mindflow.geometry.SamplingConfig
- class mindflow.geometry.SamplingConfig(part_sampling_dict)[source]
Definition of global sampling configuration.
- Parameters
part_sampling_dict (dict) – sampling configuration.
- Raises
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 domain.size in part_sampling_dict is neither list nor tuple.
ValueError – If ic.size in part_sampling_dict is neither list nor tuple.
ValueError – If time.size in part_sampling_dict is neither list nor tuple.
- Supported Platforms:
Ascend
GPU
Examples
>>> from mindflow.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)