|
| template<typename TYPE , typename CELL , typename PRESSURE , typename DESCRIPTOR = typename CELL::descriptor_t, typename V = typename CELL::value_t> |
| void | compute (CELL &cell, PRESSURE &p) any_platform |
| |
| template<typename TYPE , typename CELL , typename RHO > |
| void | define (CELL &cell, const RHO &rho) any_platform |
| |
| template<typename TYPE , typename CELL > |
| void | initialize (CELL &cell) any_platform |
| |
| template<typename TYPE , typename CELL , typename RHO > |
| void | inverseShift (CELL &cell, RHO &rho) any_platform |
| |
template<typename MOMENTUM>
struct olb::momenta::BulkPressure< MOMENTUM >
Computation of hydrodynamic pressure as zeroth moment of the population.
Definition at line 173 of file elements.h.
template<typename MOMENTUM >
template<typename TYPE , typename CELL , typename PRESSURE , typename DESCRIPTOR = typename CELL::descriptor_t, typename V = typename CELL::value_t>
Definition at line 175 of file elements.h.
176 {
177 V sum = 0;
178 for (int iPop=1; iPop < DESCRIPTOR::q; ++iPop) {
179 sum += cell[iPop];
180 }
181 auto rho = cell.template getField<descriptors::RHO>();
182 auto gradRho = cell.template getField<descriptors::NABLARHO>();
184 V uGradRho = 0;
185 MOMENTUM().template computeU<TYPE>(cell, u);
186 for (unsigned iD=0; iD < DESCRIPTOR::d; ++iD) {
187 uGradRho += u[iD] * gradRho[iD];
188 }
192 }
constexpr T invCs2() any_platform
constexpr T t(unsigned iPop, tag::CUM) any_platform
auto normSqr(const ARRAY_LIKE &u) any_platform
Compute norm square of a d-dimensional vector.
Vector(T &&t, Ts &&... ts) -> Vector< std::remove_cvref_t< T >, 1+sizeof...(Ts)>
References olb::descriptors::invCs2(), olb::util::normSqr(), and olb::descriptors::t().