Geometry
This module contains geometry related functions that can be used for seeding nodes and integration points, impose boundary conditions and to select nodes and elements. The main functionality relies on distance functions. For the construction of user-specific distance functions, there are the Rvachev operations, but there are also some pre-made signed distance functions and positive smooth distance functions. The distance functions are suitable, for example, for verifying whether nodes lie within certain regions or on specified surfaces. Additionally, the smooth distance functions can be used for constructing solution structures.
Rvachev function operations
|
Computes the logical NOT XOR operation by combining two positively evaluated smooth distance functions. |
|
Computes the logical AND operation using smooth distance functions. |
|
Computes the logical OR operation using smooth distance functions. |
|
Trimming operations. |
Absolute value using the formula jnp.sqrt(o**2). |
|
Set negative regions to zero by manipulating values using the formula (o + jnp.sqrt(o**2)) / 2. |
|
|
Normalizes an unnormalized distance function o with its gradient grad. |
|
Returns a smooth vector field that equals the surface normals where the normalized smooth distance function sdf equals 0 |
Signed distance functions
|
Normalized signed smooth distance function of an infinite line going through x_p1 and x_p2. |
|
Normalized signed distance function to n-dimensional sphere, positive in the interior. |
|
Normalized signed smooth distance function, positive between points (1D), lines (2D), and n-dimensional planes (nD). |
|
Normalized signed smooth distance function to a plane defined by one point and a normal vector, positive in the direction of the normal vector. |
|
Normalized signed smooth distance function, positive within an infinite cylinder in 3D. |
|
Normalized signed smooth distance function, positive within a cylinder in 3D. |
|
Normalized signed smooth distance function of a cylinder that is extruded in time (fourth dimension). |
|
Normalized signed smooth distance function to a triangle (2D) or infinite triprism (3D), positive in the interior. |
|
Normalized signed smooth distance function to a convex polygon (2D), positive in the interior. |
|
Normalized signed smooth distance function to a triangle (2D) or infinite triprism (3D), positive in the interior. |
|
Normalized signed smooth distance function to a parallelogram, positive in the interior. |
|
Normalized signed smooth distance function to a cuboid, positive in the interior. |
Positive smooth distance functions
|
Positive normalized smooth distance function of an infinite line going through x_p1 and x_p2. |
|
Positive normalized smooth distance function of a line segment going from x_p1 to x_p2. |
|
Interior positive normalized smooth distance function of an n-dimensional sphere. |
|
Exterior positive normalized smooth distance function of an n-dimensional sphere. |
|
Positive normalized smooth distance function to an infinite cylinder in 3D. |
|
Positive normalized smooth distance function to a cylinder in 3D. |
|
Positive normalized smooth distance function of a cylinder that is extruded in time. |
|
Interior positive normalized smooth distance function of a triangle in 2D and a tri-prism in 3D. |
|
Interior positive normalized smooth distance function of a triangle in 2D and a tri-prism in 3D. |
|
Positive normalized smooth distance function to a parallelogram, positive in the interior. |
|
First order normalized positive smooth distance function of a circular arc in 2D. |
|
Positive normalized smooth distance function for a polygon in 2D. |
Helper functions
|
Mean of two points in n-dimensions: |
|
Normalized vector showing from x_p1 to x_p2. |
|
Projects vector x in the direction of vector normal. |
|
Projects x_p1 on the line going through x_p2 and x_p3. |
Transfinite interpolation
|
Transfinite interpolation using positive smooth distance functions (PSDFs) and boundary conditions. |
|
Unification of multiple positive smooth distance functions (PSDFs). |