mindelec.geometry.Cuboid

class mindelec.geometry.Cuboid(name, coord_min, coord_max, dtype=np.float32, sampling_config=None)[source]

Definition of Cuboid object.

Parameters
Supported Platforms:

Ascend

Examples

>>> from easydict import EasyDict as edict
>>> from mindelec.geometry import create_config_from_edict, Cuboid
>>> cuboid_mesh = edict({'domain': edict({'random_sampling': False, 'size': [50, 50, 25]}),
...                      'BC': edict({'random_sampling': False, 'size': 1000, 'with_normal': True,}),})
>>> cuboid = Cuboid("cuboid", (-3.0, 1, 0), (1, 2, 1), sampling_config=create_config_from_edict(cuboid_mesh))
>>> domain = cuboid.sampling(geom_type="domain")
>>> bc, bc_normal = cuboid.sampling(geom_type="BC")
>>> print(domain.shape)
(62500, 3)