SpECTRE Documentation Coverage Report
Current view: top level - Evolution/Systems/ForceFree - ElectromagneticVariables.hpp Coverage Total Hit
Commit: 0d1d717af84a81fb1284a20c4013708fe85cc2f0 Lines: 29.2 % 24 7
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 "DataStructures/DataBox/Tag.hpp"
       7              : #include "DataStructures/Tensor/TypeAliases.hpp"
       8              : #include "Evolution/Systems/ForceFree/Tags.hpp"
       9              : #include "PointwiseFunctions/GeneralRelativity/TagsDeclarations.hpp"
      10              : #include "Utilities/TMPL.hpp"
      11              : 
      12              : /// \cond
      13              : class DataVector;
      14              : namespace gsl {
      15              : template <typename T>
      16              : class not_null;
      17              : }  // namespace gsl
      18              : /// \endcond
      19              : 
      20              : namespace ForceFree {
      21              : 
      22              : /*!
      23              :  * \brief Computes electric field $E^i$ from TildeE or magnetic field $B^i$ from
      24              :  * TildeB.
      25              :  */
      26            1 : void em_field_from_evolved_fields(
      27              :     const gsl::not_null<tnsr::I<DataVector, 3>*> vector,
      28              :     const tnsr::I<DataVector, 3>& densitized_vector,
      29              :     const Scalar<DataVector>& sqrt_det_spatial_metric);
      30              : 
      31              : /*!
      32              :  * \brief Computes electric charge density $q$ from TildeQ.
      33              :  */
      34            1 : void charge_density_from_tilde_q(
      35              :     const gsl::not_null<Scalar<DataVector>*> charge_density,
      36              :     const Scalar<DataVector>& tilde_q,
      37              :     const Scalar<DataVector>& sqrt_det_spatial_metric);
      38              : 
      39              : /*!
      40              :  * \brief Computes electric current density $J^i$ from TildeJ.
      41              :  */
      42            1 : void electric_current_density_from_tilde_j(
      43              :     const gsl::not_null<tnsr::I<DataVector, 3>*> electric_current_density,
      44              :     const tnsr::I<DataVector, 3>& tilde_j,
      45              :     const Scalar<DataVector>& sqrt_det_spatial_metric,
      46              :     const Scalar<DataVector>& lapse);
      47              : 
      48              : namespace Tags {
      49              : /*!
      50              :  * \brief Compute item for electric field $E^i$ from TildeE.
      51              :  *
      52              :  * \note This ComputeTag is solely for observation purpose, not related to
      53              :  * actual time evolution.
      54              :  */
      55            1 : struct ElectricFieldCompute : ElectricField, db::ComputeTag {
      56            0 :   using argument_tags =
      57              :       tmpl::list<TildeE, gr::Tags::SqrtDetSpatialMetric<DataVector>>;
      58            0 :   using return_type = tnsr::I<DataVector, 3>;
      59            0 :   using base = ElectricField;
      60              : 
      61            0 :   static constexpr auto function = &em_field_from_evolved_fields;
      62              : };
      63              : 
      64              : /*!
      65              :  * \brief Compute item for magnetic field $B^i$ from TildeB.
      66              :  *
      67              :  * \note This ComputeTag is solely for observation purpose, not related to
      68              :  * actual time evolution.
      69              :  */
      70            1 : struct MagneticFieldCompute : MagneticField, db::ComputeTag {
      71            0 :   using argument_tags =
      72              :       tmpl::list<TildeB, gr::Tags::SqrtDetSpatialMetric<DataVector>>;
      73            0 :   using return_type = tnsr::I<DataVector, 3>;
      74            0 :   using base = MagneticField;
      75              : 
      76            0 :   static constexpr auto function = &em_field_from_evolved_fields;
      77              : };
      78              : 
      79              : /*!
      80              :  * \brief Compute item for electric charge density $q$ from TildeQ.
      81              :  *
      82              :  * \note This ComputeTag is solely for observation purpose, not related to
      83              :  * actual time evolution.
      84              :  */
      85            1 : struct ChargeDensityCompute : ChargeDensity, db::ComputeTag {
      86            0 :   using argument_tags =
      87              :       tmpl::list<TildeQ, gr::Tags::SqrtDetSpatialMetric<DataVector>>;
      88            0 :   using return_type = Scalar<DataVector>;
      89            0 :   using base = ChargeDensity;
      90              : 
      91            0 :   static constexpr auto function = &charge_density_from_tilde_q;
      92              : };
      93              : 
      94              : /*!
      95              :  * \brief Compute item for electric current density $J^i$ from TildeJ.
      96              :  *
      97              :  * \note This ComputeTag is solely for observation purpose, not related to
      98              :  * actual time evolution.
      99              :  */
     100            1 : struct ElectricCurrentDensityCompute : ElectricCurrentDensity, db::ComputeTag {
     101            0 :   using argument_tags = tmpl::list<TildeJ, gr::Tags::Lapse<DataVector>,
     102              :                                    gr::Tags::SqrtDetSpatialMetric<DataVector>>;
     103            0 :   using return_type = tnsr::I<DataVector, 3>;
     104            0 :   using base = ElectricCurrentDensity;
     105              : 
     106            0 :   static constexpr auto function = &electric_current_density_from_tilde_j;
     107              : };
     108              : 
     109              : }  // namespace Tags
     110              : }  // namespace ForceFree
        

Generated by: LCOV version 2.0-1