SpECTRE
v2024.04.12
|
Used for adding compute items to a DataBox
without copying or moving any data from the original DataBox
More...
#include <ObservationBox.hpp>
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. | |
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.