mindflow.geometry.PartSamplingConfig

class mindflow.geometry.PartSamplingConfig(size, random_sampling=True, sampler='uniform', random_merge=True, with_normal=False, with_sdf=False)[source]

Definition of partial sampling configuration.

Parameters
  • size (Union[int, tuple[int], list[int]]) – number of sampling points.

  • random_sampling (bool) – Whether randomly sampling points. Default: True.

  • sampler (str) – method for random sampling. Default: "uniform".

  • random_merge (bool) – Specifies whether randomly merge coordinates of different dimensions. Default: True.

  • with_normal (bool) – Specifies whether generating the normal vectors of the boundary. Default: False.

  • with_sdf (bool) – Specifies whether return the sign-distance-function result of the inner domain points. Default: False.

Raises

TypeErrorsize is not int number when random sampling.

Supported Platforms:

Ascend GPU

Examples

>>> from mindflow.geometry import PartSamplingConfig
>>> partsampling = PartSamplingConfig(100, True, "uniform", True, True)