scimba_torch.domain.meshless_domain.domain_nd¶
nD domains.
Classes
|
n-dimensional ball domain. |
|
Cartesian product of multiple domains. |
|
Hypercube n-dimensional domain. |
- class HypercubeND(bounds, is_main_domain=False)[source]¶
Bases:
VolumetricDomainHypercube n-dimensional domain.
- Parameters:
bounds (
list[tuple[float,float]] |Tensor) – A list of tuples representing the bounds of the cube in each dimension.is_main_domain (
bool) – A flag to indicate if the domain can have subdomains and holes.
- class BallND(center, radius, is_main_domain=False)[source]¶
Bases:
VolumetricDomainn-dimensional ball domain.
- Parameters:
center (
tuple[float] |Tensor) – A list of tuples representing the center of the ball in each dimension.radius (
float) – The radius of the ball.is_main_domain (
bool) – A flag to indicate if the domain can have subdomains and holes.
- class CartesianProduct(domains, is_main_domain=False)[source]¶
Bases:
VolumetricDomainCartesian product of multiple domains.
- Parameters:
domains (
list[VolumetricDomain]) – list of domains to be combinedis_main_domain (
bool) – Whether the domain is the main domain or not
- Raises:
ValueError – If any of the domains have non-invertible mappings
- is_inside(x)[source]¶
Test if N points x are inside the domain (before mapping if any).
- Parameters:
x (
Tensor) – Tensor of shape (N, dim) representing the points to test.- Return type:
Tensor- Returns:
Boolean tensor of shape (N,) indicating if the points are inside the domain.