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

#include <blockLatticeRefinementMetricF3D.h>

+ Inheritance diagram for olb::BlockLatticeHighOrderKnudsen3D< T, DESCRIPTOR >:
+ Collaboration diagram for olb::BlockLatticeHighOrderKnudsen3D< T, DESCRIPTOR >:

Public Member Functions

 BlockLatticeHighOrderKnudsen3D (BlockLattice< T, DESCRIPTOR > &blockLattice)
 
bool operator() (T output[], const int input[]) override
 has to be implemented for 'every' derived class
 
- Public Member Functions inherited from olb::BlockLatticeF3D< T, DESCRIPTOR >
BlockLattice< T, DESCRIPTOR > & getBlock ()
 Copy Constructor.
 
- 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)
 

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::BlockLatticeF3D< T, DESCRIPTOR >
 BlockLatticeF3D (BlockLattice< T, DESCRIPTOR > &blockLattice, int targetDim)
 
- 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)
 
- Protected Attributes inherited from olb::BlockLatticeF3D< T, DESCRIPTOR >
BlockLattice< T, DESCRIPTOR > & _blockLattice
 
- Protected Attributes inherited from olb::BlockF3D< T >
BlockStructureD< 3 > & _blockStructure
 

Detailed Description

template<typename T, typename DESCRIPTOR>
class olb::BlockLatticeHighOrderKnudsen3D< T, DESCRIPTOR >

Definition at line 55 of file blockLatticeRefinementMetricF3D.h.

Constructor & Destructor Documentation

◆ BlockLatticeHighOrderKnudsen3D()

template<typename T , typename DESCRIPTOR >
olb::BlockLatticeHighOrderKnudsen3D< T, DESCRIPTOR >::BlockLatticeHighOrderKnudsen3D ( BlockLattice< T, DESCRIPTOR > & blockLattice)

Definition at line 128 of file blockLatticeRefinementMetricF3D.hh.

130 : BlockLatticeF3D<T, DESCRIPTOR>(blockLattice, 1)
131{
132 this->getName() = "high_order_knudsen";
133}
std::string & getName()
read and write access to name
Definition genericF.hh:51

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

+ Here is the call graph for this function:

Member Function Documentation

◆ operator()()

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

has to be implemented for 'every' derived class

Implements olb::GenericF< T, int >.

Definition at line 136 of file blockLatticeRefinementMetricF3D.hh.

137{
138 ConstCell<T,DESCRIPTOR> cell = this->_blockLattice.get(input[0], input[1], input[2]);
139
140 T rho = { };
141 T u[3] = { };
143 cell.computeAllMomenta(rho, u, pi);
144
145 const T uSqr = u[0]*u[0] + u[1]*u[1] + u[2]*u[2];
146
147 T sum = 0.;
148
149 for (int iPop = 0; iPop < DESCRIPTOR::q; ++iPop) {
150 const T fEq = olb::equilibrium<DESCRIPTOR>::secondOrder(iPop, rho, u, uSqr);
151 const T fNeqFromPi = olb::lbm< DESCRIPTOR>::fromPiToFneq(iPop, pi);
152
153 sum += util::abs((cell[iPop] - fEq - fNeqFromPi) / (fEq + descriptors::t<T,DESCRIPTOR>(iPop)));
154 }
155
156 output[0] = sum / (DESCRIPTOR::q);
157
158 return true;
159}
BlockLattice< T, DESCRIPTOR > & _blockLattice
ADf< T, DIM > abs(const ADf< T, DIM > &a)
Definition aDiff.h:1019
static V secondOrder(int iPop, const RHO &rho, const U &u, const USQR &uSqr) any_platform
Computation of equilibrium distribution, second order in u.
Definition lbm.h:51
Collection of common computations for LBM.
Definition lbm.h:182
static constexpr int n
result stored in n
Definition util.h:211

References olb::util::abs(), olb::ConstCell< T, DESCRIPTOR >::computeAllMomenta(), and olb::equilibrium< DESCRIPTOR >::secondOrder().

+ Here is the call graph for this function:

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