RK4Integrator
-
class RK4Integrator : public rr::Integrator
A super basic 4’th order fixed step integrator.
The RungeKuttaIntegrator will be the more sophisticated, general purpose Runge-Kutta integrator which will support different orders and adaptive time stepping.
This object is mainly here as an example of creating a new Integrator.
Public Functions
-
RK4Integrator(ExecutableModel *m)
Creates a new RK4Integrator.
The IntegratorFactory is the ONLY object that creates integrators.
Integrators are created when the IntegratorFactory::New method is called, typically by the top level RoadRunner object.
The integrator will hold onto the ExecutableModel pointer, m, and when the integrate method is called, will advance the model object forward in time.
-
~RK4Integrator() override
clean up any mess.
-
virtual void syncWithModel(ExecutableModel *m) override
Called whenever a new model is loaded to allow integrator to reset internal state.
- Author
JKM
-
virtual double integrate(double t0, double tf) override
implement Integrator interface
integrates the model from t0 to tf.
-
virtual void restart(double t0) override
copies the state std::vector out of the model and into cvode std::vector, re-initializes cvode.
-
virtual std::string getName() const override
Get the name for this integrator.
- Author
JKM
Note
Delegates to getName
-
virtual std::string getDescription() const override
Get the description for this integrator.
- Author
JKM
Note
Delegates to getDescription
-
virtual std::string getHint() const override
Get the hint for this integrator.
- Author
WBC
Note
Delegates to getHint
-
virtual Solver *construct(ExecutableModel *model) const override
construct an instance of type RK4Integrator.
implements the Registrar interface. Used in factory creation of Integrators.
-
virtual Setting getValue(std::string key)
-
virtual IntegrationMethod getIntegrationMethod() const override
Always deterministic for RK4.
- Author
JKM
-
virtual void resetSettings() override
Reset all integrator settings to their respective default values.
- Author
JKM
-
virtual void setListener(IntegratorListenerPtr) override
the integrator can hold a single listener.
If clients require multicast, they can create a multi-cast listener.
-
virtual IntegratorListenerPtr getListener() override
get the integrator listener
-
explicit Integrator(ExecutableModel *model)
-
Integrator()
-
RK4Integrator(ExecutableModel *m)