35#ifndef DYNAMICS_MOMENTA_INTERFACE_H
36#define DYNAMICS_MOMENTA_INTERFACE_H
51template <
typename BASE,
typename DENSITY,
typename MOMENTUM>
53 template <concepts::Cell CELL,
typename RHO,
typename U>
56 DENSITY().template compute<BASE>(cell, rho);
57 MOMENTUM().template computeU<BASE>(cell, u);
61template <
typename BASE>
63 template <concepts::Cell CELL,
typename RHO,
typename U,
typename DESCRIPTOR=
typename CELL::descriptor_t>
74 typename DefinitionRule
93 typename DefinitionRule
105 template <concepts::Cell CELL,
typename V=
typename CELL::value_t>
109 DENSITY().template compute<type>(cell, rho);
113 template <concepts::Cell CELL,
typename U>
119 template <concepts::Cell CELL,
typename J>
122 MOMENTUM().template compute<type>(cell, j);
127 template <concepts::Cell CELL,
typename RHO,
typename U,
typename PI>
131 STRESS().template compute<type>(cell, rho, u, pi);
135 template <concepts::Cell 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 <concepts::Cell CELL,
typename RHO,
typename J>
146 DENSITY().template compute<type>(cell, rho);
147 MOMENTUM().template compute<type>(cell, j);
150 template <concepts::Cell CELL,
typename RHO,
typename U>
156 template <concepts::Cell CELL,
typename RHO,
typename U,
typename PI>
160 STRESS().template compute<type>(cell, rho, u, pi);
163 template <concepts::Cell 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 <concepts::Cell CELL,
typename RHO>
178 DENSITY().template define<type>(cell, rho);
185 template <concepts::Cell 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];
197 template <concepts::Cell 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];
211 template <concepts::Cell 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];
225 template <
typename CELL>
232 template <concepts::Cell CELL,
typename RHO>
235 DENSITY().template inverseShift<type>(cell, rho);
238 template <concepts::Cell CELL,
typename U>
241 MOMENTUM().template inverseShift<type>(cell, u);
244 template <concepts::Cell CELL,
typename RHO,
typename U>
256 +
stress().getName() +
","
266 typename DefinitionRule
274 template <
typename DESCRIPTOR>
278 template <
template<
typename>
typename F>
282 template <
template<
typename>
typename F>
287template <
typename MOMENTA>
289 template <
typename DESCRIPTOR>
299template <
typename MOMENTA>
301 template <
typename DESCRIPTOR>
311template <
typename MOMENTA>
313 template <
typename DESCRIPTOR>
323template <
typename MOMENTA>
326template <
typename MOMENTA>
328 template <
typename DESCRIPTOR>
338template <
typename MOMENTA>
340 template <
typename DESCRIPTOR>
350template <
typename MOMENTA>
352 template <
typename DESCRIPTOR>
362template <
typename MOMENTA>
364 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.