SpECTRE Documentation Coverage Report
Current view: top level - Elliptic/Systems/ScalarGaussBonnet - Equations.hpp Hit Total Coverage
Commit: a8efe75339f4781ca06d43fed14c40144d5e8a08 Lines: 8 20 40.0 %
Date: 2024-10-17 21:19:21
Legend: Lines: hit not hit

          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 "Elliptic/Systems/ScalarGaussBonnet/Tags.hpp"
      10             : #include "Elliptic/Systems/Xcts/Tags.hpp"
      11             : #include "PointwiseFunctions/GeneralRelativity/Tags.hpp"
      12             : #include "Utilities/Gsl.hpp"
      13             : #include "Utilities/MakeWithValue.hpp"
      14             : #include "Utilities/TMPL.hpp"
      15             : 
      16             : /// \cond
      17             : class DataVector;
      18             : namespace PUP {
      19             : class er;
      20             : }  // namespace PUP
      21             : namespace sgb {
      22             : struct Fluxes;
      23             : struct Sources;
      24             : }  // namespace sgb
      25             : /// \endcond
      26             : 
      27             : namespace sgb {
      28             : 
      29             : /*!
      30             :  * \brief Compute the fluxes $F^i=\left(\psi^{-4} \tilde{\gamma}^{ij}
      31             :  * -\alpha^{2} \beta^i \beta^j \right) \partial_j \Psi(x)$ for the scalar
      32             :  * equation in sGB gravity on a conformal metric $\tilde{\gamma}_{ij}$.
      33             :  */
      34           1 : void curved_fluxes(gsl::not_null<tnsr::I<DataVector, 3>*> flux_for_field,
      35             :                    const tnsr::II<DataVector, 3>& inv_conformal_metric,
      36             :                    const tnsr::I<DataVector, 3>& shift,
      37             :                    const Scalar<DataVector>& lapse,
      38             :                    const Scalar<DataVector>& conformal_factor,
      39             :                    const tnsr::i<DataVector, 3>& field_gradient);
      40             : 
      41             : /*!
      42             :  * \brief Compute the fluxes $F^i=\left(\psi^{-4} \tilde{\gamma}^{ij}
      43             :  * -\alpha^{2} \beta^i \beta^j \right) \partial_j \Psi(x)$ for the scalar
      44             :  * equation in sGB gravity on a conformal metric $\tilde{\gamma}_{ij}$ on a face
      45             :  * normal.
      46             :  */
      47           1 : void face_fluxes(gsl::not_null<tnsr::I<DataVector, 3>*> flux_for_field,
      48             :                  const tnsr::II<DataVector, 3>& inv_conformal_metric,
      49             :                  const tnsr::I<DataVector, 3>& shift,
      50             :                  const Scalar<DataVector>& lapse,
      51             :                  const Scalar<DataVector>& conformal_factor,
      52             :                  const tnsr::i<DataVector, 3>& face_normal,
      53             :                  const Scalar<DataVector>& field);
      54             : 
      55             : /*!
      56             :  * \brief Adds the source terms arising from the $\Box \Psi$ term in the
      57             :  * equation of motion for the scalar field: $S=-\tilde{\Gamma}^i_{ij}F^j-F^j
      58             :  * \alpha^{-1} \partial_j \alpha - 6F^j \psi^{-1} \partial_j \psi$.*/
      59           1 : void add_curved_sources(gsl::not_null<Scalar<DataVector>*> source_for_field,
      60             :                         const tnsr::i<DataVector, 3>& christoffel_contracted,
      61             :                         const tnsr::I<DataVector, 3>& flux_for_field,
      62             :                         const tnsr::i<DataVector, 3>& deriv_lapse,
      63             :                         const Scalar<DataVector>& lapse,
      64             :                         const Scalar<DataVector>& conformal_factor,
      65             :                         const tnsr::i<DataVector, 3>& conformal_factor_deriv);
      66             : 
      67             : /*!
      68             :  * \brief Add the sGB coupling term $\mathcal{R} f'(\Psi)=2(E-B)(\epsilon_2 \Psi
      69             :  * + \epsilon_4 \Psi^3)$.
      70             :  */
      71           1 : void add_GB_terms(gsl::not_null<Scalar<DataVector>*> scalar_tensor_equation,
      72             :                   double eps2, double eps4,
      73             :                   const Scalar<DataVector>& weyl_electric,
      74             :                   const Scalar<DataVector>& weyl_magnetic,
      75             :                   const Scalar<DataVector>& field);
      76             : 
      77             : /*!
      78             :  * \brief Add sources arising from linearising the sGB coupling term.
      79             :  */
      80           1 : void add_linearized_GB_terms(
      81             :     gsl::not_null<Scalar<DataVector>*> linearized_scalar_tensor_equation,
      82             :     double eps2, double eps4, const Scalar<DataVector>& weyl_electric,
      83             :     const Scalar<DataVector>& weyl_magnetic, const Scalar<DataVector>& field,
      84             :     const Scalar<DataVector>& field_correction);
      85             : 
      86             : /*!
      87             :  * \brief Compute the fluxes \f$F^i\f$ for the scalar equation in sGB gravity on
      88             :  * a spatial metric \f$\gamma_{ij}\f$.
      89             :  */
      90           1 : struct Fluxes {
      91           0 :   using argument_tags = tmpl::list<
      92             :       Xcts::Tags::InverseConformalMetric<DataVector, 3, Frame::Inertial>,
      93             :       sgb::Tags::RolledOffShift, gr::Tags::Lapse<DataVector>,
      94             :       Xcts::Tags::ConformalFactor<DataVector>>;
      95           0 :   using volume_tags = tmpl::list<>;
      96           0 :   using const_global_cache_tags = tmpl::list<>;
      97           0 :   static constexpr bool is_trivial = false;
      98           0 :   static constexpr bool is_discontinuous = false;
      99           0 :   static void apply(gsl::not_null<tnsr::I<DataVector, 3>*> flux_for_field,
     100             :                     const tnsr::II<DataVector, 3>& inv_conformal_metric,
     101             :                     const tnsr::I<DataVector, 3>& shift,
     102             :                     const Scalar<DataVector>& lapse,
     103             :                     const Scalar<DataVector>& conformal_factor,
     104             :                     const Scalar<DataVector>& field,
     105             :                     const tnsr::i<DataVector, 3>& field_gradient);
     106           0 :   static void apply(gsl::not_null<tnsr::I<DataVector, 3>*> flux_for_field,
     107             :                     const tnsr::II<DataVector, 3>& inv_conformal_metric,
     108             :                     const tnsr::I<DataVector, 3>& shift,
     109             :                     const Scalar<DataVector>& lapse,
     110             :                     const Scalar<DataVector>& conformal_factor,
     111             :                     const tnsr::i<DataVector, 3>& face_normal,
     112             :                     const tnsr::I<DataVector, 3>& face_normal_vector,
     113             :                     const Scalar<DataVector>& field);
     114             : };
     115             : 
     116             : /*!
     117             :  * \brief Add the sources \f$S_A\f$ for the scalar equation in sGB gravity on a
     118             :  * spatial metric \f$\gamma_{ij}\f$.
     119             :  */
     120           1 : struct Sources {
     121           0 :   using argument_tags = tmpl::list<
     122             :       Xcts::Tags::ConformalChristoffelContracted<DataVector, 3,
     123             :                                                  Frame::Inertial>,
     124             :       ::Tags::deriv<gr::Tags::Lapse<DataVector>, tmpl::size_t<3>,
     125             :                     Frame::Inertial>,
     126             :       gr::Tags::Lapse<DataVector>, Xcts::Tags::ConformalFactor<DataVector>,
     127             :       ::Tags::deriv<Xcts::Tags::ConformalFactor<DataVector>, tmpl::size_t<3>,
     128             :                     Frame::Inertial>,
     129             :       Tags::Epsilon2, Tags::Epsilon4, gr::Tags::WeylElectricScalar<DataVector>,
     130             :       gr::Tags::WeylMagneticScalar<DataVector>>;
     131           0 :   static void apply(
     132             :       gsl::not_null<Scalar<DataVector>*> equation_for_field,
     133             :       const tnsr::i<DataVector, 3>& conformal_christoffel_contracted,
     134             :       const tnsr::i<DataVector, 3>& deriv_lapse,
     135             :       const Scalar<DataVector>& lapse,
     136             :       const Scalar<DataVector>& conformal_factor,
     137             :       const tnsr::i<DataVector, 3>& conformal_factor_deriv, const double& eps2,
     138             :       const double& eps4, const Scalar<DataVector>& weyl_electric,
     139             :       const Scalar<DataVector>& weyl_magnetic, const Scalar<DataVector>& field,
     140             :       const tnsr::I<DataVector, 3>& field_flux);
     141             : };
     142             : 
     143             : /*!
     144             :  * \brief Add the linearised sources \f$S_A\f$ for the scalar equation in sGB
     145             :  * gravity on a spatial metric \f$\gamma_{ij}\f$.
     146             :  */
     147           1 : struct LinearizedSources {
     148           0 :   using argument_tags =
     149             :       tmpl::list<Xcts::Tags::ConformalChristoffelContracted<DataVector, 3,
     150             :                                                             Frame::Inertial>,
     151             :                  ::Tags::deriv<gr::Tags::Lapse<DataVector>, tmpl::size_t<3>,
     152             :                                Frame::Inertial>,
     153             :                  gr::Tags::Lapse<DataVector>,
     154             :                  Xcts::Tags::ConformalFactor<DataVector>,
     155             :                  ::Tags::deriv<Xcts::Tags::ConformalFactor<DataVector>,
     156             :                                tmpl::size_t<3>, Frame::Inertial>,
     157             :                  ::CurvedScalarWave::Tags::Psi, Tags::Epsilon2, Tags::Epsilon4,
     158             :                  gr::Tags::WeylElectricScalar<DataVector>,
     159             :                  gr::Tags::WeylMagneticScalar<DataVector>>;
     160           0 :   static void apply(
     161             :       gsl::not_null<Scalar<DataVector>*> linearized_equation_for_field,
     162             :       const tnsr::i<DataVector, 3>& conformal_christoffel_contracted,
     163             :       const tnsr::i<DataVector, 3>& deriv_lapse,
     164             :       const Scalar<DataVector>& lapse,
     165             :       const Scalar<DataVector>& conformal_factor,
     166             :       const tnsr::i<DataVector, 3>& conformal_factor_deriv,
     167             :       const Scalar<DataVector>& field, const double& eps2, const double& eps4,
     168             :       const Scalar<DataVector>& weyl_electric,
     169             :       const Scalar<DataVector>& weyl_magnetic,
     170             :       const Scalar<DataVector>& field_correction,
     171             :       const tnsr::I<DataVector, 3>& field_flux_correction);
     172             : };
     173             : 
     174             : }  // namespace sgb

Generated by: LCOV version 1.14