OpenLB 1.8.1
Loading...
Searching...
No Matches
olb::forcing::Kupershtokh::combined_collision< DESCRIPTOR, MOMENTA, EQUILIBRIUM, COLLISION > Struct Template Reference

#include <forcing.h>

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

Public Types

using MomentaF = typename MOMENTA::template type<DESCRIPTOR>
 
using EquilibriumF = combined_equilibrium<DESCRIPTOR,MOMENTA,EQUILIBRIUM>
 
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::Kupershtokh::combined_collision< DESCRIPTOR, MOMENTA, EQUILIBRIUM, COLLISION >

Definition at line 358 of file forcing.h.

Member Typedef Documentation

◆ CollisionO

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

Definition at line 361 of file forcing.h.

◆ EquilibriumF

template<typename DESCRIPTOR , typename MOMENTA , typename EQUILIBRIUM , typename COLLISION >
using olb::forcing::Kupershtokh::combined_collision< DESCRIPTOR, MOMENTA, EQUILIBRIUM, COLLISION >::EquilibriumF = combined_equilibrium<DESCRIPTOR,MOMENTA,EQUILIBRIUM>

Definition at line 360 of file forcing.h.

◆ MomentaF

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

Definition at line 359 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::Kupershtokh::combined_collision< DESCRIPTOR, MOMENTA, EQUILIBRIUM, COLLISION >::apply ( CELL & cell,
PARAMETERS & parameters )
inline

Definition at line 364 of file forcing.h.

364 {
365 V u[DESCRIPTOR::d];
366 MomentaF().computeU(cell, u);
367 const auto statistic = CollisionO().apply(cell, parameters);
368 const auto force = cell.template getField<descriptors::FORCE>();
369 V uPlusDeltaU[DESCRIPTOR::d];
370 for (int iVel=0; iVel < DESCRIPTOR::d; ++iVel) {
371 uPlusDeltaU[iVel] = u[iVel] + force[iVel];
372 }
373 V fEq[DESCRIPTOR::q] { };
374 V fEq2[DESCRIPTOR::q] { };
375 EquilibriumF().compute(cell, statistic.rho, u, fEq);
376 EquilibriumF().compute(cell, statistic.rho, uPlusDeltaU, fEq2);
377 for (int iPop=0; iPop < DESCRIPTOR::q; ++iPop) {
378 cell[iPop] += fEq2[iPop] - fEq[iPop];
379 }
380 return statistic;
381 };
combined_equilibrium< DESCRIPTOR, MOMENTA, EQUILIBRIUM > EquilibriumF
Definition forcing.h:360
typename MOMENTA::template type< DESCRIPTOR > MomentaF
Definition forcing.h:359
typename COLLISION::template type< DESCRIPTOR, MOMENTA, EQUILIBRIUM > CollisionO
Definition forcing.h:361

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