OpenLB 1.8.1
Loading...
Searching...
No Matches
olb::SuperLatticeTimeAveragedCrossCorrelationF3D< T > Class Template Referencefinal

#include <superLatticeTimeAveraged3D.h>

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

Public Member Functions

 SuperLatticeTimeAveragedCrossCorrelationF3D (SuperF3D< T, T > &sFunctorM, SuperF3D< T, T > &sFunctorN)
 
bool operator() (T output[], const int input[])
 
void addEnsemble ()
 
- Public Member Functions inherited from olb::SuperF3D< T, T >
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[])
 has to be implemented for 'every' derived class
 
- Public Member Functions inherited from olb::GenericF< W, 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() (W output[])
 wrapper that call the pure virtual operator() (T output[], const S input[]) from above
 
bool operator() (W output[], int input0)
 
bool operator() (W output[], int input0, int input1)
 
bool operator() (W output[], int input0, int input1, int input2)
 
bool operator() (W output[], int input0, int input1, int input2, int input3)
 

Additional Inherited Members

- Public Types inherited from olb::SuperF3D< T, T >
using identity_functor_type
 
- Public Types inherited from olb::GenericF< W, int >
using targetType
 
using sourceType
 
- Public Attributes inherited from olb::GenericF< W, int >
std::shared_ptr< GenericF< W, int > > _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< W, int >
 GenericF (int targetDim, int sourceDim)
 
- Protected Attributes inherited from olb::SuperF3D< T, T >
SuperStructure< T, 3 > & _superStructure
 
std::vector< std::unique_ptr< BlockF3D< W > > > _blockF
 Super functors may consist of several BlockF3D<W> derived functors.
 

Detailed Description

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

Definition at line 89 of file superLatticeTimeAveraged3D.h.

Constructor & Destructor Documentation

◆ SuperLatticeTimeAveragedCrossCorrelationF3D()

template<typename T >
olb::SuperLatticeTimeAveragedCrossCorrelationF3D< T >::SuperLatticeTimeAveragedCrossCorrelationF3D ( SuperF3D< T, T > & sFunctorM,
SuperF3D< T, T > & sFunctorN )

Definition at line 199 of file superLatticeTimeAveraged3D.hh.

200 : SuperF3D<T,T>(sFunctorM.getSuperStructure(),sFunctorM.getTargetDim()*sFunctorN.getTargetDim()),
201 _ensembles(0),
202 _sFunctorM(sFunctorM),
203 _sFunctorN(sFunctorN),
204 _sDataM(_sFunctorM.getSuperStructure().getCuboidDecomposition(),_sFunctorM.getSuperStructure().getLoadBalancer(),_sFunctorM.getSuperStructure().getOverlap(),_sFunctorM.getTargetDim()),
205 _sDataN(_sFunctorN.getSuperStructure().getCuboidDecomposition(),_sFunctorN.getSuperStructure().getLoadBalancer(),_sFunctorN.getSuperStructure().getOverlap(),_sFunctorN.getTargetDim()),
206 _sDataMN(_sFunctorM.getSuperStructure().getCuboidDecomposition(),_sFunctorM.getSuperStructure().getLoadBalancer(),_sFunctorM.getSuperStructure().getOverlap(),_sFunctorM.getTargetDim()*_sFunctorN.getTargetDim()),
207 _sDataMhelp(_sFunctorM.getSuperStructure().getCuboidDecomposition(),_sFunctorM.getSuperStructure().getLoadBalancer(),_sFunctorM.getSuperStructure().getOverlap(),_sFunctorM.getTargetDim()),
208 _sDataNhelp(_sFunctorN.getSuperStructure().getCuboidDecomposition(),_sFunctorN.getSuperStructure().getLoadBalancer(),_sFunctorN.getSuperStructure().getOverlap(),_sFunctorN.getTargetDim()),
209 _sDataMNhelp(_sFunctorM.getSuperStructure().getCuboidDecomposition(),_sFunctorM.getSuperStructure().getLoadBalancer(),_sFunctorM.getSuperStructure().getOverlap(),_sFunctorM.getTargetDim()*_sFunctorN.getTargetDim())
210{
211 this->getName() = "Time Averaged Cross Correlation " + _sFunctorM.getName()+"-"+_sFunctorN.getName();
212};
int getTargetDim() const
read only access to member variable _n
Definition genericF.hh:45
std::string & getName()
Definition genericF.hh:51
SuperStructure< T, 3 > & getSuperStructure()
int getOverlap()
Read and write access to the overlap.
LoadBalancer< T > & getLoadBalancer()
Read and write access to the load balancer.
CuboidDecomposition< T, D > & getCuboidDecomposition()
Read and write access to cuboid geometry.

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

+ Here is the call graph for this function:

Member Function Documentation

◆ addEnsemble()

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

Definition at line 215 of file superLatticeTimeAveraged3D.hh.

216{
217 int i[4];
218 int iX,iY,iZ;
219 int iDimMN;
220
221 for (int iCloc=0; iCloc < _sDataMN.getLoadBalancer().size(); ++iCloc) {
222 i[0] = _sDataMN.getLoadBalancer().glob(iCloc);
223 for (iX=0; iX < _sDataMN.getBlock(iCloc).getNx(); iX++) {
224 for (iY=0; iY < _sDataMN.getBlock(iCloc).getNy(); iY++) {
225 for (iZ=0; iZ < _sDataMN.getBlock(iCloc).getNz(); iZ++) {
226 i[1] = iX;
227 i[2] = iY;
228 i[3] = iZ;
229 BaseType<T> tmpN[_sFunctorN.getTargetDim()];
230 BaseType<T> tmpM[_sFunctorM.getTargetDim()];
231 _sFunctorN(tmpN, i);
232 _sFunctorM(tmpM, i);
233 iDimMN=0;
234 for (int iDimM=0; iDimM<_sFunctorM.getTargetDim(); iDimM++) {
235 for (int iDimN=0; iDimN<_sFunctorN.getTargetDim(); iDimN++) {
236 util::kahanSum<T>(_sDataMN.getBlock(iCloc).get({iX, iY, iZ}, iDimMN),
237 _sDataMNhelp.getBlock(iCloc).get({iX, iY, iZ}, iDimMN),
238 (BaseType<T>)(tmpM[iDimM])*(BaseType<T>)(tmpN[iDimN]));
239 iDimMN++;
240 }
241 }
242 for (int iDim=0; iDim<_sFunctorN.getTargetDim(); iDim++) {
243 util::kahanSum<T>(_sDataN.getBlock(iCloc).get({iX, iY, iZ}, iDim),
244 _sDataNhelp.getBlock(iCloc).get({iX, iY, iZ}, iDim),
245 (BaseType<T>)(tmpN[iDim]));
246 }
247 for (int iDim=0; iDim<_sFunctorM.getTargetDim(); iDim++) {
248 util::kahanSum<T>(_sDataM.getBlock(iCloc).get({iX, iY, iZ}, iDim),
249 _sDataMhelp.getBlock(iCloc).get({iX, iY, iZ}, iDim),
250 (BaseType<T>)(tmpM[iDim]));
251 }
252 }
253 }
254 }
255 }
256
257 _ensembles++;
258};
const BlockData< D, T, U > & getBlock(int iC) const
Definition superData.hh:87
void kahanSum(T output[2], T summand)
Accurate summation of floating point numbers with the Kahan algorithm.
Definition calc.h:51
typename util::BaseTypeHelper< T >::type BaseType
Definition baseType.h:59

References olb::util::kahanSum().

+ Here is the call graph for this function:

◆ operator()()

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

Definition at line 261 of file superLatticeTimeAveraged3D.hh.

262{
263 int iDim =0;
264 T iCloc = _sDataMN.getLoadBalancer().loc(input[0]);
265 for (int iDimM=0; iDimM<_sFunctorM.getTargetDim(); iDimM++) {
266 for (int iDimN=0; iDimN<_sFunctorN.getTargetDim(); iDimN++) {
267 output[iDim] = _sDataMN.getBlock(iCloc).get(input+1,iDim)-_sDataM.getBlock(iCloc).get(input+1,iDimM) *_sDataN.getBlock(iCloc).get(input+1,iDimN)/_ensembles/_ensembles;
268 iDim++;
269 }
270 }
271
272 return true;
273};

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