OpenLB 1.7
Loading...
Searching...
No Matches
Namespaces | Macros | Functions
sdf.h File Reference
#include "core/vector.h"
#include <algorithm>
#include <functional>
+ Include dependency graph for sdf.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

namespace  olb
 Top level namespace for all of OpenLB.
 
namespace  olb::sdf
 

Macros

#define M_PI   3.14159265358979323846
 
#define M_PI2   1.57079632679489661923
 

Functions

template<typename T >
olb::sdf::mix (T a, T b, T h) any_platform
 
template<typename T0 , typename T1 , typename T2 >
decltype(T0 {} *T1 {} *T2 {}) olb::sdf::clamp (T0 x, T1 a, T2 b) any_platform
 
template<typename T >
Vector< bool, 3 > olb::sdf::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>
olb::sdf::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 >
olb::sdf::box (Vector< T, 2 > p, Vector< T, 2 > b) any_platform
 Exact signed distance to the surface of two-dimensional cuboid.
 
template<typename T >
olb::sdf::box (Vector< T, 3 > p, Vector< T, 3 > b) any_platform
 Exact signed distance to the surface of three-dimensional cuboid.
 
template<typename T >
olb::sdf::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 >
olb::sdf::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 >
olb::sdf::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 >
olb::sdf::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 >
olb::sdf::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 >
olb::sdf::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 >
olb::sdf::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 >
olb::sdf::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 > olb::sdf::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 > olb::sdf::flip (Vector< T, 3 > p) any_platform
 
template<typename T >
olb::sdf::subtraction (T a, T b) any_platform
 Volume of a is subtracted from b.
 
template<typename T >
olb::sdf::unify (T a, T b) any_platform
 Volume of a and volume of b are combined as a new object.
 
template<typename T >
olb::sdf::intersection (T a, T b) any_platform
 Volume which is shared by a and b creates a new object.
 
template<typename T >
olb::sdf::smooth_union (T a, T b, T k) any_platform
 
template<typename T >
olb::sdf::smooth_subtraction (T a, T b, T k) any_platform
 
template<typename T >
olb::sdf::smooth_intersection (T a, T b, T k) any_platform
 
template<typename T >
olb::sdf::rounding (T a, T r) any_platform
 Computes a layer of a constant thickness around the surface.
 
template<typename T , bool symmetryCheck = true>
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))) 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>
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))) any_platform
 Function to scale a geometry The object has to be placed in the origin of the coodinate system.
 
template<typename T >
olb::sdf::signedDistanceToPorosity (T signedDist, T eps) any_platform
 Converts signed distance to values for the smooth epsilon boundary.
 
template<typename T >
bool olb::sdf::evalSolidVolumeFraction (T output[], T signedDist, T eps) any_platform
 

Macro Definition Documentation

◆ M_PI

#define M_PI   3.14159265358979323846

Definition at line 33 of file sdf.h.

◆ M_PI2

#define M_PI2   1.57079632679489661923

Definition at line 36 of file sdf.h.