OpenLB 1.8.1
Loading...
Searching...
No Matches
olb::momenta::FixedVelocityMomentumAD Struct Reference

The first moment (the heat conduction) is fixed. More...

#include <elements.h>

+ Collaboration diagram for olb::momenta::FixedVelocityMomentumAD:

Classes

struct  VELOCITY
 

Public Member Functions

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
 

Static Public Member Functions

static std::string getName ()
 

Detailed Description

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 843 of file elements.h.

Member Function Documentation

◆ 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 848 of file elements.h.

849 {
850 const V temp = TYPE().computeRho(cell);
851 const auto uNS = cell.template getFieldPointer<descriptors::VELOCITY>();
852 computeU<TYPE>(cell, j);
853 for (int iD=0; iD<DESCRIPTOR::d; ++iD) {
854 j[iD] += temp * uNS[iD];
855 }
856 }
void computeU(CELL &cell, U &u) any_platform
Definition elements.h:860

References computeU().

+ Here is the call graph for this function:

◆ 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 860 of file elements.h.

861 {
862 const auto uExt = cell.template getFieldPointer<VELOCITY>();
863 for (int iD=0; iD < DESCRIPTOR::d; ++iD) {
864 u[iD] = uExt[iD];
865 }
866 }
+ Here is the caller graph for this function:

◆ define()

template<typename TYPE , typename CELL , typename U >
void olb::momenta::FixedVelocityMomentumAD::define ( CELL & cell,
const U & u )
inline

Definition at line 870 of file elements.h.

871 {
872 cell.template setField<VELOCITY>(u);
873 }

◆ getName()

static std::string olb::momenta::FixedVelocityMomentumAD::getName ( )
inlinestatic

Definition at line 885 of file elements.h.

885 {
886 return "FixedVelocityMomentumAD";
887 }

◆ 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 876 of file elements.h.

877 {
878 V u[DESCRIPTOR::d] = { V{} };
879 cell.template setField<VELOCITY>(u);
880 }

◆ inverseShift()

template<typename TYPE , typename CELL , typename U >
void olb::momenta::FixedVelocityMomentumAD::inverseShift ( CELL & cell,
U & u )
inline

Definition at line 883 of file elements.h.

883{};

The documentation for this struct was generated from the following file: