mindelec.geometry.SamplingConfig
- class mindelec.geometry.SamplingConfig(part_sampling_dict)[source]
Definition of global sampling configuration.
- Parameters
part_sampling_dict (dict) –
sampling configuration. The configurable keys are
"domain"
,"BC"
,"IC"
or"time"
.'domain'
, feasible domain of the problem.'BC'
, boundary of the problem.'IC'
, initial condition of the problem.'time'
, time domain of the problem.
- Raises
ValueError – If coord_min or coord_max is neither int nor float .
TypeError – If part_sampling_dict is not dict.
KeyError – If geom_type not
"domain"
,"BC"
,"IC"
or"time"
.TypeError – If 'config' is not PartSamplingConfig object.
ValueError – If self.domain.size is neither list nor tuple.
ValueError – If self.ic.size is neither list nor tuple.
ValueError – If self.time.size is neither list nor tuple.
- Supported Platforms:
Ascend
Examples
>>> from mindelec.geometry import SamplingConfig, PartSamplingConfig >>> part_sampling_config_dict = {"domain" : PartSamplingConfig([100, 100], False, True), ... "BC" : PartSamplingConfig(100, True, "uniform", True, True)} >>> sampling_config = SamplingConfig(part_sampling_config_dict)