SpECTRE Documentation Coverage Report
Current view: top level - Evolution/Systems/GeneralizedHarmonic/GaugeSourceFunctions - SetPiFromGauge.hpp Hit Total Coverage
Commit: 9f349d3c09e1c03107f00c2135ca40e209d3b84c Lines: 1 6 16.7 %
Date: 2023-06-09 21:05:06
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 <array>
       7             : #include <cstddef>
       8             : #include <memory>
       9             : #include <random>
      10             : #include <string>
      11             : #include <unordered_map>
      12             : 
      13             : #include "DataStructures/DataBox/DataBox.hpp"
      14             : #include "DataStructures/DataVector.hpp"
      15             : #include "DataStructures/Tensor/Tensor.hpp"
      16             : #include "Domain/ElementMap.hpp"
      17             : #include "Domain/FunctionsOfTime/FunctionOfTime.hpp"
      18             : #include "Domain/FunctionsOfTime/Tags.hpp"
      19             : #include "Domain/Tags.hpp"
      20             : #include "Domain/TagsTimeDependent.hpp"
      21             : #include "Evolution/Initialization/Tags.hpp"
      22             : #include "Evolution/Systems/GeneralizedHarmonic/GaugeSourceFunctions/Tags/GaugeCondition.hpp"
      23             : #include "Evolution/Systems/GeneralizedHarmonic/Tags.hpp"
      24             : #include "Time/Tags.hpp"
      25             : #include "Utilities/TMPL.hpp"
      26             : 
      27             : namespace gh::gauges {
      28             : /*!
      29             :  * \brief Set \f$\Pi_{ab}\f$ from the gauge source function.
      30             :  *
      31             :  * This is necessary to ensure the initial data is in the desired evolution
      32             :  * gauge.
      33             :  */
      34             : template <size_t Dim>
      35           1 : struct SetPiFromGauge {
      36             :  public:
      37           0 :   using return_tags = tmpl::list<gh::Tags::Pi<DataVector, Dim>>;
      38           0 :   using argument_tags =
      39             :       tmpl::list<::Tags::Time, domain::Tags::Mesh<Dim>,
      40             :                  domain::Tags::ElementMap<Dim, Frame::Grid>,
      41             :                  domain::CoordinateMaps::Tags::CoordinateMap<Dim, Frame::Grid,
      42             :                                                              Frame::Inertial>,
      43             :                  domain::Tags::FunctionsOfTime,
      44             :                  domain::Tags::Coordinates<Dim, Frame::ElementLogical>,
      45             :                  gr::Tags::SpacetimeMetric<DataVector, Dim>,
      46             :                  gh::Tags::Phi<DataVector, Dim>,
      47             :                  gh::gauges::Tags::GaugeCondition>;
      48             : 
      49           0 :   using const_global_cache_tags = tmpl::list<gh::gauges::Tags::GaugeCondition>;
      50             : 
      51           0 :   static void apply(
      52             :       gsl::not_null<tnsr::aa<DataVector, Dim, Frame::Inertial>*> pi,
      53             :       double time, const Mesh<Dim>& mesh,
      54             :       const ElementMap<Dim, Frame::Grid>& logical_to_grid_map,
      55             :       const domain::CoordinateMapBase<Frame::Grid, Frame::Inertial, Dim>&
      56             :           grid_to_inertial_map,
      57             :       const std::unordered_map<
      58             :           std::string,
      59             :           std::unique_ptr<domain::FunctionsOfTime::FunctionOfTime>>&
      60             :           functions_of_time,
      61             :       const tnsr::I<DataVector, Dim, Frame::ElementLogical>&
      62             :           logical_coordinates,
      63             :       const tnsr::aa<DataVector, Dim, Frame::Inertial>& spacetime_metric,
      64             :       const tnsr::iaa<DataVector, Dim, Frame::Inertial>& phi,
      65             :       const gauges::GaugeCondition& gauge_condition);
      66             : };
      67             : }  // namespace gh::gauges

Generated by: LCOV version 1.14