Mallard 0.8.0
Unstructured, GPU accelerated, high-order finite volume CFD solver
Mallard website
Loading...
Searching...
No Matches
ScalarReconstruction Class Reference

Reconstructs a mixture's cell scalars (mass fractions and the thermodynamic surrogates gamma, e0) with the face reconstruction that the flow block uses: More...

#include <scalar_reconstruction.h>

Public Member Functions

void init (std::shared_ptr< Mesh > mesh, const BoundaryData &boundaries, uint32_t n_species, const FaceReconstruction &flow)
 
void calc (ScalarView scalars, Kokkos::View< rtype *[N_CONSERVATIVE]> W, Kokkos::View< rtype **[2][2]> face_thermo)
 After the flow block's reconstruction: what the scalars need beyond it (MUSCL gradients and limiters, TENO factors theta), and the face values of [gamma, e0] on both sides of every face, written to face_thermo(face, q, side, 0/1).
 
void species_slots (ScalarView scalars, Kokkos::View< rtype ** > face_mdot, Kokkos::View< rtype * > quad_weights, Kokkos::View< rtype ** > face_weights, Kokkos::View< rtype ***, Kokkos::LayoutRight > slots)
 Species fluxes per face side (SpeciesSlotFunctor) of every cell, from the mass flux at each face point, valid after calc().
 
ScalarFaceValues face_values (ScalarView scalars) const
 Device evaluator of first-order and MUSCL face values, valid after calc().
 
void set_boundaries (const BoundaryData &b)
 
template<typename Eval >
void launch_slots (const Eval &values, Kokkos::View< rtype ** > face_mdot, Kokkos::View< rtype * > quad_weights, Kokkos::View< rtype ** > face_weights, Kokkos::View< rtype ***, Kokkos::LayoutRight > slots)
 
template<uint8_t DEG>
void calc_teno (ScalarView scalars, Kokkos::View< rtype **[2][2]> face_thermo)
 

Detailed Description

Reconstructs a mixture's cell scalars (mass fractions and the thermodynamic surrogates gamma, e0) with the face reconstruction that the flow block uses:

  • first order;
  • MUSCL: least-squares gradients and one limiter value per cell, the minimum over all scalars of the flow block's limiter type, further reduced so that every mass fraction stays in [0, 1] and gamma above 1 at every face;
  • TENO: the flow block's linear weights (TENOScalarValues) with one bound-preserving factor theta per cell (Zhang & Shu 2010), the largest in [0, 1] keeping every Y_k in [0, 1] and gamma above 1 at every face point, and in troubled cells every scalar within the range of the cell and its face neighbors.

Member Function Documentation

◆ calc()

void ScalarReconstruction::calc ( ScalarView  scalars,
Kokkos::View< rtype *[N_CONSERVATIVE]>  W,
Kokkos::View< rtype **[2][2]>  face_thermo 
)

After the flow block's reconstruction: what the scalars need beyond it (MUSCL gradients and limiters, TENO factors theta), and the face values of [gamma, e0] on both sides of every face, written to face_thermo(face, q, side, 0/1).

Parameters
WCell states W = [rho, u, p], for the limiter thresholds.

◆ calc_teno()

template<uint8_t DEG>
void ScalarReconstruction::calc_teno ( ScalarView  scalars,
Kokkos::View< rtype **[2][2]>  face_thermo 
)

◆ face_values()

ScalarFaceValues ScalarReconstruction::face_values ( ScalarView  scalars) const

Device evaluator of first-order and MUSCL face values, valid after calc().

◆ init()

void ScalarReconstruction::init ( std::shared_ptr< Mesh >  mesh,
const BoundaryData &  boundaries,
uint32_t  n_species,
const FaceReconstruction &  flow 
)
Parameters
n_speciesNumber of species (the scalars are n_species + 2).
flowFace reconstruction of the flow block, whose stencils TENO shares.

◆ launch_slots()

template<typename Eval >
void ScalarReconstruction::launch_slots ( const Eval &  values,
Kokkos::View< rtype ** >  face_mdot,
Kokkos::View< rtype * >  quad_weights,
Kokkos::View< rtype ** >  face_weights,
Kokkos::View< rtype ***, Kokkos::LayoutRight >  slots 
)

◆ set_boundaries()

void ScalarReconstruction::set_boundaries ( const BoundaryData &  b)
inline

◆ species_slots()

void ScalarReconstruction::species_slots ( ScalarView  scalars,
Kokkos::View< rtype ** >  face_mdot,
Kokkos::View< rtype * >  quad_weights,
Kokkos::View< rtype ** >  face_weights,
Kokkos::View< rtype ***, Kokkos::LayoutRight >  slots 
)

Species fluxes per face side (SpeciesSlotFunctor) of every cell, from the mass flux at each face point, valid after calc().

Parameters
quad_weights2D: weights of the face points.
face_weights3D: (face, q) weights of the face points.

The documentation for this class was generated from the following files: