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/Tensor/TypeAliases.hpp" 9 : #include "Utilities/Gsl.hpp" 10 : 11 : namespace gr { 12 : /// @{ 13 : /*! 14 : * \ingroup GeneralRelativityGroup 15 : * \brief Computes spacetime derivative of 16 : * \f$ \mathfrak{g}^{ab}\equiv (-g)^{1/2} g^{ab} \f$. 17 : * 18 : * \details Computes the spacetime derivative of 19 : * \f$ \mathfrak{g}^{ab}\equiv (-g)^{1/2} g^{ab} \f$, defined 20 : * in \cite Misner1973. Using \f$ (-g)^{1/2} = \alpha (\gamma)^{1/2} \f$, where 21 : * \f$ \alpha \f$ is the lapse and \f$ \gamma \f$ is the determinant of the 22 : * spatial metric (\cite BaumgarteShapiro), the derivative of 23 : * \f$ \mathfrak{g}^{ab} \f$ expands out to 24 : * \f{align}{ 25 : * \partial_c \mathfrak{g}^{ab} &= \left[\partial_c \alpha \gamma^{1/2} 26 : * + \frac{1}{2} \alpha \partial_c \gamma \gamma^{-1/2} \right] g^{ab} 27 : * - \alpha \gamma^{1/2} g^{ad} g^{be} \partial_c g_{de}. 28 : * \f} 29 : */ 30 : template <typename DataType, size_t SpatialDim, typename Frame> 31 1 : void spacetime_deriv_of_goth_g( 32 : gsl::not_null<tnsr::aBB<DataType, SpatialDim, Frame>*> da_goth_g, 33 : const tnsr::AA<DataType, SpatialDim, Frame>& inverse_spacetime_metric, 34 : const tnsr::abb<DataType, SpatialDim, Frame>& da_spacetime_metric, 35 : const Scalar<DataType>& lapse, 36 : const tnsr::a<DataType, SpatialDim, Frame>& da_lapse, 37 : const Scalar<DataType>& sqrt_det_spatial_metric, 38 : const tnsr::a<DataType, SpatialDim, Frame>& da_det_spatial_metric); 39 : 40 : template <typename DataType, size_t SpatialDim, typename Frame> 41 1 : tnsr::aBB<DataType, SpatialDim, Frame> spacetime_deriv_of_goth_g( 42 : const tnsr::AA<DataType, SpatialDim, Frame>& inverse_spacetime_metric, 43 : const tnsr::abb<DataType, SpatialDim, Frame>& da_spacetime_metric, 44 : const Scalar<DataType>& lapse, 45 : const tnsr::a<DataType, SpatialDim, Frame>& da_lapse, 46 : const Scalar<DataType>& sqrt_det_spatial_metric, 47 : const tnsr::a<DataType, SpatialDim, Frame>& da_det_spatial_metric); 48 : /// @} 49 : } // namespace gr