TimeDerivativeOfSpacetimeMetric.hpp
2 // See LICENSE.txt for details.
3
4 #pragma once
5
6 #include <cmath>
7 #include <cstddef>
8 #include <cstdint>
9 #include <utility>
10
12 #include "DataStructures/DataBox/Tag.hpp"
15 #include "DataStructures/VariablesTag.hpp"
17 #include "PointwiseFunctions/GeneralRelativity/Tags.hpp"
18 #include "Utilities/ContainerHelpers.hpp"
19 #include "Utilities/Gsl.hpp"
20 #include "Utilities/TMPL.hpp"
21 #include "Utilities/TaggedTuple.hpp"
22
23 /// \ingroup GeneralRelativityGroup
24 /// Holds functions related to general relativity.
25 namespace gr {
26 // @{
27 /*!
28  * \ingroup GeneralRelativityGroup
29  * \brief Computes the time derivative of the spacetime metric from spatial
30  * metric, lapse, shift, and their time derivatives.
31  *
32  * \details Computes the derivative as:
33  *
34  * \f{align}{
35  * \partial_t g_{tt} &= - 2 \alpha \partial_t \alpha
36  * - 2 \gamma_{i j} \beta^i \partial_t \beta^j
37  * + \beta^i \beta^j \partial_t \gamma_{i j}\\
38  * \partial_t g_{t i} &= \gamma_{j i} \partial_t \beta^j
39  * + \beta^j \partial_t \gamma_{j i}\\
40  * \partial_t g_{i j} &= \partial_t \gamma_{i j},
41  * \f}
42  *
43  * where \f$\alpha, \beta^i, \gamma_{ij}\f$ are the lapse, shift, and spatial
44  * metric respectively.
45  */
46 template <size_t SpatialDim, typename Frame, typename DataType>
48  gsl::not_null<tnsr::aa<DataType, SpatialDim, Frame>*> dt_spacetime_metric,
49  const Scalar<DataType>& lapse, const Scalar<DataType>& dt_lapse,
50  const tnsr::I<DataType, SpatialDim, Frame>& shift,
51  const tnsr::I<DataType, SpatialDim, Frame>& dt_shift,
52  const tnsr::ii<DataType, SpatialDim, Frame>& spatial_metric,
53  const tnsr::ii<DataType, SpatialDim, Frame>& dt_spatial_metric) noexcept;
54
55 template <size_t SpatialDim, typename Frame, typename DataType>
56 tnsr::aa<DataType, SpatialDim, Frame> time_derivative_of_spacetime_metric(
57  const Scalar<DataType>& lapse, const Scalar<DataType>& dt_lapse,
58  const tnsr::I<DataType, SpatialDim, Frame>& shift,
59  const tnsr::I<DataType, SpatialDim, Frame>& dt_shift,
60  const tnsr::ii<DataType, SpatialDim, Frame>& spatial_metric,
61  const tnsr::ii<DataType, SpatialDim, Frame>& dt_spatial_metric) noexcept;
62 //@}
63 namespace Tags {} // namespace Tags
64 } // namespace gr
utility
DeterminantAndInverse.hpp
cmath
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.
cstddef
cstdint
gr::time_derivative_of_spacetime_metric
void time_derivative_of_spacetime_metric(gsl::not_null< tnsr::aa< DataType, SpatialDim, Frame > * > dt_spacetime_metric, 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) noexcept
Computes the time derivative of the spacetime metric from spatial metric, lapse, shift,...
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
gr
Definition: GaugeWave.hpp:27
Tensor.hpp
gr::spatial_metric
tnsr::ii< DataType, SpatialDim, Frame > spatial_metric(const tnsr::aa< DataType, SpatialDim, Frame > &spacetime_metric) noexcept
Compute spatial metric from spacetime metric.
PartialDerivatives.hpp
Prefixes.hpp
TMPL.hpp
gsl::not_null
Require a pointer to not be a nullptr
Definition: Gsl.hpp:183