OpenLB 1.8.1
Loading...
Searching...
No Matches
olb::momenta::ForcedMomentum< MOMENTUM > Struct Template Reference

#include <elements.h>

+ Collaboration diagram for olb::momenta::ForcedMomentum< MOMENTUM >:

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 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
 

Static Public Member Functions

static std::string getName ()
 

Detailed Description

template<typename MOMENTUM>
struct olb::momenta::ForcedMomentum< MOMENTUM >

Definition at line 1475 of file elements.h.

Member Function Documentation

◆ compute()

template<typename MOMENTUM >
template<typename TYPE , typename CELL , typename J , typename V = typename CELL::value_t, typename DESCRIPTOR = typename CELL::descriptor_t>
void olb::momenta::ForcedMomentum< MOMENTUM >::compute ( CELL & cell,
J & j )
inline

Definition at line 1477 of file elements.h.

1478 {
1479 MOMENTUM().template compute<TYPE>(cell, j);
1480 }
void compute(CELL &cell, J &j) any_platform
Definition elements.h:1477

References olb::momenta::ForcedMomentum< MOMENTUM >::compute().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ computeU()

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

Definition at line 1483 of file elements.h.

1484 {
1485 MOMENTUM().template computeU<TYPE>(cell, u);
1486 const auto force = cell.template getFieldPointer<descriptors::FORCE>();
1487 for (int iVel=0; iVel < DESCRIPTOR::d; ++iVel) {
1488 u[iVel] += force[iVel] * V(0.5);
1489 }
1490 }
void computeU(CELL &cell, U &u) any_platform
Definition elements.h:1483

References olb::momenta::ForcedMomentum< MOMENTUM >::computeU().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ define()

template<typename MOMENTUM >
template<typename TYPE , typename CELL , typename U , typename DESCRIPTOR = typename CELL::descriptor_t>
void olb::momenta::ForcedMomentum< MOMENTUM >::define ( CELL & cell,
const U & u )
inline

Definition at line 1493 of file elements.h.

1494 {
1495 MOMENTUM().template define<TYPE>(cell, u);
1496 }
void define(CELL &cell, const U &u) any_platform
Definition elements.h:1493

References olb::momenta::ForcedMomentum< MOMENTUM >::define().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getName()

template<typename MOMENTUM >
static std::string olb::momenta::ForcedMomentum< MOMENTUM >::getName ( )
inlinestatic

Definition at line 1512 of file elements.h.

1512 {
1513 return "ForcedMomentum<" + MOMENTUM().getName() + ">";
1514 }

◆ initialize()

template<typename MOMENTUM >
template<typename TYPE , typename CELL >
void olb::momenta::ForcedMomentum< MOMENTUM >::initialize ( CELL & cell)
inline

Definition at line 1499 of file elements.h.

1500 {
1501 MOMENTUM().template initialize<TYPE>(cell);
1502 }
void initialize(CELL &cell) any_platform
Definition elements.h:1499

References olb::momenta::ForcedMomentum< MOMENTUM >::initialize().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ inverseShift()

template<typename MOMENTUM >
template<typename TYPE , typename CELL , typename U , typename V = typename CELL::value_t, typename DESCRIPTOR = typename CELL::descriptor_t>
void olb::momenta::ForcedMomentum< MOMENTUM >::inverseShift ( CELL & cell,
U & u )
inline

Definition at line 1505 of file elements.h.

1505 {
1506 const auto force = cell.template getFieldPointer<descriptors::FORCE>();
1507 for (int iVel=0; iVel < DESCRIPTOR::d; ++iVel) {
1508 u[iVel] -= force[iVel] * V(0.5);
1509 }
1510 }

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