Classes | Functions
Discontinuous Galerkin

Functions and classes specific to the Discontinuous Galerkin algorithm. More...

Classes

struct  Elliptic::Actions::ComputeOperatorAction
 Compute the bulk contribution to the linear operator applied to the variables. More...
 
struct  Actions::ComputeTimeDerivative
 Compute the time derivative of the system variables. More...
 
struct  dg::Actions::InitializeElement< Dim >
 Initialize a dG element with analytic initial data. More...
 
struct  SlopeLimiters::Tags::LimiterCommunicationTag< Metavariables >
 The inbox tag for limiter communication. More...
 
struct  SlopeLimiters::Actions::Limit< Metavariables >
 Receive limiter data from neighbors, then apply limiter. More...
 
struct  SlopeLimiters::Actions::SendData< Metavariables >
 Send local data needed for limiting. More...
 
struct  dg::Actions::ApplyBoundaryFluxesLocalTimeStepping
 Perform the boundary part of the update of the variables for local time stepping. More...
 
struct  dg::Actions::ApplyFluxes
 Compute element boundary contributions to the temporal step of the variables. More...
 
struct  dg::Actions::ComputeNonconservativeBoundaryFluxes< DirectionsTag >
 Compute \(\hat{n} \cdot F\) on the boundaries for a non-conservative system. More...
 
struct  dg::Actions::ReceiveDataForFluxes< Metavariables >
 Receive boundary data needed for fluxes from neighbors. More...
 
struct  dg::Actions::SendDataForFluxes< Metavariables >
 Send local boundary data needed for fluxes to neighbors. More...
 
struct  dg::Actions::ImposeDirichletBoundaryConditions< Metavariables >
 Packages data on external boundaries for calculating numerical flux. Computes contributions on the interior side from the volume, and imposes Dirichlet boundary conditions on the exterior side. More...
 
struct  dg::FluxCommunicationTypes< Metavariables >
 Types related to flux communication. More...
 
struct  dg::NumericalFluxes::Hll< System >
 Compute the HLL numerical flux. More...
 
struct  dg::NumericalFluxes::LocalLaxFriedrichs< System >
 Compute the local Lax-Friedrichs numerical flux. More...
 
class  dg::SimpleBoundaryData< TemporalId, LocalVars, RemoteVars >
 Storage of boundary data on two sides of a mortar. More...
 
struct  Tags::SimpleBoundaryData< TemporalId, LocalData, RemoteData >
 Simple boundary communication data. More...
 
struct  Tags::Mortars< Tag, VolumeDim >
 Data on mortars, indexed by (Direction, ElementId) pairs. More...
 
struct  Tags::MortarSize< Dim >
 Size of a mortar, relative to the element face. That is, the part of the face that it covers. More...
 

Functions

template<typename... FluxTags>
auto dg::lift_flux (Variables< tmpl::list< FluxTags... >> flux, const size_t extent_perpendicular_to_boundary, Scalar< DataVector > magnitude_of_face_normal) noexcept -> Variables< tmpl::list< db::remove_tag_prefix< FluxTags >... >>
 Lifts the flux contribution from an interface to the volume. More...
 
template<size_t Dim>
Mesh< Dim > dg::mortar_mesh (const Mesh< Dim > &face_mesh1, const Mesh< Dim > &face_mesh2) noexcept
 Find a mesh for a mortar capable of representing data from either of two faces.
 
template<size_t Dim>
std::array< Spectral::MortarSize, Dim - 1 > dg::mortar_size (const ElementId< Dim > &self, const ElementId< Dim > &neighbor, size_t dimension, const OrientationMap< Dim > &orientation) noexcept
 Determine the size of the mortar (i.e., the part of the face it covers) for communicating with a neighbor. This is the size relative to the size of self, and will not generally agree with that determined by neighbor.
 
template<typename Tags , size_t Dim>
Variables< Tags > dg::project_to_mortar (const Variables< Tags > &vars, const Mesh< Dim > &face_mesh, const Mesh< Dim > &mortar_mesh, const std::array< Spectral::MortarSize, Dim > &mortar_size) noexcept
 Project variables from a face to a mortar.
 
template<typename Tags , size_t Dim>
Variables< Tags > dg::project_from_mortar (const Variables< Tags > &vars, const Mesh< Dim > &face_mesh, const Mesh< Dim > &mortar_mesh, const std::array< Spectral::MortarSize, Dim > &mortar_size) noexcept
 Project variables from a mortar to a face.
 
template<typename FluxCommTypes , typename NormalDotNumericalFluxComputer , size_t Dim, typename LocalData >
auto dg::compute_boundary_flux_contribution (const NormalDotNumericalFluxComputer &normal_dot_numerical_flux_computer, LocalData &&local_data, const typename FluxCommTypes::PackagedData &remote_data, const Mesh< Dim > &face_mesh, const Mesh< Dim > &mortar_mesh, const size_t extent_perpendicular_to_boundary, const std::array< Spectral::MortarSize, Dim > &mortar_size) noexcept -> db::item_type< db::remove_tag_prefix< typename FluxCommTypes::normal_dot_fluxes_tag >>
 Compute the lifted data resulting from computing the numerical flux. More...
 

Detailed Description

Functions and classes specific to the Discontinuous Galerkin algorithm.

Function Documentation

◆ compute_boundary_flux_contribution()

template<typename FluxCommTypes , typename NormalDotNumericalFluxComputer , size_t Dim, typename LocalData >
auto dg::compute_boundary_flux_contribution ( const NormalDotNumericalFluxComputer &  normal_dot_numerical_flux_computer,
LocalData &&  local_data,
const typename FluxCommTypes::PackagedData &  remote_data,
const Mesh< Dim > &  face_mesh,
const Mesh< Dim > &  mortar_mesh,
const size_t  extent_perpendicular_to_boundary,
const std::array< Spectral::MortarSize, Dim > &  mortar_size 
) -> db::item_type< db::remove_tag_prefix<typename FluxCommTypes::normal_dot_fluxes_tag>>
noexcept

Compute the lifted data resulting from computing the numerical flux.

Details

This applies the numerical flux, projects the result to the face mesh if necessary, and then lifts it to the volume (still presented only on the face mesh as all other points are zero).

Projection must happen after the numerical flux calculation so that the elements on either side of the mortar calculate the same result. Projection must happen before flux lifting because we want the factor of the magnitude of the unit normal added during the lift to cancel the Jacobian factor in integrals to preserve conservation; this only happens if the two operations are done on the same grid.

◆ lift_flux()

template<typename... FluxTags>
auto dg::lift_flux ( Variables< tmpl::list< FluxTags... >>  flux,
const size_t  extent_perpendicular_to_boundary,
Scalar< DataVector magnitude_of_face_normal 
) -> Variables<tmpl::list<db::remove_tag_prefix<FluxTags>...>>
noexcept

Lifts the flux contribution from an interface to the volume.

The lifting operation takes the (d-1)-dimensional flux term at the interface and computes the corresponding d-dimensional term in the volume. SpECTRE implements an efficient DG method in which each interface grid point contributes only to that same grid point of the volume.

Details

SpECTRE implements a DG method with a diagonalized mass matrix (also known as a mass-lumping scheme). This choice gives a large reduction in the computational cost of the lifting operation, however, the scheme is slightly less accurate, especially when the grid is deformed by non-trivial Jacobians. For more details on the diagonalization of the mass matrix and its implications, [26], especially Section 3.

Note
The result is still provided only on the boundary grid. The values away from the boundary are zero and are not stored.