OpenLB 1.8.1
Loading...
Searching...
No Matches
olb::dispersionLimiter Struct Reference

#include <phaseFieldCoupling.h>

+ Collaboration diagram for olb::dispersionLimiter:

Public Types

using parameters = meta::list<descriptors::INTERFACE_WIDTH>
 

Public Member Functions

int getPriority () const
 
template<typename CELL , typename PARAMETERS >
void apply (CELL &cell, PARAMETERS &parameters) any_platform
 

Static Public Attributes

static constexpr OperatorScope scope = OperatorScope::PerCellWithParameters
 

Detailed Description

Definition at line 212 of file phaseFieldCoupling.h.

Member Typedef Documentation

◆ parameters

Member Function Documentation

◆ apply()

template<typename CELL , typename PARAMETERS >
void olb::dispersionLimiter::apply ( CELL & cell,
PARAMETERS & parameters )
inline

Definition at line 221 of file phaseFieldCoupling.h.

222 {
223 using V = typename CELL::value_t;
224 using DESCRIPTOR = typename CELL::descriptor_t;
225 V w = parameters.template get<descriptors::INTERFACE_WIDTH>();
226 V psi = cell.template getField<descriptors::PSI>();
227 auto phi = cell.template getField<descriptors::STATISTIC>();
228 if (fabs(psi) >= 1.5*w) {
229 if (phi[0] > 0.5 && phi[0] < 0.995) {
230 for (int iPop=0; iPop < DESCRIPTOR::q; ++iPop) {
231 cell[iPop] += descriptors::t<V,DESCRIPTOR>(iPop) * (1-phi[0]);
232 }
233 } else if (phi[0] < 0.5 && phi[0] > 0.005) {
234 for (int iPop=0; iPop < DESCRIPTOR::q; ++iPop) {
235 cell[iPop] += descriptors::t<V,DESCRIPTOR>(iPop) * (0-phi[0]);
236 }
237 }
238 phi[0] = cell.computeRho();
239 cell.template setField<descriptors::STATISTIC>(phi);
240 }
241 }
constexpr T t(unsigned iPop, tag::CUM) any_platform
Definition cum.h:108
Expr fabs(Expr x)
Definition expr.cpp:230
meta::list< descriptors::INTERFACE_WIDTH > parameters

References olb::descriptors::t().

+ Here is the call graph for this function:

◆ getPriority()

int olb::dispersionLimiter::getPriority ( ) const
inline

Definition at line 216 of file phaseFieldCoupling.h.

216 {
217 return 0;
218 }

Member Data Documentation

◆ scope

OperatorScope olb::dispersionLimiter::scope = OperatorScope::PerCellWithParameters
staticconstexpr

Definition at line 213 of file phaseFieldCoupling.h.


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