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

#include <blockLatticeRefinementMetricF3D.h>

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

Public Member Functions

 BlockLatticeKnudsen3D (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::BlockLatticeKnudsen3D< T, DESCRIPTOR >

Definition at line 33 of file blockLatticeRefinementMetricF3D.h.

Constructor & Destructor Documentation

◆ BlockLatticeKnudsen3D()

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

Definition at line 35 of file blockLatticeRefinementMetricF3D.hh.

37 : BlockLatticeF3D<T, DESCRIPTOR>(blockLattice, 1)
38{
39 this->getName() = "knudsen";
40}
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::BlockLatticeKnudsen3D< T, DESCRIPTOR >::operator() ( T output[],
const int input[] )
overridevirtual

has to be implemented for 'every' derived class

Implements olb::GenericF< T, int >.

Reimplemented in olb::BlockLatticeRefinementMetricKnudsen3D< T, DESCRIPTOR >.

Definition at line 43 of file blockLatticeRefinementMetricF3D.hh.

44{
45 ConstCell<T,DESCRIPTOR> cell = this->_blockLattice.get(input[0], input[1], input[2]);
46
47 T rho = { };
48 T u[3] = { };
49 cell.computeRhoU(rho, u);
50
51 const T uSqr = u[0]*u[0] + u[1]*u[1] + u[2]*u[2];
52
53 T sum = 0.;
54
55 for (int iPop = 0; iPop < DESCRIPTOR::q; ++iPop) {
56 const T fEq = olb::equilibrium<DESCRIPTOR>::secondOrder(iPop, rho, u, uSqr);
57
58 sum += util::abs((cell[iPop] - fEq) / (fEq + descriptors::t<T,DESCRIPTOR>(iPop)));
59 }
60
61 output[0] = sum / (DESCRIPTOR::q);
62
63 return true;
64}
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

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

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

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