OpenLB 1.8.1
Loading...
Searching...
No Matches
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 90 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 92 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 91 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 98 of file forcing.h.

98 {
99 const auto u = cell.template getField<descriptors::VELOCITY>();
100 const V rho = MomentaF().computeRho(cell);
101 CollisionO().apply(cell, parameters);
102 const V omega = parameters.template get<descriptors::OMEGA>();
103 const auto source = cell.template getField<descriptors::SOURCE>();
104 for (int iPop=0; iPop < DESCRIPTOR::q; ++iPop) {
105 V sourceTerm{};
106 sourceTerm = source;
107 sourceTerm *= descriptors::t<V,DESCRIPTOR>(iPop);
108 sourceTerm *= (V{1} - omega * V{0.5});
109 cell[iPop] += sourceTerm;
110 }
111 return {rho, util::normSqr<V,DESCRIPTOR::d>(u)};
112 };
constexpr T t(unsigned iPop, tag::CUM) any_platform
Definition cum.h:108
auto normSqr(const ARRAY_LIKE &u) any_platform
Compute norm square of a d-dimensional vector.
Definition util.h:145
typename MOMENTA::template type< DESCRIPTOR > MomentaF
Definition forcing.h:91
typename COLLISION::template type< DESCRIPTOR, MOMENTA, EQUILIBRIUM > CollisionO
Definition forcing.h:92

References olb::util::normSqr(), and olb::descriptors::t().

+ Here is the call graph for this function:

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