SpECTRE Documentation Coverage Report
Current view: top level - ParallelAlgorithms/ApparentHorizonFinder/Protocols - HorizonMetavars.hpp Hit Total Coverage
Commit: de0084593a37be7727c6c4da0be2184b0f8d9ed4 Lines: 1 10 10.0 %
Date: 2025-11-04 23:26:01
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 <string>
       7             : 
       8             : #include "ParallelAlgorithms/ApparentHorizonFinder/Destination.hpp"
       9             : #include "ParallelAlgorithms/ApparentHorizonFinder/Protocols/Callback.hpp"
      10             : #include "Utilities/ProtocolHelpers.hpp"
      11             : #include "Utilities/TMPL.hpp"
      12             : 
      13             : namespace ah::protocols {
      14             : /*!
      15             :  * \brief A protocol for `InterpolationTargetTag`s that are used in the
      16             :  * intrp::InterpolationTarget parallel component.
      17             :  *
      18             :  * \details A struct conforming to the `InterpolationTargetTag` protocol must
      19             :  * have
      20             :  *
      21             :  * - a type alias `time_tag` to a tag that tells the horizon finder
      22             :  *   which time tag to use (for example, `::Tags::TimeAndPrevious`).
      23             :  *
      24             :  * - a type alias `frame` to the frame that the horizon find happens in (e.g.
      25             :  *   `::Frame::Distorted`).
      26             :  *
      27             :  * - a type alias `compute_tags_on_element` which is a `tmpl::list` of compute
      28             :  *   tags used in the `ObservationBox` on the elements.
      29             :  *
      30             :  * - a type alias `horizon_find_callbacks` which is a `tmpl::list` of callbacks
      31             :  *   that conform to `ah::protocols::Callback`.
      32             :  *
      33             :  * - a type alias `horizon_find_failure_callbacks` which is a `tmpl::list` of
      34             :  *   callbacks that conform to `ah::protocols::Callback`.
      35             :  *
      36             :  * - a static function `name()` that returns a `std::string`.
      37             :  *
      38             :  * - a static constexpr `ah::Destination` named `destination` which tells what
      39             :  *   this horizon find is for.
      40             :  *
      41             :  * \snippet Helpers/ParallelAlgorithms/ApparentHorizonFinder/TestHelpers.hpp HorizonMetavars
      42             :  */
      43           1 : struct HorizonMetavars {
      44             :   template <typename ConformingType>
      45           0 :   struct test {
      46           0 :     using time_tag = typename ConformingType::time_tag;
      47             : 
      48           0 :     using frame = typename ConformingType::frame;
      49             : 
      50           0 :     using horizon_find_callbacks =
      51             :         typename ConformingType::horizon_find_callbacks;
      52             :     static_assert(tmpl::all<horizon_find_callbacks,
      53             :                             tt::assert_conforms_to<tmpl::_1, Callback>>::value);
      54           0 :     using horizon_find_failure_callbacks =
      55             :         typename ConformingType::horizon_find_failure_callbacks;
      56             :     static_assert(tmpl::all<horizon_find_failure_callbacks,
      57             :                             tt::assert_conforms_to<tmpl::_1, Callback>>::value);
      58             : 
      59           0 :     using compute_tags_on_element =
      60             :         typename ConformingType::compute_tags_on_element;
      61             : 
      62           0 :     static constexpr Destination destination = ConformingType::destination;
      63             : 
      64           0 :     static std::string name() { return ConformingType::name(); }
      65             :   };
      66             : };
      67             : }  // namespace ah::protocols

Generated by: LCOV version 1.14