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

#include <collision.h>

+ Collaboration diagram for olb::collision::P1::type< DESCRIPTOR, MOMENTA, EQUILIBRIUM >:

Public Types

using EquilibriumF = typename EQUILIBRIUM::template type<DESCRIPTOR,MOMENTA>
 

Public Member Functions

template<CONCEPT(MinimalCell) 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>
struct olb::collision::P1::type< DESCRIPTOR, MOMENTA, EQUILIBRIUM >

Definition at line 366 of file collision.h.

Member Typedef Documentation

◆ EquilibriumF

template<typename DESCRIPTOR , typename MOMENTA , typename EQUILIBRIUM >
using olb::collision::P1::type< DESCRIPTOR, MOMENTA, EQUILIBRIUM >::EquilibriumF = typename EQUILIBRIUM::template type<DESCRIPTOR,MOMENTA>

Definition at line 367 of file collision.h.

Member Function Documentation

◆ apply()

template<typename DESCRIPTOR , typename MOMENTA , typename EQUILIBRIUM >
template<CONCEPT(MinimalCell) CELL, typename PARAMETERS , typename V = typename CELL::value_t>
CellStatistic< V > olb::collision::P1::type< DESCRIPTOR, MOMENTA, EQUILIBRIUM >::apply ( CELL & cell,
PARAMETERS & parameters )
inline

Definition at line 370 of file collision.h.

370 {
371 V fEq[DESCRIPTOR::q] { };
372 const auto statistic = EquilibriumF().compute(cell, parameters, fEq);
373 const V scattering = parameters.template get<SCATTERING>();
374 const V absorption = parameters.template get<ABSORPTION>();
375 for (int iPop=0; iPop < DESCRIPTOR::q; ++iPop) {
376 cell[iPop] -= scattering * descriptors::norm_c<V,DESCRIPTOR>(iPop)*(cell[iPop] - fEq[iPop])
377 + absorption * descriptors::norm_c<V,DESCRIPTOR>(iPop)*(cell[iPop] + descriptors::t<V,DESCRIPTOR>(iPop));
378 }
379 return statistic;
380 };
typename EQUILIBRIUM::template type< DESCRIPTOR, MOMENTA > EquilibriumF
Definition collision.h:367
typename meta::list< SCATTERING, ABSORPTION > parameters
Definition collision.h:359

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