SpECTRE  2021.08.02
Poisson::FirstOrderSystem< Dim, BackgroundGeometry > Struct Template Reference

The Poisson equation formulated as a set of coupled first-order PDEs. More...

#include <FirstOrderSystem.hpp>

Public Types

using primal_fields = tmpl::list< field >
 
using auxiliary_fields = tmpl::list< field_gradient >
 
using primal_fluxes = tmpl::list<::Tags::Flux< field, tmpl::size_t< Dim >, Frame::Inertial > >
 
using auxiliary_fluxes = tmpl::list< ::Tags::Flux< field_gradient, tmpl::size_t< Dim >, Frame::Inertial > >
 
using background_fields = tmpl::conditional_t< BackgroundGeometry==Geometry::FlatCartesian, tmpl::list<>, tmpl::list< gr::Tags::InverseSpatialMetric< Dim, Frame::Inertial, DataVector >, gr::Tags::SpatialChristoffelSecondKindContracted< Dim, Frame::Inertial, DataVector > > >
 
using inv_metric_tag = tmpl::conditional_t< BackgroundGeometry==Geometry::FlatCartesian, void, gr::Tags::InverseSpatialMetric< Dim, Frame::Inertial, DataVector > >
 
using fluxes_computer = Fluxes< Dim, BackgroundGeometry >
 
using sources_computer = Sources< Dim, BackgroundGeometry >
 
using boundary_conditions_base = elliptic::BoundaryConditions::BoundaryCondition< Dim, tmpl::list< elliptic::BoundaryConditions::Registrars::AnalyticSolution< FirstOrderSystem >, Poisson::BoundaryConditions::Registrars::Robin< Dim > > >
 

Static Public Attributes

static constexpr size_t volume_dim = Dim
 

Detailed Description

template<size_t Dim, Geometry BackgroundGeometry>
struct Poisson::FirstOrderSystem< Dim, BackgroundGeometry >

The Poisson equation formulated as a set of coupled first-order PDEs.

Details

This system formulates the Poisson equation \(-\Delta_\gamma u(x) = f(x)\) on a background metric \(\gamma_{ij}\) as the set of coupled first-order PDEs

\[ -\partial_i \gamma^{ij} v_j(x) - \Gamma^i_{ij}\gamma^{jk}v_k = f(x) \\ -\partial_i u(x) + v_i(x) = 0 \]

where we have chosen the field gradient as an auxiliary variable \(v_i\) and where \(\Gamma^i_{jk}=\frac{1}{2}\gamma^{il}\left(\partial_j\gamma_{kl} +\partial_k\gamma_{jl}-\partial_l\gamma_{jk}\right)\) are the Christoffel symbols of the second kind of the background metric \(\gamma_{ij}\). The background metric \(\gamma_{ij}\) and the Christoffel symbols derived from it are assumed to be independent of the variables \(u\) and \(v_i\), i.e. constant throughout an iterative elliptic solve.

This scheme also goes by the name of mixed or flux formulation (see e.g. [2]). The reason for the latter name is that we can write the set of coupled first-order PDEs in flux-form

\[ -\partial_i F^i_A + S_A = f_A(x) \]

by choosing the fluxes and sources in terms of the system variables \(u(x)\) and \(v_i(x)\) as

\begin{align*} F^i_u &= \gamma^{ij} v_j(x) \\ S_u &= -\Gamma^i_{ij}\gamma^{jk}v_k \\ f_u &= f(x) \\ F^i_{v_j} &= u \delta^i_j \\ S_{v_j} &= v_j \\ f_{v_j} &= 0 \text{.} \end{align*}

Note that we use the system variables to index the fluxes and sources, which we also do in the code by using DataBox tags. Also note that we have defined the fixed sources \(f_A\) as those source terms that are independent of the system variables.

The fluxes und sources simplify significantly when the background metric is flat and we employ Cartesian coordinates so \(\gamma_{ij} = delta_{ij}\) and \(\Gamma^i_{jk} = 0\). Set the template parameter BackgroundGeometry to Poisson::Geometry::FlatCartesian to specialise the system for this case. Set it to Poisson::Geometry::Curved for the general case.