OpenLB 1.8.1
Loading...
Searching...
No Matches
olb::momenta::SourcedDensity< DENSITY > Struct Template Reference

#include <elements.h>

+ Collaboration diagram for olb::momenta::SourcedDensity< DENSITY >:

Public Member Functions

template<typename TYPE , typename CELL , typename RHO >
void compute (CELL &cell, RHO &rho) any_platform
 
template<typename TYPE , typename CELL , typename RHO >
void define (CELL &cell, const RHO &rho) any_platform
 
template<typename TYPE , typename CELL >
void initialize (CELL &cell) any_platform
 
template<typename TYPE , typename CELL , typename RHO >
void inverseShift (CELL &cell, RHO &rho) any_platform
 

Static Public Member Functions

static std::string getName ()
 

Detailed Description

template<typename DENSITY>
struct olb::momenta::SourcedDensity< DENSITY >

Definition at line 209 of file elements.h.

Member Function Documentation

◆ compute()

template<typename DENSITY >
template<typename TYPE , typename CELL , typename RHO >
void olb::momenta::SourcedDensity< DENSITY >::compute ( CELL & cell,
RHO & rho )
inline

Definition at line 211 of file elements.h.

212 {
213 const auto source = cell.template getField<descriptors::SOURCE>();
214 DENSITY().template compute<TYPE>(cell, rho);
215 rho += 0.5 * source;
216 }
void compute(CELL &cell, RHO &rho) any_platform
Definition elements.h:211

References olb::momenta::SourcedDensity< DENSITY >::compute().

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

◆ define()

template<typename DENSITY >
template<typename TYPE , typename CELL , typename RHO >
void olb::momenta::SourcedDensity< DENSITY >::define ( CELL & cell,
const RHO & rho )
inline

Definition at line 219 of file elements.h.

219{};

◆ getName()

template<typename DENSITY >
static std::string olb::momenta::SourcedDensity< DENSITY >::getName ( )
inlinestatic

Definition at line 231 of file elements.h.

231 {
232 return "SourcedDensity<" + DENSITY().getName() + ">";
233 }

◆ initialize()

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

Definition at line 222 of file elements.h.

222{};

◆ inverseShift()

template<typename DENSITY >
template<typename TYPE , typename CELL , typename RHO >
void olb::momenta::SourcedDensity< DENSITY >::inverseShift ( CELL & cell,
RHO & rho )
inline

Definition at line 225 of file elements.h.

226 {
227 const auto source = cell.template getField<descriptors::SOURCE>();
228 rho -= 0.5 * source;
229 }

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