42 virtual Real value(
Real time,
const Point & point)
const final;
58 mutable std::unordered_map<hashing::HashValue, Real>
_cache;
void invalidateCache()
Called by derived classes to invalidate the cache, perhaps due to a state change. ...
bool _enable_cache
Flag for whether to cache values.
virtual Real value(Real time, const Point &point) const final
Real _current_time
Stores the time evaluation of the cache.
DualNumber< Real, DNDerivativeType, true > ADReal
static InputParameters validParams()
bool _respect_time
Flag for whether changes in time invalidate the cache.
std::unordered_map< hashing::HashValue, Real > _cache
Cached evaluations for each point.
MemoizedFunctionInterface(const InputParameters ¶meters)
virtual void meshChanged() override
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
void useCache(bool use)
Enable/disable the cache.
const InputParameters & parameters() const
Implementation of Function that memoizes (caches) former evaluations in an unordered map using a hash...
virtual Real value(Real t, const Point &p) const
virtual Real evaluateValue(Real time, const Point &point)=0
Used in derived classes, equivalent to Function::value()