26 #ifndef CASADI_ERK_HPP
27 #define CASADI_ERK_HPP
29 #include "casadi/core/runtime_integrator.hpp"
30 #include <casadi/solvers/casadi_integrator_erk_export.h>
58 struct ErkMemory :
public RuntimeIntegratorMemory {
67 class Erk :
public RuntimeIntegrator {
71 Erk(
const std::string& name,
const Function& dae,
double t0,
72 const std::vector<double>& tout);
75 static Integrator* creator(
const std::string& name,
const Function& dae,
76 double t0,
const std::vector<double>& tout) {
77 return new Erk(name, dae, t0, tout);
84 const char* plugin_name()
const override {
return "erk";}
87 std::string class_name()
const override {
return "Erk";}
91 static const Options options_;
92 const Options& get_options()
const override {
return options_;}
96 void init(
const Dict& opts)
override;
99 void set_work(
void* mem,
const double**& arg,
double**& res,
100 casadi_int*& iw,
double*& w)
const override;
103 void* alloc_mem()
const override {
return new ErkMemory();}
106 void free_mem(
void *mem)
const override {
delete static_cast<ErkMemory*
>(mem);}
109 static const std::string meta_doc;
112 void serialize_body(SerializingStream &s)
const override;
115 static ProtoFunction* deserialize(DeserializingStream& s) {
return new Erk(s); }
120 explicit Erk(DeserializingStream& s);
123 bool needs_jacobian()
const override {
return false;}
126 int kernel(RuntimeIntegratorMemory* m)
const override;
129 void codegen_method(CodeGenerator& g)
const override;
133 void set_coefficients();
GenericType::Dict Dict
C++ equivalent of Python's dict or MATLAB's struct.