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 spacetime derivatives of the determinant of spatial metric, 36 : * using the generalized harmonic variables, spatial metric, and its 37 : * time derivative. 38 : * 39 : * \details Using the relation 40 : * \f$ \partial_a \gamma = \gamma \gamma^{jk} \partial_a \gamma_{jk} \f$ 41 : */ 42 : template <typename DataType, size_t SpatialDim, typename Frame> 43 1 : void spacetime_deriv_of_det_spatial_metric( 44 : gsl::not_null<tnsr::a<DataType, SpatialDim, Frame>*> d4_det_spatial_metric, 45 : const Scalar<DataType>& sqrt_det_spatial_metric, 46 : const tnsr::II<DataType, SpatialDim, Frame>& inverse_spatial_metric, 47 : const tnsr::ii<DataType, SpatialDim, Frame>& dt_spatial_metric, 48 : const tnsr::iaa<DataType, SpatialDim, Frame>& phi); 49 : 50 : template <typename DataType, size_t SpatialDim, typename Frame> 51 1 : tnsr::a<DataType, SpatialDim, Frame> spacetime_deriv_of_det_spatial_metric( 52 : const Scalar<DataType>& sqrt_det_spatial_metric, 53 : const tnsr::II<DataType, SpatialDim, Frame>& inverse_spatial_metric, 54 : const tnsr::ii<DataType, SpatialDim, Frame>& dt_spatial_metric, 55 : const tnsr::iaa<DataType, SpatialDim, Frame>& phi); 56 : /// @} 57 : } // namespace gh