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 : // IWYU pragma: no_forward_declare Tags::deriv 20 : 21 : /// \cond 22 : namespace domain { 23 : namespace Tags { 24 : template <size_t Dim, typename Frame> 25 : struct Coordinates; 26 : } // namespace Tags 27 : } // namespace domain 28 : class DataVector; 29 : template <typename X, typename Symm, typename IndexList> 30 : class Tensor; 31 : /// \endcond 32 : 33 : namespace gh { 34 : /// @{ 35 : /*! 36 : * \ingroup GeneralRelativityGroup 37 : * \brief Computes the time derivative of the spacetime metric from the 38 : * generalized harmonic quantities \f$\Pi_{a b}\f$, \f$\Phi_{i a b}\f$, and the 39 : * lapse \f$\alpha\f$ and shift \f$\beta^i\f$. 40 : * 41 : * \details Computes the derivative as: 42 : * 43 : * \f{align}{ 44 : * \partial_t g_{a b} = \beta^i \Phi_{i a b} - \alpha \Pi_{a b}. 45 : * \f} 46 : */ 47 : template <typename DataType, size_t SpatialDim, typename Frame> 48 1 : void time_derivative_of_spacetime_metric( 49 : gsl::not_null<tnsr::aa<DataType, SpatialDim, Frame>*> dt_spacetime_metric, 50 : const Scalar<DataType>& lapse, 51 : const tnsr::I<DataType, SpatialDim, Frame>& shift, 52 : const tnsr::aa<DataType, SpatialDim, Frame>& pi, 53 : const tnsr::iaa<DataType, SpatialDim, Frame>& phi); 54 : 55 : template <typename DataType, size_t SpatialDim, typename Frame> 56 1 : tnsr::aa<DataType, SpatialDim, Frame> time_derivative_of_spacetime_metric( 57 : const Scalar<DataType>& lapse, 58 : const tnsr::I<DataType, SpatialDim, Frame>& shift, 59 : const tnsr::aa<DataType, SpatialDim, Frame>& pi, 60 : const tnsr::iaa<DataType, SpatialDim, Frame>& phi); 61 : /// @} 62 : } // namespace gh