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

#include <blockLatticeRefinementMetricF3D.h>

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

Public Member Functions

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

Definition at line 41 of file blockLatticeRefinementMetricF3D.h.

Constructor & Destructor Documentation

◆ BlockLatticeRefinementMetricKnudsen3D()

template<typename T , typename DESCRIPTOR >
olb::BlockLatticeRefinementMetricKnudsen3D< T, DESCRIPTOR >::BlockLatticeRefinementMetricKnudsen3D ( BlockLattice< T, DESCRIPTOR > & blockLattice,
const UnitConverter< T, DESCRIPTOR > & converter )

Definition at line 68 of file blockLatticeRefinementMetricF3D.hh.

71 : BlockLatticeKnudsen3D<T, DESCRIPTOR>(blockLattice),
72 _knudsen(converter.getKnudsenNumber())
73{
74 this->getName() = "refinementMetricKnudsen";
75}
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()() [1/2]

template<typename T , typename DESCRIPTOR >
bool olb::BlockLatticeRefinementMetricKnudsen3D< T, DESCRIPTOR >::operator() ( T output[])

Definition at line 78 of file blockLatticeRefinementMetricF3D.hh.

79{
80 const std::size_t cellCount = this->_blockLattice.getNx() * this->_blockLattice.getNy() * this->_blockLattice.getNz();
81
82 T blockSum = 0.;
83
84 T localOutput[1] = { };
85 int localInput[3] = { };
86
87 for (localInput[0] = 0; localInput[0] < this->_blockLattice.getNx(); ++localInput[0]) {
88 for (localInput[1] = 0; localInput[1] < this->_blockLattice.getNy(); ++localInput[1]) {
89 for (localInput[2]=0; localInput[2] < this->_blockLattice.getNz(); ++localInput[2]) {
91
92 blockSum += localOutput[0];
93 }
94 }
95 }
96
97 const T blockC = blockSum / cellCount;
98
99 output[0] = std::log2(blockC / _knudsen);
100
101 if ( output[0] <= 0. || blockC <= 0. ) {
102 output[0] = 0.;
103 }
104
105 return true;
106}
BlockLattice< T, DESCRIPTOR > & _blockLattice
bool operator()(T output[], const int input[]) override
has to be implemented for 'every' derived class

References olb::BlockLatticeKnudsen3D< T, DESCRIPTOR >::operator()().

+ Here is the call graph for this function:

◆ operator()() [2/2]

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

has to be implemented for 'every' derived class

Reimplemented from olb::BlockLatticeKnudsen3D< T, DESCRIPTOR >.

Definition at line 109 of file blockLatticeRefinementMetricF3D.hh.

111{
112 T measuredKnudsen[1] { };
114
115 output[0] = std::log2(measuredKnudsen[0] / _knudsen);
116
117
118 if ( output[0] <= 0. || measuredKnudsen[0] <= 0. ) {
119 output[0] = 0.;
120 }
121
122
123 return true;
124}

References olb::BlockLatticeKnudsen3D< T, DESCRIPTOR >::operator()().

+ Here is the call graph for this function:

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