SpECTRE Documentation Coverage Report
Current view: top level - Evolution/Executables/GrMhd/GhValenciaDivClean - EvolveGhValenciaDivCleanWithHorizon.hpp Hit Total Coverage
Commit: 817e13c5144619b701c7cd870655d8dbf94ab8ce Lines: 0 30 0.0 %
Date: 2024-07-19 22:17:05
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 <vector>
       7             : 
       8             : #include "Evolution/DiscontinuousGalerkin/Limiters/Tags.hpp"
       9             : #include "Evolution/Executables/GrMhd/GhValenciaDivClean/GhValenciaDivCleanBase.hpp"
      10             : #include "Evolution/Systems/GeneralizedHarmonic/Tags.hpp"
      11             : #include "Evolution/Systems/GrMhd/GhValenciaDivClean/TimeDerivativeTerms.hpp"
      12             : #include "Evolution/Systems/GrMhd/ValenciaDivClean/Tags.hpp"
      13             : #include "Evolution/VariableFixing/Tags.hpp"
      14             : #include "Options/FactoryHelpers.hpp"
      15             : #include "Options/Protocols/FactoryCreation.hpp"
      16             : #include "Options/String.hpp"
      17             : #include "ParallelAlgorithms/ApparentHorizonFinder/Callbacks/ErrorOnFailedApparentHorizon.hpp"
      18             : #include "ParallelAlgorithms/ApparentHorizonFinder/Callbacks/FindApparentHorizon.hpp"
      19             : #include "ParallelAlgorithms/ApparentHorizonFinder/ComputeHorizonVolumeQuantities.hpp"
      20             : #include "ParallelAlgorithms/ApparentHorizonFinder/ComputeHorizonVolumeQuantities.tpp"
      21             : #include "ParallelAlgorithms/ApparentHorizonFinder/InterpolationTarget.hpp"
      22             : #include "ParallelAlgorithms/Interpolation/Actions/CleanUpInterpolator.hpp"
      23             : #include "ParallelAlgorithms/Interpolation/Actions/InitializeInterpolationTarget.hpp"
      24             : #include "ParallelAlgorithms/Interpolation/Actions/InterpolationTargetReceiveVars.hpp"
      25             : #include "ParallelAlgorithms/Interpolation/Actions/InterpolatorReceivePoints.hpp"
      26             : #include "ParallelAlgorithms/Interpolation/Actions/InterpolatorReceiveVolumeData.hpp"
      27             : #include "ParallelAlgorithms/Interpolation/Actions/InterpolatorRegisterElement.hpp"
      28             : #include "ParallelAlgorithms/Interpolation/Actions/TryToInterpolate.hpp"
      29             : #include "ParallelAlgorithms/Interpolation/Callbacks/ObserveTimeSeriesOnSurface.hpp"
      30             : #include "ParallelAlgorithms/Interpolation/Events/Interpolate.hpp"
      31             : #include "ParallelAlgorithms/Interpolation/InterpolationTarget.hpp"
      32             : #include "ParallelAlgorithms/Interpolation/Interpolator.hpp"
      33             : #include "ParallelAlgorithms/Interpolation/Protocols/InterpolationTargetTag.hpp"
      34             : #include "ParallelAlgorithms/Interpolation/Tags.hpp"
      35             : #include "PointwiseFunctions/GeneralRelativity/Surfaces/Tags.hpp"
      36             : #include "PointwiseFunctions/Hydro/EquationsOfState/Factory.hpp"
      37             : #include "Time/Tags/Time.hpp"
      38             : #include "Utilities/ErrorHandling/Error.hpp"
      39             : #include "Utilities/ProtocolHelpers.hpp"
      40             : #include "Utilities/TMPL.hpp"
      41             : 
      42             : template <bool UseControlSystems, typename... InterpolationTargetTags>
      43             : struct EvolutionMetavars
      44             :     : public GhValenciaDivCleanTemplateBase<
      45             :           EvolutionMetavars<UseControlSystems, InterpolationTargetTags...>,
      46             :           false, false> {
      47             :   static_assert(not UseControlSystems,
      48             :                 "GhValenciaWithHorizon doesn't support control systems yet.");
      49             :   static constexpr bool use_dg_subcell = false;
      50             : 
      51           0 :   using defaults = GhValenciaDivCleanDefaults<use_dg_subcell>;
      52           0 :   using base = GhValenciaDivCleanTemplateBase<EvolutionMetavars, use_dg_subcell,
      53             :                                               UseControlSystems>;
      54             :   static constexpr size_t volume_dim = defaults::volume_dim;
      55           0 :   using domain_frame = typename defaults::domain_frame;
      56             :   static constexpr bool use_damped_harmonic_rollon =
      57             :       defaults::use_damped_harmonic_rollon;
      58           0 :   using temporal_id = typename defaults::temporal_id;
      59             :   static constexpr bool local_time_stepping = defaults::local_time_stepping;
      60           0 :   using system = typename defaults::system;
      61           0 :   using analytic_variables_tags = typename defaults::analytic_variables_tags;
      62           0 :   using analytic_solution_fields = typename defaults::analytic_solution_fields;
      63           0 :   using ordered_list_of_primitive_recovery_schemes =
      64             :       typename defaults::ordered_list_of_primitive_recovery_schemes;
      65           0 :   using limiter = typename defaults::limiter;
      66           0 :   using initialize_initial_data_dependent_quantities_actions =
      67             :       typename defaults::initialize_initial_data_dependent_quantities_actions;
      68             : 
      69             :   static constexpr Options::String help{
      70             :       "Evolve the Valencia formulation of the GRMHD system with divergence "
      71             :       "cleaning, coupled to a dynamic spacetime evolved with the Generalized "
      72             :       "Harmonic formulation\n"
      73             :       "on a domain with a single horizon and corresponding excised region"};
      74             : 
      75           0 :   struct AhA : tt::ConformsTo<intrp::protocols::InterpolationTargetTag> {
      76           0 :     using temporal_id = ::Tags::Time;
      77           0 :     using tags_to_observe =
      78             :         tmpl::list<gr::surfaces::Tags::AreaCompute<domain_frame>>;
      79           0 :     using compute_vars_to_interpolate = ah::ComputeHorizonVolumeQuantities;
      80           0 :     using vars_to_interpolate_to_target = tmpl::list<
      81             :         gr::Tags::SpatialMetric<DataVector, volume_dim, domain_frame>,
      82             :         gr::Tags::InverseSpatialMetric<DataVector, volume_dim, domain_frame>,
      83             :         gr::Tags::ExtrinsicCurvature<DataVector, volume_dim, domain_frame>,
      84             :         gr::Tags::SpatialChristoffelSecondKind<DataVector, volume_dim,
      85             :                                                domain_frame>>;
      86           0 :     using compute_items_on_target = tmpl::append<
      87             :         tmpl::list<gr::surfaces::Tags::AreaElementCompute<domain_frame>>,
      88             :         tags_to_observe>;
      89           0 :     using compute_target_points =
      90             :         intrp::TargetPoints::ApparentHorizon<AhA, ::Frame::Inertial>;
      91           0 :     using post_interpolation_callbacks = tmpl::list<
      92             :         intrp::callbacks::FindApparentHorizon<AhA, ::Frame::Inertial>>;
      93           0 :     using horizon_find_failure_callback =
      94             :         intrp::callbacks::ErrorOnFailedApparentHorizon;
      95           0 :     using post_horizon_find_callbacks = tmpl::list<
      96             :         intrp::callbacks::ObserveTimeSeriesOnSurface<tags_to_observe, AhA>>;
      97             :   };
      98             : 
      99           0 :   using interpolation_target_tags = tmpl::list<InterpolationTargetTags..., AhA>;
     100           0 :   using interpolator_source_vars = tmpl::list<
     101             :       gr::Tags::SpacetimeMetric<DataVector, volume_dim, domain_frame>,
     102             :       gh::Tags::Pi<DataVector, volume_dim, domain_frame>,
     103             :       gh::Tags::Phi<DataVector, volume_dim, domain_frame>>;
     104             : 
     105           0 :   using observe_fields = typename base::observe_fields;
     106             : 
     107             :   struct factory_creation
     108             :       : tt::ConformsTo<Options::protocols::FactoryCreation> {
     109           0 :     using factory_classes = Options::add_factory_classes<
     110             :         typename base::factory_creation::factory_classes,
     111             :         tmpl::pair<Event, tmpl::list<intrp::Events::Interpolate<
     112             :                               3, AhA, interpolator_source_vars>>>>;
     113             :   };
     114             : 
     115           0 :   using initial_data_tag = typename base::initial_data_tag;
     116             : 
     117           0 :   using const_global_cache_tags = tmpl::flatten<tmpl::list<
     118             :       grmhd::ValenciaDivClean::Tags::PrimitiveFromConservativeOptions,
     119             :       gh::gauges::Tags::GaugeCondition, initial_data_tag,
     120             :       grmhd::ValenciaDivClean::Tags::ConstraintDampingParameter,
     121             :       typename base::equation_of_state_tag,
     122             :       gh::ConstraintDamping::Tags::DampingFunctionGamma0<volume_dim,
     123             :                                                          Frame::Grid>,
     124             :       gh::ConstraintDamping::Tags::DampingFunctionGamma1<volume_dim,
     125             :                                                          Frame::Grid>,
     126             :       gh::ConstraintDamping::Tags::DampingFunctionGamma2<volume_dim,
     127             :                                                          Frame::Grid>>>;
     128             : 
     129           0 :   using observed_reduction_data_tags = observers::collect_reduction_data_tags<
     130             :       tmpl::at<typename factory_creation::factory_classes, Event>>;
     131             : 
     132           0 :   using registration = typename base::registration;
     133             : 
     134           0 :   using component_list =
     135             :       tmpl::push_back<typename base::component_list,
     136             :                       intrp::InterpolationTarget<EvolutionMetavars, AhA>>;
     137             : };

Generated by: LCOV version 1.14