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

perform explicit typecast from output type T2 to T More...

#include <blockBaseF3D.h>

+ Inheritance diagram for olb::BlockTypecastF3D< T, T2 >:
+ Collaboration diagram for olb::BlockTypecastF3D< T, T2 >:

Public Member Functions

 BlockTypecastF3D (BlockF3D< T2 > &f)
 
bool operator() (T output[], const int input[])
 has to be implemented for 'every' derived class
 
- Public Member Functions inherited from olb::BlockF3D< T >
 ~BlockF3D () override
 virtual destructor for defined behaviour
 
virtual BlockStructureD< 3 > & getBlockStructure () const
 
BlockF3D< T > & operator- (BlockF3D< T > &rhs)
 
BlockF3D< T > & operator+ (BlockF3D< T > &rhs)
 
BlockF3D< T > & operator* (BlockF3D< T > &rhs)
 
BlockF3D< T > & operator/ (BlockF3D< T > &rhs)
 
- Public Member Functions inherited from olb::GenericF< T, 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() (T output[])
 wrapper that call the pure virtual operator() (T output[], const S input[]) from above
 
bool operator() (T output[], int input0)
 
bool operator() (T output[], int input0, int input1)
 
bool operator() (T output[], int input0, int input1, int input2)
 
bool operator() (T output[], int input0, int input1, int input2, int input3)
 

Protected Attributes

BlockF3D< T2 > & _f
 
- Protected Attributes inherited from olb::BlockF3D< T >
BlockStructureD< 3 > & _blockStructure
 

Additional Inherited Members

- Public Types inherited from olb::GenericF< T, int >
using targetType
 
using sourceType
 
- Public Attributes inherited from olb::GenericF< T, int >
std::shared_ptr< GenericF< T, int > > _ptrCalcC
 memory management, frees resouces (calcClass)
 
- Protected Member Functions inherited from olb::BlockF3D< T >
 BlockF3D (BlockStructureD< 3 > &blockStructure, int targetDim)
 
- Protected Member Functions inherited from olb::GenericF< T, int >
 GenericF (int targetDim, int sourceDim)
 

Detailed Description

template<typename T, typename T2>
class olb::BlockTypecastF3D< T, T2 >

perform explicit typecast from output type T2 to T

Definition at line 131 of file blockBaseF3D.h.

Constructor & Destructor Documentation

◆ BlockTypecastF3D()

template<typename T , typename T2 >
olb::BlockTypecastF3D< T, T2 >::BlockTypecastF3D ( BlockF3D< T2 > & f)

Definition at line 162 of file blockBaseF3D.hh.

163 : BlockF3D<T>(f.getBlockStructure(), f.getTargetDim()),
164 _f(f)
165{
166 this->getName() = f.getName();
167}
virtual BlockStructureD< 3 > & getBlockStructure() const
BlockF3D< T2 > & _f
int getTargetDim() const
read only access to member variable _n
Definition genericF.hh:45
std::string & getName()
read and write access to name
Definition genericF.hh:51

References olb::GenericF< T, S >::getName(), and olb::GenericF< T, int >::getName().

+ Here is the call graph for this function:

Member Function Documentation

◆ operator()()

template<typename T , typename T2 >
bool olb::BlockTypecastF3D< T, T2 >::operator() ( T output[],
const int input[] )
virtual

has to be implemented for 'every' derived class

Implements olb::GenericF< T, int >.

Definition at line 170 of file blockBaseF3D.hh.

171{
172 T2 result[this->getTargetDim()];
173 _f(result, input);
174 for (int i = 0; i < this->getTargetDim(); ++i) {
175 output[i] = static_cast<T>(result[i]);
176 }
177 return true;
178}

Member Data Documentation

◆ _f

template<typename T , typename T2 >
BlockF3D<T2>& olb::BlockTypecastF3D< T, T2 >::_f
protected

Definition at line 133 of file blockBaseF3D.h.


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