template<typename STRESS>
struct olb::momenta::ForcedIncompressibleStress< STRESS >
Definition at line 1847 of file elements.h.
template<typename STRESS >
template<typename TYPE , typename CELL , typename P , typename U , typename PI , typename V = typename CELL::value_t, typename DESCRIPTOR = typename CELL::descriptor_t>
Definition at line 1849 of file elements.h.
1850 {
1851 V uNew[DESCRIPTOR::d] { };
1852 const auto force = cell.template getFieldPointer<descriptors::FORCE>();
1853 const auto partialRho = cell.template getFieldPointer<descriptors::NABLARHO>();
1854 for (unsigned iD=0; iD < DESCRIPTOR::d; ++iD) {
1855 uNew[iD] = u[iD] - V{0.5} * force[iD];
1856 }
1859 int iPi = 0;
1860 for (int iAlpha=0; iAlpha < DESCRIPTOR::d; ++iAlpha) {
1861 for (int iBeta=iAlpha; iBeta < DESCRIPTOR::d; ++iBeta) {
1864 ++iPi;
1865 }
1866 }
1867
1868 for (int iPi=0; iPi < util::TensorVal<DESCRIPTOR>::n; ++iPi) {
1869 pi[iPi] += forceTensor[iPi];
1870 }
1871 }
constexpr T invCs2() any_platform
void compute(CELL &cell, const P &p, const U &u, PI &pi) any_platform
static constexpr int n
result stored in n
References olb::momenta::ForcedIncompressibleStress< STRESS >::compute(), and olb::descriptors::invCs2().