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

Weighted least-squares gradient of W = [rho, u, p] over face neighbors, with boundary ghost states placed at the mirror image of the cell centroid across the boundary face. More...

#include <gradient.h>

Public Member Functions

KOKKOS_INLINE_FUNCTION bool one_sided (const uint32_t i_face) const
 Whether vertex-neighbor gradients leave out the ghost of face i_face: the zero-gradient ghost of a characteristic boundary would halve the normal derivative of waves leaving the domain, and the jump this leaves at the boundary cell's inner face reflects them through the low-Mach correction.
 
KOKKOS_INLINE_FUNCTION void neighbor (const uint32_t i_cell, const uint32_t i_face, const rtype *W_i, rtype *dx, rtype *W_j) const
 Offset to and state of the neighbor across face i_face.
 
KOKKOS_INLINE_FUNCTION void operator() (const uint32_t i_cell) const
 

Public Attributes

Kokkos::View< uint32_t * > offsets_faces_of_cell
 
Kokkos::View< uint32_t * > faces_of_cell
 
Kokkos::View< int32_t *[2]> cells_of_face
 
Kokkos::View< rtype *[N_DIM]> cell_coords
 
Kokkos::View< rtype *[N_DIM]> face_coords
 
Kokkos::View< rtype *[N_DIM]> face_normals
 
Kokkos::View< rtype *[N_DIM]> shifts
 
Kokkos::View< uint8_t * > face_shift
 
BoundaryData boundaries
 
Kokkos::View< rtype *[N_CONSERVATIVE]> W
 
Kokkos::View< rtype *[N_CONSERVATIVE][N_DIM]> gradients
 

Detailed Description

Weighted least-squares gradient of W = [rho, u, p] over face neighbors, with boundary ghost states placed at the mirror image of the cell centroid across the boundary face.

Exact for linear fields on any mesh where the neighbor offsets span N_DIM dimensions. Build it with make_gradient.

Member Function Documentation

◆ neighbor()

KOKKOS_INLINE_FUNCTION void LSQGradientFunctor::neighbor ( const uint32_t  i_cell,
const uint32_t  i_face,
const rtype *  W_i,
rtype *  dx,
rtype *  W_j 
) const
inline

Offset to and state of the neighbor across face i_face.

◆ one_sided()

KOKKOS_INLINE_FUNCTION bool LSQGradientFunctor::one_sided ( const uint32_t  i_face) const
inline

Whether vertex-neighbor gradients leave out the ghost of face i_face: the zero-gradient ghost of a characteristic boundary would halve the normal derivative of waves leaving the domain, and the jump this leaves at the boundary cell's inner face reflects them through the low-Mach correction.

◆ operator()()

KOKKOS_INLINE_FUNCTION void LSQGradientFunctor::operator() ( const uint32_t  i_cell) const
inline

Member Data Documentation

◆ boundaries

BoundaryData LSQGradientFunctor::boundaries

◆ cell_coords

Kokkos::View<rtype *[N_DIM]> LSQGradientFunctor::cell_coords

◆ cells_of_face

Kokkos::View<int32_t *[2]> LSQGradientFunctor::cells_of_face

◆ face_coords

Kokkos::View<rtype *[N_DIM]> LSQGradientFunctor::face_coords

◆ face_normals

Kokkos::View<rtype *[N_DIM]> LSQGradientFunctor::face_normals

◆ face_shift

Kokkos::View<uint8_t *> LSQGradientFunctor::face_shift

◆ faces_of_cell

Kokkos::View<uint32_t *> LSQGradientFunctor::faces_of_cell

◆ gradients

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

◆ offsets_faces_of_cell

Kokkos::View<uint32_t *> LSQGradientFunctor::offsets_faces_of_cell

◆ shifts

Kokkos::View<rtype *[N_DIM]> LSQGradientFunctor::shifts

◆ W

Kokkos::View<rtype *[N_CONSERVATIVE]> LSQGradientFunctor::W

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