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

#include <phaseFieldCoupling.h>

+ Collaboration diagram for olb::psiEvolve:

Classes

struct  DELTAT
 

Public Types

using parameters = meta::list<DELTAT,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 185 of file phaseFieldCoupling.h.

Member Typedef Documentation

◆ parameters

Member Function Documentation

◆ apply()

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

Definition at line 195 of file phaseFieldCoupling.h.

196 {
197 using V = typename CELL::value_t;
198 auto dt = parameters.template get<DELTAT>();
199 auto epsilon = parameters.template get<descriptors::EPSILON>();
200 auto s = cell.template getField<descriptors::SCALAR>();
201 auto psi = cell.template getField<descriptors::PSI>();
202 V psi_new = psi;
203 if (util::fabs(psi) >= epsilon) cell.template setField<descriptors::PSI>(psi_new);
204 else {
205 auto normGradPsi = cell.template getField<descriptors::NORMGRADPSI>();
206 psi_new = psi-dt*s*(normGradPsi-1.);
207 cell.template setField<descriptors::PSI>(psi_new);
208 }
209 }
platform_constant Fraction s[Q]
Definition mrt.h:65
Expr fabs(Expr x)
Definition expr.cpp:230
meta::list< DELTAT, descriptors::EPSILON > parameters

References olb::util::fabs().

+ Here is the call graph for this function:

◆ getPriority()

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

Definition at line 190 of file phaseFieldCoupling.h.

190 {
191 return 1;
192 }

Member Data Documentation

◆ scope

OperatorScope olb::psiEvolve::scope = OperatorScope::PerCellWithParameters
staticconstexpr

Definition at line 186 of file phaseFieldCoupling.h.


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