|
SpECTRE
v2025.08.19
|
A DataBox stores objects that can be retrieved by using Tags. More...
#include <DataBox.hpp>
Public Types | |
| using | tags_list = tmpl::list< Tags... > |
A typelist (tmpl::list) of Tags that the DataBox holds. | |
| using | immutable_item_tags = tmpl::filter< tags_list, db::is_immutable_item_tag< tmpl::_1 > > |
| A list of all the immutable item tags, including their subitems. Immutable items are compute tags and reference tags. | |
| using | immutable_item_creation_tags = tmpl::remove_if< immutable_item_tags, tt::is_a<::Tags::Subitem, tmpl::_1 > > |
| A list of all the immutable item tags used to create the DataBox. More... | |
| using | mutable_item_tags = tmpl::filter< tags_list, db::is_mutable_item_tag< tmpl::_1 > > |
| A list of all the mutable item tags, including their subitems. | |
| using | mutable_subitem_tags = tmpl::flatten< tmpl::transform< mutable_item_tags, db::Subitems< tmpl::_1 > > > |
| A list of the expanded simple subitems, not including the main Subitem tags themselves. More... | |
| using | mutable_item_creation_tags = tmpl::list_difference< mutable_item_tags, mutable_subitem_tags > |
| A list of all the mutable item tags used to create the DataBox. More... | |
| using | mutable_item_parent_tags = tmpl::filter< mutable_item_creation_tags, tmpl::bind< detail::has_subitems, tmpl::_1 > > |
| A list of all the mutable tags that have subitems. | |
| using | compute_item_tags = tmpl::filter< immutable_item_tags, db::is_compute_tag< tmpl::_1 > > |
| A list of all the compute item tags. | |
| using | compute_item_parent_tags = tmpl::filter< compute_item_tags, tmpl::bind< detail::has_subitems, tmpl::_1 > > |
| A list of all the compute tags that have subitems. | |
| using | reference_item_tags = tmpl::filter< immutable_item_tags, db::is_reference_tag< tmpl::_1 > > |
| A list of all the reference tags. | |
| using | reference_item_parent_tags = tmpl::filter< reference_item_tags, tmpl::bind< detail::has_subitems, tmpl::_1 > > |
| A list of all the reference tags that have subitems. | |
| using | metavars_tag = typename detail::metavars_tag_impl< mutable_item_tags >::type |
| If it exists, the Parallel::Tags::MetavariablesImpl tag, otherwise NoSuchType. More... | |
Public Member Functions | |
| std::string | print_tags () const override |
| Print the expanded type aliases. More... | |
| std::string | print_types () const override |
| Print the expanded type aliases. More... | |
| template<bool PrintImmutableItems = true> | |
| std::string | print_items () const |
| Print the items. | |
| std::map< std::string, size_t > | size_of_items () const |
| The size in bytes of each item (excluding reference items) | |
| template<typename Tag > | |
| const auto & | get () const |
Retrieve the tag Tag, should be called by the free function db::get. | |
| template<typename... TagsOfItemsToCopy> | |
| tuples::TaggedTuple< TagsOfItemsToCopy... > | copy_items () const |
Copy the items with tags TagsOfItemsToCopy from the DataBox into a TaggedTuple, should be called by the free function db::copy_items. | |
| template<typename Tag > | |
| auto & | get_mutable_reference () |
Retrieve a mutable reference to the tag Tag, should be called by the free function db::get_mutable_reference. | |
| void | pup (PUP::er &p) |
| template<typename... AddMutableItemTags, typename AddImmutableItemTagsList , typename... Args> | |
| constexpr | DataBox (tmpl::list< AddMutableItemTags... >, AddImmutableItemTagsList, Args &&... args) |
| virtual std::string | print_tags () const =0 |
Print the expanded type aliases of the derived db::DataBox More... | |
| virtual std::string | print_types () const =0 |
Print the expanded type aliases of the derived db::DataBox More... | |
Static Public Member Functions | |
| template<typename Consumer , typename Provider > | |
| static constexpr bool | tag_depends_on () |
| Check whether a tags depends on another tag. Should be called through the metafunction db::tag_depends_on. | |
Friends | |
| template<typename CopiedItemsTagList , typename DbTagList > | |
| auto | copy_items (const DataBox< DbTagList > &box) |
| Copy the items from the DataBox into a TaggedTuple. More... | |
| template<typename... MutateTags, typename TagList , typename Invokable , typename... Args> | |
| decltype(auto) | mutate (Invokable &&invokable, gsl::not_null< DataBox< TagList > * > box, Args &&... args) |
A DataBox stores objects that can be retrieved by using Tags.
| Tags | list of DataBoxTag's |
| using db::DataBox< tmpl::list< Tags... > >::immutable_item_creation_tags = tmpl::remove_if<immutable_item_tags, tt::is_a<::Tags::Subitem, tmpl::_1> > |
A list of all the immutable item tags used to create the DataBox.
| using db::DataBox< tmpl::list< Tags... > >::metavars_tag = typename detail::metavars_tag_impl<mutable_item_tags>::type |
If it exists, the Parallel::Tags::MetavariablesImpl tag, otherwise NoSuchType.
This allows the type-erased Parallel::Tags::Metavariables to be used to fetch the metavariables
| using db::DataBox< tmpl::list< Tags... > >::mutable_item_creation_tags = tmpl::list_difference<mutable_item_tags, mutable_subitem_tags> |
A list of all the mutable item tags used to create the DataBox.
| using db::DataBox< tmpl::list< Tags... > >::mutable_subitem_tags = tmpl::flatten< tmpl::transform<mutable_item_tags, db::Subitems<tmpl::_1> >> |
A list of the expanded simple subitems, not including the main Subitem tags themselves.
Specifically, if there is a Variables<Tag0, Tag1>, then this list would contain Tag0, Tag1.
|
overridevirtual |
Print the expanded type aliases.
Implements db::Access.
|
overridevirtual |
Print the expanded type aliases.
Implements db::Access.
|
friend |
Copy the items from the DataBox into a TaggedTuple.
Returns: The objects corresponding to CopiedItemsTagList