SpECTRE  v2026.04.01
Loading...
Searching...
No Matches
elliptic::analytic_data::Background Class Reference

Subclasses supply variable-independent background data for an elliptic solve. More...

#include <Background.hpp>

Detailed Description

Subclasses supply variable-independent background data for an elliptic solve.

Examples for background fields are a background metric, associated curvature quantities, matter sources such as a mass-density in the XCTS equations, or just a source function \(f(x)\) in a Poisson equation \(\Delta u = f(x)\).

Subclasses must define the following compile-time interface:

  • They are option-creatable.
  • They define a variables function that provides the fixed-sources in the elliptic equations (see elliptic::protocols::FirstOrderSystem). The function must have this signature:

    tuples::TaggedTuple<Tags::FixedSource<ScalarFieldTag>> variables( // NOLINT
    const tnsr::I<DataVector, 1>& x,
    tmpl::list<Tags::FixedSource<ScalarFieldTag>> /*meta*/) const {

    It must support being called with a tmpl::list of all system-variable tags prefixed with Tags::FixedSource.

  • They define a variables function that provides data for all background quantities, if any are listed in the background_fields of the system (see elliptic::protocols::FirstOrderSystem). The function must have this signature:

    template <typename... RequestedTags>
    tuples::TaggedTuple<RequestedTags...> variables( // NOLINT
    const tnsr::I<DataVector, Dim>& x, const Mesh<Dim>& /*mesh*/,
    const InverseJacobian<DataVector, Dim, Frame::ElementLogical,
    Frame::Inertial>&
    /*inv_jacobian*/,
    tmpl::list<RequestedTags...> /*meta*/) const {

    It must support being called with a tmpl::list of all background tags. It may use the mesh and inv_jacobian to compute numerical derivatives.


The documentation for this class was generated from the following file:
  • src/PointwiseFunctions/InitialDataUtilities/Background.hpp