The first moment (the heat conduction) is fixed.
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 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 , typename V = typename CELL::value_t, typename DESCRIPTOR = typename CELL::descriptor_t> |
void | initialize (CELL &cell) any_platform |
|
template<typename TYPE , typename CELL , typename U > |
void | inverseShift (CELL &cell, U &u) any_platform |
|
The first moment (the heat conduction) is fixed.
Implementation is identical to FixedVelocityMomentumGeneric, but the compute(...) method is different: is computes the (heat) transport, similar to FixedTemperatureMomentum.
Definition at line 642 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::FixedVelocityMomentumAD::compute |
( |
CELL & | cell, |
|
|
J & | j ) |
|
inline |
Definition at line 647 of file elements.h.
648 {
649 const V temp = TYPE().computeRho(cell);
650 const auto uNS = cell.template getFieldPointer<descriptors::VELOCITY>();
651 computeU<TYPE>(cell, j);
652 for (int iD=0; iD<DESCRIPTOR::d; ++iD) {
653 j[iD] += temp * uNS[iD];
654 }
655 }
◆ computeU()
template<typename TYPE , typename CELL , typename U , typename DESCRIPTOR = typename CELL::descriptor_t>
void olb::momenta::FixedVelocityMomentumAD::computeU |
( |
CELL & | cell, |
|
|
U & | u ) |
|
inline |
Definition at line 659 of file elements.h.
660 {
661 const auto uExt = cell.template getFieldPointer<VELOCITY>();
662 for (int iD=0; iD < DESCRIPTOR::d; ++iD) {
663 u[iD] = uExt[iD];
664 }
665 }
◆ define()
template<typename TYPE , typename CELL , typename U >
void olb::momenta::FixedVelocityMomentumAD::define |
( |
CELL & | cell, |
|
|
const U & | u ) |
|
inline |
Definition at line 669 of file elements.h.
670 {
671 cell.template setField<VELOCITY>(u);
672 }
◆ getName()
static std::string olb::momenta::FixedVelocityMomentumAD::getName |
( |
| ) |
|
|
inlinestatic |
Definition at line 684 of file elements.h.
684 {
685 return "FixedVelocityMomentumAD";
686 }
◆ initialize()
template<typename TYPE , typename CELL , typename V = typename CELL::value_t, typename DESCRIPTOR = typename CELL::descriptor_t>
void olb::momenta::FixedVelocityMomentumAD::initialize |
( |
CELL & | cell | ) |
|
|
inline |
Definition at line 675 of file elements.h.
676 {
677 V u[DESCRIPTOR::d] = { V{} };
678 cell.template setField<VELOCITY>(u);
679 }
◆ inverseShift()
template<typename TYPE , typename CELL , typename U >
void olb::momenta::FixedVelocityMomentumAD::inverseShift |
( |
CELL & | cell, |
|
|
U & | u ) |
|
inline |
The documentation for this struct was generated from the following file: