SpECTRE
v2022.05.05

Defines the interface for DG numerical fluxes. More...
#include <Protocols.hpp>
Classes  
struct  test 
Defines the interface for DG numerical fluxes.
This protocol defines the interface that a class must conform to so that it can be used as a numerical flux in DG boundary schemes. Essentially, the class must be able to compute the quantity \(G\) that appears, for example, in the strong firstorder DG boundary scheme \(G_\alpha(n_i^\mathrm{int}, u_\alpha^\mathrm{int}, n_i^\mathrm{ext}, u_\alpha^\mathrm{ext})  n_i^\mathrm{int} F^{i,\mathrm{int}}_\alpha\) where \(u_\alpha\) are the system variables and \(F^i_\alpha\) their corresponding fluxes. See also Eq. (2.20) in [118] where the quantity \(G\) is denoted \(n_i F^{i*}\), which is why we occasionally refer to it as the "normaldotnumericalfluxes".
Requires the ConformingType
has these type aliases:
variables_tags
: A typelist of DataBox tags that the class computes numerical fluxes for.argument_tags
: A typelist of DataBox tags that will be retrieved on interfaces and passed to the package_data
function (see below). The ConformingType
may also have a volume_tags
typelist that specifies the subset of argument_tags
that should be retrieved from the volume instead of the interface.package_field_tags
: A typelist of DataBox tags with Tensor
types that the package_data
function will compute from the argument_tags
. These quantities will be made available on both sides of a mortar and passed to the call operator to compute the numerical flux.package_extra_tags
: Additional nontensor tags that will be made available on both sides of a mortar, e.g. geometric quantities.Requires the ConformingType
has these member functions:
package_data
: Takes the types of the package_field_tags
and the package_extra_tags
by gsl::not_null
pointer, followed by the types of the argument_tags
.operator()
: Takes the types of the variables_tags
by gsl::not_null
pointer, followed by the types of the package_field_tags
and the package_extra_tags
from the interior side of the mortar and from the exterior side. Note that the data from the exterior side was computed entirely with data from the neighboring element, including its interface normal which is (at least when it's independent of the system variables) opposite to the interior element's interface normal. Therefore, make sure to take into account the sign flip for quantities that include the interface normal.Here's an example for a simple "central" numerical flux \(G_\alpha(n_i^\mathrm{int}, u_\alpha^\mathrm{int}, n_i^\mathrm{ext}, u_\alpha^\mathrm{ext}) = \frac{1}{2}\left(n_i^\mathrm{int} F^{i,\mathrm{int}}_\alpha  n_i^\mathrm{ext} F^{i,\mathrm{ext}}_\alpha \right)\):
Note that this numerical flux reduces to the interface average \(G_\alpha=\frac{n^\mathrm{int}_i}{2}\left(F^{i,\mathrm{int}}_\alpha + F^{i,\mathrm{ext}}_\alpha\right)\) for the case where the interface normal is independent of the system variables and therefore \(n_i^\mathrm{ext} = n_i^\mathrm{int}\).