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

#include <freeEnergyDynamics.h>

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

Public Types

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

Public Member Functions

template<typename RHO , typename U , typename V = RHO>
auto compute (int iPop, const RHO &rho, const U &u) 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::FreeEnergy::type< DESCRIPTOR, MOMENTA >

Definition at line 49 of file freeEnergyDynamics.h.

Member Typedef Documentation

◆ MomentaF

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

Definition at line 50 of file freeEnergyDynamics.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::FreeEnergy::type< DESCRIPTOR, MOMENTA >::compute ( CELL & cell,
PARAMETERS & parameters,
FEQ & fEq )
inline

Definition at line 64 of file freeEnergyDynamics.h.

64 {
65 auto u = cell.template getField<descriptors::FORCE>();
66 V rho = MomentaF().computeRho(cell);
67 const V uSqr = util::normSqr<V,DESCRIPTOR::d>(u);
68 for (int iPop=0; iPop < DESCRIPTOR::q; ++iPop) {
69 fEq[iPop] = equilibrium<DESCRIPTOR>::secondOrder(iPop, rho, u, uSqr);
70 }
71 return {rho, uSqr};
72 };
typename MOMENTA::template type< DESCRIPTOR > MomentaF
static V secondOrder(int iPop, const RHO &rho, const U &u, const USQR &uSqr) any_platform
Computation of equilibrium distribution, second order in u.
Definition lbm.h:51

References olb::equilibrium< DESCRIPTOR >::secondOrder().

+ Here is the call graph for this function:

◆ compute() [2/2]

template<typename DESCRIPTOR , typename MOMENTA >
template<typename RHO , typename U , typename V = RHO>
auto olb::equilibria::FreeEnergy::type< DESCRIPTOR, MOMENTA >::compute ( int iPop,
const RHO & rho,
const U & u )
inline

Definition at line 53 of file freeEnergyDynamics.h.

53 {
54 V eq = equilibrium<DESCRIPTOR>::secondOrder(iPop, rho, u);
55 if (iPop == 0) {
56 eq += (V{1} - descriptors::t<V,DESCRIPTOR>(0)) * rho;
57 } else {
58 eq -= descriptors::t<V,DESCRIPTOR>(iPop) * rho;
59 }
60 return eq;
61 }

References olb::equilibrium< DESCRIPTOR >::secondOrder().

+ Here is the call graph for this function:

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