OpenLB 1.7
Loading...
Searching...
No Matches
Public Member Functions | List of all members
olb::IndicatorInternal3D< S > Class Template Reference

indicator function for the internal part of an input indicator More...

#include <indicatorF3D.h>

+ Inheritance diagram for olb::IndicatorInternal3D< S >:
+ Collaboration diagram for olb::IndicatorInternal3D< S >:

Public Member Functions

 IndicatorInternal3D (IndicatorF3D< S > &indicatorF, S layerSize)
 
bool operator() (bool output[], const S input[]) override
 has to be implemented for 'every' derived class
 
- 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
 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
 
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)
 

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)
 
- 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::IndicatorInternal3D< S >

indicator function for the internal part of an input indicator

Definition at line 128 of file indicatorF3D.h.

Constructor & Destructor Documentation

◆ IndicatorInternal3D()

template<typename S >
olb::IndicatorInternal3D< S >::IndicatorInternal3D ( IndicatorF3D< S > & indicatorF,
S layerSize )

Definition at line 261 of file indicatorF3D.hh.

262 : _indicatorF(indicatorF), _layerSize(layerSize)
263{
264 this->_myMin = indicatorF.getMin() + layerSize;
265 this->_myMax = indicatorF.getMax() - layerSize;
266}
Vector< S, 3 > _myMin
Vector< S, 3 > _myMax

References olb::IndicatorF3D< S >::_myMax, olb::IndicatorF3D< S >::_myMin, olb::IndicatorF3D< S >::getMax(), and olb::IndicatorF3D< S >::getMin().

+ Here is the call graph for this function:

Member Function Documentation

◆ operator()()

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

has to be implemented for 'every' derived class

Implements olb::GenericF< bool, S >.

Definition at line 270 of file indicatorF3D.hh.

271{
272 output[0] = false;
273 _indicatorF(output,input);
274 if (!output[0]) {
275 return true;
276 }
277
278 S r[3];
279 for (int iX =- 1; iX < 2; ++iX) {
280 for (int iY =- 1; iY < 2; ++iY) {
281 for (int iZ =- 1; iZ < 2; ++iZ) {
282 r[0] = input[0] + iX*_layerSize;
283 r[1] = input[1] + iY*_layerSize;
284 r[2] = input[2] + iZ*_layerSize;
285 _indicatorF(output,r);
286 if (!output[0]) {
287 return true;
288 }
289 }
290 }
291 }
292 return true;
293}

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