Classes | Typedefs | Functions
dg::FirstOrderScheme Namespace Reference

Functionality related to the first-order DG scheme. More...

Classes

struct  FirstOrderScheme
 Boundary contributions for a first-order DG scheme. More...
 
struct  FirstOrderSchemeLts
 Boundary contributions for a first-order DG scheme with local time-stepping. More...
 

Typedefs

template<typename NumericalFluxType >
using BoundaryData = typename detail::BoundaryDataImpl< NumericalFluxType >::type
 The data on element boundaries that's needed for the (strong) first-order boundary scheme. More...
 

Functions

template<size_t FaceDim, typename NumericalFluxType , typename... NumericalFluxArgs, Requires< tt::conforms_to_v< NumericalFluxType, protocols::NumericalFlux >> = nullptr>
auto package_boundary_data (const NumericalFluxType &numerical_flux_computer, const Mesh< FaceDim > &face_mesh, const Variables< db::wrap_tags_in< ::Tags::NormalDotFlux, typename NumericalFluxType::variables_tags >> &normal_dot_fluxes, const NumericalFluxArgs &... args) noexcept
 Package the data on element boundaries that's needed for the (strong) first-order boundary scheme. More...
 
template<size_t FaceDim, typename NumericalFluxType , typename AllFieldsTags , typename AllExtraDataTags , Requires< tt::conforms_to_v< NumericalFluxType, dg::protocols::NumericalFlux >> = nullptr>
Variables< typename NumericalFluxType::variables_tags > boundary_flux (const dg::SimpleBoundaryData< AllFieldsTags, AllExtraDataTags > &local_boundary_data, const dg::SimpleBoundaryData< AllFieldsTags, AllExtraDataTags > &remote_boundary_data, const NumericalFluxType &numerical_flux_computer, const Scalar< DataVector > &magnitude_of_face_normal, const size_t extent_perpendicular_to_boundary, const Mesh< FaceDim > &face_mesh, const Mesh< FaceDim > &mortar_mesh, const MortarSize< FaceDim > &mortar_size) noexcept
 Compute the boundary flux contribution and lift it to the volume. More...
 

Detailed Description

Functionality related to the first-order DG scheme.

Typedef Documentation

◆ BoundaryData

template<typename NumericalFluxType >
using dg::FirstOrderScheme::BoundaryData = typedef typename detail::BoundaryDataImpl<NumericalFluxType>::type

The data on element boundaries that's needed for the (strong) first-order boundary scheme.

The boundary data includes the NumericalFluxType's packaged data plus all "normal-dot-fluxes" so the strong boundary scheme can compute the difference between the normal-dot-numerical-fluxes and the normal-dot-fluxes (see dg::FirstOrder). For the weak formulation the normal-dot-fluxes need not be included explicitly, but the NumericalFluxType may require a subset of them.

Function Documentation

◆ boundary_flux()

template<size_t FaceDim, typename NumericalFluxType , typename AllFieldsTags , typename AllExtraDataTags , Requires< tt::conforms_to_v< NumericalFluxType, dg::protocols::NumericalFlux >> = nullptr>
Variables<typename NumericalFluxType::variables_tags> dg::FirstOrderScheme::boundary_flux ( const dg::SimpleBoundaryData< AllFieldsTags, AllExtraDataTags > &  local_boundary_data,
const dg::SimpleBoundaryData< AllFieldsTags, AllExtraDataTags > &  remote_boundary_data,
const NumericalFluxType &  numerical_flux_computer,
const Scalar< DataVector > &  magnitude_of_face_normal,
const size_t  extent_perpendicular_to_boundary,
const Mesh< FaceDim > &  face_mesh,
const Mesh< FaceDim > &  mortar_mesh,
const MortarSize< FaceDim > &  mortar_size 
)
noexcept

Compute the boundary flux contribution and lift it to the volume.

This computes the numerical flux minus the flux dotted into the interface normal, 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.

◆ package_boundary_data()

template<size_t FaceDim, typename NumericalFluxType , typename... NumericalFluxArgs, Requires< tt::conforms_to_v< NumericalFluxType, protocols::NumericalFlux >> = nullptr>
auto dg::FirstOrderScheme::package_boundary_data ( const NumericalFluxType &  numerical_flux_computer,
const Mesh< FaceDim > &  face_mesh,
const Variables< db::wrap_tags_in< ::Tags::NormalDotFlux, typename NumericalFluxType::variables_tags >> &  normal_dot_fluxes,
const NumericalFluxArgs &...  args 
)
noexcept

Package the data on element boundaries that's needed for the (strong) first-order boundary scheme.

This function currently packages the data required by the NumericalFluxType plus all "normal-dot-fluxes", which are needed for the strong first-order boundary scheme (see dg::FirstOrderScheme::BoundaryData). Note that for the weak formulation the normal-dot-fluxes need not be included explicitly, but the NumericalFluxType may require a subset of them.