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

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

#include <superBaseF3D.h>

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

Public Types

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

Public Member Functions

SuperF3D< T, W > & operator- (SuperF3D< T, W > &rhs)
 
SuperF3D< T, W > & operator+ (SuperF3D< T, W > &rhs)
 
SuperF3D< T, W > & operator* (SuperF3D< T, W > &rhs)
 
SuperF3D< T, W > & operator/ (SuperF3D< T, W > &rhs)
 
SuperStructure< T, 3 > & getSuperStructure ()
 
int getBlockFSize () const
 
BlockF3D< W > & getBlockF (int iCloc)
 
bool operator() (W output[], const int input[])
 
- 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)
 

Static Public Attributes

static constexpr bool isSuper = true
 
static constexpr unsigned d = 3
 

Protected Member Functions

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

Protected Attributes

SuperStructure< T, 3 > & _superStructure
 
std::vector< std::unique_ptr< BlockF3D< W > > > _blockF
 Super functors may consist of several BlockF3D<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::SuperF3D< T, W >

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

Definition at line 56 of file superBaseF3D.h.

Member Typedef Documentation

◆ identity_functor_type

template<typename T , typename W = T>
using olb::SuperF3D< T, W >::identity_functor_type = SuperIdentity3D<T,W>

Definition at line 68 of file superBaseF3D.h.

Constructor & Destructor Documentation

◆ SuperF3D()

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

Definition at line 34 of file superBaseF3D.hh.

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

Member Function Documentation

◆ getBlockF()

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

Definition at line 52 of file superBaseF3D.hh.

53{
54 OLB_ASSERT(iCloc < int(_blockF.size()) && iCloc >= 0,
55 "block functor index outside bounds");
56 return *(_blockF[iCloc]);
57}
std::vector< std::unique_ptr< BlockF3D< W > > > _blockF
Super functors may consist of several BlockF3D<W> derived functors.
#define OLB_ASSERT(COND, MESSAGE)
Definition olbDebug.h:45

References OLB_ASSERT.

+ Here is the caller graph for this function:

◆ getBlockFSize()

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

Definition at line 44 of file superBaseF3D.hh.

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

References OLB_ASSERT.

◆ getSuperStructure()

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

Definition at line 38 of file superBaseF3D.hh.

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

◆ operator()()

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

Reimplemented in olb::SuperTypecastF3D< T, W, W2 >, olb::SuperLpNorm3D< T, W, P >, and olb::SuperIdentity3D< T, W >.

Definition at line 60 of file superBaseF3D.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}
BlockF3D< 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 >
SuperF3D< T, W > & olb::SuperF3D< T, W >::operator* ( SuperF3D< T, W > & rhs)

Definition at line 239 of file superCalcF3D.hh.

240{
241 auto tmp = std::make_shared< SuperCalcMultiplication3D<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 >
SuperF3D< T, W > & olb::SuperF3D< T, W >::operator+ ( SuperF3D< T, W > & rhs)

Definition at line 223 of file superCalcF3D.hh.

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

◆ operator-()

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

Definition at line 231 of file superCalcF3D.hh.

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

◆ operator/()

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

Definition at line 247 of file superCalcF3D.hh.

248{
249 auto tmp = std::make_shared< SuperCalcDivision3D<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<BlockF3D<W> > > olb::SuperF3D< T, W >::_blockF
protected

Super functors may consist of several BlockF3D<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 66 of file superBaseF3D.h.

◆ _superStructure

template<typename T , typename W = T>
SuperStructure<T,3>& olb::SuperF3D< T, W >::_superStructure
protected

Definition at line 60 of file superBaseF3D.h.

◆ d

template<typename T , typename W = T>
constexpr unsigned olb::SuperF3D< T, W >::d = 3
staticconstexpr

Definition at line 70 of file superBaseF3D.h.

◆ isSuper

template<typename T , typename W = T>
constexpr bool olb::SuperF3D< T, W >::isSuper = true
staticconstexpr

Definition at line 69 of file superBaseF3D.h.


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