SpECTRE
v2025.03.17
|
Functionality related to discontinuous Galerkin discretizations of elliptic equations. More...
Namespaces | |
namespace | Actions |
Actions related to elliptic discontinuous Galerkin schemes. | |
namespace | OptionTags |
Option tags related to elliptic discontinuous Galerkin schemes. | |
namespace | subdomain_operator |
Items related to the restriction of the DG operator to an element-centered subdomain. | |
namespace | Tags |
DataBox tags related to elliptic discontinuous Galerkin schemes. | |
Classes | |
struct | InitializeBackground |
Initialize background quantities for the elliptic DG operator, possibly including the metric necessary for normalizing face normals. More... | |
struct | InitializeFacesAndMortars |
Initialize the geometry on faces and mortars for the elliptic DG operator. More... | |
struct | InitializeGeometry |
Initialize the background-independent geometry for the elliptic DG operator. More... | |
struct | MortarData |
Boundary data on both sides of a mortar. More... | |
struct | ProjectGeometry |
Typedefs | |
template<typename PrimalFields , typename PrimalFluxes > | |
using | BoundaryData = ::dg::SimpleBoundaryData< tmpl::append< PrimalFields, db::wrap_tags_in<::Tags::NormalDotFlux, PrimalFields > >, tmpl::list<> > |
Data that is projected to mortars and communicated across element boundaries. | |
Functions | |
template<typename System , bool Linearized, typename... Args> | |
void | prepare_mortar_data (Args &&... args) |
Prepare data on mortars so they can be communicated to neighbors. More... | |
template<typename System , bool Linearized, typename... Args> | |
void | apply_operator (Args &&... args) |
Apply the elliptic DG operator. More... | |
template<typename System , typename... Args> | |
void | impose_inhomogeneous_boundary_conditions_on_source (Args &&... args) |
For linear systems, impose inhomogeneous boundary conditions as contributions to the fixed sources (i.e. the RHS of the equations). More... | |
DataVector | penalty (const DataVector &element_size, size_t num_points, double penalty_parameter) |
The penalty factor in internal penalty fluxes. More... | |
Functionality related to discontinuous Galerkin discretizations of elliptic equations.
The following is a brief overview of the elliptic DG schemes that are implemented here. The scheme is described in detail in [69].
The DG schemes apply to any elliptic PDE that can be formulated in first-order flux-form, as detailed by elliptic::protocols::FirstOrderSystem
. The DG discretization of equations in this first-order form amounts to projecting the equations on the set of basis functions that we also use to represent the fields on the computational grid. The currently implemented DG operator uses Lagrange interpolating polynomials w.r.t. Legendre-Gauss or Legendre-Gauss-Lobatto collocation points as basis functions. Skipping all further details here, the discretization results in a linear equation
Note that
Also note that the numerical fluxes intentionally don't depend on the auxiliary field values
For a Poisson system (see Poisson::FirstOrderSystem
) this numerical flux reduces to the standard internal penalty flux (see e.g. [95], section 7.2, or [5]):
where a sum over repeated indices is assumed, since the equation is formulated on a Euclidean geometry.
The penalty factor elliptic::dg::penalty
for details. For the element size that goes into computing the penalty we choose
void elliptic::dg::apply_operator | ( | Args &&... | args | ) |
Apply the elliptic DG operator.
This function applies the elliptic DG operator on an element, assuming all data on mortars is already available. Use the elliptic::dg::prepare_mortar_data
function to prepare mortar data on neighboring elements, then communicate the data and insert them on the "remote" side of the mortars before calling this function.
void elliptic::dg::impose_inhomogeneous_boundary_conditions_on_source | ( | Args &&... | args | ) |
For linear systems, impose inhomogeneous boundary conditions as contributions to the fixed sources (i.e. the RHS of the equations).
This function exists because the DG operator must typically be linear, but even for linear elliptic equations we typically apply boundary conditions with a constant, and therefore nonlinear, contribution. Standard examples are inhomogeneous (i.e. non-zero) Dirichlet or Neumann boundary conditions. This nonlinear contribution can be added to the fixed sources, leaving only the linearized boundary conditions in the DG operator. For standard constant Dirichlet or Neumann boundary conditions the linearization is of course just zero.
This function essentially feeds zero variables through the nonlinear operator and subtracts the result from the fixed sources: b -= A(x=0)
.
DataVector elliptic::dg::penalty | ( | const DataVector & | element_size, |
size_t | num_points, | ||
double | penalty_parameter | ||
) |
The penalty factor in internal penalty fluxes.
The penalty factor is computed as
where
void elliptic::dg::prepare_mortar_data | ( | Args &&... | args | ) |
Prepare data on mortars so they can be communicated to neighbors.
Call this function on all elements and communicate the mortar data, then call elliptic::dg::apply_operator
.