Line data Source code
1 0 : // Distributed under the MIT License.
2 : // See LICENSE.txt for details.
3 :
4 : #pragma once
5 :
6 : #include <cstddef>
7 :
8 : #include "DataStructures/DataBox/Prefixes.hpp"
9 : #include "DataStructures/DataBox/Tag.hpp"
10 : #include "DataStructures/DataVector.hpp"
11 : #include "DataStructures/Tensor/Tensor.hpp"
12 : #include "Evolution/Systems/GeneralizedHarmonic/Tags.hpp"
13 : #include "NumericalAlgorithms/LinearOperators/PartialDerivatives.hpp"
14 : #include "PointwiseFunctions/GeneralRelativity/Tags.hpp"
15 : #include "Utilities/ContainerHelpers.hpp"
16 : #include "Utilities/Gsl.hpp"
17 : #include "Utilities/TMPL.hpp"
18 :
19 : /// \cond
20 : namespace domain {
21 : namespace Tags {
22 : template <size_t Dim, typename Frame>
23 : struct Coordinates;
24 : } // namespace Tags
25 : } // namespace domain
26 : class DataVector;
27 : template <typename X, typename Symm, typename IndexList>
28 : class Tensor;
29 : /// \endcond
30 :
31 : namespace gh {
32 : /// @{
33 : /*!
34 : * \ingroup GeneralRelativityGroup
35 : * \brief Computes time derivative of index lowered shift from generalized
36 : * harmonic variables, spatial metric and its time derivative.
37 : *
38 : * \details The time derivative of \f$ \beta_i \f$ is given by:
39 : * \f{align*}
40 : * \partial_0 \beta_i =
41 : * \gamma_{ij} \partial_0 \beta^j + \beta^j \partial_0 \gamma_{ij}
42 : * \f}
43 : * where the first term is obtained from `time_deriv_of_shift()`, and the latter
44 : * is a user input.
45 : */
46 : template <typename DataType, size_t SpatialDim, typename Frame>
47 1 : void time_deriv_of_lower_shift(
48 : gsl::not_null<tnsr::i<DataType, SpatialDim, Frame>*> dt_lower_shift,
49 : const Scalar<DataType>& lapse,
50 : const tnsr::I<DataType, SpatialDim, Frame>& shift,
51 : const tnsr::ii<DataType, SpatialDim, Frame>& spatial_metric,
52 : const tnsr::A<DataType, SpatialDim, Frame>& spacetime_unit_normal,
53 : const tnsr::iaa<DataType, SpatialDim, Frame>& phi,
54 : const tnsr::aa<DataType, SpatialDim, Frame>& pi);
55 :
56 : template <typename DataType, size_t SpatialDim, typename Frame>
57 1 : tnsr::i<DataType, SpatialDim, Frame> time_deriv_of_lower_shift(
58 : const Scalar<DataType>& lapse,
59 : const tnsr::I<DataType, SpatialDim, Frame>& shift,
60 : const tnsr::ii<DataType, SpatialDim, Frame>& spatial_metric,
61 : const tnsr::A<DataType, SpatialDim, Frame>& spacetime_unit_normal,
62 : const tnsr::iaa<DataType, SpatialDim, Frame>& phi,
63 : const tnsr::aa<DataType, SpatialDim, Frame>& pi);
64 : /// @}
65 : } // namespace gh
|