29 for (
auto& [time_m, value_m, integral_m] :
cache_m) {
40 return item.time_m == time;
47 if (
const auto pos =
find(time); pos ==
cache_m.end()) {
50 result = pos->value_m;
59 if (
const auto pos =
find(time); pos ==
cache_m.end()) {
62 result = pos->integral_m;
std::string::iterator iterator
Time dependence abstraction for field parameters that vary slowly with time; for example,...
virtual double getValue(double time)=0
getValue(time) returns the value as a function of time.
virtual double getIntegral(double time)=0
getIntegral(time) returns the integral from 0 to time of the function.
std::array< Item, CacheSize > cache_m
const Item & placeInCache(double time)
double getIntegral(double time)
std::array< Item, CacheSize >::iterator find(double time)
static constexpr size_t CacheSize
AbstractTimeDependence * timeDependence_m
void setTimeDependence(AbstractTimeDependence *timeDependence)
double getValue(double time)