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

Intersection. More...

`#include <indicCalc2D.h>`

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

## Public Member Functions

IndicMultiplication2D (std::shared_ptr< IndicatorF2D< S > > f, std::shared_ptr< IndicatorF2D< S > > g)

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

Public Member Functions inherited from olb::IndicCalc2D< S, util::multiplies >
bool operator() (bool output[], const S input[3])

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

virtual Vector< S, 2 > & getMax ()

virtual bool distance (S &distance, const Vector< S, 2 > &origin, S precision, const Vector< S, 2 > &direction)
returns false or true and pos. distance if there was one found for an given origin and direction

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

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

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

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

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

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

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

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

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

virtual bool operator() (const S input[])

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

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

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::IndicCalc2D< S, util::multiplies >
IndicCalc2D (std::shared_ptr< IndicatorF2D< S > > f, std::shared_ptr< IndicatorF2D< S > > g)

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

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

Protected Attributes inherited from olb::IndicCalc2D< S, util::multiplies >
std::shared_ptr< IndicatorF2D< S > > _f

std::shared_ptr< IndicatorF2D< S > > _g

Protected Attributes inherited from olb::IndicatorF2D< S >
Vector< S, 2 > _myMin

Vector< S, 2 > _myMax

## Detailed Description

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

Intersection.

Definition at line 110 of file indicCalc2D.h.

## ◆ IndicMultiplication2D()

template<typename S >
 olb::IndicMultiplication2D< S >::IndicMultiplication2D ( std::shared_ptr< IndicatorF2D< S > > f, std::shared_ptr< IndicatorF2D< S > > g )

Definition at line 182 of file indicCalc2D.hh.

183 : IndicCalc2D<S,util::multiplies>(f, g)
184{
185 for ( int i=0; i<2; i++) {
186 this->_myMin[i] = util::max(this->_f->getMin()[i], this->_g->getMin()[i]);
187 this->_myMax[i] = util::min(this->_f->getMax()[i], this->_g->getMax()[i]);
188 }
189}
std::shared_ptr< IndicatorF2D< S > > _f
Definition indicCalc2D.h:85
Vector< S, 2 > _myMin
Vector< S, 2 > _myMax
cpu::simd::Pack< T > min(cpu::simd::Pack< T > rhs, cpu::simd::Pack< T > lhs)
Definition pack.h:124
cpu::simd::Pack< T > max(cpu::simd::Pack< T > rhs, cpu::simd::Pack< T > lhs)
Definition pack.h:130
Here is the call graph for this function:

## ◆ signedDistance()

template<typename S >
 S olb::IndicMultiplication2D< S >::signedDistance ( const Vector< S, 2 > & input )
overridevirtual

Returns signed distance to the nearest point on the indicator surface.

Implements olb::IndicCalc2D< S, util::multiplies >.

Definition at line 192 of file indicCalc2D.hh.

193{
194 return sdf::intersection(this->_f->signedDistance(input), this->_g->signedDistance(input));
195}
T intersection(T a, T b) any_platform
Volume which is shared by a and b creates a new object.
Definition sdf.h:341

References olb::sdf::intersection().

Here is the call graph for this function:

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