SpECTRE  v2022.05.05
evolution::dg::subcell::fd Namespace Reference

Code specific to a conservative finite difference subcell limiter. More...

Namespaces

namespace  Actions
 Actions specific to using a finite-difference subcell method.
 
namespace  Tags
 Tags for the DG-subcell finite difference solver
 

Enumerations

enum class  ReconstructionMethod { DimByDim , AllDimsAtOnce }
 The reconstruction method to use. More...
 

Functions

const Matrixprojection_matrix (const Mesh< 1 > &dg_mesh, size_t subcell_extents)
 Computes the projection matrix in 1 dimension going from a DG mesh to a conservative finite difference subcell mesh.
 
template<size_t Dim>
const Matrixreconstruction_matrix (const Mesh< Dim > &dg_mesh, const Index< Dim > &subcell_extents)
 Computes the matrix needed for reconstructing the DG solution from the subcell solution. More...
 
template<size_t Dim>
Mesh< Dim > mesh (const Mesh< Dim > &dg_mesh)
 Computes the cell-centered finite-difference mesh from the DG mesh, using \(2N-1\) grid points per dimension, where \(N\) is the degree of the DG basis.
 
std::ostreamoperator<< (std::ostream &os, ReconstructionMethod recons_method)
 
template<size_t Dim>
void ghost_zone_logical_coordinates (const gsl::not_null< tnsr::I< DataVector, Dim, Frame::ElementLogical > * > ghost_logical_coords, const Mesh< Dim > &subcell_mesh, const size_t ghost_zone_size, const Direction< Dim > &direction)
 Computes the logical coordinates of ghost grid points for a given direction and ghost zone size. More...
 
template<size_t Dim>
tnsr::I< DataVector, Dim, Frame::ElementLogicalghost_zone_logical_coordinates (const Mesh< Dim > &subcell_mesh, const size_t ghost_zone_size, const Direction< Dim > &direction)
 Computes the logical coordinates of ghost grid points for a given direction and ghost zone size. More...
 
template<size_t Dim>
DataVector project (const DataVector &dg_u, const Mesh< Dim > &dg_mesh, const Index< Dim > &subcell_extents)
 Project the variable dg_u onto the subcell grid with extents subcell_extents. More...
 
template<size_t Dim>
void project (gsl::not_null< DataVector * > subcell_u, const DataVector &dg_u, const Mesh< Dim > &dg_mesh, const Index< Dim > &subcell_extents)
 Project the variable dg_u onto the subcell grid with extents subcell_extents. More...
 
template<typename SubcellTagList , typename DgTagList , size_t Dim>
void project (const gsl::not_null< Variables< SubcellTagList > * > subcell_u, const Variables< DgTagList > &dg_u, const Mesh< Dim > &dg_mesh, const Index< Dim > &subcell_extents)
 Project the variable dg_u onto the subcell grid with extents subcell_extents. More...
 
template<typename TagList , size_t Dim>
Variables< TagList > project (const Variables< TagList > &dg_u, const Mesh< Dim > &dg_mesh, const Index< Dim > &subcell_extents)
 Project the variable dg_u onto the subcell grid with extents subcell_extents. More...
 
template<size_t Dim>
DataVector reconstruct (const DataVector &subcell_u_times_projected_det_jac, const Mesh< Dim > &dg_mesh, const Index< Dim > &subcell_extents, ReconstructionMethod reconstruction_method)
 reconstruct the variable subcell_u_times_projected_det_jac onto the DG grid dg_mesh. More...
 
template<size_t Dim>
void reconstruct (gsl::not_null< DataVector * > dg_u, const DataVector &subcell_u_times_projected_det_jac, const Mesh< Dim > &dg_mesh, const Index< Dim > &subcell_extents, ReconstructionMethod reconstruction_method)
 reconstruct the variable subcell_u_times_projected_det_jac onto the DG grid dg_mesh. More...
 
template<typename SubcellTagList , typename DgTagList , size_t Dim>
void reconstruct (const gsl::not_null< Variables< DgTagList > * > dg_u, const Variables< SubcellTagList > &subcell_u, const Mesh< Dim > &dg_mesh, const Index< Dim > &subcell_extents, const ReconstructionMethod reconstruction_method)
 reconstruct the variable subcell_u_times_projected_det_jac onto the DG grid dg_mesh. More...
 
template<typename TagList , size_t Dim>
Variables< TagList > reconstruct (const Variables< TagList > &subcell_u, const Mesh< Dim > &dg_mesh, const Index< Dim > &subcell_extents, const ReconstructionMethod reconstruction_method)
 reconstruct the variable subcell_u_times_projected_det_jac onto the DG grid dg_mesh. More...
 

Detailed Description

Code specific to a conservative finite difference subcell limiter.

Enumeration Type Documentation

◆ ReconstructionMethod

The reconstruction method to use.

Enumerator
DimByDim 

Dimension-by-dimension reconstruction assuming a tensor-product basis.

AllDimsAtOnce 

Reconstruct all dimensions at once.

Function Documentation

◆ ghost_zone_logical_coordinates() [1/2]

template<size_t Dim>
void evolution::dg::subcell::fd::ghost_zone_logical_coordinates ( const gsl::not_null< tnsr::I< DataVector, Dim, Frame::ElementLogical > * >  ghost_logical_coords,
const Mesh< Dim > &  subcell_mesh,
const size_t  ghost_zone_size,
const Direction< Dim > &  direction 
)

Computes the logical coordinates of ghost grid points for a given direction and ghost zone size.

Let d be the axis dimension of the direction. The returned coordinate has extents that is same as the volume mesh extents but [d]-th value replaced by the ghost zone size.

For instance if the (volume) subcell mesh has extents \((6,6,6)\), ghost zone size is 2, and the direction is along Xi axis, the resulting coordinates computed by this function has extents \((2,6,6)\).

◆ ghost_zone_logical_coordinates() [2/2]

template<size_t Dim>
tnsr::I< DataVector, Dim, Frame::ElementLogical > evolution::dg::subcell::fd::ghost_zone_logical_coordinates ( const Mesh< Dim > &  subcell_mesh,
const size_t  ghost_zone_size,
const Direction< Dim > &  direction 
)

Computes the logical coordinates of ghost grid points for a given direction and ghost zone size.

Let d be the axis dimension of the direction. The returned coordinate has extents that is same as the volume mesh extents but [d]-th value replaced by the ghost zone size.

For instance if the (volume) subcell mesh has extents \((6,6,6)\), ghost zone size is 2, and the direction is along Xi axis, the resulting coordinates computed by this function has extents \((2,6,6)\).