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/Tag.hpp" 9 : #include "DataStructures/Tensor/TypeAliases.hpp" 10 : #include "PointwiseFunctions/GeneralRelativity/Tags.hpp" 11 : #include "Utilities/TMPL.hpp" 12 : 13 : /// \cond 14 : namespace gsl { 15 : template <typename> 16 : struct not_null; 17 : } // namespace gsl 18 : /// \endcond 19 : 20 : namespace gr { 21 : 22 : /// @{ 23 : /*! 24 : * \brief Computes the Pontryagin scalar in vacuum. 25 : * 26 : * \details The Pontryagin scalar in vacuum is given by 27 : * \begin{align} 28 : * \mathcal{P} &\equiv {^{\star} C}_{abcd} C^{abcd} \\ 29 : * &= - 16 E_{ab} B^{ab} ~, 30 : * \end{align} 31 : * where $ C_{abcd} $ it the Weyl tensor (with dual $ {^\star} C}_{abcd} $) in 4 32 : * spacetime dimensions. Here it is computed in terms of the electric ($ 33 : * E_{ab} $) and magnetic ($ B_{ab} $) parts of the Weyl scalar, with the 34 : * conventions used here for ($ \{E_{ab}, B_{ab}\} $). 35 : * 36 : * \see `gr::Tags::WeylMagnetic` and `gr::Tags::WeylElectric` 37 : * 38 : */ 39 : template <typename Frame> 40 1 : void pontryagin_scalar_in_vacuum( 41 : gsl::not_null<Scalar<DataVector>*> pontryagin_scalar, 42 : const tnsr::ii<DataVector, 3, Frame>& weyl_electric, 43 : const tnsr::ii<DataVector, 3, Frame>& weyl_magnetic, 44 : const tnsr::II<DataVector, 3, Frame>& inverse_spatial_metric); 45 : 46 : template <typename Frame> 47 1 : Scalar<DataVector> pontryagin_scalar_in_vacuum( 48 : const tnsr::ii<DataVector, 3, Frame>& weyl_electric, 49 : const tnsr::ii<DataVector, 3, Frame>& weyl_magnetic, 50 : const tnsr::II<DataVector, 3, Frame>& inverse_spatial_metric); 51 : /// @} 52 : 53 : /// @{ 54 : /*! 55 : * \brief Computes Gauss-Bonnet scalar in vacuum. 56 : * 57 : * \details The Gauss-Bonnet scalar in vacuum is given by 58 : * \begin{align} 59 : * \mathcal{G} &\equiv R_{abcd} R^{abcd} - 4 R_{ab} R^{ab} + R^2 60 : * &= C_{abcd} C^{abcd} 61 : * &= 8 (E_{ab} E^{ab} - B_{ab} B^{ab}) ~, 62 : * \end{align} 63 : * where $ R_{abcd} $, $ R_{ab} $, $ R $ $ C_{abcd} $ are the Riemann tensor, 64 : * Ricci tensor, Ricci scalar and Weyl tensor in 4 spacetime dimensions. The 65 : * Gauss-Bonnet scalar in vacuum can be computed in terms of the electric ($ 66 : * E_{ab} $) and magnetic ($ B_{ab} $) parts of the Weyl tensor. 67 : * 68 : * \see `gr::Tags::WeylMagnetic` and `gr::Tags::WeylElectric` 69 : * 70 : */ 71 1 : void gauss_bonnet_scalar_in_vacuum( 72 : gsl::not_null<Scalar<DataVector>*> gb_scalar, 73 : const Scalar<DataVector>& weyl_electric_scalar, 74 : const Scalar<DataVector>& weyl_magnetic_scalar); 75 : 76 1 : Scalar<DataVector> gauss_bonnet_scalar_in_vacuum( 77 : const Scalar<DataVector>& weyl_electric_scalar, 78 : const Scalar<DataVector>& weyl_magnetic_scalar); 79 : /// @} 80 : 81 : } // namespace gr