OpenLB 1.7
Searching...
No Matches
olb::IndicatorCircle3D< S > Class Template Reference

indicator function for a 3D circle More...

`#include <indicatorF3D.h>`

Inheritance diagram for olb::IndicatorCircle3D< S >:
Collaboration diagram for olb::IndicatorCircle3D< S >:

## Public Member Functions

IndicatorCircle3D (Vector< S, 3 > center, Vector< S, 3 > normal, S radius)

IndicatorCircle3D (S center0, S center1, S center2, S normal0, S normal1, S normal2, S radius)

bool operator() (bool output[], const S input[]) override
has to be implemented for 'every' derived class

Vector< S, 3 > const & getCenter () const

Vector< S, 3 > const & getNormal () const

Public Member Functions inherited from olb::IndicatorF3D< S >
virtual Vector< S, 3 > & getMin ()

virtual Vector< S, 3 > & getMax ()

virtual bool distance (S &distance, const Vector< S, 3 > &origin, S precision, const Vector< S, 3 > &direction)

virtual bool distance (S &distance, const Vector< S, 3 > &origin, const Vector< S, 3 > &direction, S precision, S pitch)

virtual bool distance (S &distance, const Vector< S, 3 > &origin, const Vector< S, 3 > &direction, int iC=-1)

virtual bool distance (S &distance, const Vector< S, 3 > &origin)

virtual bool distance (S &distance, const S input[])

virtual bool normal (Vector< S, 3 > &normal, const Vector< S, 3 > &origin, const Vector< S, 3 > &direction, int iC=-1)
returns true and the normal if there was one found for an given origin and direction

virtual bool rotOnAxis (Vector< S, 3 > &vec_rot, const Vector< S, 3 > &vec, const Vector< S, 3 > &axis, S &theta)
Rotate vector around axis by angle theta.

virtual bool operator() (bool output[1], const S input[3])
Returns true if input is inside the indicator.

virtual S signedDistance (const Vector< S, 3 > &input)
Returns signed distance to the nearest point on the indicator surface.

virtual Vector< S, 3 > surfaceNormal (const Vector< S, 3 > &pos, const S meshSize)
Return surface normal.

Vector< S, 3 > surfaceNormal (const Vector< S, 3 > &pos, const S meshSize, std::function< Vector< S, 3 >(const Vector< S, 3 > &)> transformPos)
Return surface normal after possible translation and rotation.

bool isInsideBox (Vector< S, 3 > point)
Returns true if `point` is inside a cube with corners `_myMin` and `_myMax`

virtual Vector< S, 3 > getSample (const std::function< S()> &randomness) const

Public Member Functions inherited from olb::GenericF< bool, S >
virtual ~GenericF ()=default

int getSourceDim () const

int getTargetDim () const

std::string & getName ()

std::string const & getName () const

bool operator() (bool output[])
wrapper that call the pure virtual operator() (T output[], const S input[]) from above

bool operator() (bool output[], S input0)

bool operator() (bool output[], S input0, S input1)

bool operator() (bool output[], S input0, S input1, S input2)

bool operator() (bool output[], S input0, S input1, S input2, S input3)

Public Types inherited from olb::GenericF< bool, S >
using targetType

using sourceType

Public Attributes inherited from olb::GenericF< bool, S >
std::shared_ptr< GenericF< bool, S > > _ptrCalcC
memory management, frees resouces (calcClass)

Protected Member Functions inherited from olb::IndicatorF3D< S >
IndicatorF3D ()

Protected Member Functions inherited from olb::GenericF< bool, S >
GenericF (int targetDim, int sourceDim)

Protected Attributes inherited from olb::IndicatorF3D< S >
Vector< S, 3 > _myMin

Vector< S, 3 > _myMax

## Detailed Description

template<typename S>
class olb::IndicatorCircle3D< S >

indicator function for a 3D circle

Definition at line 77 of file indicatorF3D.h.

## ◆ IndicatorCircle3D() [1/2]

template<typename S >
 olb::IndicatorCircle3D< S >::IndicatorCircle3D ( Vector< S, 3 > center, Vector< S, 3 > normal, S radius )

Definition at line 87 of file indicatorF3D.hh.

90{
91 _normal = normalize(_normal);
92 this->_myMin = _center - radius;
93 this->_myMax = _center + radius;
94}
Vector< S, 3 > _myMin
virtual bool normal(Vector< S, 3 > &normal, const Vector< S, 3 > &origin, const Vector< S, 3 > &direction, int iC=-1)
returns true and the normal if there was one found for an given origin and direction
Vector< S, 3 > _myMax
constexpr Vector< T, D > normalize(const ScalarVector< T, D, IMPL > &a, T scale=T{1})
Definition vector.h:245
Here is the call graph for this function:

## ◆ IndicatorCircle3D() [2/2]

template<typename S >
 olb::IndicatorCircle3D< S >::IndicatorCircle3D ( S center0, S center1, S center2, S normal0, S normal1, S normal2, S radius )

Definition at line 97 of file indicatorF3D.hh.

99 : IndicatorCircle3D(Vector<S,3>{center0, center1, center2},
101{ }
IndicatorCircle3D(Vector< S, 3 > center, Vector< S, 3 > normal, S radius)

## ◆ getCenter()

template<typename S >
 Vector< S, 3 > const & olb::IndicatorCircle3D< S >::getCenter ( ) const

Definition at line 111 of file indicatorF3D.hh.

112{
113 return _center;
114}
Here is the caller graph for this function:

## ◆ getNormal()

template<typename S >
 Vector< S, 3 > const & olb::IndicatorCircle3D< S >::getNormal ( ) const

Definition at line 117 of file indicatorF3D.hh.

118{
119 return _normal;
120}
Here is the caller graph for this function:

template<typename S >
 S olb::IndicatorCircle3D< S >::getRadius ( ) const

Definition at line 123 of file indicatorF3D.hh.

124{
126}
cpu::simd::Pack< T > sqrt(cpu::simd::Pack< T > value)
Definition pack.h:100

References olb::util::sqrt().

Here is the call graph for this function:
Here is the caller graph for this function:

## ◆ operator()()

template<typename S >
 bool olb::IndicatorCircle3D< S >::operator() ( bool output[], const S input[] )
overridevirtual

has to be implemented for 'every' derived class

Implements olb::GenericF< bool, S >.

Definition at line 105 of file indicatorF3D.hh.

106{
107 return _cylinder(output,input);
108}

The documentation for this class was generated from the following files: