scimba_torch.domain.meshless_domain.domain_2d¶
Basic Volumetric and Surfacic domains in 2D.
Classes
|
ArcCircle2D domain. |
|
Circle2D domain. |
|
Disk2D domain. |
|
Polygon2D domain. |
|
Segment2D domain. |
|
Square2D domain. |
- class Segment2D(pt1, pt2)[source]¶
Bases:
SurfacicDomainSegment2D domain.
- Parameters:
pt1 (
tuple[float,float] |Tensor) – First point of the segment.pt2 (
tuple[float,float] |Tensor) – Second point of the segment.
- class Circle2D(center, radius)[source]¶
Bases:
SurfacicDomainCircle2D domain.
- Parameters:
center (
tuple[float,float] |Tensor) – Center of the circle.radius (
float) – Radius of the circle.
- class ArcCircle2D(center, radius, theta1, theta2)[source]¶
Bases:
SurfacicDomainArcCircle2D domain.
- Parameters:
center (
tuple[float,float] |Tensor) – Center of the circle.radius (
float) – Radius of the circle.theta1 (
float) – Start angle of the arc in radians.theta2 (
float) – End angle of the arc in radians.
- class Square2D(bounds, is_main_domain=False)[source]¶
Bases:
VolumetricDomainSquare2D domain.
- Parameters:
bounds (
list[tuple[float,float]]) – Bounds of the square in the form [(min_x, max_x), (min_y, max_y)].is_main_domain (
bool) – Whether this domain is the main domain.
- Raises:
ValueError – If bounds is not of shape (2, 2).
- class Polygon2D(vertices, threshold=0.01, is_main_domain=False)[source]¶
Bases:
VolumetricDomainPolygon2D domain.
The vertices must be given in counter-clockwise order.
- Parameters:
vertices (
list[tuple[float,float]]) – Vertices of the polygon.threshold (
float) – Threshold for the polygonal approximation.is_main_domain (
bool) – Whether this domain is the main domain.
- full_bc_domain()[source]¶
Return the full boundary domain of the Polygon2D.
- Return type:
list[SurfacicDomain]- Returns:
A list containing the boundary Segment2D domains.
- class Disk2D(center, radius, is_main_domain=False)[source]¶
Bases:
VolumetricDomainDisk2D domain.
- Parameters:
center (
Tensor) – Center of the disk.radius (
float) – Radius of the disk.is_main_domain (
bool) – Whether this domain is the main domain.
- full_bc_domain()[source]¶
Return the full boundary domain of the Disk2D.
- Return type:
list[SurfacicDomain]- Returns:
A list containing the boundary Circle2D domain.