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

#include <face_reconstruction.h>

Inheritance diagram for FaceReconstruction:
FirstOrder MUSCL TENO

Public Member Functions

 FaceReconstruction ()
 Construct a new Face Reconstruction object.
 
virtual ~FaceReconstruction ()
 Destroy the Face Reconstruction object.
 
virtual void init (const toml::value &input)=0
 Initialize the face reconstruction.
 
virtual logging::Items summary () const
 Display lines for the run log.
 
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 uint8_t n_face_quadrature_points () const =0
 Get the number of quadrature points per face.
 
virtual void calc_face_values (Kokkos::View< rtype *[N_CONSERVATIVE]> solution, Kokkos::View< rtype **[2][N_CONSERVATIVE]> face_solution)=0
 Reconstruct the face values.
 
virtual std::vector< uint32_t > cells_independent_of_halo (uint32_t n_owned) const
 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.
 
virtual 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)
 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.
 
virtual void finish_cell_face_values (Kokkos::View< rtype *[N_CONSERVATIVE]> solution, Kokkos::View< rtype **[2][N_CONSERVATIVE]> face_solution)
 Complete the face values after calc_cell_face_values().
 
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

Quadrature quadrature_face
 
Kokkos::View< rtype *** > face_quad_points
 
Kokkos::View< rtype ** > face_quad_weights
 
Kokkos::View< rtype *** > face_quad_normals
 

Protected Attributes

FaceReconstructionType type
 
std::shared_ptr< Mesh > mesh
 
BoundaryData boundaries
 

Constructor & Destructor Documentation

◆ FaceReconstruction()

FaceReconstruction::FaceReconstruction ( )

Construct a new Face Reconstruction object.

◆ ~FaceReconstruction()

FaceReconstruction::~FaceReconstruction ( )
virtual

Destroy the Face Reconstruction object.

Member Function Documentation

◆ axisymmetric_source()

virtual void FaceReconstruction::axisymmetric_source ( Kokkos::View< rtype *[N_CONSERVATIVE]>  ,
Kokkos::View< rtype *, Kokkos::LayoutStride >  ,
Kokkos::View< rtype * >  ,
uint32_t   
)
inlinevirtual

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.

Reimplemented in TENO.

◆ calc_cell_face_values()

void FaceReconstruction::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 
)
virtual

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 in MUSCL, and TENO.

◆ calc_face_values()

virtual void FaceReconstruction::calc_face_values ( Kokkos::View< rtype *[N_CONSERVATIVE]>  solution,
Kokkos::View< rtype **[2][N_CONSERVATIVE]>  face_solution 
)
pure virtual

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.

Implemented in FirstOrder, MUSCL, and TENO.

◆ cell_gradients()

virtual bool FaceReconstruction::cell_gradients ( Kokkos::View< rtype *[N_CONSERVATIVE]>  ,
Kokkos::View< rtype *[N_CONSERVATIVE][N_DIM]>  ,
uint32_t   
)
inlinevirtual

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.

Returns
Whether gradients were written.

Reimplemented in TENO.

◆ cells_independent_of_halo()

std::vector< uint32_t > FaceReconstruction::cells_independent_of_halo ( uint32_t  n_owned) const
virtual

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 in MUSCL, and TENO.

◆ finish_cell_face_values()

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

Complete the face values after calc_cell_face_values().

Reimplemented in MUSCL, and TENO.

◆ get_type()

FaceReconstructionType FaceReconstruction::get_type ( ) const
inline

Get the face reconstruction type.

Returns
Face reconstruction type.

◆ init()

virtual void FaceReconstruction::init ( const toml::value &  input)
pure virtual

Initialize the face reconstruction.

Implemented in FirstOrder, MUSCL, and TENO.

◆ init_face_quadrature_2d_curved()

void FaceReconstruction::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).

◆ init_face_quadrature_3d()

void FaceReconstruction::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).

Parameters
degreePolynomial degree to integrate exactly.

◆ n_face_quadrature_points()

virtual uint8_t FaceReconstruction::n_face_quadrature_points ( ) const
pure virtual

Get the number of quadrature points per face.

Returns
Number of quadrature points per face.

Implemented in FirstOrder, MUSCL, and TENO.

◆ set_boundaries()

void FaceReconstruction::set_boundaries ( const BoundaryData &  boundaries)

Set the boundary data used for ghost states.

Parameters
boundariesBoundary data.

◆ set_mesh()

void FaceReconstruction::set_mesh ( std::shared_ptr< Mesh >  mesh)

Set the mesh.

Parameters
meshPointer to the mesh.

◆ summary()

logging::Items FaceReconstruction::summary ( ) const
virtual

Display lines for the run log.

Reimplemented in MUSCL, and TENO.

Member Data Documentation

◆ boundaries

BoundaryData FaceReconstruction::boundaries
protected

◆ face_quad_normals

Kokkos::View<rtype ***> FaceReconstruction::face_quad_normals

◆ face_quad_points

Kokkos::View<rtype ***> FaceReconstruction::face_quad_points

◆ face_quad_weights

Kokkos::View<rtype **> FaceReconstruction::face_quad_weights

◆ mesh

std::shared_ptr<Mesh> FaceReconstruction::mesh
protected

◆ quadrature_face

Quadrature FaceReconstruction::quadrature_face

◆ type

FaceReconstructionType FaceReconstruction::type
protected

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