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

BlockDataF2D can store data of any BlockFunctor2D. More...

#include <blockBaseF2D.h>

+ Inheritance diagram for olb::BlockDataF2D< T, BaseType >:
+ Collaboration diagram for olb::BlockDataF2D< T, BaseType >:

Public Member Functions

 BlockDataF2D (BlockData< 2, T, BaseType > &blockData)
 Constructor.
 
 ~BlockDataF2D ()
 
 BlockDataF2D (BlockF2D< BaseType > &f)
 to store functor data, constuctor creates _blockData with functor data
 
BlockData< 2, T, BaseType > & getBlockData ()
 returns _blockData
 
bool operator() (BaseType output[], const int input[]) override
 access to _blockData via its get()
 
- Public Member Functions inherited from olb::BlockF2D< BaseType >
virtual BlockStructureD< 2 > & getBlockStructure ()
 virtual destructor for defined behaviour
 
void setBlockStructure (BlockStructureD< 2 > *blockStructure)
 
BlockF2D< BaseType > & operator- (BlockF2D< BaseType > &rhs)
 
BlockF2D< BaseType > & operator+ (BlockF2D< BaseType > &rhs)
 
BlockF2D< BaseType > & operator* (BlockF2D< BaseType > &rhs)
 
BlockF2D< BaseType > & operator/ (BlockF2D< BaseType > &rhs)
 
- 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

 BlockDataF2D (int nx, int ny, int size=1)
 
- Protected Member Functions inherited from olb::BlockF2D< BaseType >
 BlockF2D (BlockStructureD< 2 > &blockStructure, int targetDim)
 
 BlockF2D (int targetDim)
 
- Protected Member Functions inherited from olb::GenericF< T, S >
 GenericF (int targetDim, int sourceDim)
 

Protected Attributes

BlockData< 2, T, BaseType > * _blockData
 
bool _owning
 
- Protected Attributes inherited from olb::BlockF2D< BaseType >
BlockStructureD< 2 > * _blockStructure
 

Additional Inherited Members

- Public Types inherited from olb::GenericF< T, S >
using targetType = T
 
using sourceType = S
 
- 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 BaseType>
class olb::BlockDataF2D< T, BaseType >

BlockDataF2D can store data of any BlockFunctor2D.

Definition at line 68 of file blockBaseF2D.h.

Constructor & Destructor Documentation

◆ BlockDataF2D() [1/3]

template<typename T , typename BaseType >
olb::BlockDataF2D< T, BaseType >::BlockDataF2D ( int nx,
int ny,
int size = 1 )
protected

Definition at line 69 of file blockBaseF2D.hh.

72 : BlockF2D<T>(*(new BlockData<2,T,BaseType>({{nx, ny}, 0}, size)), size),
73 _blockData(static_cast<BlockData<2,T,BaseType>*>(&(this->getBlockStructure()))),
74 _owning(true)
75{ }
BlockData< 2, T, BaseType > * _blockData
virtual BlockStructureD< 2 > & getBlockStructure()
virtual destructor for defined behaviour

◆ BlockDataF2D() [2/3]

template<typename T , typename BaseType >
olb::BlockDataF2D< T, BaseType >::BlockDataF2D ( BlockData< 2, T, BaseType > & blockData)

Constructor.

Definition at line 55 of file blockBaseF2D.hh.

56 : BlockF2D<T>(blockData, blockData.getSize()),
57 _blockData(&blockData),
58 _owning(false)
59{ }
unsigned getSize() const
Definition blockData.hh:118

◆ ~BlockDataF2D()

template<typename T , typename BaseType >
olb::BlockDataF2D< T, BaseType >::~BlockDataF2D ( )

Definition at line 78 of file blockBaseF2D.hh.

79{
80 if (_owning) {
81 delete _blockData;
82 }
83}

◆ BlockDataF2D() [3/3]

template<typename T , typename BaseType >
olb::BlockDataF2D< T, BaseType >::BlockDataF2D ( BlockF2D< BaseType > & f)

to store functor data, constuctor creates _blockData with functor data

Definition at line 62 of file blockBaseF2D.hh.

63 : BlockF2D<T>(f.getBlockStructure(), f.getTargetDim()),
64 _blockData(new BlockData<2,T,BaseType>(f)),
65 _owning(true)
66{ }
int getTargetDim() const
read only access to member variable _n
Definition genericF.hh:45

Member Function Documentation

◆ getBlockData()

template<typename T , typename BaseType >
BlockData< 2, T, BaseType > & olb::BlockDataF2D< T, BaseType >::getBlockData ( )

returns _blockData

Definition at line 86 of file blockBaseF2D.hh.

87{
88 return *_blockData;
89}

◆ operator()()

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

access to _blockData via its get()

Definition at line 92 of file blockBaseF2D.hh.

93{
94 for (int iDim = 0; iDim < this->getTargetDim(); ++iDim) {
95 output[iDim] = _blockData->get(input, iDim);
96 }
97 return true;
98}
U & get(std::size_t iCell, int iD=0)
Definition blockData.hh:94

References olb::BlockData< D, T, U >::get().

+ Here is the call graph for this function:

Member Data Documentation

◆ _blockData

template<typename T , typename BaseType >
BlockData<2,T,BaseType>* olb::BlockDataF2D< T, BaseType >::_blockData
protected

Definition at line 71 of file blockBaseF2D.h.

◆ _owning

template<typename T , typename BaseType >
bool olb::BlockDataF2D< T, BaseType >::_owning
protected

Definition at line 72 of file blockBaseF2D.h.


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