Go to the documentation of this file.
44 virtual Real
value(Real time,
const Point & point)
const final;
50 virtual Real
evaluateValue(Real time,
const Point & point) = 0;
59 mutable std::unordered_map<hashing::HashValue, Real>
_cache;
bool _respect_time
Flag for whether changes in time invalidate the cache.
Implementation of Function that memoizes (caches) former evaluations in an unordered map using a hash...
bool _enable_cache
Flag for whether to cache values.
virtual void meshChanged() override
void invalidateCache()
Called by derived classes to invalidate the cache, perhaps due to a state change.
InputParameters validParams< MemoizedFunctionInterface >()
void useCache(bool use)
Enable/disable the cache.
Real _current_time
Stores the time evaluation of the cache.
virtual Real evaluateValue(Real time, const Point &point)=0
Used in derived classes, equivalent to Function::value()
MemoizedFunctionInterface(const InputParameters ¶meters)
virtual Real value(Real time, const Point &point) const final
std::unordered_map< hashing::HashValue, Real > _cache
Cached evaluations for each point.