SpECTRE  v2025.08.19
db::SimpleTag Struct Reference

Mark a struct as a simple tag by inheriting from this. More...

#include <Tag.hpp>

Detailed Description

Mark a struct as a simple tag by inheriting from this.

Details

A simple tag is used to uniquely identify an item in a tagged container such as a DataBox, Variables, or tuples::TaggedTuple.

A simple tag may be the base class of a compute or reference tag. In such a case, the simple tag can be used to fetch the item corresponding to the compute or reference tag from a DataBox.

A simple tag may be the base class of another simple tag. This should be done rarely, usually as a means of specifying an alternative way to create the simple item from input-file options. In such a case, the base simple tag can be used to fetch the item, while either the base simple tag or one othe derived simple tags can be used to insert the item into the DataBox Te derived simple tags should have a type alias base that is the base simple tag.

Derived Class Requires:

  • type alias type of the type of the item corresponding to the simple tag

A simple tag may optionally specify a static std::string name() method to override the default name produced by db::tag_name.

Example

struct Tag0 : db::SimpleTag {
using type = double;
};
Mark a struct as a simple tag by inheriting from this.
Definition: Tag.hpp:38
See also
DataBox ComputeTag PrefixTag ReferenceTag

The documentation for this struct was generated from the following file: