The velocity is fixed and stored in the external field U.
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 , 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 velocity is fixed and stored in the external field U.
Definition at line 413 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::FixedVelocityMomentumGeneric::compute |
( |
CELL & | cell, |
|
|
J & | j ) |
|
inline |
Definition at line 418 of file elements.h.
419 {
420 const V rho = TYPE().computeRho(cell);
421 auto uExt = cell.template getField<VELOCITY>();
422 for (int iD=0; iD < DESCRIPTOR::d; ++iD) {
423 j[iD] = uExt[iD] * rho;
424 }
425 }
◆ computeU()
template<typename TYPE , typename CELL , typename U , typename V = typename CELL::value_t, typename DESCRIPTOR = typename CELL::descriptor_t>
void olb::momenta::FixedVelocityMomentumGeneric::computeU |
( |
CELL & | cell, |
|
|
U & | u ) |
|
inline |
Definition at line 429 of file elements.h.
430 {
431 const auto uExt = cell.template getField<VELOCITY>();
432 for (int iD=0; iD < DESCRIPTOR::d; ++iD) {
433 u[iD] = uExt[iD];
434 }
435 }
◆ define()
template<typename TYPE , typename CELL , typename U >
void olb::momenta::FixedVelocityMomentumGeneric::define |
( |
CELL & | cell, |
|
|
const U & | u ) |
|
inline |
Definition at line 439 of file elements.h.
440 {
441 cell.template setField<VELOCITY>(u);
442 }
◆ getName()
static std::string olb::momenta::FixedVelocityMomentumGeneric::getName |
( |
| ) |
|
|
inlinestatic |
Definition at line 454 of file elements.h.
454 {
455 return "FixedVelocityMomentumGeneric";
456 }
◆ initialize()
template<typename TYPE , typename CELL , typename V = typename CELL::value_t, typename DESCRIPTOR = typename CELL::descriptor_t>
void olb::momenta::FixedVelocityMomentumGeneric::initialize |
( |
CELL & | cell | ) |
|
|
inline |
Definition at line 445 of file elements.h.
446 {
447 Vector<V,DESCRIPTOR::d> u{};
448 cell.template setField<VELOCITY>(u);
449 }
◆ inverseShift()
template<typename TYPE , typename CELL , typename U >
void olb::momenta::FixedVelocityMomentumGeneric::inverseShift |
( |
CELL & | cell, |
|
|
U & | u ) |
|
inline |
The documentation for this struct was generated from the following file: