SpECTRE Documentation Coverage Report
Current view: top level - DataStructures/DataBox - SubitemTag.hpp Hit Total Coverage
Commit: 3c072f0ce967e2e56649d3fa12aa2a0e4fe2a42e Lines: 1 5 20.0 %
Date: 2024-04-23 20:50:18
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/Subitems.hpp"
       7             : #include "DataStructures/DataBox/Tag.hpp"
       8             : #include "Utilities/TMPL.hpp"
       9             : 
      10             : namespace Tags {
      11             : 
      12             : /// \cond
      13             : // Declaration of a tag for a subitem
      14             : // Unless specialized, it will be the reference tag below,
      15             : template <typename Tag, typename ParentTag, typename = std::nullptr_t>
      16             : struct Subitem;
      17             : /// \endcond
      18             : 
      19             : /// \brief a reference tag that refers to a particular Tag that is a subitem of
      20             : /// an item tagged with ParentTag
      21             : template <typename Tag, typename ParentTag, typename>
      22           1 : struct Subitem : Tag, db::ReferenceTag {
      23           0 :   using base = Tag;
      24           0 :   using argument_tags = tmpl::list<ParentTag>;
      25           0 :   static const auto& get(
      26             :       const typename ParentTag::type& parent_value) {
      27             :     return ::db::Subitems<ParentTag>::template create_compute_item<base>(
      28             :         parent_value);
      29             :   }
      30             : };
      31             : }  // namespace Tags

Generated by: LCOV version 1.14