|
SpECTRE
v2026.04.01
|
A system of elliptic equations in first-order "flux" formulation. More...
#include <FirstOrderSystem.hpp>
Classes | |
| struct | test |
A system of elliptic equations in first-order "flux" formulation.
Classes conforming to this protocol represent a set of elliptic partial differential equations in first-order "flux" formulation:
\begin{equation}-\partial_i F^i_\alpha + S_\alpha = f_\alpha(x) \end{equation}
in terms of fluxes \(F_\alpha^i\), sources \(S_\alpha\) and fixed-sources \(f_\alpha(x)\) [73]. It resembles closely formulations of hyperbolic conservation laws but allows the fluxes \(F_\alpha^i\) to be higher-rank tensor fields. The fluxes and sources are functionals of the system variables \(u_\alpha(x)\) and their derivatives. The fixed-sources \(f_\alpha(x)\) are independent of the system variables. See the Poisson::FirstOrderSystem and the Elasticity::FirstOrderSystem for examples.
Note that this formulation has been simplified since [73] : We assume that the fluxes are linear in the fields and their derivatives and removed the notion of "auxiliary variables" from the formulation altogether. In the language of [73] we always just choose the partial derivatives of the fields as auxiliary variables.
Conforming classes must have these static member variables:
Conforming classes must have these type aliases:
fluxes_computer: A class that defines the fluxes \(F_\alpha^i\). Must have an argument_tags type alias and an apply function that takes these arguments in this order:
The function can assume the output buffers are already correctly sized, but no guarantee is made on the values that the buffers hold at input.
The fluxes_computer must also have an apply function overload that is evaluated on faces of DG elements. It computes the same fluxes \(F_\alpha^i\), but with the field derivatives replaced by the the face normal times the fields, and with the non-principal (non-derivative) terms set to zero. Having this separate function is an optimization to take advantage of the face normal remaining constant throughout the solve, so it can be "baked in" to the flux. The function takes these arguments in this order:
The fluxes_computer class must also have the following additional type aliases and static member variables:
sources_computer: A class that defines the sources \(S_\alpha\). Must have an argument_tags type alias and an apply function that adds the sources to the equations. It takes these arguments in this order:
The function is expected to add the sources \(S_\alpha\) to the output buffers. It must also have the following alias:
The sources_computer may also be void, in which case \(S_\alpha=0\).
modify_boundary_data (optional, can be void): A class that can modify boundary data received from a neighboring element, e.g. to transform from one variable to another across element boundaries. This can be used to solve for different variables in some regions of the domain to absorb singularities. For example, when solving \(-\Delta u = f\) we could define \(u=u_R + u_P\) in some region of the domain with a known (often singular) field \(u_P\) and solve only for the regular field \(u_R\) in this region. So, when receiving boundary data from outside this region, we subtract \(u_P\), and when receiving boundary data from inside this region, we add \(u_P\). We also add \(\Delta u_P\) to the volume fixed sources \(f\) inside the regularized region.
The modify_boundary_data must have an argument_tags type alias and an apply function that takes these arguments in this order:
Currently, modification made by this function must not depend on the variables, meaning that the modification can only be adding or subtracting a precomputed field. This is a simplification so the linearized operator is not modified at all and can be relaxed if needed (then we also need modify_boundary_data_linearized).