![]() |
OpenLB 1.8.1
|
Functions | |
| template<typename T > | |
| T | mix (T a, T b, T h) any_platform |
| template<typename T0 , typename T1 , typename T2 > | |
| decltype(T0 {} *T1 {} *T2 {}) | clamp (T0 x, T1 a, T2 b) any_platform |
| template<typename T > | |
| Vector< bool, 3 > | isSymmetric (std::function< T(const Vector< T, 3 > &)> sdf, Vector< T, 3 > center) any_platform |
| A rough test for symmetry. | |
| template<typename T , unsigned D> | |
| T | sphere (Vector< T, D > p, T r) any_platform |
| Exact signed distance to the surface of circle (in 2D) or sphere (in 3D). | |
| template<typename T > | |
| T | box (Vector< T, 2 > p, Vector< T, 2 > b) any_platform |
| Exact signed distance to the surface of two-dimensional cuboid. | |
| template<typename T > | |
| T | box (Vector< T, 3 > p, Vector< T, 3 > b) any_platform |
| Exact signed distance to the surface of three-dimensional cuboid. | |
| template<typename T , unsigned D> | |
| T | line (Vector< T, D > p, Vector< T, D > a, Vector< T, D > b, T r) any_platform |
| template<typename T > | |
| T | triangle (Vector< T, 2 > p, Vector< T, 2 > a, Vector< T, 2 > b, Vector< T, 2 > c) any_platform |
| Exact signed distance to the surface of two-dimensional triangle. | |
| template<typename T > | |
| T | triangle (Vector< T, 3 > p, Vector< T, 3 > a, Vector< T, 3 > b, Vector< T, 3 > c) any_platform |
| Exact signed distance to the surface of three-dimensional triangle. | |
| template<typename T > | |
| T | cylinder (Vector< T, 3 > p, Vector< T, 3 > a, Vector< T, 3 > ba, T baba, T r) any_platform |
| Exact signed distance to the surface of three-dimensional cylinder. | |
| template<typename T > | |
| T | cylinder (Vector< T, 3 > p, Vector< T, 3 > a, Vector< T, 3 > b, T r) any_platform |
| Calculate signed distance to the surface of three-dimensional cylinder defined by the centers of the two extremities and the radius. | |
| template<typename T > | |
| T | cone (Vector< T, 3 > p, Vector< T, 3 > a, Vector< T, 3 > ba, T baba, T ra, T rb) any_platform |
| Exact signed distance to the surface of three-dimensional (capped) cone. | |
| template<typename T > | |
| T | cone (Vector< T, 3 > p, Vector< T, 3 > a, Vector< T, 3 > b, T ra, T rb) any_platform |
| Calculate signed distance to the surface of three-dimensional capped cone defined by the centers of the two extremities and the corresponding radius. | |
| template<typename T > | |
| T | ellipsoid (Vector< T, 3 > p, Vector< T, 3 > r) any_platform |
| Calculate the NOT EXACT (!) signed distance to the surface of three-dimensional ellipsoid. | |
| template<typename T > | |
| T | torus (Vector< T, 3 > p, Vector< T, 2 > t) any_platform |
| Exact signed distance to the surface of a torus placed in the XZ-plane of the coordinate system. | |
| template<typename T > | |
| T | solidAngle (Vector< T, 3 > p, Vector< T, 2 > c, T r) any_platform |
| Exact signed distance to the surface of a solid angle which represents a combination of a cone (axis y=0 to y=r) and a sphere. | |
| template<typename T , unsigned D> | |
| Vector< T, D > | translate (Vector< T, D > p, Vector< T, D > origin) any_platform |
| Translation: The output of this function is used for the calculation of the signed distance to translated/shifted objects. | |
| template<typename T > | |
| Vector< T, 3 > | flip (Vector< T, 3 > p) any_platform |
| template<typename T > | |
| T | subtraction (T a, T b) any_platform |
| Volume of a is subtracted from b. | |
| template<typename T > | |
| T | unify (T a, T b) any_platform |
| Volume of a and volume of b are combined as a new object. | |
| template<typename T > | |
| T | intersection (T a, T b) any_platform |
| Volume which is shared by a and b creates a new object. | |
| template<typename T > | |
| T | smooth_union (T a, T b, T k) any_platform |
| template<typename T > | |
| T | smooth_subtraction (T a, T b, T k) any_platform |
| template<typename T > | |
| T | smooth_intersection (T a, T b, T k) any_platform |
| template<typename T > | |
| T | rounding (T a, T r) any_platform |
| Computes a layer of a constant thickness around the surface. | |
| template<typename T , bool symmetryCheck = true> | |
| T | elongation (std::function< T(const Vector< T, 3 > &)> sdf, const Vector< T, 3 > &p, const Vector< T, 3 > &h, const Vector< T, 3 > ¢er=(T(0))) any_platform |
| Elongation splits the object in 2 (4 or 8) parts, moves them apart and connects them again The object has to be placed in the origin of the coodinate system. | |
| template<typename T , unsigned D> | |
| T | scale (std::function< T(const Vector< T, D > &)> sdf, const Vector< T, D > &p, T s, const Vector< T, D > ¢er=(T(0))) any_platform |
| Function to scale a geometry The object has to be placed in the origin of the coodinate system. | |
| template<typename T > | |
| T | signedDistanceToPorosity (T signedDist, T eps) any_platform |
| Converts signed distance to values for the smooth epsilon boundary. | |
| template<typename T > | |
| bool | evalSolidVolumeFraction (T output[], T signedDist, T eps) any_platform |
Exact signed distance to the surface of two-dimensional cuboid.
| p | point for which the distance to the surface is calculated |
| b | vector containing half side lengths to describe the cuboid |
Definition at line 115 of file sdf.h.
References olb::abs(), olb::util::max(), olb::maxv(), olb::util::min(), and olb::norm().
Here is the call graph for this function:
Here is the caller graph for this function:Exact signed distance to the surface of three-dimensional cuboid.
| p | point for which the distance to the surface is calculated |
| b | vector containing half side lengths to describe the cuboid |
Definition at line 128 of file sdf.h.
References olb::abs(), olb::util::max(), olb::maxv(), olb::util::min(), and olb::norm().
Here is the call graph for this function:| decltype(T0 {} *T1 {} *T2 {}) olb::sdf::clamp | ( | T0 | x, |
| T1 | a, | ||
| T2 | b ) |
Definition at line 50 of file sdf.h.
Here is the caller graph for this function:| T olb::sdf::cone | ( | Vector< T, 3 > | p, |
| Vector< T, 3 > | a, | ||
| Vector< T, 3 > | b, | ||
| T | ra, | ||
| T | rb ) |
Calculate signed distance to the surface of three-dimensional capped cone defined by the centers of the two extremities and the corresponding radius.
For the calculation of a cone, the second radius is set to zero
| p | point for which the distance to the surface is calculated |
| a | vector containing center of the first circular end of the capped cone |
| b | vector containing center of the second circular end of the capped cone or the apex of the cone |
| ra | radius of the first circular end of the capped cone |
| rb | radius of the second circular end of the capped cone |
Definition at line 281 of file sdf.h.
References cone().
Here is the call graph for this function:| T olb::sdf::cone | ( | Vector< T, 3 > | p, |
| Vector< T, 3 > | a, | ||
| Vector< T, 3 > | ba, | ||
| T | baba, | ||
| T | ra, | ||
| T | rb ) |
Exact signed distance to the surface of three-dimensional (capped) cone.
| p | point for which the distance to the surface is calculated |
| a | vector containing center of the first circular end of the (capped) cone |
| ba | vector representing the axis of the (capped) cone |
| baba | length of the cone height squared |
Definition at line 250 of file sdf.h.
References olb::util::abs(), clamp(), olb::util::max(), olb::util::min(), and olb::util::sqrt().
Here is the call graph for this function:
Here is the caller graph for this function:| T olb::sdf::cylinder | ( | Vector< T, 3 > | p, |
| Vector< T, 3 > | a, | ||
| Vector< T, 3 > | b, | ||
| T | r ) |
Calculate signed distance to the surface of three-dimensional cylinder defined by the centers of the two extremities and the radius.
| p | point for which the distance to the surface is calculated |
| a | vector containing center of the first circular end of the cylinder |
| b | vector containing center of the second circular end of the cylinder |
| r | radius of the cylinder |
Definition at line 235 of file sdf.h.
References cylinder().
Here is the call graph for this function:| T olb::sdf::cylinder | ( | Vector< T, 3 > | p, |
| Vector< T, 3 > | a, | ||
| Vector< T, 3 > | ba, | ||
| T | baba, | ||
| T | r ) |
Exact signed distance to the surface of three-dimensional cylinder.
| p | point for which the distance to the surface is calculated |
| a | vector containing center of the first circular end of the cylinder |
| ba | vector representing the axis of the cylinder |
| baba | length of the cylinder height squared |
| r | radius of cylinder |
Definition at line 213 of file sdf.h.
References olb::util::abs(), olb::util::max(), olb::util::min(), olb::norm(), olb::util::sign(), and olb::util::sqrt().
Here is the call graph for this function:
Here is the caller graph for this function:Calculate the NOT EXACT (!) signed distance to the surface of three-dimensional ellipsoid.
| p | point for which the distance to the surface is calculated |
| r | vector containing half the length of the principal axes |
Definition at line 293 of file sdf.h.
References olb::util::min(), and olb::norm().
Here is the call graph for this function:
Here is the caller graph for this function:| T olb::sdf::elongation | ( | std::function< T(const Vector< T, 3 > &)> | sdf, |
| const Vector< T, 3 > & | p, | ||
| const Vector< T, 3 > & | h, | ||
| const Vector< T, 3 > & | center = (T(0)) ) |
Elongation splits the object in 2 (4 or 8) parts, moves them apart and connects them again The object has to be placed in the origin of the coodinate system.
Symmetry is required so that the splitted parts are symmetric (check can be disabled)
| sdf | signed Distance Function of the object which is altered |
| p | point for which the distance to the surface is calculated |
| h | vector containing the information how far the splitted parts are moved apart |
| center | vector containing the center, to shift the object to the origin of the coordinate system for the calculation of the elongation |
Definition at line 426 of file sdf.h.
References olb::abs(), isSymmetric(), olb::util::max(), and olb::util::min().
Here is the call graph for this function:
Here is the caller graph for this function:| bool olb::sdf::evalSolidVolumeFraction | ( | T | output[], |
| T | signedDist, | ||
| T | eps ) |
Definition at line 493 of file sdf.h.
References signedDistanceToPorosity().
Here is the call graph for this function:
Here is the caller graph for this function:| T olb::sdf::intersection | ( | T | a, |
| T | b ) |
Volume which is shared by a and b creates a new object.
The returned distance is not exact if the signed Distance of both objects points to the part of the surface which is removed for creating the combined object
| a | signed Distance of the first object |
| b | signed Distance of the second object |
Definition at line 381 of file sdf.h.
References olb::util::max().
Here is the call graph for this function:
Here is the caller graph for this function:| Vector< bool, 3 > olb::sdf::isSymmetric | ( | std::function< T(const Vector< T, 3 > &)> | sdf, |
| Vector< T, 3 > | center ) |
A rough test for symmetry.
Definition at line 65 of file sdf.h.
References isSymmetric().
Here is the call graph for this function:
Here is the caller graph for this function:| T olb::sdf::line | ( | Vector< T, D > | p, |
| Vector< T, D > | a, | ||
| Vector< T, D > | b, | ||
| T | r ) |
Definition at line 136 of file sdf.h.
References clamp(), and olb::norm().
Here is the call graph for this function:
Here is the caller graph for this function:| T olb::sdf::mix | ( | T | a, |
| T | b, | ||
| T | h ) |
| T olb::sdf::rounding | ( | T | a, |
| T | r ) |
| T olb::sdf::scale | ( | std::function< T(const Vector< T, D > &)> | sdf, |
| const Vector< T, D > & | p, | ||
| T | s, | ||
| const Vector< T, D > & | center = (T(0)) ) |
Function to scale a geometry The object has to be placed in the origin of the coodinate system.
| sdf | signed Distance Function of the object which is altered |
| p | point for which the distance to the surface is calculated |
| s | scaling factor |
| center | vector containing the center, to shift the object to the origin of the coordinate system for the calculation of the elongation |
Definition at line 477 of file sdf.h.
Here is the caller graph for this function:| T olb::sdf::signedDistanceToPorosity | ( | T | signedDist, |
| T | eps ) |
Converts signed distance to values for the smooth epsilon boundary.
Definition at line 486 of file sdf.h.
References olb::util::cos(), M_PI2, and olb::util::pow().
Here is the call graph for this function:
Here is the caller graph for this function:| T olb::sdf::smooth_intersection | ( | T | a, |
| T | b, | ||
| T | k ) |
| T olb::sdf::smooth_subtraction | ( | T | a, |
| T | b, | ||
| T | k ) |
| T olb::sdf::smooth_union | ( | T | a, |
| T | b, | ||
| T | k ) |
Exact signed distance to the surface of a solid angle which represents a combination of a cone (axis y=0 to y=r) and a sphere.
| p | point for which the distance to the surface is calculated |
| c[0] | sin of the angle |
| c[1] | cos of the angle |
| r | radius of the sphere |
Definition at line 326 of file sdf.h.
References clamp(), olb::util::max(), olb::norm(), and olb::util::sign().
Here is the call graph for this function:| T olb::sdf::sphere | ( | Vector< T, D > | p, |
| T | r ) |
Exact signed distance to the surface of circle (in 2D) or sphere (in 3D).
| p | point for which the distance to the surface is calculated |
| r | radius describing the geometry |
Definition at line 104 of file sdf.h.
References olb::norm().
Here is the call graph for this function:
Here is the caller graph for this function:| T olb::sdf::subtraction | ( | T | a, |
| T | b ) |
Volume of a is subtracted from b.
The returned distance is not exact if the signed Distance of both objects points to the part of the surface which is removed for creating the combined object
| a | signed Distance of the first object |
| b | signed Distance of the second object |
Definition at line 357 of file sdf.h.
References olb::util::max().
Here is the call graph for this function:
Here is the caller graph for this function:Exact signed distance to the surface of a torus placed in the XZ-plane of the coordinate system.
| p | point for which the distance to the surface is calculated |
| t[0] | distance center of the tube to center of the torus |
| t[1] | radius of the tube |
Definition at line 311 of file sdf.h.
References olb::norm().
Here is the call graph for this function:| Vector< T, D > olb::sdf::translate | ( | Vector< T, D > | p, |
| Vector< T, D > | origin ) |
Translation: The output of this function is used for the calculation of the signed distance to translated/shifted objects.
| p | point for which the distance to the surface is calculated |
| origin | point to which the object is shifted to |
Definition at line 339 of file sdf.h.
Here is the caller graph for this function:| T olb::sdf::triangle | ( | Vector< T, 2 > | p, |
| Vector< T, 2 > | a, | ||
| Vector< T, 2 > | b, | ||
| Vector< T, 2 > | c ) |
Exact signed distance to the surface of two-dimensional triangle.
| p | point for which the distance to the surface is calculated |
| a | vector containing first vertex |
| b | vector containing second vertex |
| c | vector containing third vertex |
Definition at line 152 of file sdf.h.
References clamp(), olb::util::min(), olb::util::sign(), and olb::util::sqrt().
Here is the call graph for this function:
Here is the caller graph for this function:| T olb::sdf::triangle | ( | Vector< T, 3 > | p, |
| Vector< T, 3 > | a, | ||
| Vector< T, 3 > | b, | ||
| Vector< T, 3 > | c ) |
Exact signed distance to the surface of three-dimensional triangle.
| p | point for which the distance to the surface is calculated |
| a | vector containing first vertex |
| b | vector containing second vertex |
| c | vector containing third vertex |
Definition at line 181 of file sdf.h.
References clamp(), olb::crossProduct(), olb::util::min(), olb::util::sign(), and olb::util::sqrt().
Here is the call graph for this function:| T olb::sdf::unify | ( | T | a, |
| T | b ) |
Volume of a and volume of b are combined as a new object.
The returned distance is not exact if the signed Distance of both objects points to the part of the surface which is removed for creating the combined object
| a | signed Distance of the first object |
| b | signed Distance of the second object |
Definition at line 369 of file sdf.h.
References olb::util::min().
Here is the call graph for this function:
Here is the caller graph for this function: