scimba_torch.domain.sdf¶
Defines the signed distance function.
Classes
|
Describe the approximate signed Distance function as described in [Sukumar2022]. |
|
Describe the signed Distance function. |
- class SignedDistance(dim, threshold=0.0)[source]¶
Bases:
ABCDescribe the signed Distance function.
Approximative or exact Signed distance function.
- Parameters:
dim (
int) – dimension of the domainthreshold (
float) – threshold to determinate how we sample inside the domain. We use signedDistance(x) < threshold
- class PolygonalApproxSignedDistance(dim, points, threshold=0.01)[source]¶
Bases:
SignedDistanceDescribe the approximate signed Distance function as described in [Sukumar2022].
- Parameters:
dim (
int) – dimension of the domainpoints (
Union[List[Tuple[float,float]],Tensor]) – coordinates of the vertices of the polygonthreshold (
float) – threshold to determinate how we sample inside the domain. We use signedDistance(x) < threshold
- vectorial_product(x, y)[source]¶
Returns the vectorial product between two batched vectors.
- Parameters:
x (
Tensor) – left tensory (
Tensor) – right tensor
- Return type:
Tensor- Returns:
the vectorial product between x and y
- dot_product(x, y)[source]¶
Returns the scalar product between two batched vectors.
- Parameters:
x (
Tensor) – left tensory (
Tensor) – right tensor
- Return type:
Tensor- Returns:
the dot product between x and y
- vect_x_to_xi(x, i)[source]¶
Returns the batched vector x-xi with xi vertices of the polygonal.
- Parameters:
x (
Tensor) – left tensori (
int) – the number of the polygonal point
- Returns:
the batched vector x-xi