OpenLB 1.7
Loading...
Searching...
No Matches
Public Types | Public Member Functions | List of all members
olb::forcing::AdeGuo::combined_collision< DESCRIPTOR, MOMENTA, EQUILIBRIUM, COLLISION > Struct Template Reference

#include <forcing.h>

+ Collaboration diagram for olb::forcing::AdeGuo::combined_collision< DESCRIPTOR, MOMENTA, EQUILIBRIUM, COLLISION >:

Public Types

using MomentaF = typename MOMENTA::template type<DESCRIPTOR>
 
using CollisionO = typename COLLISION::template type<DESCRIPTOR,MOMENTA,EQUILIBRIUM>
 

Public Member Functions

template<typename CELL , typename PARAMETERS , typename V = typename CELL::value_t>
CellStatistic< V > apply (CELL &cell, PARAMETERS &parameters) any_platform
 

Detailed Description

template<typename DESCRIPTOR, typename MOMENTA, typename EQUILIBRIUM, typename COLLISION>
struct olb::forcing::AdeGuo::combined_collision< DESCRIPTOR, MOMENTA, EQUILIBRIUM, COLLISION >

Definition at line 87 of file forcing.h.

Member Typedef Documentation

◆ CollisionO

template<typename DESCRIPTOR , typename MOMENTA , typename EQUILIBRIUM , typename COLLISION >
using olb::forcing::AdeGuo::combined_collision< DESCRIPTOR, MOMENTA, EQUILIBRIUM, COLLISION >::CollisionO = typename COLLISION::template type<DESCRIPTOR,MOMENTA,EQUILIBRIUM>

Definition at line 89 of file forcing.h.

◆ MomentaF

template<typename DESCRIPTOR , typename MOMENTA , typename EQUILIBRIUM , typename COLLISION >
using olb::forcing::AdeGuo::combined_collision< DESCRIPTOR, MOMENTA, EQUILIBRIUM, COLLISION >::MomentaF = typename MOMENTA::template type<DESCRIPTOR>

Definition at line 88 of file forcing.h.

Member Function Documentation

◆ apply()

template<typename DESCRIPTOR , typename MOMENTA , typename EQUILIBRIUM , typename COLLISION >
template<typename CELL , typename PARAMETERS , typename V = typename CELL::value_t>
CellStatistic< V > olb::forcing::AdeGuo::combined_collision< DESCRIPTOR, MOMENTA, EQUILIBRIUM, COLLISION >::apply ( CELL & cell,
PARAMETERS & parameters )
inline

Definition at line 95 of file forcing.h.

95 {
96 const auto u = cell.template getField<descriptors::VELOCITY>();
97 const V rho = MomentaF().computeRho(cell);
98 CollisionO().apply(cell, parameters);
99 const V omega = parameters.template get<descriptors::OMEGA>();
100 const auto source = cell.template getField<descriptors::SOURCE>();
101 for (int iPop=0; iPop < DESCRIPTOR::q; ++iPop) {
102 V sourceTerm{};
103 sourceTerm = source;
104 sourceTerm *= descriptors::t<V,DESCRIPTOR>(iPop);
105 sourceTerm *= (V{1} - omega * V{0.5});
106 cell[iPop] += sourceTerm;
107 }
108 return {rho, util::normSqr<V,DESCRIPTOR::d>(u)};
109 };
typename MOMENTA::template type< DESCRIPTOR > MomentaF
Definition forcing.h:88
typename COLLISION::template type< DESCRIPTOR, MOMENTA, EQUILIBRIUM > CollisionO
Definition forcing.h:89

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