Loading...
Searching...
No Matches
terra::fv::hex::operators::FCTLimiterKernel< ScalarT > Struct Template Reference

Kokkos kernel that computes the Zalesak nodal correction factors \(R_i^+\) and \(R_i^-\) from the low-order predictor \(T^L\) and the antidiffusive fluxes. More...

#include <fct_advection_diffusion.hpp>

Public Types

using GH = fct_detail::GeometryHelper< ScalarT >
 

Public Member Functions

void operator() (const int id, const int x, const int y, const int r) const
 

Public Attributes

grid::Grid4DDataScalar< ScalarT > T_L_
 \(T^L\) with ghost layers filled.
 
grid::Grid5DDataScalar< ScalarT > antidiff_
 \(\tilde{f}_{ij}\): pre-scaled antidiff fluxes.
 
grid::Grid4DDataScalar< ScalarT > R_plus_
 Output: \(R_i^+\) correction factor.
 
grid::Grid4DDataScalar< ScalarT > R_minus_
 Output: \(R_i^-\) correction factor.
 

Static Public Attributes

static constexpr int num_neighbors = GH::num_neighbors
 

Detailed Description

template<typename ScalarT>
struct terra::fv::hex::operators::FCTLimiterKernel< ScalarT >

Kokkos kernel that computes the Zalesak nodal correction factors \(R_i^+\) and \(R_i^-\) from the low-order predictor \(T^L\) and the antidiffusive fluxes.

Per cell \(i\) (summing over all 6 neighbours \(j \in \mathcal{N}(i)\)):

Positive/negative flux sums:

\[ P_i^+ = \sum_{j:\,\tilde{f}_{ij} > 0} \tilde{f}_{ij}, \qquad P_i^- = \sum_{j:\,\tilde{f}_{ij} < 0} \tilde{f}_{ij}. \]

Local extrema of the low-order solution:

\[ T_i^{\max} = \max(T_i^L,\;T_j^L\;\forall j \in \mathcal{N}(i)), \qquad T_i^{\min} = \min(T_i^L,\;T_j^L\;\forall j \in \mathcal{N}(i)). \]

Room to grow/shrink:

\[ Q_i^+ = T_i^{\max} - T_i^L \geq 0, \qquad Q_i^- = T_i^{\min} - T_i^L \leq 0. \]

Correction factors (Zalesak 1979, eq. 13–14):

\[ R_i^+ = \begin{cases} \min\!\left(1,\;\dfrac{Q_i^+}{P_i^+}\right) & P_i^+ > 0 \\ 1 & \text{otherwise} \end{cases}, \qquad R_i^- = \begin{cases} \min\!\left(1,\;\dfrac{Q_i^-}{P_i^-}\right) & P_i^- < 0 \\ 1 & \text{otherwise} \end{cases}. \]

Note
Ghost layers of \(T^L\) must be filled before launch so that \(T_j^L\) for boundary-adjacent cells is available.
Template Parameters
ScalarTFloating-point scalar type.

Member Typedef Documentation

◆ GH

template<typename ScalarT >
using terra::fv::hex::operators::FCTLimiterKernel< ScalarT >::GH = fct_detail::GeometryHelper< ScalarT >

Member Function Documentation

◆ operator()()

template<typename ScalarT >
void terra::fv::hex::operators::FCTLimiterKernel< ScalarT >::operator() ( const int  id,
const int  x,
const int  y,
const int  r 
) const
inline

Member Data Documentation

◆ antidiff_

template<typename ScalarT >
grid::Grid5DDataScalar< ScalarT > terra::fv::hex::operators::FCTLimiterKernel< ScalarT >::antidiff_

\(\tilde{f}_{ij}\): pre-scaled antidiff fluxes.

◆ num_neighbors

template<typename ScalarT >
constexpr int terra::fv::hex::operators::FCTLimiterKernel< ScalarT >::num_neighbors = GH::num_neighbors
staticconstexpr

◆ R_minus_

template<typename ScalarT >
grid::Grid4DDataScalar< ScalarT > terra::fv::hex::operators::FCTLimiterKernel< ScalarT >::R_minus_

Output: \(R_i^-\) correction factor.

◆ R_plus_

template<typename ScalarT >
grid::Grid4DDataScalar< ScalarT > terra::fv::hex::operators::FCTLimiterKernel< ScalarT >::R_plus_

Output: \(R_i^+\) correction factor.

◆ T_L_

template<typename ScalarT >
grid::Grid4DDataScalar< ScalarT > terra::fv::hex::operators::FCTLimiterKernel< ScalarT >::T_L_

\(T^L\) with ghost layers filled.


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