TimeDerivative.hpp
1 // Distributed under the MIT License.
2 // See LICENSE.txt for details.
3 
4 #pragma once
5 
6 #include <cstddef>
7 
9 #include "Evolution/Systems/CurvedScalarWave/Characteristics.hpp"
12 #include "PointwiseFunctions/GeneralRelativity/Tags.hpp"
13 #include "Utilities/Gsl.hpp"
14 #include "Utilities/TMPL.hpp"
15 
16 /// \cond
17 class DataVector;
18 template <typename X, typename Symm, typename IndexList>
19 class Tensor;
20 /// \endcond
21 
22 namespace CurvedScalarWave {
23 /*!
24  * \brief Compute the time derivative of the evolved variables of the
25  * first-order scalar wave system on a curved background.
26  *
27  * The evolution equations for the first-order scalar wave system are given by
28  * \cite Holst2004wt :
29  *
30  * \f{align}
31  * \partial_t\Psi = & (1 + \gamma_1) \beta^k \partial_k \Psi - \alpha \Pi -
32  * \gamma_1 \beta^k \Phi_k \\
33  *
34  * \partial_t\Pi = & - \alpha \gamma^{ij}\partial_i\Phi_j + \beta^k \partial_k
35  * \Pi + \gamma_1 \gamma_2 \beta^k \partial_k \Psi + \alpha \Gamma^i -
36  * \gamma^{ij} \Phi_i \partial_j \alpha
37  * + \alpha K \Pi - \gamma_1 \gamma_2 \beta^k \Phi_k\\
38  *
39  * \partial_t\Phi_i = & - \alpha \partial_i \Pi + \beta^k \partial_k \Phi +
40  * \gamma_2 \alpha \partial_i \Psi - \Pi
41  * \partial_i \alpha + \Phi_k \partial_i \beta^j - \gamma_2 \alpha \Phi_i\\
42  * \f}
43  *
44  * where \f$\Psi\f$ is the scalar field, \f$\Pi\f$ is the
45  * conjugate momentum to \f$\Psi\f$, \f$\Phi_i=\partial_i\Psi\f$ is an
46  * auxiliary variable, \f$\alpha\f$ is the lapse, \f$\beta^k\f$ is the shift,
47  * \f$ \gamma_{ij} \f$ is the spatial metric, \f$ K \f$ is the trace of the
48  * extrinsic curvature, and \f$ \Gamma^i \f$ is the trace of the Christoffel
49  * symbol of the second kind. \f$\gamma_1, \gamma_2\f$ are constraint damping
50  * parameters.
51  */
52 template <size_t Dim>
54  public:
55  using temporary_tags = tmpl::list<>;
56 
57  using argument_tags = tmpl::list<
63  tmpl::size_t<Dim>, Frame::Inertial>,
66  DataVector>,
69 
70  static void apply(
72  gsl::not_null<tnsr::i<DataVector, Dim, Frame::Inertial>*> dt_phi,
74  const tnsr::i<DataVector, Dim>& d_pi,
75  const tnsr::ij<DataVector, Dim>& d_phi,
76  const tnsr::i<DataVector, Dim>& d_psi, const Scalar<DataVector>& pi,
77  const tnsr::i<DataVector, Dim>& phi, const Scalar<DataVector>& lapse,
78  const tnsr::I<DataVector, Dim>& shift,
79  const tnsr::i<DataVector, Dim>& deriv_lapse,
80  const tnsr::iJ<DataVector, Dim>& deriv_shift,
81  const tnsr::II<DataVector, Dim>& upper_spatial_metric,
82  const tnsr::I<DataVector, Dim>& trace_spatial_christoffel,
83  const Scalar<DataVector>& trace_extrinsic_curvature,
84  const Scalar<DataVector>& gamma1,
85  const Scalar<DataVector>& gamma2) noexcept;
86 };
87 } // namespace CurvedScalarWave
gr::Tags::TraceExtrinsicCurvature< DataVector >
GeneralizedHarmonic::pi
void pi(gsl::not_null< tnsr::aa< DataType, SpatialDim, Frame > * > pi, const Scalar< DataType > &lapse, const Scalar< DataType > &dt_lapse, const tnsr::I< DataType, SpatialDim, Frame > &shift, const tnsr::I< DataType, SpatialDim, Frame > &dt_shift, const tnsr::ii< DataType, SpatialDim, Frame > &spatial_metric, const tnsr::ii< DataType, SpatialDim, Frame > &dt_spatial_metric, const tnsr::iaa< DataType, SpatialDim, Frame > &phi) noexcept
Computes the conjugate momentum of the spacetime metric .
Frame::Inertial
Definition: IndexType.hpp:44
CurvedScalarWave::Tags::ConstraintGamma1
Definition: Tags.hpp:37
Tags.hpp
CurvedScalarWave::Tags::ConstraintGamma2
Definition: Tags.hpp:41
CurvedScalarWave::Phi
Definition: Tags.hpp:32
gr::lapse
Scalar< DataType > lapse(const tnsr::I< DataType, SpatialDim, Frame > &shift, const tnsr::aa< DataType, SpatialDim, Frame > &spacetime_metric) noexcept
Compute lapse from shift and spacetime metric.
CurvedScalarWave::TimeDerivative
Compute the time derivative of the evolved variables of the first-order scalar wave system on a curve...
Definition: TimeDerivative.hpp:53
cstddef
DataVector
Stores a collection of function values.
Definition: DataVector.hpp:46
CurvedScalarWave::Pi
Definition: Tags.hpp:27
GeneralizedHarmonic::phi
void phi(gsl::not_null< tnsr::iaa< DataType, SpatialDim, Frame > * > phi, const Scalar< DataType > &lapse, const tnsr::i< DataType, SpatialDim, Frame > &deriv_lapse, const tnsr::I< DataType, SpatialDim, Frame > &shift, const tnsr::iJ< DataType, SpatialDim, Frame > &deriv_shift, const tnsr::ii< DataType, SpatialDim, Frame > &spatial_metric, const tnsr::ijj< DataType, SpatialDim, Frame > &deriv_spatial_metric) noexcept
Computes the auxiliary variable used by the generalized harmonic formulation of Einstein's equations...
gr::Tags::Shift
Definition: Tags.hpp:48
gr::shift
tnsr::I< DataType, SpatialDim, Frame > shift(const tnsr::aa< DataType, SpatialDim, Frame > &spacetime_metric, const tnsr::II< DataType, SpatialDim, Frame > &inverse_spatial_metric) noexcept
Compute shift from spacetime metric and inverse spatial metric.
Scalar
Tensor< T, Symmetry<>, index_list<> > Scalar
Definition: TypeAliases.hpp:21
Gsl.hpp
TypeAliases.hpp
Tags::deriv
Prefix indicating spatial derivatives.
Definition: PartialDerivatives.hpp:52
PartialDerivatives.hpp
gr::Tags::TraceSpatialChristoffelSecondKind
Definition: Tags.hpp:105
gr::Tags::Lapse
Definition: Tags.hpp:52
TMPL.hpp
gr::Tags::InverseSpatialMetric
Inverse of the spatial metric.
Definition: Tags.hpp:33
CurvedScalarWave
Items related to evolving a scalar wave on a curved background.
Definition: Characteristics.hpp:18
gsl::not_null
Require a pointer to not be a nullptr
Definition: ReadSpecPiecewisePolynomial.hpp:13