OpenLB 1.8.1
Loading...
Searching...
No Matches
olb::BlockIndicatorBoundaryNeighbor2D< T > Class Template Reference

Block indicator identifying neighbors of boundary cells. More...

#include <blockIndicatorF2D.h>

+ Inheritance diagram for olb::BlockIndicatorBoundaryNeighbor2D< T >:
+ Collaboration diagram for olb::BlockIndicatorBoundaryNeighbor2D< T >:

Public Member Functions

 BlockIndicatorBoundaryNeighbor2D (BlockIndicatorF2D< T > &indicatorF, int overlap)
 
bool operator() (bool output[], const int input[]) override
 has to be implemented for 'every' derived class
 
Vector< int, 2 > getMin () override
 Returns min lattice position of the indicated domain's bounding box.
 
Vector< int, 2 > getMax () override
 Returns 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

BlockIndicatorF2D< T > & _indicatorF
 
int _overlap
 
- 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>
class olb::BlockIndicatorBoundaryNeighbor2D< T >

Block indicator identifying neighbors of boundary cells.

Definition at line 223 of file aliases.h.

Constructor & Destructor Documentation

◆ BlockIndicatorBoundaryNeighbor2D()

template<typename T >
olb::BlockIndicatorBoundaryNeighbor2D< T >::BlockIndicatorBoundaryNeighbor2D ( BlockIndicatorF2D< T > & indicatorF,
int overlap )

Definition at line 215 of file blockIndicatorF2D.hh.

216 : BlockIndicatorF2D<T>(indicatorF.getBlockGeometry()),
217 _indicatorF(indicatorF),
218 _overlap(overlap)
219{ }
BlockIndicatorF2D(BlockGeometry< T, 2 > &geometry)

Member Function Documentation

◆ getMax()

template<typename T >
Vector< int, 2 > olb::BlockIndicatorBoundaryNeighbor2D< T >::getMax ( )
overridevirtual

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

Implements olb::BlockIndicatorF2D< T >.

Definition at line 248 of file blockIndicatorF2D.hh.

249{
250 return _indicatorF.getMax() + _overlap;
251}

◆ getMin()

template<typename T >
Vector< int, 2 > olb::BlockIndicatorBoundaryNeighbor2D< T >::getMin ( )
overridevirtual

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

Implements olb::BlockIndicatorF2D< T >.

Definition at line 242 of file blockIndicatorF2D.hh.

243{
244 return _indicatorF.getMin() - _overlap;
245}

◆ operator()()

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

has to be implemented for 'every' derived class

Implements olb::GenericF< bool, int >.

Definition at line 222 of file blockIndicatorF2D.hh.

223{
224 // check if current position is not solid
225 if ( this->getBlockGeometry().getMaterial(input[0],input[1]) != 0 ) {
226 // check all neighbors if they are part of boundary via indicator
227 for ( int iXo = -_overlap; iXo <= _overlap; ++iXo ) {
228 for ( int iYo = -_overlap; iYo <= _overlap; ++iYo ) {
229 const int neighborPos[2] = {iXo + input[0], iYo + input[1]};
230 if ( _indicatorF ( neighborPos ) &&
231 this->getBlockGeometry().isInside( neighborPos ) ) {
232 output[0] = true;
233 return true;
234 }
235 }
236 }
237 }
238 return true;
239}
BlockGeometry< T, 2 > & getBlockGeometry()
Get underlying block geometry structure.

Member Data Documentation

◆ _indicatorF

template<typename T >
BlockIndicatorF2D<T>& olb::BlockIndicatorBoundaryNeighbor2D< T >::_indicatorF
protected

Definition at line 174 of file blockIndicatorF2D.h.

◆ _overlap

template<typename T >
int olb::BlockIndicatorBoundaryNeighbor2D< T >::_overlap
protected

Definition at line 175 of file blockIndicatorF2D.h.


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