Momentum computation for P1 dynamics.
More...
#include <elements.h>
|
| template<typename TYPE , typename CELL , typename J , typename V = typename CELL::value_t, typename DESCRIPTOR = typename CELL::descriptor_t> |
| void | compute (CELL &cell, J &j) any_platform |
| |
| template<typename TYPE , typename CELL , typename U , typename V = typename CELL::value_t, typename DESCRIPTOR = typename CELL::descriptor_t> |
| void | computeU (CELL &cell, U &u) any_platform |
| |
| template<typename TYPE , typename CELL , typename U > |
| void | define (CELL &cell, const U &u) any_platform |
| |
| template<typename TYPE , typename CELL > |
| void | initialize (CELL &cell) any_platform |
| |
| template<typename TYPE , typename CELL , typename U > |
| void | inverseShift (CELL &cell, U &u) any_platform |
| |
Momentum computation for P1 dynamics.
Definition at line 1132 of file elements.h.
◆ compute()
template<typename TYPE , typename CELL , typename J , typename V = typename CELL::value_t, typename DESCRIPTOR = typename CELL::descriptor_t>
| void olb::momenta::P1Momentum::compute |
( |
CELL & | cell, |
|
|
J & | j ) |
|
inline |
Definition at line 1134 of file elements.h.
1135 {
1136 std::array<V,DESCRIPTOR::q> cellShifted;
1137 for (int iPop = 0; iPop <DESCRIPTOR::q; ++iPop) {
1139 }
1140 std::array<V,DESCRIPTOR::d> moment1;
1141 moment1.fill( V(0) );
1142
1143 for (int iPop = 0; iPop < DESCRIPTOR::q; ++iPop) {
1144 for (int iDim = 0; iDim < DESCRIPTOR::d; ++iDim) {
1146 }
1147 }
1148 for (int iDim = 0; iDim < DESCRIPTOR::d; ++iDim) {
1149 j[iDim] = moment1[iDim];
1150 }
1151 }
constexpr T t(unsigned iPop, tag::CUM) any_platform
constexpr int c(unsigned iPop, unsigned iDim) any_platform
References olb::descriptors::c(), and olb::descriptors::t().
◆ computeU()
template<typename TYPE , typename CELL , typename U , typename V = typename CELL::value_t, typename DESCRIPTOR = typename CELL::descriptor_t>
| void olb::momenta::P1Momentum::computeU |
( |
CELL & | cell, |
|
|
U & | u ) |
|
inline |
Definition at line 1154 of file elements.h.
1155 {
1156 for (int iD=0; iD<DESCRIPTOR::d; ++iD) {
1157 u[iD] = V{};
1158 }
1159 }
◆ define()
template<typename TYPE , typename CELL , typename U >
| void olb::momenta::P1Momentum::define |
( |
CELL & | cell, |
|
|
const U & | u ) |
|
inline |
◆ getName()
| static std::string olb::momenta::P1Momentum::getName |
( |
| ) |
|
|
inlinestatic |
Definition at line 1170 of file elements.h.
1170 {
1171 return "P1Momentum";
1172 }
◆ initialize()
template<typename TYPE , typename CELL >
| void olb::momenta::P1Momentum::initialize |
( |
CELL & | cell | ) |
|
|
inline |
◆ inverseShift()
template<typename TYPE , typename CELL , typename U >
| void olb::momenta::P1Momentum::inverseShift |
( |
CELL & | cell, |
|
|
U & | u ) |
|
inline |
The documentation for this struct was generated from the following file: