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

Second-order MUSCL reconstruction of W = [rho, u_x, u_y, p] using least-squares gradients and a slope limiter. More...

#include <face_reconstruction.h>

Inheritance diagram for MUSCL:
FaceReconstruction

Public Member Functions

 MUSCL ()
 
 ~MUSCL ()
 
void init (const toml::value &input) override
 Initialize the face reconstruction.
 
logging::Items summary () const override
 Display lines for the run log.
 
uint8_t n_face_quadrature_points () const override
 Get the number of quadrature points per face.
 
void calc_face_values (Kokkos::View< rtype *[N_CONSERVATIVE]> solution, Kokkos::View< rtype **[2][N_CONSERVATIVE]> face_solution) override
 Reconstruct the face values.
 
std::vector< uint32_t > cells_independent_of_halo (uint32_t n_owned) const override
 Cells below n_owned whose reconstruction reads no cell at or above n_owned, so that calc_cell_face_values can reconstruct them before the halo is filled. Empty if this reconstruction cannot be split by cells.
 
void calc_cell_face_values (const Kokkos::DefaultExecutionSpace &exec, Kokkos::View< rtype *[N_CONSERVATIVE]> solution, Kokkos::View< rtype **[2][N_CONSERVATIVE]> face_solution, Kokkos::View< uint32_t * > cells) override
 Reconstruct the listed cells' sides of their faces, on the given execution space instance, as far as each cell can on its own (see cells_independent_of_halo()). Once every reconstructed cell went through this and those instances are fenced, finish_cell_face_values() completes the face values.
 
void finish_cell_face_values (Kokkos::View< rtype *[N_CONSERVATIVE]> solution, Kokkos::View< rtype **[2][N_CONSERVATIVE]> face_solution) override
 Complete the face values after calc_cell_face_values().
 
- Public Member Functions inherited from FaceReconstruction
 FaceReconstruction ()
 Construct a new Face Reconstruction object.
 
virtual ~FaceReconstruction ()
 Destroy the Face Reconstruction object.
 
void set_mesh (std::shared_ptr< Mesh > mesh)
 Set the mesh.
 
void set_boundaries (const BoundaryData &boundaries)
 Set the boundary data used for ghost states.
 
FaceReconstructionType get_type () const
 Get the face reconstruction type.
 
virtual bool cell_gradients (Kokkos::View< rtype *[N_CONSERVATIVE]>, Kokkos::View< rtype *[N_CONSERVATIVE][N_DIM]>, uint32_t)
 Gradients of W = [rho, u, p] at the centroids of the first n_cells cells from the reconstruction polynomials, if the scheme has higher-order ones than least squares on face neighbors.
 
virtual void axisymmetric_source (Kokkos::View< rtype *[N_CONSERVATIVE]>, Kokkos::View< rtype *, Kokkos::LayoutStride >, Kokkos::View< rtype * >, uint32_t)
 Axisymmetric runs: for each of the first n_cells cells whose reconstruction has a smooth polynomial, replace source(c) by int (p - tau_thetatheta) dA over the planar cell, with p and the velocity of the polynomial at cell quadrature points and the cell viscosity mu(c) (inviscid if mu is empty). Other cells keep their source, which the caller set from cell values.
 
void init_face_quadrature_3d (uint8_t degree)
 Set up per-face quadrature (3D): Dunavant rules on triangles and Gauss rules mapped bilinearly onto quadrilaterals, exact for polynomials of the given degree on planar faces (degree <= 1 uses the face centroid). Also maps each quadrature point of a transmissive boundary face to the matching point of its image face (BoundaryData::face_image_quad).
 
void init_face_quadrature_2d_curved ()
 Curved meshes in 2D: per-face quadrature points, weights and normals for quadrature_face's Gauss rule on every face, the curved faces' mapped onto their curves (nothing otherwise).
 

Public Attributes

LimiterType limiter = LimiterType::VENKATAKRISHNAN
 
rtype venkat_K = 5.0
 
Kokkos::View< rtype *[N_CONSERVATIVE][N_DIM]> gradients
 
Kokkos::View< rtype *[N_CONSERVATIVE]> limiters
 
LSQVertexGradientFunctor gradient
 
- Public Attributes inherited from FaceReconstruction
Quadrature quadrature_face
 
Kokkos::View< rtype *** > face_quad_points
 
Kokkos::View< rtype ** > face_quad_weights
 
Kokkos::View< rtype *** > face_quad_normals
 

Additional Inherited Members

- Protected Attributes inherited from FaceReconstruction
FaceReconstructionType type
 
std::shared_ptr< Mesh > mesh
 
BoundaryData boundaries
 

Detailed Description

Second-order MUSCL reconstruction of W = [rho, u_x, u_y, p] using least-squares gradients and a slope limiter.

Constructor & Destructor Documentation

◆ MUSCL()

MUSCL::MUSCL ( )

◆ ~MUSCL()

MUSCL::~MUSCL ( )

Member Function Documentation

◆ calc_cell_face_values()

void MUSCL::calc_cell_face_values ( const Kokkos::DefaultExecutionSpace &  exec,
Kokkos::View< rtype *[N_CONSERVATIVE]>  solution,
Kokkos::View< rtype **[2][N_CONSERVATIVE]>  face_solution,
Kokkos::View< uint32_t * >  cells 
)
overridevirtual

Reconstruct the listed cells' sides of their faces, on the given execution space instance, as far as each cell can on its own (see cells_independent_of_halo()). Once every reconstructed cell went through this and those instances are fenced, finish_cell_face_values() completes the face values.

Parameters
execExecution space instance to launch on.
solutionCell states W = [rho, u_x, u_y, p].
face_solutionFace states W, as in calc_face_values.
cellsLocal cells to reconstruct (not empty).

Reimplemented from FaceReconstruction.

◆ calc_face_values()

void MUSCL::calc_face_values ( Kokkos::View< rtype *[N_CONSERVATIVE]>  solution,
Kokkos::View< rtype **[2][N_CONSERVATIVE]>  face_solution 
)
overridevirtual

Reconstruct the face values.

Parameters
solutionCell states W = [rho, u_x, u_y, p].
face_solutionFace states W, indexed (face, quadrature point, side, variable). Side 1 of boundary faces is left untouched.

Implements FaceReconstruction.

◆ cells_independent_of_halo()

std::vector< uint32_t > MUSCL::cells_independent_of_halo ( uint32_t  n_owned) const
overridevirtual

Cells below n_owned whose reconstruction reads no cell at or above n_owned, so that calc_cell_face_values can reconstruct them before the halo is filled. Empty if this reconstruction cannot be split by cells.

Reimplemented from FaceReconstruction.

◆ finish_cell_face_values()

void MUSCL::finish_cell_face_values ( Kokkos::View< rtype *[N_CONSERVATIVE]>  solution,
Kokkos::View< rtype **[2][N_CONSERVATIVE]>  face_solution 
)
overridevirtual

Complete the face values after calc_cell_face_values().

Reimplemented from FaceReconstruction.

◆ init()

void MUSCL::init ( const toml::value &  input)
overridevirtual

Initialize the face reconstruction.

Implements FaceReconstruction.

◆ n_face_quadrature_points()

uint8_t MUSCL::n_face_quadrature_points ( ) const
overridevirtual

Get the number of quadrature points per face.

Returns
Number of quadrature points per face.

Implements FaceReconstruction.

◆ summary()

logging::Items MUSCL::summary ( ) const
overridevirtual

Display lines for the run log.

Reimplemented from FaceReconstruction.

Member Data Documentation

◆ gradient

LSQVertexGradientFunctor MUSCL::gradient

◆ gradients

Kokkos::View<rtype *[N_CONSERVATIVE][N_DIM]> MUSCL::gradients

◆ limiter

◆ limiters

Kokkos::View<rtype *[N_CONSERVATIVE]> MUSCL::limiters

◆ venkat_K

rtype MUSCL::venkat_K = 5.0

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