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

Gradient over all vertex neighbors plus the boundary ghost states of the cell's own boundary faces, as a fixed linear combination of the differences to the cell's state. More...

#include <gradient.h>

Public Member Functions

template<typename F >
KOKKOS_INLINE_FUNCTION void for_each_point (const uint32_t i_cell, F &&f) const
 Offset of every stencil point of cell i_cell, passed to f(offset, is_face, index into cells_of_cell or faces_of_cell).
 
KOKKOS_INLINE_FUNCTION void compute_weights (const uint32_t i_cell) const
 Compute the weights of cell i_cell, in double: the normal equations of the quadratic fit are too ill conditioned for single precision.
 
KOKKOS_INLINE_FUNCTION void operator() (const uint32_t i_cell) const
 

Public Attributes

LSQGradientFunctor faces
 
Kokkos::View< uint32_t * > offsets_cells_of_cell
 
Kokkos::View< uint32_t * > cells_of_cell
 
Kokkos::View< uint8_t * > cells_of_cell_shift
 
VertexGradientWeights weights
 
bool quadratic = true
 
Kokkos::View< rtype *[3]> covariance
 

Static Public Attributes

static constexpr uint8_t NB = N_DIM + N_DIM * (N_DIM + 1) / 2
 

Detailed Description

Gradient over all vertex neighbors plus the boundary ghost states of the cell's own boundary faces, as a fixed linear combination of the differences to the cell's state.

The weights come from an inverse-distance-squared weighted least-squares fit of a quadratic, so the gradient is second-order accurate on any stencil that determines the fit: on triangles and on the one-sided stencils of boundary cells, where a linear fit is only first-order accurate. Stencils with too few or degenerate points, or quadratic = false, use the linear fit.

Member Function Documentation

◆ compute_weights()

KOKKOS_INLINE_FUNCTION void LSQVertexGradientFunctor::compute_weights ( const uint32_t  i_cell) const
inline

Compute the weights of cell i_cell, in double: the normal equations of the quadratic fit are too ill conditioned for single precision.

◆ for_each_point()

template<typename F >
KOKKOS_INLINE_FUNCTION void LSQVertexGradientFunctor::for_each_point ( const uint32_t  i_cell,
F &&  f 
) const
inline

Offset of every stencil point of cell i_cell, passed to f(offset, is_face, index into cells_of_cell or faces_of_cell).

◆ operator()()

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

Member Data Documentation

◆ cells_of_cell

Kokkos::View<uint32_t *> LSQVertexGradientFunctor::cells_of_cell

◆ cells_of_cell_shift

Kokkos::View<uint8_t *> LSQVertexGradientFunctor::cells_of_cell_shift

◆ covariance

Kokkos::View<rtype *[3]> LSQVertexGradientFunctor::covariance

◆ faces

LSQGradientFunctor LSQVertexGradientFunctor::faces

◆ NB

constexpr uint8_t LSQVertexGradientFunctor::NB = N_DIM + N_DIM * (N_DIM + 1) / 2
staticconstexpr

◆ offsets_cells_of_cell

Kokkos::View<uint32_t *> LSQVertexGradientFunctor::offsets_cells_of_cell

◆ quadratic

bool LSQVertexGradientFunctor::quadratic = true

◆ weights

VertexGradientWeights LSQVertexGradientFunctor::weights

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