SpECTRE Documentation Coverage Report
Current view: top level - PointwiseFunctions/AnalyticData - Tags.hpp Coverage Total Hit
Commit: 0d1d717af84a81fb1284a20c4013708fe85cc2f0 Lines: 21.4 % 14 3
Test Date: 2026-10-22 17:29:42
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 "DataStructures/DataBox/Tag.hpp"
       7              : #include "Options/String.hpp"
       8              : #include "Utilities/PrettyType.hpp"
       9              : #include "Utilities/Serialization/Serialize.hpp"
      10              : 
      11              : namespace OptionTags {
      12              : /// \ingroup OptionGroupsGroup
      13              : /// Holds the `OptionTags::AnalyticData` option in the input file
      14            1 : struct AnalyticDataGroup {
      15            0 :   static std::string name() { return "AnalyticData"; }
      16            0 :   static constexpr Options::String help =
      17              :       "Analytic data used for the initial data";
      18              : };
      19              : 
      20              : /// \ingroup OptionTagsGroup
      21              : /// The analytic data, with the type of the analytic data set as the template
      22              : /// parameter
      23              : template <typename DataType>
      24            1 : struct AnalyticData {
      25            0 :   static std::string name() { return pretty_type::name<DataType>(); }
      26            0 :   static constexpr Options::String help = "Options for the analytic data";
      27            0 :   using type = DataType;
      28            0 :   using group = AnalyticDataGroup;
      29              : };
      30              : }  // namespace OptionTags
      31              : 
      32              : namespace Tags {
      33              : /// The analytic data, with the type of the analytic data set as the
      34              : /// template parameter
      35              : template <typename DataType>
      36            1 : struct AnalyticData : db::SimpleTag {
      37            0 :   using type = DataType;
      38            0 :   using option_tags = tmpl::list<::OptionTags::AnalyticData<DataType>>;
      39              : 
      40            0 :   static constexpr bool pass_metavariables = false;
      41            0 :   static DataType create_from_options(const DataType& analytic_solution) {
      42              :     return serialize_and_deserialize<type>(analytic_solution);
      43              :   }
      44              : };
      45              : }  // namespace Tags
        

Generated by: LCOV version 2.0-1