FirstOrderSystem.hpp
Go to the documentation of this file.
2 // See LICENSE.txt for details.
3
4 /// \file
5 /// Defines class Poisson::FirstOrderSystem
6
7 #pragma once
8
9 #include <cstddef>
10
11 #include "DataStructures/Tensor/EagerMath/Magnitude.hpp"
12 #include "Elliptic/Systems/Poisson/Equations.hpp"
15 #include "Utilities/TMPL.hpp"
16
17 /// \cond
18 namespace Tags {
19 template <typename>
20 class Variables;
21 } // namespace Tags
22
23 namespace LinearSolver {
24 namespace Tags {
25 template <typename>
26 struct Operand;
27 } // namespace Tags
28 } // namespace LinearSolver
29 /// \endcond
30
31 namespace Poisson {
32
33 /*!
34  * \brief The Poisson equation formulated as a set of coupled first-order PDEs.
35  *
36  * \details This system formulates the Poisson equation \f$-\Delta u(x) = 37 * f(x)\f$ as the set of coupled first-order PDEs
38  * \f[
39  * -\nabla \cdot \boldsymbol{v}(x) = f(x) \\
40  * \nabla u(x) - \boldsymbol{v}(x) = 0
41  * \f]
42  * where we make use of an auxiliary variable \f$\boldsymbol{v}\f$. This scheme
43  * also goes by the name of _mixed_ or _flux_ formulation (see e.g.
44  * \cite Arnold2002). The auxiliary variable is treated on the same footing as
45  * the field \f$u\f$. This allows us to make use of the DG architecture
46  * developed for coupled first-order PDEs, in particular the flux communication
47  * and lifting code. It does, however, introduce auxiliary degrees of freedom
48  * that can be avoided in the _primal formulation_. Furthermore, the linear
49  * operator that represents the DG discretization for this system is not
50  * symmetric (since no mass operator is applied) and has both positive and
51  * negative eigenvalues. These properties further increase the computational
52  * cost (see \ref LinearSolverGroup) and are remedied in the primal formulation.
53  */
54 template <size_t Dim>
56  static constexpr size_t volume_dim = Dim;
57
58  // The physical fields to solve for
60  using impose_boundary_conditions_on_fields = tmpl::list<Field>;
61
62  // The variables to compute bulk contributions and fluxes for.
63  using variables_tag =
65
66  // The bulk contribution to the linear operator action
68
69  // The interface normal dotted into the fluxes that is required by the strong
70  // flux lifting operation
72
73  // The tag of the operator to compute magnitudes on the manifold, e.g. to
74  // normalize vectors on the faces of an element
75  template <typename Tag>
77
78  // The tags to instantiate derivative functions for
80  using divergence_tags = tmpl::list<AuxiliaryField<Dim>>;
81 };
82 } // namespace Poisson
Wrap Tag in Prefix<_, Args...>, also wrapping variables tags if Tag is a Tags::Variables.
Definition: DataBoxTag.hpp:533
The bulk contribution to the linear operator action for the first order formulation of the Poisson eq...
Definition: Equations.hpp:58
Definition: Variables.hpp:46
Defines DataBox tags for the linear solver.
Functionality for solving linear systems of equations.
Definition: TerminateIfConverged.hpp:22
The Euclidean magnitude of a (co)vector.
Definition: Magnitude.hpp:67
Items related to solving a Poisson equation .
Definition: Actions.hpp:6
The interface normal dotted into the fluxes for the first order formulation of the Poisson equation...
Definition: Equations.hpp:86
Defines DataBox tags for the Poisson system.
Definition: DataBoxTag.hpp:29
The Poisson equation formulated as a set of coupled first-order PDEs.
Definition: FirstOrderSystem.hpp:55
Wraps the template metaprogramming library used (brigand)