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

represents all functors that operate on a SuperStructure<T,2> in general More...

#include <superBaseF2D.h>

+ Inheritance diagram for olb::SuperF2D< T, W >:
+ Collaboration diagram for olb::SuperF2D< T, W >:

Public Types

using identity_functor_type = SuperIdentity2D<T,W>
 
- Public Types inherited from olb::GenericF< T, S >
using targetType = T
 
using sourceType = S
 

Public Member Functions

SuperF2D< T, W > & operator- (SuperF2D< T, W > &rhs)
 
SuperF2D< T, W > & operator+ (SuperF2D< T, W > &rhs)
 
SuperF2D< T, W > & operator* (SuperF2D< T, W > &rhs)
 
SuperF2D< T, W > & operator/ (SuperF2D< T, W > &rhs)
 
SuperStructure< T, 2 > & getSuperStructure ()
 
int getBlockFSize () const
 
BlockF2D< W > & getBlockF (int iCloc)
 
bool operator() (W 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 Member Functions

 SuperF2D (SuperStructure< T, 2 > &superStructure, int targetDim)
 
- Protected Member Functions inherited from olb::GenericF< T, S >
 GenericF (int targetDim, int sourceDim)
 

Protected Attributes

SuperStructure< T, 2 > & _superStructure
 
std::vector< std::unique_ptr< BlockF2D< W > > > _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)
 

Detailed Description

template<typename T, typename W = T>
class olb::SuperF2D< T, W >

represents all functors that operate on a SuperStructure<T,2> in general

Definition at line 51 of file superBaseF2D.h.

Member Typedef Documentation

◆ identity_functor_type

template<typename T , typename W = T>
using olb::SuperF2D< T, W >::identity_functor_type = SuperIdentity2D<T,W>

Definition at line 64 of file superBaseF2D.h.

Constructor & Destructor Documentation

◆ SuperF2D()

template<typename T , typename W >
olb::SuperF2D< T, W >::SuperF2D ( SuperStructure< T, 2 > & superStructure,
int targetDim )
protected

Definition at line 34 of file superBaseF2D.hh.

35 : GenericF<W,int>(targetDim,2), _superStructure(superStructure) { }
SuperStructure< T, 2 > & _superStructure

Member Function Documentation

◆ getBlockF()

template<typename T , typename W >
BlockF2D< W > & olb::SuperF2D< T, W >::getBlockF ( int iCloc)
Returns
_blockF[iCloc]

Definition at line 52 of file superBaseF2D.hh.

53{
54 OLB_ASSERT(size_t(iCloc) < _blockF.size() && iCloc >= 0,
55 "block functor index within bounds");
56 return *(_blockF[iCloc]);
57}
std::vector< std::unique_ptr< BlockF2D< W > > > _blockF
Super functors may consist of several BlockF2D<W> derived functors.
#define OLB_ASSERT(COND, MESSAGE)
Definition olbDebug.h:45
+ Here is the caller graph for this function:

◆ getBlockFSize()

template<typename T , typename W >
int olb::SuperF2D< T, W >::getBlockFSize ( ) const
Returns
Size of SuperF3D<T,W>::_blockF vector

Definition at line 44 of file superBaseF2D.hh.

45{
46 OLB_ASSERT(_blockF.size() < INT32_MAX,
47 "it is safe to cast std::size_t to int");
48 return _blockF.size();
49}

References OLB_ASSERT.

◆ getSuperStructure()

template<typename T , typename W >
SuperStructure< T, 2 > & olb::SuperF2D< T, W >::getSuperStructure ( )
Returns
_superStructure

Definition at line 38 of file superBaseF2D.hh.

39{
40 return _superStructure;
41}
+ Here is the caller graph for this function:

◆ operator()()

template<typename T , typename W >
bool olb::SuperF2D< T, W >::operator() ( W output[],
const int input[] )
override

Reimplemented in olb::SuperLpNorm2D< T, W, P >, and olb::SuperIdentity2D< T, W >.

Definition at line 60 of file superBaseF2D.hh.

61{
62
63 LoadBalancer<T>& load = _superStructure.getLoadBalancer();
64
65 if (load.isLocal(input[0])) {
66 const int loc = load.loc(input[0]);
67
68 return this->getBlockF(loc)(output, &input[1]);
69 }
70 else {
71 return false;
72 }
73
74}
BlockF2D< W > & getBlockF(int iCloc)
LoadBalancer< T > & getLoadBalancer()
Read and write access to the load balancer.

References olb::LoadBalancer< T >::isLocal(), and olb::LoadBalancer< T >::loc().

+ Here is the call graph for this function:

◆ operator*()

template<typename T , typename W >
SuperF2D< T, W > & olb::SuperF2D< T, W >::operator* ( SuperF2D< T, W > & rhs)

Definition at line 239 of file superCalcF2D.hh.

240{
241 auto tmp = std::make_shared< SuperCalcMultiplication2D<T,W> >(*this,rhs);
242 this->_ptrCalcC = tmp;
243 return *tmp;
244}
std::shared_ptr< GenericF< T, S > > _ptrCalcC
memory management, frees resouces (calcClass)
Definition genericF.h:71

◆ operator+()

template<typename T , typename W >
SuperF2D< T, W > & olb::SuperF2D< T, W >::operator+ ( SuperF2D< T, W > & rhs)

Definition at line 223 of file superCalcF2D.hh.

224{
225 auto tmp = std::make_shared< SuperCalcPlus2D<T,W> >(*this,rhs);
226 this->_ptrCalcC = tmp;
227 return *tmp;
228}

◆ operator-()

template<typename T , typename W >
SuperF2D< T, W > & olb::SuperF2D< T, W >::operator- ( SuperF2D< T, W > & rhs)

Definition at line 231 of file superCalcF2D.hh.

232{
233 auto tmp = std::make_shared< SuperCalcMinus2D<T,W> >(*this,rhs);
234 this->_ptrCalcC = tmp;
235 return *tmp;
236}

◆ operator/()

template<typename T , typename W >
SuperF2D< T, W > & olb::SuperF2D< T, W >::operator/ ( SuperF2D< T, W > & rhs)

Definition at line 247 of file superCalcF2D.hh.

248{
249 auto tmp = std::make_shared< SuperCalcDivision2D<T,W> >(*this,rhs);
250 this->_ptrCalcC = tmp;
251 return *tmp;
252}

Member Data Documentation

◆ _blockF

template<typename T , typename W = T>
std::vector<std::unique_ptr<BlockF2D<W> > > olb::SuperF2D< T, W >::_blockF
protected

Super functors may consist of several BlockF2D<W> derived functors.

By convention: If block level functors are used at all they should number exactly LoadBalancer<T>::size per process.

Definition at line 62 of file superBaseF2D.h.

◆ _superStructure

template<typename T , typename W = T>
SuperStructure<T,2>& olb::SuperF2D< T, W >::_superStructure
protected

Definition at line 55 of file superBaseF2D.h.


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