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 the time derivative of the spacetime metric from the 36 : * generalized harmonic quantities \f$\Pi_{a b}\f$, \f$\Phi_{i a b}\f$, and the 37 : * lapse \f$\alpha\f$ and shift \f$\beta^i\f$. 38 : * 39 : * \details Computes the derivative as: 40 : * 41 : * \f{align}{ 42 : * \partial_t g_{a b} = \beta^i \Phi_{i a b} - \alpha \Pi_{a b}. 43 : * \f} 44 : */ 45 : template <typename DataType, size_t SpatialDim, typename Frame> 46 1 : void time_derivative_of_spacetime_metric( 47 : gsl::not_null<tnsr::aa<DataType, SpatialDim, Frame>*> dt_spacetime_metric, 48 : const Scalar<DataType>& lapse, 49 : const tnsr::I<DataType, SpatialDim, Frame>& shift, 50 : const tnsr::aa<DataType, SpatialDim, Frame>& pi, 51 : const tnsr::iaa<DataType, SpatialDim, Frame>& phi); 52 : 53 : template <typename DataType, size_t SpatialDim, typename Frame> 54 1 : tnsr::aa<DataType, SpatialDim, Frame> time_derivative_of_spacetime_metric( 55 : const Scalar<DataType>& lapse, 56 : const tnsr::I<DataType, SpatialDim, Frame>& shift, 57 : const tnsr::aa<DataType, SpatialDim, Frame>& pi, 58 : const tnsr::iaa<DataType, SpatialDim, Frame>& phi); 59 : /// @} 60 : } // namespace gh