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

#include <superLatticeTimeAveraged2D.h>

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

Public Member Functions

 SuperLatticeTimeAveragedCrossCorrelationF2D (SuperF2D< T, T > &sFunctorM, SuperF2D< T, T > &sFunctorN)
 
bool operator() (T output[], const int input[])
 
void addEnsemble ()
 
- Public Member Functions inherited from olb::SuperF2D< T, T >
SuperF2D< T, T > & operator- (SuperF2D< T, T > &rhs)
 
SuperF2D< T, T > & operator+ (SuperF2D< T, T > &rhs)
 
SuperF2D< T, T > & operator* (SuperF2D< T, T > &rhs)
 
SuperF2D< T, T > & operator/ (SuperF2D< T, T > &rhs)
 
SuperStructure< T, 2 > & getSuperStructure ()
 
int getBlockFSize () const
 
BlockF2D< T > & getBlockF (int iCloc)
 
bool operator() (T output[], const int input[]) override
 
- 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::SuperF2D< 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)
 
- Protected Member Functions inherited from olb::SuperF2D< T, T >
 SuperF2D (SuperStructure< T, 2 > &superStructure, int targetDim)
 
- Protected Member Functions inherited from olb::GenericF< T, S >
 GenericF (int targetDim, int sourceDim)
 
- Protected Attributes inherited from olb::SuperF2D< T, T >
SuperStructure< T, 2 > & _superStructure
 
std::vector< std::unique_ptr< BlockF2D< T > > > _blockF
 Super functors may consist of several BlockF2D<W> derived functors.
 

Detailed Description

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

Definition at line 63 of file superLatticeTimeAveraged2D.h.

Constructor & Destructor Documentation

◆ SuperLatticeTimeAveragedCrossCorrelationF2D()

template<typename T >
olb::SuperLatticeTimeAveragedCrossCorrelationF2D< T >::SuperLatticeTimeAveragedCrossCorrelationF2D ( SuperF2D< T, T > & sFunctorM,
SuperF2D< T, T > & sFunctorN )

Definition at line 95 of file superLatticeTimeAveraged2D.hh.

96 : SuperF2D<T,T>(sFunctorM.getSuperStructure(),sFunctorM.getTargetDim()*sFunctorN.getTargetDim()), _ensembles(0), _sFunctorM(sFunctorM), _sFunctorN(sFunctorN), _sDataM(_sFunctorM.getSuperStructure().getCuboidGeometry(),_sFunctorM.getSuperStructure().getLoadBalancer(),_sFunctorM.getSuperStructure().getOverlap(),_sFunctorM.getTargetDim()),_sDataN(_sFunctorN.getSuperStructure().getCuboidGeometry(),_sFunctorN.getSuperStructure().getLoadBalancer(),_sFunctorN.getSuperStructure().getOverlap(),_sFunctorN.getTargetDim()),_sDataMN(_sFunctorM.getSuperStructure().getCuboidGeometry(),_sFunctorM.getSuperStructure().getLoadBalancer(),_sFunctorM.getSuperStructure().getOverlap(),_sFunctorM.getTargetDim()*_sFunctorN.getTargetDim())
97{
98 this->getName() = "Time Averaged Corss Correlation " + _sFunctorM.getName()+"-"+_sFunctorN.getName();
99};
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, 2 > & 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::SuperLatticeTimeAveragedCrossCorrelationF2D< T >::addEnsemble ( )

Definition at line 102 of file superLatticeTimeAveraged2D.hh.

103{
104 int i[3];
105 int iX,iY;
106 int iDimMN;
107
108
109 for (int iCloc=0; iCloc < _sDataMN.getLoadBalancer().size(); ++iCloc) {
110 i[0] = _sDataMN.getLoadBalancer().glob(iCloc);
111 for (iX=0; iX < _sDataMN.getBlock(iCloc).getNx(); iX++) {
112 for (iY=0; iY < _sDataMN.getBlock(iCloc).getNy(); iY++) {
113 i[1] = iX;
114 i[2] = iY;
115 BaseType<T> tmpN[_sFunctorN.getTargetDim()];
116 BaseType<T> tmpM[_sFunctorM.getTargetDim()];
117 _sFunctorN(tmpN, i);
118 _sFunctorM(tmpM, i);
119 iDimMN=0;
120 for (int iDimM=0; iDimM<_sFunctorM.getTargetDim(); iDimM++) {
121 for (int iDimN=0; iDimN<_sFunctorN.getTargetDim(); iDimN++) {
122 _sDataMN.getBlock(iCloc).get({iX, iY}, iDimMN) += (BaseType<T>)(tmpM[iDimM])*(BaseType<T>)(tmpN[iDimN]) ;
123 iDimMN++;
124 }
125 }
126 for (int iDim=0; iDim<_sFunctorN.getTargetDim(); iDim++) {
127 _sDataN.getBlock(iCloc).get({iX, iY}, iDim) += (BaseType<T>)(tmpN[iDim]) ;
128 }
129 for (int iDim=0; iDim<_sFunctorM.getTargetDim(); iDim++) {
130 _sDataM.getBlock(iCloc).get({iX, iY}, iDim) += (BaseType<T>)(tmpM[iDim]) ;
131 }
132 }
133 }
134 }
135
136 _ensembles++;
137};
const BlockData< D, T, U > & getBlock(int iC) const
Definition superData.hh:88

◆ operator()()

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

Definition at line 139 of file superLatticeTimeAveraged2D.hh.

140{
141 int iDim =0;
142 T iCloc = _sDataMN.getLoadBalancer().loc(input[0]);
143 for (int iDimM=0; iDimM<_sFunctorM.getTargetDim(); iDimM++) {
144 for (int iDimN=0; iDimN<_sFunctorN.getTargetDim(); iDimN++) {
145 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;
146 iDim++;
147 }
148 }
149
150 return true;
151
152};

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