mindelec.geometry.TimeDomain

class mindelec.geometry.TimeDomain(name, start=0.0, end=1.0, dtype=np.float32, sampling_config=None)[source]

Definition of Time Domain.

Parameters
  • name (str) – name of the time domain.

  • start (Union[int, float]) – start of the time domain. Default: 0.0.

  • end (Union[int, float]) – end of the time domain. Default: 1.0.

  • dtype (numpy.dtype) – Data type of sampled point data type. Default: numpy.float32.

  • sampling_config (SamplingConfig) – sampling configuration. Default: None

Supported Platforms:

Ascend

Examples

>>> from easydict import EasyDict as edict
>>> from mindelec.geometry import create_config_from_edict, TimeDomain
>>> time_config = edict({
...     'domain': edict({
...         'random_sampling': True,
...         'size': 100,
...         'sampler': 'lhs'
...     })
... })
>>> time_domain = TimeDomain("time", 0.0, 1.0, sampling_config=create_config_from_edict(time_config))
>>> domain = time_domain.sampling(geom_type="domain")
>>> print(domain.shape)
(100, 1)