OpenLB 1.7
Loading...
Searching...
No Matches
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
olb::IndicComb3D< S, F > Class Template Referenceabstract

IndicComb3D //////////////////////////////// arithmetic helper class for Indicator 3d functors. More...

#include <indicComb3D.h>

+ Inheritance diagram for olb::IndicComb3D< S, F >:
+ Collaboration diagram for olb::IndicComb3D< S, F >:

Public Member Functions

virtual S signedDistance (const Vector< S, 3 > &input)=0
 Returns signed distance to the nearest point on the indicator surface.
 
bool operator() (bool output[], const S input[3])
 
- 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 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
 read only access to member variable _m
 
int getTargetDim () const
 read only access to member variable _n
 
std::string & getName ()
 read and write access to name
 
std::string const & getName () const
 read only access to name
 
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)
 

Protected Member Functions

 IndicComb3D (std::shared_ptr< IndicatorF3D< S > > f, std::shared_ptr< IndicatorF3D< S > > g)
 
- 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

std::shared_ptr< IndicatorF3D< S > > _f
 
std::shared_ptr< IndicatorF3D< S > > _g
 
- Protected Attributes inherited from olb::IndicatorF3D< S >
Vector< S, 3 > _myMin
 
Vector< S, 3 > _myMax
 

Additional Inherited Members

- 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)
 

Detailed Description

template<typename S, template< typename U > class F>
class olb::IndicComb3D< S, F >

IndicComb3D //////////////////////////////// arithmetic helper class for Indicator 3d functors.

Definition at line 43 of file indicComb3D.h.

Constructor & Destructor Documentation

◆ IndicComb3D()

template<typename S , template< typename U > class F>
olb::IndicComb3D< S, F >::IndicComb3D ( std::shared_ptr< IndicatorF3D< S > > f,
std::shared_ptr< IndicatorF3D< S > > g )
protected

Definition at line 33 of file indicComb3D.hh.

34 : _f(f), _g(g)
35{ }
std::shared_ptr< IndicatorF3D< S > > _f
Definition indicComb3D.h:46
std::shared_ptr< IndicatorF3D< S > > _g
Definition indicComb3D.h:47

Member Function Documentation

◆ operator()()

template<typename S , template< typename U > class F>
bool olb::IndicComb3D< S, F >::operator() ( bool output[],
const S input[3] )

Definition at line 38 of file indicComb3D.hh.

39{
40 // componentwise operation on equidimensional functors
41 bool* outputF = output;
42 _f->operator()(outputF, input);
43
44 bool outputG[this->getTargetDim()];
45 _g->operator()(outputG, input);
46
47 for (int i = 0; i < this->getTargetDim(); i++) {
48 output[i] = F<S>()(outputF[i], outputG[i]);
49 }
50 return output;
51}
int getTargetDim() const
read only access to member variable _n
Definition genericF.hh:45

◆ signedDistance()

template<typename S , template< typename U > class F>
virtual S olb::IndicComb3D< S, F >::signedDistance ( const Vector< S, 3 > & input)
pure virtual

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

Reimplemented from olb::IndicatorF3D< S >.

Implemented in olb::IndicPlus3D< S >, olb::IndicMinus3D< S >, and olb::IndicMultiplication3D< S >.

Member Data Documentation

◆ _f

template<typename S , template< typename U > class F>
std::shared_ptr<IndicatorF3D<S> > olb::IndicComb3D< S, F >::_f
protected

Definition at line 46 of file indicComb3D.h.

◆ _g

template<typename S , template< typename U > class F>
std::shared_ptr<IndicatorF3D<S> > olb::IndicComb3D< S, F >::_g
protected

Definition at line 47 of file indicComb3D.h.


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