SpECTRE Documentation Coverage Report
Current view: top level - Evolution/DgSubcell/Tags - OnSubcells.hpp Coverage Total Hit
Commit: 0d1d717af84a81fb1284a20c4013708fe85cc2f0 Lines: 25.0 % 4 1
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/PrefixHelpers.hpp"
       7              : #include "DataStructures/DataBox/Tag.hpp"
       8              : #include "DataStructures/VariablesTag.hpp"
       9              : 
      10              : /// \cond
      11              : template <typename X, typename Symm, typename IndexList>
      12              : class Tensor;
      13              : template <typename TagsList>
      14              : class Variables;
      15              : /// \endcond
      16              : 
      17              : namespace evolution::dg::subcell::Tags {
      18              : /// Mark a tag as the being on the subcell grid
      19              : template <typename Tag>
      20            1 : struct OnSubcells : db::PrefixTag, db::SimpleTag {
      21              :   static_assert(tt::is_a_v<Tensor, typename Tag::type>,
      22              :                 "A subcell tag must be either a Tensor or a Variables "
      23              :                 "currently, though this can be generalized if needed.");
      24            0 :   using type = typename Tag::type;
      25            0 :   using tag = Tag;
      26              : };
      27              : 
      28              : /// \cond
      29              : // This tag currently exposes its constituents as subitems. Possible
      30              : // compile-time optimization: Remove this template specialization and use
      31              : // `OnSubcells<VariablesTag<tmpl::list<Tag1, Tag2>>>` instead of the individual
      32              : // `OnSubcells<Tag1>`.
      33              : template <typename TagList>
      34              : struct OnSubcells<::Tags::Variables<TagList>>
      35              :     : ::Tags::Variables<db::wrap_tags_in<OnSubcells, TagList>> {
      36              :  private:
      37              :   using wrapped_tags_list = db::wrap_tags_in<OnSubcells, TagList>;
      38              : 
      39              :  public:
      40              :   using tag = ::Tags::Variables<TagList>;
      41              :   using type = Variables<wrapped_tags_list>;
      42              : };
      43              : /// \endcond
      44              : }  // namespace evolution::dg::subcell::Tags
        

Generated by: LCOV version 2.0-1