OpenLB 1.7
Loading...
Searching...
No Matches
Public Types | Public Member Functions | List of all members
olb::powerlaw::PeriodicPressureOffset< NORMAL >::combined_collision< DESCRIPTOR, MOMENTA, EQUILIBRIUM, COLLISION > Struct Template Reference

#include <powerLawBGKdynamics.h>

+ Collaboration diagram for olb::powerlaw::PeriodicPressureOffset< NORMAL >::combined_collision< DESCRIPTOR, MOMENTA, EQUILIBRIUM, COLLISION >:

Public Types

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<int... NORMAL>
template<typename DESCRIPTOR, typename MOMENTA, typename EQUILIBRIUM, typename COLLISION>
struct olb::powerlaw::PeriodicPressureOffset< NORMAL >::combined_collision< DESCRIPTOR, MOMENTA, EQUILIBRIUM, COLLISION >

Definition at line 142 of file powerLawBGKdynamics.h.

Member Typedef Documentation

◆ CollisionO

template<int... NORMAL>
template<typename DESCRIPTOR , typename MOMENTA , typename EQUILIBRIUM , typename COLLISION >
using olb::powerlaw::PeriodicPressureOffset< NORMAL >::combined_collision< DESCRIPTOR, MOMENTA, EQUILIBRIUM, COLLISION >::CollisionO = typename COLLISION::template type<DESCRIPTOR, MOMENTA, EQUILIBRIUM>

Definition at line 143 of file powerLawBGKdynamics.h.

Member Function Documentation

◆ apply()

template<int... NORMAL>
template<typename DESCRIPTOR , typename MOMENTA , typename EQUILIBRIUM , typename COLLISION >
template<typename CELL , typename PARAMETERS , typename V = typename CELL::value_t>
CellStatistic< V > olb::powerlaw::PeriodicPressureOffset< NORMAL >::combined_collision< DESCRIPTOR, MOMENTA, EQUILIBRIUM, COLLISION >::apply ( CELL & cell,
PARAMETERS & parameters )
inline

Definition at line 146 of file powerLawBGKdynamics.h.

147 {
148 static constexpr auto populations = util::populationsContributingToDirection<DESCRIPTOR, NORMAL...>();
149
150 auto statistic = CollisionO().apply(cell, parameters);
151 const V densityOffset = parameters.template get<PRESSURE_OFFSET<NORMAL...>>();
152 for (unsigned iPop : populations) {
153 cell[iPop] += (cell[iPop] + descriptors::t<V,DESCRIPTOR>(iPop)) * densityOffset;
154 }
155 return statistic;
156 }
int get()
Get current device.
Definition device.hh:71
constexpr auto populationsContributingToDirection() any_platform
Return array of population indices where c[iPop][iD] == NORMAL[iD].
Definition util.h:226
typename COLLISION::template type< DESCRIPTOR, MOMENTA, EQUILIBRIUM > CollisionO

References olb::util::populationsContributingToDirection().

+ Here is the call graph for this function:

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