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

#include <phaseFieldCoupling.h>

+ Collaboration diagram for olb::AllenCahnNonLocalHelper:

Public Types

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

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 244 of file phaseFieldCoupling.h.

Member Typedef Documentation

◆ parameters

Member Function Documentation

◆ apply()

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

Definition at line 253 of file phaseFieldCoupling.h.

254 {
255 using V = typename CELL::value_t;
256 V phi = cell.template getFieldComponent<descriptors::STATISTIC>(0);
257 auto epsilon = parameters.template get<descriptors::EPSILON>();
258
259 V psi = cell.template getField<descriptors::PSI>();
260 V interfaceIndicator = 0;
261 if (util::fabs(psi) < epsilon) interfaceIndicator = 1;
262 V top = (1.-interfaceIndicator)*phi*(phi-1.)*(phi-0.5);
263 V bottom = (1.-interfaceIndicator)*(1.-phi)*phi;
264
265 cell.template setField<descriptors::TOP>(top);
266 cell.template setField<descriptors::BOTTOM>(bottom);
267 }
Expr fabs(Expr x)
Definition expr.cpp:230
meta::list< descriptors::EPSILON > parameters

References olb::util::fabs().

+ Here is the call graph for this function:

◆ getPriority()

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

Definition at line 248 of file phaseFieldCoupling.h.

248 {
249 return 0;
250 }

Member Data Documentation

◆ scope

OperatorScope olb::AllenCahnNonLocalHelper::scope = OperatorScope::PerCellWithParameters
staticconstexpr

Definition at line 245 of file phaseFieldCoupling.h.


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