SpECTRE Documentation Coverage Report
Current view: top level - Elliptic/Systems/ScalarGaussBonnet - Equations.hpp Coverage Total Hit
Commit: 0d1d717af84a81fb1284a20c4013708fe85cc2f0 Lines: 36.4 % 22 8
Test Date: 2026-10-22 17:29:42
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 :   using const_global_cache_tags = tmpl::list<>;
     132            0 :   static void apply(
     133              :       gsl::not_null<Scalar<DataVector>*> equation_for_field,
     134              :       const tnsr::i<DataVector, 3>& conformal_christoffel_contracted,
     135              :       const tnsr::i<DataVector, 3>& deriv_lapse,
     136              :       const Scalar<DataVector>& lapse,
     137              :       const Scalar<DataVector>& conformal_factor,
     138              :       const tnsr::i<DataVector, 3>& conformal_factor_deriv, const double& eps2,
     139              :       const double& eps4, const Scalar<DataVector>& weyl_electric,
     140              :       const Scalar<DataVector>& weyl_magnetic, const Scalar<DataVector>& field,
     141              :       const tnsr::i<DataVector, 3>& /*field_gradient*/,
     142              :       const tnsr::I<DataVector, 3>& field_flux);
     143              : };
     144              : 
     145              : /*!
     146              :  * \brief Add the linearised sources \f$S_A\f$ for the scalar equation in sGB
     147              :  * gravity on a spatial metric \f$\gamma_{ij}\f$.
     148              :  */
     149            1 : struct LinearizedSources {
     150            0 :   using argument_tags =
     151              :       tmpl::list<Xcts::Tags::ConformalChristoffelContracted<DataVector, 3,
     152              :                                                             Frame::Inertial>,
     153              :                  ::Tags::deriv<gr::Tags::Lapse<DataVector>, tmpl::size_t<3>,
     154              :                                Frame::Inertial>,
     155              :                  gr::Tags::Lapse<DataVector>,
     156              :                  Xcts::Tags::ConformalFactor<DataVector>,
     157              :                  ::Tags::deriv<Xcts::Tags::ConformalFactor<DataVector>,
     158              :                                tmpl::size_t<3>, Frame::Inertial>,
     159              :                  ::CurvedScalarWave::Tags::Psi, Tags::Epsilon2, Tags::Epsilon4,
     160              :                  gr::Tags::WeylElectricScalar<DataVector>,
     161              :                  gr::Tags::WeylMagneticScalar<DataVector>>;
     162            0 :   using const_global_cache_tags = tmpl::list<>;
     163            0 :   static void apply(
     164              :       gsl::not_null<Scalar<DataVector>*> linearized_equation_for_field,
     165              :       const tnsr::i<DataVector, 3>& conformal_christoffel_contracted,
     166              :       const tnsr::i<DataVector, 3>& deriv_lapse,
     167              :       const Scalar<DataVector>& lapse,
     168              :       const Scalar<DataVector>& conformal_factor,
     169              :       const tnsr::i<DataVector, 3>& conformal_factor_deriv,
     170              :       const Scalar<DataVector>& field, const double& eps2, const double& eps4,
     171              :       const Scalar<DataVector>& weyl_electric,
     172              :       const Scalar<DataVector>& weyl_magnetic,
     173              :       const Scalar<DataVector>& field_correction,
     174              :       const tnsr::i<DataVector, 3>& /*field_gradient_correction*/,
     175              :       const tnsr::I<DataVector, 3>& field_flux_correction);
     176              : };
     177              : 
     178              : }  // namespace sgb
        

Generated by: LCOV version 2.0-1