OpenLB 1.7
Loading...
Searching...
No Matches
Public Types | Public Member Functions | Protected Attributes | List of all members
olb::SuperIndicatorF2D< T > Class Template Reference

#include <superIndicatorBaseF2D.h>

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

Public Types

using identity_functor_type = SuperIndicatorIdentity2D<T>
 
- Public Types inherited from olb::SuperF2D< T, bool >
using identity_functor_type
 
- Public Types inherited from olb::GenericF< T, S >
using targetType = T
 
using sourceType = S
 

Public Member Functions

 SuperIndicatorF2D (SuperGeometry< T, 2 > &geometry)
 
BlockIndicatorF2D< T > & getBlockIndicatorF (int iCloc)
 Get block indicator.
 
SuperGeometry< T, 2 > & getSuperGeometry ()
 Get underlying super geometry.
 
bool operator() (const int input[])
 Indicator specific function operator overload.
 
bool operator() (int iC, int iX, int iY)
 Indicator specific function operator overload.
 
void cache ()
 Optional: initialize _cachedData for faster access.
 
- Public Member Functions inherited from olb::SuperF2D< T, bool >
SuperF2D< T, bool > & operator- (SuperF2D< T, bool > &rhs)
 
SuperF2D< T, bool > & operator+ (SuperF2D< T, bool > &rhs)
 
SuperF2D< T, bool > & operator* (SuperF2D< T, bool > &rhs)
 
SuperF2D< T, bool > & operator/ (SuperF2D< T, bool > &rhs)
 
SuperStructure< T, 2 > & getSuperStructure ()
 
int getBlockFSize () const
 
BlockF2D< bool > & getBlockF (int iCloc)
 
bool operator() (bool output[], const int input[]) override
 
- Public Member Functions inherited from olb::GenericF< T, 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() (T output[], const S input[])=0
 has to be implemented for 'every' derived class
 
bool operator() (T output[])
 wrapper that call the pure virtual operator() (T output[], const S input[]) from above
 
bool operator() (T output[], S input0)
 
bool operator() (T output[], S input0, S input1)
 
bool operator() (T output[], S input0, S input1, S input2)
 
bool operator() (T output[], S input0, S input1, S input2, S input3)
 

Protected Attributes

SuperGeometry< T, 2 > & _superGeometry
 
std::unique_ptr< SuperData< 2, T, bool > > _cachedData
 
- Protected Attributes inherited from olb::SuperF2D< T, bool >
SuperStructure< T, 2 > & _superStructure
 
std::vector< std::unique_ptr< BlockF2D< bool > > > _blockF
 Super functors may consist of several BlockF2D<W> derived functors.
 

Additional Inherited Members

- Public Attributes inherited from olb::GenericF< T, S >
std::shared_ptr< GenericF< T, S > > _ptrCalcC
 memory management, frees resouces (calcClass)
 
- Protected Member Functions inherited from olb::SuperF2D< T, bool >
 SuperF2D (SuperStructure< T, 2 > &superStructure, int targetDim)
 
- Protected Member Functions inherited from olb::GenericF< T, S >
 GenericF (int targetDim, int sourceDim)
 

Detailed Description

template<typename T>
class olb::SuperIndicatorF2D< T >

Definition at line 40 of file superIndicatorBaseF2D.h.

Member Typedef Documentation

◆ identity_functor_type

template<typename T >
using olb::SuperIndicatorF2D< T >::identity_functor_type = SuperIndicatorIdentity2D<T>

Definition at line 47 of file superIndicatorBaseF2D.h.

Constructor & Destructor Documentation

◆ SuperIndicatorF2D()

template<typename T >
olb::SuperIndicatorF2D< T >::SuperIndicatorF2D ( SuperGeometry< T, 2 > & geometry)

Definition at line 34 of file superIndicatorBaseF2D.hh.

35 : SuperF2D<T, bool>(geometry, 1),
36 _superGeometry(geometry)
37{ }
SuperGeometry< T, 2 > & _superGeometry

Member Function Documentation

◆ cache()

template<typename T >
void olb::SuperIndicatorF2D< T >::cache ( )

Optional: initialize _cachedData for faster access.

Definition at line 82 of file superIndicatorBaseF2D.hh.

83{
84 _cachedData = std::unique_ptr<SuperData<2,T,bool>>(
85 new SuperData<2,T,bool>(*this));
86 for (unsigned iC = 0; iC < this->_blockF.size(); ++iC) {
87 getBlockIndicatorF(iC).setCache(_cachedData->getBlock(iC));
88 }
89}
std::vector< std::unique_ptr< BlockF2D< bool > > > _blockF
Super functors may consist of several BlockF2D<W> derived functors.
std::unique_ptr< SuperData< 2, T, bool > > _cachedData
BlockIndicatorF2D< T > & getBlockIndicatorF(int iCloc)
Get block indicator.

◆ getBlockIndicatorF()

template<typename T >
BlockIndicatorF2D< T > & olb::SuperIndicatorF2D< T >::getBlockIndicatorF ( int iCloc)

Get block indicator.

Returns
_blockF[iCloc] cast as BlockIndicatorF2D<T>&

Definition at line 40 of file superIndicatorBaseF2D.hh.

41{
42 OLB_ASSERT(size_t(iCloc) < this->_blockF.size() && iCloc >= 0,
43 "block functor index within bounds");
44 // Note: The type system doesn't guarantee this operation to be valid
45 // as blockF may contain any implementation of the BlockF2D interface.
46 return *static_cast<BlockIndicatorF2D<T>*>(this->_blockF[iCloc].get());
47}
#define OLB_ASSERT(COND, MESSAGE)
Definition olbDebug.h:45

References OLB_ASSERT.

◆ getSuperGeometry()

template<typename T >
SuperGeometry< T, 2 > & olb::SuperIndicatorF2D< T >::getSuperGeometry ( )

Get underlying super geometry.

Returns
_superGeometry

Definition at line 50 of file superIndicatorBaseF2D.hh.

51{
52 return this->_superGeometry;
53}

◆ operator()() [1/2]

template<typename T >
bool olb::SuperIndicatorF2D< T >::operator() ( const int input[])

Indicator specific function operator overload.

The boolean return value of operator()(T output[], S input[]) describes the call's success and by convention must not describe the indicated domain.

Returns
Domain indicator i.e. true iff the input lies within the described domain.

Definition at line 56 of file superIndicatorBaseF2D.hh.

57{
58 bool output;
59 if (_cachedData) {
60 output = _cachedData->getBlock(input[0]).get(input+1);
61 }
62 else {
63 this->operator()(&output, input);
64 }
65 return output;
66}
bool operator()(const int input[])
Indicator specific function operator overload.

References olb::SuperGeometry< T, D >::getBlock().

+ Here is the call graph for this function:

◆ operator()() [2/2]

template<typename T >
bool olb::SuperIndicatorF2D< T >::operator() ( int iC,
int iX,
int iY )

Indicator specific function operator overload.

The boolean return value of operator()(T output[], S input[]) describes the call's success and by convention must not describe the indicated domain.

Returns
Domain indicator i.e. true iff the input lies within the described domain.

Definition at line 69 of file superIndicatorBaseF2D.hh.

70{
71 bool output;
72 if (_cachedData) {
73 output = _cachedData->getBlock(iC).get({iX, iY});
74 }
75 else {
76 this->operator()(&output, iC, iX, iY);
77 }
78 return output;
79}

Member Data Documentation

◆ _cachedData

template<typename T >
std::unique_ptr<SuperData<2,T,bool> > olb::SuperIndicatorF2D< T >::_cachedData
protected

Definition at line 43 of file superIndicatorBaseF2D.h.

◆ _superGeometry

template<typename T >
SuperGeometry<T,2>& olb::SuperIndicatorF2D< T >::_superGeometry
protected

Definition at line 42 of file superIndicatorBaseF2D.h.


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