OpenLB 1.7
Loading...
Searching...
No Matches
Public Types | Public Member Functions | List of all members
olb::equilibria::Chopard::type< DESCRIPTOR, MOMENTA > Struct Template Reference

#include <equilibrium.h>

+ Collaboration diagram for olb::equilibria::Chopard::type< DESCRIPTOR, MOMENTA >:

Public Types

using MomentaF = typename MOMENTA::template type<DESCRIPTOR>
 

Public Member Functions

template<typename RHO , typename U , typename VS2 , typename V = RHO>
auto compute (int iPop, const RHO &rho, const U &u, VS2 vs2=V{1}/descriptors::invCs2< V, DESCRIPTOR >()) any_platform
 
template<typename CELL , typename PARAMETERS , typename FEQ , typename V = typename CELL::value_t>
CellStatistic< V > compute (CELL &cell, PARAMETERS &parameters, FEQ &fEq) any_platform
 

Detailed Description

template<typename DESCRIPTOR, typename MOMENTA>
struct olb::equilibria::Chopard::type< DESCRIPTOR, MOMENTA >

Definition at line 216 of file equilibrium.h.

Member Typedef Documentation

◆ MomentaF

template<typename DESCRIPTOR , typename MOMENTA >
using olb::equilibria::Chopard::type< DESCRIPTOR, MOMENTA >::MomentaF = typename MOMENTA::template type<DESCRIPTOR>

Definition at line 217 of file equilibrium.h.

Member Function Documentation

◆ compute() [1/2]

template<typename DESCRIPTOR , typename MOMENTA >
template<typename CELL , typename PARAMETERS , typename FEQ , typename V = typename CELL::value_t>
CellStatistic< V > olb::equilibria::Chopard::type< DESCRIPTOR, MOMENTA >::compute ( CELL & cell,
PARAMETERS & parameters,
FEQ & fEq )
inline

Definition at line 242 of file equilibrium.h.

242 {
243 V rho, u[DESCRIPTOR::d] { };
244 MomentaF().computeRhoU(cell, rho, u);
245 const V vs2 = parameters.template get<SPEED_OF_SOUND>();
246 for (int iPop=0; iPop < DESCRIPTOR::q; ++iPop) {
247 fEq[iPop] = compute(iPop, rho, u, vs2);
248 }
249 return {rho, util::normSqr<V,DESCRIPTOR::d>(u)};
250 };
typename MOMENTA::template type< DESCRIPTOR > MomentaF
auto compute(int iPop, const RHO &rho, const U &u, VS2 vs2=V{1}/descriptors::invCs2< V, DESCRIPTOR >()) any_platform
meta::list< SPEED_OF_SOUND > parameters

References olb::equilibria::Chopard::type< DESCRIPTOR, MOMENTA >::compute().

+ Here is the call graph for this function:

◆ compute() [2/2]

template<typename DESCRIPTOR , typename MOMENTA >
template<typename RHO , typename U , typename VS2 , typename V = RHO>
auto olb::equilibria::Chopard::type< DESCRIPTOR, MOMENTA >::compute ( int iPop,
const RHO & rho,
const U & u,
VS2 vs2 = V{1} / descriptors::invCs2<V,DESCRIPTOR>() )
inline

Definition at line 221 of file equilibrium.h.

221 {1} / descriptors::invCs2<V,DESCRIPTOR>()) any_platform {
222 const V uSqr = util::normSqr<V,DESCRIPTOR::d>(u);
223 if (iPop==0) {
224 return rho * (V{1} - vs2 * descriptors::invCs2<V,DESCRIPTOR>()*(V{1}-descriptors::t<V,DESCRIPTOR>(0))
225 - descriptors::t<V,DESCRIPTOR>(0)/V{2}*descriptors::invCs2<V,DESCRIPTOR>()*uSqr)
226 - descriptors::t<V,DESCRIPTOR>(0);
227 }
228 else {
229 V c_u{};
230 for (int iD=0; iD < DESCRIPTOR::d; ++iD) {
231 c_u += descriptors::c<DESCRIPTOR>(iPop,iD)*u[iD];
232 }
233 return rho * descriptors::t<V,DESCRIPTOR>(iPop) * descriptors::invCs2<V,DESCRIPTOR>()
234 * (vs2 + c_u
235 + descriptors::invCs2<V,DESCRIPTOR>() / V{2} * c_u*c_u
236 - uSqr / V{2})
237 - descriptors::t<V,DESCRIPTOR>(iPop);
238 }
239 }
#define any_platform
Define preprocessor macros for device-side functions, constant storage.
Definition platform.h:78
+ Here is the caller graph for this function:

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