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

Generated by: LCOV version 1.14