OpenLB 1.7
Loading...
Searching...
No Matches
Public Types | Public Member Functions | List of all members
olb::momenta::ConcreteTuple< DESCRIPTOR, DENSITY, MOMENTUM, STRESS, DefinitionRule > Struct Template Reference

Tuple of momenta components forming a moment system. More...

#include <interface.h>

+ Collaboration diagram for olb::momenta::ConcreteTuple< DESCRIPTOR, DENSITY, MOMENTUM, STRESS, DefinitionRule >:

Public Types

using descriptor = DESCRIPTOR
 
using type = ConcreteTuple
 
using density = DENSITY
 
using momentum = MOMENTUM
 
using stress = STRESS
 
using definition = DefinitionRule
 
using abstract = Tuple<DENSITY,MOMENTUM,STRESS,DefinitionRule>
 

Public Member Functions

template<typename CELL , typename V = typename CELL::value_t>
computeRho (CELL &cell) const any_platform
 
template<typename CELL , typename U >
void computeU (CELL &cell, U &u) const any_platform
 
template<typename CELL , typename J >
void computeJ (CELL &cell, J &j) const any_platform
 
template<typename CELL , typename RHO , typename U , typename PI >
void computeStress (CELL &cell, const RHO &rho, const U &u, PI &pi) const any_platform
 
template<typename CELL , typename PI , typename V = typename CELL::value_t>
void computeStress (CELL &cell, PI &pi) const any_platform
 
template<typename CELL , typename RHO , typename J >
void computeRhoJ (CELL &cell, RHO &rho, J &j) const any_platform
 
template<typename CELL , typename RHO , typename U >
void computeRhoU (CELL &cell, RHO &rho, U &u) const any_platform
 
template<typename CELL , typename RHO , typename U , typename PI >
void computeAllMomenta (CELL &cell, RHO &rho, U &u, PI &pi) const any_platform
 
template<typename CELL , typename PINEQNORMSQR , typename V = typename CELL::value_t>
void computePiNeqNormSqr (CELL &cell, PINEQNORMSQR &piNeqNormSqr) const any_platform
 
template<typename CELL , typename RHO >
void defineRho (CELL &cell, const RHO &rho) any_platform
 
template<typename CELL , typename U >
void defineU (CELL &cell, const U &u) any_platform
 
template<typename CELL , typename RHO , typename U >
void defineRhoU (CELL &cell, const RHO &rho, const U &u) any_platform
 
template<typename CELL , typename RHO , typename U , typename PI >
void defineAllMomenta (CELL &cell, const RHO &rho, const U &u, const PI &pi) any_platform
 
template<typename CELL >
void initialize (CELL &cell)
 
template<typename CELL , typename RHO >
void inverseShiftRho (CELL &cell, RHO &rho) any_platform
 
template<typename CELL , typename U >
void inverseShiftU (CELL &cell, U &u) any_platform
 
template<typename CELL , typename RHO , typename U >
void inverseShiftRhoU (CELL &cell, RHO &rho, U &u) any_platform
 
std::string getName () const
 

Detailed Description

template<typename DESCRIPTOR, typename DENSITY, typename MOMENTUM, typename STRESS, typename DefinitionRule>
struct olb::momenta::ConcreteTuple< DESCRIPTOR, DENSITY, MOMENTUM, STRESS, DefinitionRule >

Tuple of momenta components forming a moment system.

Momenta are reduced on their components DENSITY, MOMETUM, STRESS A generic momenta tuple consists of single "submomenta" (0th moment = density, 1st velocity, 2nd moment = stress). These give a rule how to compute a certain moment and how to set the corresponding data, e.g. a velocity field, in case that this is necessary. DefinitionRule describes how to modify the momenta, e.g. the populations could be transformed to a new equilibrium or non-equilibrium state.

Definition at line 95 of file interface.h.

Member Typedef Documentation

◆ abstract

template<typename DESCRIPTOR , typename DENSITY , typename MOMENTUM , typename STRESS , typename DefinitionRule >
using olb::momenta::ConcreteTuple< DESCRIPTOR, DENSITY, MOMENTUM, STRESS, DefinitionRule >::abstract = Tuple<DENSITY,MOMENTUM,STRESS,DefinitionRule>

Definition at line 103 of file interface.h.

◆ definition

template<typename DESCRIPTOR , typename DENSITY , typename MOMENTUM , typename STRESS , typename DefinitionRule >
using olb::momenta::ConcreteTuple< DESCRIPTOR, DENSITY, MOMENTUM, STRESS, DefinitionRule >::definition = DefinitionRule

Definition at line 101 of file interface.h.

◆ density

template<typename DESCRIPTOR , typename DENSITY , typename MOMENTUM , typename STRESS , typename DefinitionRule >
using olb::momenta::ConcreteTuple< DESCRIPTOR, DENSITY, MOMENTUM, STRESS, DefinitionRule >::density = DENSITY

Definition at line 98 of file interface.h.

◆ descriptor

template<typename DESCRIPTOR , typename DENSITY , typename MOMENTUM , typename STRESS , typename DefinitionRule >
using olb::momenta::ConcreteTuple< DESCRIPTOR, DENSITY, MOMENTUM, STRESS, DefinitionRule >::descriptor = DESCRIPTOR

Definition at line 96 of file interface.h.

◆ momentum

template<typename DESCRIPTOR , typename DENSITY , typename MOMENTUM , typename STRESS , typename DefinitionRule >
using olb::momenta::ConcreteTuple< DESCRIPTOR, DENSITY, MOMENTUM, STRESS, DefinitionRule >::momentum = MOMENTUM

Definition at line 99 of file interface.h.

◆ stress

template<typename DESCRIPTOR , typename DENSITY , typename MOMENTUM , typename STRESS , typename DefinitionRule >
using olb::momenta::ConcreteTuple< DESCRIPTOR, DENSITY, MOMENTUM, STRESS, DefinitionRule >::stress = STRESS

Definition at line 100 of file interface.h.

◆ type

template<typename DESCRIPTOR , typename DENSITY , typename MOMENTUM , typename STRESS , typename DefinitionRule >
using olb::momenta::ConcreteTuple< DESCRIPTOR, DENSITY, MOMENTUM, STRESS, DefinitionRule >::type = ConcreteTuple

Definition at line 97 of file interface.h.

Member Function Documentation

◆ computeAllMomenta()

template<typename DESCRIPTOR , typename DENSITY , typename MOMENTUM , typename STRESS , typename DefinitionRule >
template<typename CELL , typename RHO , typename U , typename PI >
void olb::momenta::ConcreteTuple< DESCRIPTOR, DENSITY, MOMENTUM, STRESS, DefinitionRule >::computeAllMomenta ( CELL & cell,
RHO & rho,
U & u,
PI & pi ) const
inline

Definition at line 157 of file interface.h.

158 {
159 computeRhoU(cell, rho, u);
160 STRESS().template compute<type>(cell, rho, u, pi);
161 }
void computeRhoU(CELL &cell, RHO &rho, U &u) const any_platform
Definition interface.h:151

References olb::momenta::ConcreteTuple< DESCRIPTOR, DENSITY, MOMENTUM, STRESS, DefinitionRule >::computeRhoU().

+ Here is the call graph for this function:

◆ computeJ()

template<typename DESCRIPTOR , typename DENSITY , typename MOMENTUM , typename STRESS , typename DefinitionRule >
template<typename CELL , typename J >
void olb::momenta::ConcreteTuple< DESCRIPTOR, DENSITY, MOMENTUM, STRESS, DefinitionRule >::computeJ ( CELL & cell,
J & j ) const
inline

Definition at line 120 of file interface.h.

121 {
122 MOMENTUM().template compute<type>(cell, j);
123 }

◆ computePiNeqNormSqr()

template<typename DESCRIPTOR , typename DENSITY , typename MOMENTUM , typename STRESS , typename DefinitionRule >
template<typename CELL , typename PINEQNORMSQR , typename V = typename CELL::value_t>
void olb::momenta::ConcreteTuple< DESCRIPTOR, DENSITY, MOMENTUM, STRESS, DefinitionRule >::computePiNeqNormSqr ( CELL & cell,
PINEQNORMSQR & piNeqNormSqr ) const
inline

Definition at line 164 of file interface.h.

165 {
166 V rho, u[DESCRIPTOR::d], pi[util::TensorVal<DESCRIPTOR>::n] { };
167 computeRhoU(cell, rho, u);
168 STRESS().template compute<type>(cell, rho, u, pi);
169 piNeqNormSqr = pi[0]*pi[0] + 2.*pi[1]*pi[1] + pi[2]*pi[2];
170 if constexpr (util::TensorVal<DESCRIPTOR>::n == 6) {
171 piNeqNormSqr += pi[2]*pi[2] + pi[3]*pi[3] + 2.*pi[4]*pi[4] +pi[5]*pi[5];
172 }
173 }
static constexpr int n
result stored in n
Definition util.h:211

References olb::momenta::ConcreteTuple< DESCRIPTOR, DENSITY, MOMENTUM, STRESS, DefinitionRule >::computeRhoU().

+ Here is the call graph for this function:

◆ computeRho()

template<typename DESCRIPTOR , typename DENSITY , typename MOMENTUM , typename STRESS , typename DefinitionRule >
template<typename CELL , typename V = typename CELL::value_t>
V olb::momenta::ConcreteTuple< DESCRIPTOR, DENSITY, MOMENTUM, STRESS, DefinitionRule >::computeRho ( CELL & cell) const
inline

Definition at line 106 of file interface.h.

107 {
108 V rho{};
109 DENSITY().template compute<type>(cell, rho);
110 return rho;
111 }

◆ computeRhoJ()

template<typename DESCRIPTOR , typename DENSITY , typename MOMENTUM , typename STRESS , typename DefinitionRule >
template<typename CELL , typename RHO , typename J >
void olb::momenta::ConcreteTuple< DESCRIPTOR, DENSITY, MOMENTUM, STRESS, DefinitionRule >::computeRhoJ ( CELL & cell,
RHO & rho,
J & j ) const
inline

Definition at line 144 of file interface.h.

145 {
146 DENSITY().template compute<type>(cell, rho);
147 MOMENTUM().template compute<type>(cell, j);
148 }

◆ computeRhoU()

template<typename DESCRIPTOR , typename DENSITY , typename MOMENTUM , typename STRESS , typename DefinitionRule >
template<typename CELL , typename RHO , typename U >
void olb::momenta::ConcreteTuple< DESCRIPTOR, DENSITY, MOMENTUM, STRESS, DefinitionRule >::computeRhoU ( CELL & cell,
RHO & rho,
U & u ) const
inline

Definition at line 151 of file interface.h.

152 {
153 ComputeRhoU<type,DENSITY,MOMENTUM>()(cell, rho, u);
154 }
+ Here is the caller graph for this function:

◆ computeStress() [1/2]

template<typename DESCRIPTOR , typename DENSITY , typename MOMENTUM , typename STRESS , typename DefinitionRule >
template<typename CELL , typename RHO , typename U , typename PI >
void olb::momenta::ConcreteTuple< DESCRIPTOR, DENSITY, MOMENTUM, STRESS, DefinitionRule >::computeStress ( CELL & cell,
const RHO & rho,
const U & u,
PI & pi ) const
inline

Definition at line 128 of file interface.h.

130 {
131 STRESS().template compute<type>(cell, rho, u, pi);
132 }

◆ computeStress() [2/2]

template<typename DESCRIPTOR , typename DENSITY , typename MOMENTUM , typename STRESS , typename DefinitionRule >
template<typename CELL , typename PI , typename V = typename CELL::value_t>
void olb::momenta::ConcreteTuple< DESCRIPTOR, DENSITY, MOMENTUM, STRESS, DefinitionRule >::computeStress ( CELL & cell,
PI & pi ) const
inline

Definition at line 136 of file interface.h.

137 {
138 V rho, u[DESCRIPTOR::d];
139 computeRhoU(cell, rho, u);
140 STRESS().template compute<type>(cell, rho, u, pi);
141 }

References olb::momenta::ConcreteTuple< DESCRIPTOR, DENSITY, MOMENTUM, STRESS, DefinitionRule >::computeRhoU().

+ Here is the call graph for this function:

◆ computeU()

template<typename DESCRIPTOR , typename DENSITY , typename MOMENTUM , typename STRESS , typename DefinitionRule >
template<typename CELL , typename U >
void olb::momenta::ConcreteTuple< DESCRIPTOR, DENSITY, MOMENTUM, STRESS, DefinitionRule >::computeU ( CELL & cell,
U & u ) const
inline

Definition at line 114 of file interface.h.

115 {
116 MOMENTUM().template computeU<type>(cell, u);
117 }

◆ defineAllMomenta()

template<typename DESCRIPTOR , typename DENSITY , typename MOMENTUM , typename STRESS , typename DefinitionRule >
template<typename CELL , typename RHO , typename U , typename PI >
void olb::momenta::ConcreteTuple< DESCRIPTOR, DENSITY, MOMENTUM, STRESS, DefinitionRule >::defineAllMomenta ( CELL & cell,
const RHO & rho,
const U & u,
const PI & pi )
inline

Definition at line 212 of file interface.h.

213 {
214 DENSITY().template define<type>(cell, rho);
215 MOMENTUM().template define<type>(cell, u);
216
217 RHO rhoShift = rho;
218 using U_ARITH = std::remove_const_t<std::remove_pointer_t<std::remove_extent_t<U>>>;
219 U_ARITH uShift[DESCRIPTOR::d];
220 util::copyN(uShift, u, DESCRIPTOR::d);
221 inverseShiftRhoU(cell, rhoShift, uShift);
222 DefinitionRule().template defineAllMomenta<type>(cell, rhoShift, uShift, pi);
223 }
void copyN(T c[], const T a[], const unsigned dim) any_platform
void inverseShiftRhoU(CELL &cell, RHO &rho, U &u) any_platform
Definition interface.h:245

References olb::util::copyN(), and olb::momenta::ConcreteTuple< DESCRIPTOR, DENSITY, MOMENTUM, STRESS, DefinitionRule >::inverseShiftRhoU().

+ Here is the call graph for this function:

◆ defineRho()

template<typename DESCRIPTOR , typename DENSITY , typename MOMENTUM , typename STRESS , typename DefinitionRule >
template<typename CELL , typename RHO >
void olb::momenta::ConcreteTuple< DESCRIPTOR, DENSITY, MOMENTUM, STRESS, DefinitionRule >::defineRho ( CELL & cell,
const RHO & rho )
inline

Definition at line 176 of file interface.h.

177 {
178 DENSITY().template define<type>(cell, rho);
179
180 RHO rhoShift = rho;
181 inverseShiftRho(cell, rhoShift);
182 DefinitionRule().template defineRho<type>(cell, rho);
183 }
void inverseShiftRho(CELL &cell, RHO &rho) any_platform
Definition interface.h:233

References olb::momenta::ConcreteTuple< DESCRIPTOR, DENSITY, MOMENTUM, STRESS, DefinitionRule >::inverseShiftRho().

+ Here is the call graph for this function:

◆ defineRhoU()

template<typename DESCRIPTOR , typename DENSITY , typename MOMENTUM , typename STRESS , typename DefinitionRule >
template<typename CELL , typename RHO , typename U >
void olb::momenta::ConcreteTuple< DESCRIPTOR, DENSITY, MOMENTUM, STRESS, DefinitionRule >::defineRhoU ( CELL & cell,
const RHO & rho,
const U & u )
inline

Definition at line 198 of file interface.h.

199 {
200 DENSITY().template define<type>(cell, rho);
201 MOMENTUM().template define<type>(cell, u);
202
203 RHO rhoShift = rho;
204 using U_ARITH = std::remove_const_t<std::remove_pointer_t<std::remove_extent_t<U>>>;
205 U_ARITH uShift[DESCRIPTOR::d];
206 util::copyN(uShift, u, DESCRIPTOR::d);
207 inverseShiftRhoU(cell, rhoShift, uShift);
208 DefinitionRule().template defineRhoU<type>(cell, rhoShift, uShift);
209 }

References olb::util::copyN(), and olb::momenta::ConcreteTuple< DESCRIPTOR, DENSITY, MOMENTUM, STRESS, DefinitionRule >::inverseShiftRhoU().

+ Here is the call graph for this function:

◆ defineU()

template<typename DESCRIPTOR , typename DENSITY , typename MOMENTUM , typename STRESS , typename DefinitionRule >
template<typename CELL , typename U >
void olb::momenta::ConcreteTuple< DESCRIPTOR, DENSITY, MOMENTUM, STRESS, DefinitionRule >::defineU ( CELL & cell,
const U & u )
inline

Definition at line 186 of file interface.h.

187 {
188 MOMENTUM().template define<type>(cell, u);
189
190 using U_ARITH = std::remove_const_t<std::remove_pointer_t<std::remove_extent_t<U>>>;
191 U_ARITH uShift[DESCRIPTOR::d];
192 util::copyN(uShift, u, DESCRIPTOR::d);
193 inverseShiftU(cell, uShift);
194 DefinitionRule().template defineU<type>(cell, u);
195 }
void inverseShiftU(CELL &cell, U &u) any_platform
Definition interface.h:239

References olb::util::copyN(), and olb::momenta::ConcreteTuple< DESCRIPTOR, DENSITY, MOMENTUM, STRESS, DefinitionRule >::inverseShiftU().

+ Here is the call graph for this function:

◆ getName()

template<typename DESCRIPTOR , typename DENSITY , typename MOMENTUM , typename STRESS , typename DefinitionRule >
std::string olb::momenta::ConcreteTuple< DESCRIPTOR, DENSITY, MOMENTUM, STRESS, DefinitionRule >::getName ( ) const
inline

Definition at line 251 of file interface.h.

252 {
253 return "Momenta<"
254 + density().getName() + ","
255 + momentum().getName() + ","
256 + stress().getName() + ","
257 + definition().getName() +
258 ">";
259 }
DefinitionRule definition
Definition interface.h:101

◆ initialize()

template<typename DESCRIPTOR , typename DENSITY , typename MOMENTUM , typename STRESS , typename DefinitionRule >
template<typename CELL >
void olb::momenta::ConcreteTuple< DESCRIPTOR, DENSITY, MOMENTUM, STRESS, DefinitionRule >::initialize ( CELL & cell)
inline

Definition at line 226 of file interface.h.

227 {
228 DENSITY().template initialize<type>(cell);
229 MOMENTUM().template initialize<type>(cell);
230 }

◆ inverseShiftRho()

template<typename DESCRIPTOR , typename DENSITY , typename MOMENTUM , typename STRESS , typename DefinitionRule >
template<typename CELL , typename RHO >
void olb::momenta::ConcreteTuple< DESCRIPTOR, DENSITY, MOMENTUM, STRESS, DefinitionRule >::inverseShiftRho ( CELL & cell,
RHO & rho )
inline

Definition at line 233 of file interface.h.

234 {
235 DENSITY().template inverseShift<type>(cell, rho);
236 }
+ Here is the caller graph for this function:

◆ inverseShiftRhoU()

template<typename DESCRIPTOR , typename DENSITY , typename MOMENTUM , typename STRESS , typename DefinitionRule >
template<typename CELL , typename RHO , typename U >
void olb::momenta::ConcreteTuple< DESCRIPTOR, DENSITY, MOMENTUM, STRESS, DefinitionRule >::inverseShiftRhoU ( CELL & cell,
RHO & rho,
U & u )
inline

Definition at line 245 of file interface.h.

246 {
247 inverseShiftRho(cell, rho);
248 inverseShiftU(cell, u);
249 }

References olb::momenta::ConcreteTuple< DESCRIPTOR, DENSITY, MOMENTUM, STRESS, DefinitionRule >::inverseShiftRho(), and olb::momenta::ConcreteTuple< DESCRIPTOR, DENSITY, MOMENTUM, STRESS, DefinitionRule >::inverseShiftU().

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

◆ inverseShiftU()

template<typename DESCRIPTOR , typename DENSITY , typename MOMENTUM , typename STRESS , typename DefinitionRule >
template<typename CELL , typename U >
void olb::momenta::ConcreteTuple< DESCRIPTOR, DENSITY, MOMENTUM, STRESS, DefinitionRule >::inverseShiftU ( CELL & cell,
U & u )
inline

Definition at line 239 of file interface.h.

240 {
241 MOMENTUM().template inverseShift<type>(cell, u);
242 }
+ Here is the caller graph for this function:

The documentation for this struct was generated from the following file: