24#ifndef DYNAMICS_MOMENTA_DEFINITION_RULE_H
25#define DYNAMICS_MOMENTA_DEFINITION_RULE_H
33 template <
typename TYPE,
typename CELL,
typename V=
typename CELL::value_t,
typename DESCRIPTOR=
typename CELL::descriptor_t>
37 template <
typename TYPE,
typename CELL,
typename V=
typename CELL::value_t,
typename DESCRIPTOR=
typename CELL::descriptor_t>
41 template <
typename TYPE,
typename CELL,
typename V=
typename CELL::value_t,
typename DESCRIPTOR=
typename CELL::descriptor_t>
46 template <
typename TYPE,
typename CELL,
typename V=
typename CELL::value_t,
typename DESCRIPTOR=
typename CELL::descriptor_t>
48 V rho,
const V u[DESCRIPTOR::d],
53 return "DefineSeparately";
61 template <
typename TYPE,
typename CELL,
typename RHO,
typename V=
typename CELL::value_t,
typename DESCRIPTOR=
typename CELL::descriptor_t>
65 const auto u = cell.template getField<descriptors::VELOCITY>();
71 template <
typename TYPE,
typename CELL,
typename U,
typename V=
typename CELL::value_t,
typename DESCRIPTOR=
typename CELL::descriptor_t>
75 template <
typename TYPE,
typename CELL,
typename RHO,
typename U,
typename V=
typename CELL::value_t,
typename DESCRIPTOR=
typename CELL::descriptor_t>
79 defineRho<TYPE>(cell, rho);
82 template <
typename TYPE,
typename CELL,
typename RHO,
typename U,
typename PI,
typename V=
typename CELL::value_t,
typename DESCRIPTOR=
typename CELL::descriptor_t>
86 defineRho<TYPE>(cell, rho);
97 template <
typename TYPE,
typename CELL,
typename V=
typename CELL::value_t,
typename DESCRIPTOR=
typename CELL::descriptor_t>
101 V oldRho, u[DESCRIPTOR::d];
102 TYPE().computeRhoU(cell, oldRho, u);
103 TYPE().inverseShiftRhoU(cell, oldRho, u);
109 template <
typename TYPE,
typename CELL,
typename V=
typename CELL::value_t,
typename DESCRIPTOR=
typename CELL::descriptor_t>
113 V rho, oldU[DESCRIPTOR::d];
114 TYPE().computeRhoU(cell, rho, oldU);
115 TYPE().inverseShiftRhoU(cell, rho, oldU);
121 template <
typename TYPE,
typename CELL,
typename V=
typename CELL::value_t,
typename DESCRIPTOR=
typename CELL::descriptor_t>
125 V oldRho, oldU[DESCRIPTOR::d];
126 TYPE().computeRhoU(cell, oldRho, oldU);
127 TYPE().inverseShiftRhoU(cell, oldRho, oldU);
132 template <
typename TYPE,
typename CELL,
typename V=
typename CELL::value_t,
typename DESCRIPTOR=
typename CELL::descriptor_t>
134 V rho,
const V u[DESCRIPTOR::d],
141 return "DefineToNEq";
148 template <
typename TYPE,
typename CELL,
typename RHO,
typename V=
typename CELL::value_t,
typename DESCRIPTOR=
typename CELL::descriptor_t>
154 template <
typename TYPE,
typename CELL,
typename U,
typename V=
typename CELL::value_t,
typename DESCRIPTOR=
typename CELL::descriptor_t>
158 template <
typename TYPE,
typename CELL,
typename RHO,
typename U,
typename V=
typename CELL::value_t,
typename DESCRIPTOR=
typename CELL::descriptor_t>
161 defineRho<TYPE>(cell, rho);
164 template <
typename TYPE,
typename CELL,
typename RHO,
typename U,
typename PI,
typename V=
typename CELL::value_t,
typename DESCRIPTOR=
typename CELL::descriptor_t>
172 return "DefineUSeparately";
181 template <
typename TYPE,
typename CELL,
typename V=
typename CELL::value_t,
typename DESCRIPTOR=
typename CELL::descriptor_t>
185 V oldRho, u[DESCRIPTOR::d];
188 TYPE().inverseShiftRhoU(cell, oldRho, u);
194 template <
typename TYPE,
typename CELL,
typename V=
typename CELL::value_t,
typename DESCRIPTOR=
typename CELL::descriptor_t>
198 template <
typename TYPE,
typename CELL,
typename V=
typename CELL::value_t,
typename DESCRIPTOR=
typename CELL::descriptor_t>
202 defineRho<TYPE>(cell, rho);
205 template <
typename TYPE,
typename CELL,
typename V=
typename CELL::value_t,
typename DESCRIPTOR=
typename CELL::descriptor_t>
207 V rho,
const V u[DESCRIPTOR::d],
214 return "DefineUSeparatelyTrace";
Top level namespace for all of OpenLB.
static void defineEqFirstOrder(CELL &cell, const NEWRHO &newRho, const NEWU &newU) any_platform
static void defineNEq(CELL &cell, const OLDRHO &oldRho, const OLDU &oldU, const NEWRHO &newRho, const NEWU &newU) any_platform
static void defineNEqFromPi(CELL &cell, const RHO &rho, const U &u, const PI &pi) any_platform
static void computeRhoU(CELL &cell, RHO &rho, U &u) any_platform
Computation of hydrodynamic variables.
The momenta are defined one after the other.
void defineRhoU(CELL &cell, V rho, const V u[DESCRIPTOR::d]) any_platform
void defineAllMomenta(CELL &cell, V rho, const V u[DESCRIPTOR::d], const V pi[util::TensorVal< DESCRIPTOR >::n]) any_platform
void defineU(CELL &cell, const V u[DESCRIPTOR::d]) any_platform
void defineRho(CELL &cell, V rho) any_platform
static std::string getName()
When momenta are changed, a new equilibrium state is set.
void defineAllMomenta(CELL &cell, const RHO &rho, const U &u, const PI &pi) any_platform
static std::string getName()
void defineRhoU(CELL &cell, const RHO &rho, const U &u) any_platform
void defineU(CELL &cell, const U &u) any_platform
void defineRho(CELL &cell, const RHO &rho) any_platform
When momenta are changed, the equilibrium part of the population is modified while the non-equilibriu...
static std::string getName()
void defineRho(CELL &cell, V rho) any_platform
void defineAllMomenta(CELL &cell, V rho, const V u[DESCRIPTOR::d], const V pi[util::TensorVal< DESCRIPTOR >::n]) any_platform
void defineU(CELL &cell, const V u[DESCRIPTOR::d]) any_platform
void defineRhoU(CELL &cell, V rho, const V u[DESCRIPTOR::d]) any_platform
defineRho leads to a new non-equilibrium population, defineU only sets the velocity data.
void defineAllMomenta(CELL &cell, V rho, const V u[DESCRIPTOR::d], const V pi[util::TensorVal< DESCRIPTOR >::n]) any_platform
void defineRhoU(CELL &cell, V rho, const V u[DESCRIPTOR::d]) any_platform
void defineU(CELL &cell, const V u[DESCRIPTOR::d]) any_platform
void defineRho(CELL &cell, V rho) any_platform
static std::string getName()
defineRho leads to a new non-equilibrium population, defineU only sets the velocity data.
void defineU(CELL &cell, U &u) any_platform
static std::string getName()
void defineRhoU(CELL &cell, RHO &rho, U &u) any_platform
void defineRho(CELL &cell, RHO &rho) any_platform
void defineAllMomenta(CELL &cell, RHO &rho, U &u, PI &pi) any_platform
Compute number of elements of a symmetric d-dimensional tensor.