OpenLB 1.7
Loading...
Searching...
No Matches
Public Member Functions | Static Public Member Functions | List of all members
olb::momenta::FixedVelocityMomentum Struct Reference

The velocity is stored in the external field descriptors::VELOCITY. More...

#include <elements.h>

+ Collaboration diagram for olb::momenta::FixedVelocityMomentum:

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 velocity is stored in the external field descriptors::VELOCITY.

Definition at line 526 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::FixedVelocityMomentum::compute ( CELL & cell,
J & j )
inline

Definition at line 529 of file elements.h.

530 {
531 const V rho = TYPE().computeRho(cell);
532 auto uExt = cell.template getField<descriptors::VELOCITY>();
533 for (int iD=0; iD < DESCRIPTOR::d; ++iD) {
534 j[iD] = uExt[iD] * rho;
535 }
536 }

◆ computeU()

template<typename TYPE , typename CELL , typename U , typename DESCRIPTOR = typename CELL::descriptor_t>
void olb::momenta::FixedVelocityMomentum::computeU ( CELL & cell,
U & u )
inline

Definition at line 540 of file elements.h.

541 {
542 auto uExt = cell.template getField<descriptors::VELOCITY>();
543 for (int iD=0; iD < DESCRIPTOR::d; ++iD) {
544 u[iD] = uExt[iD];
545 }
546 }

◆ define()

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

Definition at line 550 of file elements.h.

551 {
552 cell.template setField<descriptors::VELOCITY>(u);
553 }

◆ getName()

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

Definition at line 565 of file elements.h.

565 {
566 return "FixedVelocityMomentum";
567 }

◆ initialize()

template<typename TYPE , typename CELL , typename V = typename CELL::value_t, typename DESCRIPTOR = typename CELL::descriptor_t>
void olb::momenta::FixedVelocityMomentum::initialize ( CELL & cell)
inline

Definition at line 556 of file elements.h.

557 {
558 const V u[DESCRIPTOR::d] = { V{} };
559 cell.template setField<descriptors::VELOCITY>(u);
560 }

◆ inverseShift()

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

Definition at line 563 of file elements.h.

563{};

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