OpenLB 1.8.1
Loading...
Searching...
No Matches
olb::GeometricPhaseFieldWallProcessor2D< T, DESCRIPTOR, xNormal, yNormal > Struct Template Reference

#include <phaseFieldCoupling.h>

+ Collaboration diagram for olb::GeometricPhaseFieldWallProcessor2D< T, DESCRIPTOR, xNormal, yNormal >:

Public Types

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

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

template<typename T, typename DESCRIPTOR, int xNormal, int yNormal>
struct olb::GeometricPhaseFieldWallProcessor2D< T, DESCRIPTOR, xNormal, yNormal >

Definition at line 758 of file phaseFieldCoupling.h.

Member Typedef Documentation

◆ parameters

template<typename T , typename DESCRIPTOR , int xNormal, int yNormal>
using olb::GeometricPhaseFieldWallProcessor2D< T, DESCRIPTOR, xNormal, yNormal >::parameters = meta::list<descriptors::THETA>

Definition at line 760 of file phaseFieldCoupling.h.

Member Function Documentation

◆ apply()

template<typename T , typename DESCRIPTOR , int xNormal, int yNormal>
template<typename CELL , typename PARAMETERS >
void olb::GeometricPhaseFieldWallProcessor2D< T, DESCRIPTOR, xNormal, yNormal >::apply ( CELL & cell,
PARAMETERS & parameters )
inline

Definition at line 767 of file phaseFieldCoupling.h.

768 {
769 auto theta = parameters.template get<descriptors::THETA>();
770 Vector<int,DESCRIPTOR::d> tangent{yNormal*(-1),xNormal*1};
771 Vector<int,DESCRIPTOR::d> opp_tang{tangent[0]*(-1),tangent[1]*(-1)};
772
773 auto phi_1 = cell.neighbor({-xNormal,-yNormal}).template getFieldComponent<descriptors::STATISTIC>(0);
774 auto phi_1r = cell.neighbor({-xNormal,-yNormal}).neighbor(tangent).template getFieldComponent<descriptors::STATISTIC>(0);
775 auto phi_1l = cell.neighbor({-xNormal,-yNormal}).neighbor(opp_tang).template getFieldComponent<descriptors::STATISTIC>(0);
776 auto phi_2r = cell.neighbor({-2*xNormal,-2*yNormal}).neighbor(tangent).template getFieldComponent<descriptors::STATISTIC>(0);
777 auto phi_2l = cell.neighbor({-2*xNormal,-2*yNormal}).neighbor(opp_tang).template getFieldComponent<descriptors::STATISTIC>(0);
778
779 T dphi_1 = ( phi_1r - phi_1l ) / 2.;
780 T dphi_2 = ( phi_2r - phi_2l ) / 2.;
781 T tau_x_dphi = 1.5*dphi_1 - 0.5*dphi_2;
782
783 auto phi = cell.template getField<descriptors::STATISTIC>();
784 phi[0] = phi_1 + tan( M_PI/2. - theta ) * abs(tau_x_dphi);
785 cell.template setField<descriptors::STATISTIC>(phi);
786 }
#define M_PI
ADf< T, DIM > tan(const ADf< T, DIM > &a)
Definition aDiff.h:587
Vector(T &&t, Ts &&... ts) -> Vector< std::remove_cvref_t< T >, 1+sizeof...(Ts)>
std::enable_if_t< std::is_arithmetic< T >::type::value, T > abs(T x) any_platform
Definition util.h:464
meta::list< descriptors::THETA > parameters

References olb::abs(), and M_PI.

+ Here is the call graph for this function:

◆ getPriority()

template<typename T , typename DESCRIPTOR , int xNormal, int yNormal>
int olb::GeometricPhaseFieldWallProcessor2D< T, DESCRIPTOR, xNormal, yNormal >::getPriority ( ) const
inline

Definition at line 762 of file phaseFieldCoupling.h.

762 {
763 return 1;
764 }

Member Data Documentation

◆ scope

template<typename T , typename DESCRIPTOR , int xNormal, int yNormal>
OperatorScope olb::GeometricPhaseFieldWallProcessor2D< T, DESCRIPTOR, xNormal, yNormal >::scope = OperatorScope::PerCellWithParameters
staticconstexpr

Definition at line 759 of file phaseFieldCoupling.h.


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