28#ifndef _CLASSIC_SRC_ALGORITHMS_SPLINETIMEDEPENDENCE_H_
29#define _CLASSIC_SRC_ALGORITHMS_SPLINETIMEDEPENDENCE_H_
33#include <gsl/gsl_spline.h>
82 double getValue(
double time)
override;
109 void setSpline(
size_t splineOrder,
const std::vector<double>&
times,
110 const std::vector<double>& values);
Inform & operator<<(Inform &os, SplineTimeDependence &p)
static TFunction2< double, double > times
Time dependence abstraction for field parameters that vary slowly with time; for example,...
Time dependence that follows a spline.
void setSpline(size_t splineOrder, const std::vector< double > ×, const std::vector< double > &values)
Set the spline, deleting any existing spline data.
Inform & print(Inform &os) const
Print summary information about the time dependence.
SplineTimeDependence * clone() override
Inheritable copy constructor.
std::vector< double > values_m
~SplineTimeDependence() override
Destructor cleans up the GSL spline stuff.
double getValue(double time) override
Return the value of the spline at a given time.
double getIntegral(double time) override
Return the integral of the spline from 0 to the given time.
std::vector< double > times_m
SplineTimeDependence()=default
Default Constructor makes a dependence of length 2 with values 0.