14template <MInt nDim, MInt nDist>
18 MFloat*
const p_eqDist)
const = 0;
20 MFloat*
const p_eqDist)
const = 0;
23 const MInt* mFld1,
const MInt* mFld2,
const MFloat* mTp,
const MInt* mDistFld)
const = 0;
26 const MInt* mDistFld)
const = 0;
32 MFloat*
const p_nonEqDist)
const {
34 std::array<MFloat, nDist> eqDist{};
35 calcEqDists(zerothMoment, firstMoment, eqDist.data());
38 for(
MInt j = 0; j < nDist; j++) {
39 p_nonEqDist[j] = p_dist[j] - eqDist[j];
44 MFloat*
const momentumFlux)
const {
47 std::array<MFloat, nDist> nonEqDist{};
50 for(
MInt d = 0; d < nDim * nDim; d++) {
53 for(
MInt j = 0; j < nDist; j++) {
54 for(
MInt k = 0; k < nDim; k++) {
55 for(
MInt l = 0; l < nDim; l++) {
56 momentumFlux[k * nDim + l] += nonEqDist[j] * Ld::ppdfDir(j, k) * Ld::ppdfDir(j, l);
63template <MInt nDim, MInt nDist>
67 lbfunc::calcEqDists<nDim, nDist, false>(p_rho, p_u, p_eqDist);
70 MFloat*
const p_eqDist)
const override {
71 lbfunc::calcEqDists<nDim, nDist, false>(p_rho, squaredVelocity, p_u, p_eqDist);
75 const MInt* mFld2,
const MFloat* mTp,
const MInt* mDistFld)
const override {
76 lbfunc::calcEqDists<nDim, nDist, false>(p_rho, p_u, eqDist, mFld1, mFld2, mTp, mDistFld);
80 const MInt* mDistFld)
const override {
81 lbfunc::calcEqDists<nDim, nDist, false>(p_rho, squaredVelocity, p_u, eqDist, mFld1, mFld2, mTp, mDistFld);
85 lbfunc::calcMacroVars<nDim, nDist>(p_dist, p_rho, p_u);
92template <MInt nDim, MInt nDist>
96 lbfunc::calcEqDists<nDim, nDist, true>(p_rho, p_u, p_eqDist);
99 MFloat*
const p_eqDist)
const override {
100 lbfunc::calcEqDists<nDim, nDist, true>(p_rho, squaredVelocity, p_u, p_eqDist);
104 const MInt* mFld2,
const MFloat* mTp,
const MInt* mDistFld)
const override {
105 lbfunc::calcEqDists<nDim, nDist, true>(p_rho, p_u, eqDist, mFld1, mFld2, mTp, mDistFld);
109 const MInt* mDistFld)
const override {
110 lbfunc::calcEqDists<nDim, nDist, true>(p_rho, squaredVelocity, p_u, eqDist, mFld1, mFld2, mTp, mDistFld);
114 lbfunc::calcMacroVars<nDim, nDist, true>(p_dist, p_rho, p_u);
void calcEqDists(const MFloat p_rho, MFloat const *const p_u, MFloat *const eqDist, const MInt *mFld1, const MInt *mFld2, const MFloat *mTp, const MInt *mDistFld) const override
void calcMacroVars(MFloat const *const p_dist, MFloat &p_rho, MFloat *const p_u) const override
void calcEqDists(const MFloat p_rho, const MFloat *const p_u, MFloat *const p_eqDist) const override
void calcPrimitiveVars(MFloat const *const p_dist, MFloat &p_rho, MFloat *const p_u) const override
void calcEqDists(const MFloat p_rho, const MFloat squaredVelocity, MFloat const *const p_u, MFloat *const eqDist, const MInt *mFld1, const MInt *mFld2, const MFloat *mTp, const MInt *mDistFld) const override
void calcEqDists(const MFloat p_rho, const MFloat squaredVelocity, const MFloat *const p_u, MFloat *const p_eqDist) const override
virtual void calcEqDists(const MFloat zerothMoment, const MFloat squaredFirstMoment, const MFloat *const firstMoment, MFloat *const p_eqDist, const MInt *mFld1, const MInt *mFld2, const MFloat *mTp, const MInt *mDistFld) const =0
virtual void calcMacroVars(MFloat const *const p_dist, MFloat &p_rho, MFloat *const p_u) const =0
virtual void calcEqDists(const MFloat zerothMoment, const MFloat *const firstMoment, MFloat *const p_eqDist) const =0
virtual void calcPrimitiveVars(MFloat const *const p_dist, MFloat &p_rho, MFloat *const p_u) const =0
void calcNonEqDists(const MFloat zerothMoment, const MFloat *const firstMoment, const MFloat *const p_dist, MFloat *const p_nonEqDist) const
virtual void calcEqDists(const MFloat zerothMoment, const MFloat *const firstMoment, MFloat *const p_eqDist, const MInt *mFld1, const MInt *mFld2, const MFloat *mTp, const MInt *mDistFld) const =0
void calcMomentumFlux(const MFloat &zerothMoment, const MFloat *const firstMoments, const MFloat *const dist, MFloat *const momentumFlux) const
virtual void calcEqDists(const MFloat zerothMoment, const MFloat squaredFirstMoment, const MFloat *const firstMoment, MFloat *const p_eqDist) const =0
void calcEqDists(const MFloat p_rho, const MFloat squaredVelocity, MFloat const *const p_u, MFloat *const eqDist, const MInt *mFld1, const MInt *mFld2, const MFloat *mTp, const MInt *mDistFld) const override
void calcEqDists(const MFloat p_rho, const MFloat *const p_u, MFloat *const p_eqDist) const override
void calcEqDists(const MFloat p_rho, MFloat const *const p_u, MFloat *const eqDist, const MInt *mFld1, const MInt *mFld2, const MFloat *mTp, const MInt *mDistFld) const override
void calcMacroVars(MFloat const *const p_dist, MFloat &p_rho, MFloat *const p_u) const override
void calcPrimitiveVars(MFloat const *const p_dist, MFloat &p_rho, MFloat *const p_u) const override
void calcEqDists(const MFloat p_rho, const MFloat squaredVelocity, const MFloat *const p_u, MFloat *const p_eqDist) const override
MFloat dist(const Point< DIM > &p, const Point< DIM > &q)
LB lattice descriptor for arrays depending on D and Q.