SpECTRE Documentation Coverage Report
Current view: top level - Evolution/Systems/GeneralizedHarmonic/GaugeSourceFunctions - SetPiAndPhiFromConstraints.hpp Hit Total Coverage
Commit: 22d59f0ec25cca6837adf897838d802980351e0d Lines: 1 6 16.7 %
Date: 2024-04-27 04:42:14
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 "Utilities/TMPL.hpp"
      25             : 
      26             : /// \cond
      27             : namespace Tags {
      28             : struct Time;
      29             : }  // namespace Tags
      30             : /// \endcond
      31             : 
      32             : namespace gh::gauges {
      33             : /*!
      34             :  * \brief Set \f$\Pi_{ab}\f$ from the gauge source function (or 1-index
      35             :  * constraint) and \f$\Phi_{iab}\f$ from the 3-index constraint.
      36             :  *
      37             :  * This is necessary to ensure the initial data is in the desired evolution
      38             :  * gauge and that the 1- and 3-index constraints are satisfied.
      39             :  */
      40             : template <size_t Dim>
      41           1 : struct SetPiAndPhiFromConstraints {
      42             :  public:
      43           0 :   using return_tags =
      44             :       tmpl::list<gh::Tags::Pi<DataVector, Dim>, gh::Tags::Phi<DataVector, Dim>>;
      45           0 :   using argument_tags =
      46             :       tmpl::list<::Tags::Time, domain::Tags::Mesh<Dim>,
      47             :                  domain::Tags::ElementMap<Dim, Frame::Grid>,
      48             :                  domain::CoordinateMaps::Tags::CoordinateMap<Dim, Frame::Grid,
      49             :                                                              Frame::Inertial>,
      50             :                  domain::Tags::FunctionsOfTime,
      51             :                  domain::Tags::Coordinates<Dim, Frame::ElementLogical>,
      52             :                  gr::Tags::SpacetimeMetric<DataVector, Dim>,
      53             :                  gh::gauges::Tags::GaugeCondition>;
      54             : 
      55           0 :   using const_global_cache_tags = tmpl::list<gh::gauges::Tags::GaugeCondition>;
      56             : 
      57           0 :   static void apply(
      58             :       gsl::not_null<tnsr::aa<DataVector, Dim, Frame::Inertial>*> pi,
      59             :       gsl::not_null<tnsr::iaa<DataVector, Dim, Frame::Inertial>*> phi,
      60             :       double time, const Mesh<Dim>& mesh,
      61             :       const ElementMap<Dim, Frame::Grid>& logical_to_grid_map,
      62             :       const domain::CoordinateMapBase<Frame::Grid, Frame::Inertial, Dim>&
      63             :           grid_to_inertial_map,
      64             :       const std::unordered_map<
      65             :           std::string,
      66             :           std::unique_ptr<domain::FunctionsOfTime::FunctionOfTime>>&
      67             :           functions_of_time,
      68             :       const tnsr::I<DataVector, Dim, Frame::ElementLogical>&
      69             :           logical_coordinates,
      70             :       const tnsr::aa<DataVector, Dim, Frame::Inertial>& spacetime_metric,
      71             :       const gauges::GaugeCondition& gauge_condition);
      72             : };
      73             : }  // namespace gh::gauges

Generated by: LCOV version 1.14