OpenLB 1.8.1
Loading...
Searching...
No Matches
olb::BlockIndicatorFfromSmoothIndicatorF2D< T, HLBM > Class Template Reference

BlockIndicatorF2D from SmoothIndicatorF2D. More...

#include <blockIndicatorF2D.h>

+ Inheritance diagram for olb::BlockIndicatorFfromSmoothIndicatorF2D< T, HLBM >:
+ Collaboration diagram for olb::BlockIndicatorFfromSmoothIndicatorF2D< T, HLBM >:

Public Member Functions

 BlockIndicatorFfromSmoothIndicatorF2D (SmoothIndicatorF2D< T, T, HLBM > &indicatorF, BlockGeometry< T, 2 > &blockGeometry)
 
bool operator() (bool output[], const int input[]) override
 has to be implemented for 'every' derived class
 
Vector< int, 2 > getMin () override
 Returns a min lattice position of the indicated domain's bounding box.
 
Vector< int, 2 > getMax () override
 Returns a max lattice position of the indicated domain's bounding box.
 
- Public Member Functions inherited from olb::BlockIndicatorF2D< T >
 BlockIndicatorF2D (BlockGeometry< T, 2 > &geometry)
 
BlockGeometry< T, 2 > & getBlockGeometry ()
 Get underlying block geometry structure.
 
bool operator() (const int input[])
 Block indicator specific function operator overload.
 
bool operator() (int iX, int iY)
 
bool operator() (LatticeR< 2 > loc)
 
void setCache (const BlockData< 2, T, bool > &cache)
 Set bool-mask cache to be used by indicator operator overloads.
 
virtual bool isEmpty ()
 Returns true only if the indicated domain subset is empty.
 
- Public Member Functions inherited from olb::BlockF2D< bool >
virtual BlockStructureD< 2 > & getBlockStructure ()
 virtual destructor for defined behaviour
 
void setBlockStructure (BlockStructureD< 2 > *blockStructure)
 
BlockF2D< bool > & operator- (BlockF2D< bool > &rhs)
 
BlockF2D< bool > & operator+ (BlockF2D< bool > &rhs)
 
BlockF2D< bool > & operator* (BlockF2D< bool > &rhs)
 
BlockF2D< bool > & operator/ (BlockF2D< bool > &rhs)
 
- Public Member Functions inherited from olb::GenericF< bool, int >
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[], int input0)
 
bool operator() (bool output[], int input0, int input1)
 
bool operator() (bool output[], int input0, int input1, int input2)
 
bool operator() (bool output[], int input0, int input1, int input2, int input3)
 

Protected Attributes

SmoothIndicatorF2D< T, T, HLBM > & _indicatorF
 
- Protected Attributes inherited from olb::BlockIndicatorF2D< T >
BlockGeometry< T, 2 > & _blockGeometryStructure
 
const BlockData< 2, T, bool > * _cachedData
 
- Protected Attributes inherited from olb::BlockF2D< bool >
BlockStructureD< 2 > * _blockStructure
 

Additional Inherited Members

- Public Types inherited from olb::GenericF< bool, int >
using targetType
 
using sourceType
 
- Public Attributes inherited from olb::GenericF< bool, int >
std::shared_ptr< GenericF< bool, int > > _ptrCalcC
 memory management, frees resouces (calcClass)
 
- Protected Member Functions inherited from olb::BlockF2D< bool >
 BlockF2D (BlockStructureD< 2 > &blockStructure, int targetDim)
 
 BlockF2D (int targetDim)
 
- Protected Member Functions inherited from olb::GenericF< bool, int >
 GenericF (int targetDim, int sourceDim)
 

Detailed Description

template<typename T, bool HLBM>
class olb::BlockIndicatorFfromSmoothIndicatorF2D< T, HLBM >

BlockIndicatorF2D from SmoothIndicatorF2D.

Note on get(Min,Max): SmoothIndicatorF2D currently doesn't expose a bounding box which is why these methods return the full block domain.

Definition at line 91 of file blockIndicatorF2D.h.

Constructor & Destructor Documentation

◆ BlockIndicatorFfromSmoothIndicatorF2D()

template<typename T , bool HLBM>
olb::BlockIndicatorFfromSmoothIndicatorF2D< T, HLBM >::BlockIndicatorFfromSmoothIndicatorF2D ( SmoothIndicatorF2D< T, T, HLBM > & indicatorF,
BlockGeometry< T, 2 > & blockGeometry )
Parameters
indicatorFSmooth indicator to be reduced to lattice space
blockGeometryBlock geometry structure to be used for conversion between lattice and physical coordinates.

Definition at line 70 of file blockIndicatorF2D.hh.

72 : BlockIndicatorF2D<T>(blockGeometry),
73 _indicatorF(indicatorF)
74{ }
BlockIndicatorF2D(BlockGeometry< T, 2 > &geometry)
SmoothIndicatorF2D< T, T, HLBM > & _indicatorF

Member Function Documentation

◆ getMax()

template<typename T , bool HLBM>
Vector< int, 2 > olb::BlockIndicatorFfromSmoothIndicatorF2D< T, HLBM >::getMax ( )
overridevirtual

Returns a max lattice position of the indicated domain's bounding box.

Implements olb::BlockIndicatorF2D< T >.

Definition at line 92 of file blockIndicatorF2D.hh.

93{
94 return this->_blockGeometryStructure.getExtent() - Vector<int,2> {1,1};
95}
Vector< int, D > getExtent() const
Returns the extend of the block in lattice units.
BlockGeometry< T, 2 > & _blockGeometryStructure
Vector(T &&t, Ts &&... ts) -> Vector< std::remove_cvref_t< T >, 1+sizeof...(Ts)>

◆ getMin()

template<typename T , bool HLBM>
Vector< int, 2 > olb::BlockIndicatorFfromSmoothIndicatorF2D< T, HLBM >::getMin ( )
overridevirtual

Returns a min lattice position of the indicated domain's bounding box.

Implements olb::BlockIndicatorF2D< T >.

Definition at line 86 of file blockIndicatorF2D.hh.

87{
88 return Vector<int,2> {0,0};
89}

◆ operator()()

template<typename T , bool HLBM>
bool olb::BlockIndicatorFfromSmoothIndicatorF2D< T, HLBM >::operator() ( bool output[],
const int input[] )
overridevirtual

has to be implemented for 'every' derived class

Implements olb::GenericF< bool, int >.

Definition at line 77 of file blockIndicatorF2D.hh.

78{
79 T inside[1];
80 auto physR = this->_blockGeometryStructure.getPhysR(input);
81 _indicatorF(inside, physR.data());
82 return !util::nearZero(inside[0]);
83}
Vector< T, D > getPhysR(LatticeR< D > latticeR) const
bool nearZero(T a) any_platform
return true if a is close to zero
Definition util.h:402

References olb::util::nearZero().

+ Here is the call graph for this function:

Member Data Documentation

◆ _indicatorF

template<typename T , bool HLBM>
SmoothIndicatorF2D<T,T,HLBM>& olb::BlockIndicatorFfromSmoothIndicatorF2D< T, HLBM >::_indicatorF
protected

Definition at line 93 of file blockIndicatorF2D.h.


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