OpenLB 1.7
Loading...
Searching...
No Matches
Public Member Functions | List of all members
olb::SuperLatticeTimeAveragedF3D< T > Class Template Referencefinal

#include <superLatticeTimeAveraged3D.h>

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

Public Member Functions

 SuperLatticeTimeAveragedF3D (SuperF3D< T, T > &sFunctor)
 
bool operator() (T output[], const int input[])
 
void addEnsemble ()
 
int getEnsembles ()
 
int getBlockFSize () const
 
- Public Member Functions inherited from olb::SuperF3D< T, T >
SuperF3D< T, T > & operator- (SuperF3D< T, T > &rhs)
 
SuperF3D< T, T > & operator+ (SuperF3D< T, T > &rhs)
 
SuperF3D< T, T > & operator* (SuperF3D< T, T > &rhs)
 
SuperF3D< T, T > & operator/ (SuperF3D< T, T > &rhs)
 
SuperStructure< T, 3 > & getSuperStructure ()
 
int getBlockFSize () const
 
BlockF3D< T > & getBlockF (int iCloc)
 
bool operator() (T 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)
 

Additional Inherited Members

- Public Types inherited from olb::SuperF3D< T, T >
using identity_functor_type
 
- 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)
 
- Static Public Attributes inherited from olb::SuperF3D< T, T >
static constexpr bool isSuper
 
static constexpr unsigned d
 
- Protected Member Functions inherited from olb::SuperF3D< T, T >
 SuperF3D (SuperStructure< T, 3 > &superStructure, int targetDim)
 
- Protected Member Functions inherited from olb::GenericF< T, S >
 GenericF (int targetDim, int sourceDim)
 
- Protected Attributes inherited from olb::SuperF3D< T, T >
SuperStructure< T, 3 > & _superStructure
 
std::vector< std::unique_ptr< BlockF3D< T > > > _blockF
 Super functors may consist of several BlockF3D<W> derived functors.
 

Detailed Description

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

Definition at line 39 of file superLatticeTimeAveraged3D.h.

Constructor & Destructor Documentation

◆ SuperLatticeTimeAveragedF3D()

template<typename T >
olb::SuperLatticeTimeAveragedF3D< T >::SuperLatticeTimeAveragedF3D ( SuperF3D< T, T > & sFunctor)

Definition at line 36 of file superLatticeTimeAveraged3D.hh.

37 : SuperF3D<T,T>(sFunctor.getSuperStructure(),sFunctor.getTargetDim()*2),
38 _ensembles(0),
39 _sFunctor(sFunctor),
40 _sData(_sFunctor.getSuperStructure().getCuboidGeometry(),
42 _sFunctor.getSuperStructure().getOverlap(),
43 _sFunctor.getTargetDim()),
44 _sDataP2(_sFunctor.getSuperStructure().getCuboidGeometry(),
46 _sFunctor.getSuperStructure().getOverlap(),
47 _sFunctor.getTargetDim())
48{
49 this->getName() = "Time Averaged " + _sFunctor.getName();
50};
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
SuperStructure< T, 3 > & getSuperStructure()
CuboidGeometry< T, D > & getCuboidGeometry()
Read and write access to cuboid geometry.
int getOverlap()
Read and write access to the overlap.
LoadBalancer< T > & getLoadBalancer()
Read and write access to the load balancer.

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

+ Here is the call graph for this function:

Member Function Documentation

◆ addEnsemble()

template<typename T >
void olb::SuperLatticeTimeAveragedF3D< T >::addEnsemble ( )

Definition at line 116 of file superLatticeTimeAveraged3D.hh.

117{
118 int i[4];
119 for (int iCloc=0; iCloc < _sData.getLoadBalancer().size(); ++iCloc) {
120 i[0] = _sData.getLoadBalancer().glob(iCloc);
121 _sData.getBlock(iCloc).forSpatialLocations([&](auto iX, auto iY, auto iZ) {
122 i[1] = iX;
123 i[2] = iY;
124 i[3] = iZ;
125 //BaseType<T> tmp[_sFunctor.getTargetDim()];
126 T tmp[_sFunctor.getTargetDim()];
127 _sFunctor(tmp, i);
128 for (int iDim=0; iDim<_sFunctor.getTargetDim(); iDim++) {
129 _sData.getBlock(iCloc).get({iX, iY, iZ}, iDim) += (BaseType<T>)(tmp[iDim]) ;
130 _sDataP2.getBlock(iCloc).get({iX, iY, iZ}, iDim) += (BaseType<T>)(tmp[iDim]) *(BaseType<T>)(tmp[iDim]) ;
131 }
132 });
133 }
134 _ensembles++;
135};
const BlockData< D, T, U > & getBlock(int iC) const
Definition superData.hh:88

◆ getBlockFSize()

template<typename T >
int olb::SuperLatticeTimeAveragedF3D< T >::getBlockFSize ( ) const

Definition at line 159 of file superLatticeTimeAveraged3D.hh.

160{
161 return 0;
162};

◆ getEnsembles()

template<typename T >
int olb::SuperLatticeTimeAveragedF3D< T >::getEnsembles ( )

Definition at line 104 of file superLatticeTimeAveraged3D.hh.

105{
106 return _ensembles;
107};

◆ operator()()

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

Definition at line 70 of file superLatticeTimeAveraged3D.hh.

71{
72 T iCloc = _sData.getLoadBalancer().loc(input[0]);
73 for ( int iDim = 0; iDim < _sData.getDataSize(); iDim++) {
74 output[iDim] = _sData.getBlock(iCloc).get(input+1,iDim) / _ensembles;
75 }
76 for (int iDim = _sData.getDataSize(); iDim < _sData.getDataSize()*2; iDim++)
77 if (_sDataP2.getBlock(iCloc).get(input+1,(int) iDim-_sDataP2.getDataSize())/_ensembles - _sData.getBlock(iCloc).get(input+1,(int) iDim-_sDataP2.getDataSize())*_sData.getBlock(iCloc).get(input+1,(int) iDim-_sDataP2.getDataSize())/_ensembles/_ensembles<0) {
78 output[iDim]=0;
79 }
80 else {
81 output[iDim] = util::sqrt(_sDataP2.getBlock(iCloc).get(input+1,(int) iDim-_sDataP2.getDataSize())/_ensembles - _sData.getBlock(iCloc).get(input+1,(int) iDim-_sDataP2.getDataSize())*_sData.getBlock(iCloc).get(input+1,(int) iDim-_sDataP2.getDataSize())/_ensembles/_ensembles);
82 }
83 return true;
84};
int getDataSize() const
Read only access to the dim of the data of the super structure.
Definition superData.hh:122
cpu::simd::Pack< T > sqrt(cpu::simd::Pack< T > value)
Definition pack.h:100

References olb::util::sqrt().

+ Here is the call graph for this function:

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