SpECTRE
v2024.09.29
|
#include <CachedTempBuffer.hpp>
Public Types | |
using | tags_list = tmpl::list< Tags... > |
Public Member Functions | |
CachedTempBuffer (const size_t size) | |
Construct the buffer with the given computer. size is passed to the underlying TempBuffer constructor. | |
template<typename Computer , typename Tag > | |
const Tag::type & | get_var (const Computer &computer, Tag) |
Obtain a value from the buffer, computing it if necessary. | |
size_t | number_of_grid_points () const |
A temporary buffer with contents computed on demand.
When an entry in the buffer is first requested, it is computed by the computer
that is passed to the get_var
function. Subsequent requests just return the cached value. The computer can itself request data from the cache to use in its computations.
For the cache
the function used to compute Tags::Scalar2<DataType>
is