35#ifndef DYNAMICS_MOMENTA_INTERFACE_H
36#define DYNAMICS_MOMENTA_INTERFACE_H
51template <
typename BASE,
typename DENSITY,
typename MOMENTUM>
53 template <
typename CELL,
typename RHO,
typename U>
56 DENSITY().template compute<BASE>(cell, rho);
57 MOMENTUM().template computeU<BASE>(cell, u);
61template <
typename BASE>
63 template <
typename CELL,
typename RHO,
typename U,
typename DESCRIPTOR=
typename CELL::descriptor_t>
74 typename DefinitionRule
93 typename DefinitionRule
105 template <
typename CELL,
typename V=
typename CELL::value_t>
109 DENSITY().template compute<type>(cell, rho);
113 template <
typename CELL,
typename U>
116 MOMENTUM().template computeU<type>(cell, u);
119 template <
typename CELL,
typename J>
122 MOMENTUM().template compute<type>(cell, j);
127 template <
typename CELL,
typename RHO,
typename U,
typename PI>
131 STRESS().template compute<type>(cell, rho, u, pi);
135 template <
typename CELL,
typename PI,
typename V=
typename CELL::value_t>
138 V rho, u[DESCRIPTOR::d];
140 STRESS().template compute<type>(cell, rho, u, pi);
143 template <
typename CELL,
typename RHO,
typename J>
146 DENSITY().template compute<type>(cell, rho);
147 MOMENTUM().template compute<type>(cell, j);
150 template <
typename CELL,
typename RHO,
typename U>
156 template <
typename CELL,
typename RHO,
typename U,
typename PI>
160 STRESS().template compute<type>(cell, rho, u, pi);
163 template <
typename CELL,
typename PINEQNORMSQR,
typename V=
typename CELL::value_t>
168 STRESS().template compute<type>(cell, rho, u, pi);
169 piNeqNormSqr = pi[0]*pi[0] + 2.*pi[1]*pi[1] + pi[2]*pi[2];
171 piNeqNormSqr += pi[2]*pi[2] + pi[3]*pi[3] + 2.*pi[4]*pi[4] +pi[5]*pi[5];
175 template <
typename CELL,
typename RHO>
178 DENSITY().template define<type>(cell, rho);
182 DefinitionRule().template defineRho<type>(cell, rho);
185 template <
typename CELL,
typename U>
188 MOMENTUM().template define<type>(cell, u);
190 using U_ARITH = std::remove_const_t<std::remove_pointer_t<std::remove_extent_t<U>>>;
191 U_ARITH uShift[DESCRIPTOR::d];
194 DefinitionRule().template defineU<type>(cell, u);
197 template <
typename CELL,
typename RHO,
typename U>
200 DENSITY().template define<type>(cell, rho);
201 MOMENTUM().template define<type>(cell, u);
204 using U_ARITH = std::remove_const_t<std::remove_pointer_t<std::remove_extent_t<U>>>;
205 U_ARITH uShift[DESCRIPTOR::d];
208 DefinitionRule().template defineRhoU<type>(cell, rhoShift, uShift);
211 template <
typename CELL,
typename RHO,
typename U,
typename PI>
214 DENSITY().template define<type>(cell, rho);
215 MOMENTUM().template define<type>(cell, u);
218 using U_ARITH = std::remove_const_t<std::remove_pointer_t<std::remove_extent_t<U>>>;
219 U_ARITH uShift[DESCRIPTOR::d];
222 DefinitionRule().template defineAllMomenta<type>(cell, rhoShift, uShift, pi);
225 template <
typename CELL>
228 DENSITY().template initialize<type>(cell);
229 MOMENTUM().template initialize<type>(cell);
232 template <
typename CELL,
typename RHO>
235 DENSITY().template inverseShift<type>(cell, rho);
238 template <
typename CELL,
typename U>
241 MOMENTUM().template inverseShift<type>(cell, u);
244 template <
typename CELL,
typename RHO,
typename U>
256 +
stress().getName() +
","
266 typename DefinitionRule
274 template <
typename DESCRIPTOR>
278template <
typename MOMENTA>
280 template <
typename DESCRIPTOR>
290template <
typename MOMENTA>
292 template <
typename DESCRIPTOR>
302template <
typename MOMENTA>
304 template <
typename DESCRIPTOR>
314template <
typename MOMENTA>
317template <
typename MOMENTA>
319 template <
typename DESCRIPTOR>
329template <
typename MOMENTA>
331 template <
typename DESCRIPTOR>
341template <
typename MOMENTA>
343 template <
typename DESCRIPTOR>
Implementation of computation and definition of the moments density, velocity, stress.
void copyN(T c[], const T a[], const unsigned dim) any_platform
Top level namespace for all of OpenLB.
static void computeRhoU(CELL &cell, RHO &rho, U &u) any_platform
Computation of hydrodynamic variables.
Standard computation for density in the bulk as zeroth moment of the population.
Standard computation for momentum in the bulk as first moment of the population.
void operator()(CELL &cell, RHO &rho, U &u) const any_platform
Partially-specializable rho and u computation.
void operator()(CELL &cell, RHO &rho, U &u) const any_platform
Tuple of momenta components forming a moment system.
void defineAllMomenta(CELL &cell, const RHO &rho, const U &u, const PI &pi) any_platform
void defineRhoU(CELL &cell, const RHO &rho, const U &u) any_platform
void initialize(CELL &cell)
std::string getName() const
void computeRhoU(CELL &cell, RHO &rho, U &u) const any_platform
void computeRhoJ(CELL &cell, RHO &rho, J &j) const any_platform
void inverseShiftU(CELL &cell, U &u) any_platform
void computeStress(CELL &cell, PI &pi) const any_platform
void computeJ(CELL &cell, J &j) const any_platform
void defineU(CELL &cell, const U &u) any_platform
void computeU(CELL &cell, U &u) const any_platform
V computeRho(CELL &cell) const any_platform
void computeStress(CELL &cell, const RHO &rho, const U &u, PI &pi) const any_platform
void inverseShiftRhoU(CELL &cell, RHO &rho, U &u) any_platform
void computePiNeqNormSqr(CELL &cell, PINEQNORMSQR &piNeqNormSqr) const any_platform
void computeAllMomenta(CELL &cell, RHO &rho, U &u, PI &pi) const any_platform
void inverseShiftRho(CELL &cell, RHO &rho) any_platform
DefinitionRule definition
void defineRho(CELL &cell, const RHO &rho) any_platform
DefinitionRule definition
Compute number of elements of a symmetric d-dimensional tensor.