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/Tensor.hpp" 9 : #include "DataStructures/Tensor/TypeAliases.hpp" 10 : #include "Utilities/Gsl.hpp" 11 : 12 : namespace gr { 13 : /// @{ 14 : /*! 15 : * \ingroup GeneralRelativityGroup 16 : * \brief Computes the spatial derivative of the inverse spatial metric from the 17 : * inverse spatial metric and the spatial derivative of the spatial metric. 18 : * 19 : * \details Computes the derivative as: 20 : * \f{align} 21 : * \partial_k \gamma^{ij} &= -\gamma^{in} \gamma^{mj} 22 : * \partial_k \gamma_{nm} 23 : * \f} 24 : * where \f$\gamma^{ij}\f$ and \f$\partial_k \gamma_{ij}\f$ are the inverse 25 : * spatial metric and spatial derivative of the spatial metric, respectively. 26 : */ 27 : template <typename DataType, size_t Dim, typename Frame> 28 1 : void deriv_inverse_spatial_metric( 29 : const gsl::not_null<tnsr::iJJ<DataType, Dim, Frame>*> result, 30 : const tnsr::II<DataType, Dim, Frame>& inverse_spatial_metric, 31 : const tnsr::ijj<DataType, Dim, Frame>& d_spatial_metric); 32 : 33 : template <typename DataType, size_t Dim, typename Frame> 34 1 : tnsr::iJJ<DataType, Dim, Frame> deriv_inverse_spatial_metric( 35 : const tnsr::II<DataType, Dim, Frame>& inverse_spatial_metric, 36 : const tnsr::ijj<DataType, Dim, Frame>& d_spatial_metric); 37 : /// @} 38 : } // namespace gr