|
| 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 , typename DESCRIPTOR = typename CELL::descriptor_t> |
| 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 , typename V = typename CELL::value_t, typename DESCRIPTOR = typename CELL::descriptor_t> |
| void | inverseShift (CELL &cell, U &u) any_platform |
| |
template<typename MOMENTUM>
struct olb::momenta::GuoZhaoForcedMomentum< MOMENTUM >
Definition at line 1518 of file elements.h.
template<typename MOMENTUM >
template<typename TYPE , typename CELL , typename U , typename V = typename CELL::value_t, typename DESCRIPTOR = typename CELL::descriptor_t>
Definition at line 1526 of file elements.h.
1527 {
1529 const V epsilon = cell.template getField<descriptors::EPSILON>();
1530 const V nu = cell.template getField<descriptors::NU>();
1531 const V k = cell.template getField<descriptors::K>();
1532 const auto bodyF = cell.template getFieldPointer<descriptors::BODY_FORCE>();
1533
1535 const V Fe = 0.;
1536 const V c_0 = 0.5*(1 + 0.5*epsilon*nu/k);
1538
1539 for (int iVel=0; iVel < DESCRIPTOR::d; ++iVel) {
1540 u[iVel] += bodyF[iVel] * V(0.5) * epsilon;
1541 u[iVel] /= (c_0 +
util::sqrt(c_0*c_0 + c_1*uMag));
1542 }
1543 }
auto normSqr(const ARRAY_LIKE &u) any_platform
Compute norm square of a d-dimensional vector.
void computeU(CELL &cell, U &u) any_platform
References olb::momenta::GuoZhaoForcedMomentum< MOMENTUM >::computeU(), olb::util::normSqr(), and olb::util::sqrt().
template<typename MOMENTUM >
template<typename TYPE , typename CELL , typename U , typename V = typename CELL::value_t, typename DESCRIPTOR = typename CELL::descriptor_t>
Definition at line 1558 of file elements.h.
1558 {
1559 const V epsilon = cell.template getField<descriptors::EPSILON>();
1560 const V nu = cell.template getField<descriptors::NU>();
1561 const V k = cell.template getField<descriptors::K>();
1562 const auto bodyF = cell.template getFieldPointer<descriptors::BODY_FORCE>();
1563
1565 const V Fe = 0.;
1566 const V c_0 = 0.5*(1 + 0.5*epsilon*nu/k);
1568
1569 for (int iVel=0; iVel < DESCRIPTOR::d; ++iVel) {
1570 u[iVel] *= (c_0 +
util::sqrt(c_0*c_0 + c_1*uMag));
1571 u[iVel] -= bodyF[iVel] * V(0.5) * epsilon;
1572 }
1573 }
References olb::util::normSqr(), and olb::util::sqrt().