SpECTRE  v2024.04.12
ObservationBox< tmpl::list< ComputeTags... >, DataBoxType > Class Template Reference

Used for adding compute items to a DataBox without copying or moving any data from the original DataBox More...

#include <ObservationBox.hpp>

Public Types

using compute_item_tags = tmpl::list< ComputeTags... >
 A list of all the compute item tags.
 
using tags_list = tmpl::push_back< typename DataBoxType::tags_list, ComputeTags... >
 A list of all tags.
 

Public Member Functions

 ObservationBox (const ObservationBox &rhs)=default
 
ObservationBox & operator= (const ObservationBox &rhs)=default
 
 ObservationBox (ObservationBox &&rhs)=default
 
ObservationBox & operator= (ObservationBox &&rhs)=default
 
 ObservationBox (gsl::not_null< DataBoxType * > databox)
 Create an ObservationBox that can also retrieve things out of the databox passed in.
 
template<typename Tag >
const auto & get () const
 Retrieve the tag Tag, should be called by the free function db::get.
 
DataBoxType & databox ()
 Retrieve the underlying DataBox.
 
void reset ()
 Reset all the compute items, forcing reevaluation.
 

Detailed Description

template<typename DataBoxType, typename... ComputeTags>
class ObservationBox< tmpl::list< ComputeTags... >, DataBoxType >

Used for adding compute items to a DataBox without copying or moving any data from the original DataBox

The intended use-case for this class is during IO/observing where additional compute tags are needed only for observation. The memory used by those compute tags does not need to be persistent and so we'd like a light-weight class to handle the on-demand computation.


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