14 #include <gsl/gsl_odeiv.h> 36 virtual void to_double_star (
double * y_ ,
size_t dimension_ )
const = 0;
64 virtual void action (
double t_ ,
81 virtual void action (
double t_ ,
double * y_ ,
size_t dim_ );
104 const std::string &
get_type ()
const;
106 void set_type (
const std::string & type_ );
112 double epsabs_ = 1.e-6,
113 double epsrel_ = 1.e-6,
114 bool regular_ =
false );
122 int run (
double t_begin_ ,
double t_end_ ,
double h_ );
132 int _inner_run_not_regular_ ();
134 int _inner_run_regular_ ();
145 const gsl_odeiv_step_type * _step_type_;
146 gsl_odeiv_step * _step_;
147 gsl_odeiv_control * _control_;
148 gsl_odeiv_evolve * _evolve_;
149 gsl_odeiv_system _system_;
169 #endif // MYGSL_ODE_H
void set_step_action(at_step_action &asd_)
virtual int compute_jacobian(double t_, const double *y_, double *dfdy_, double *dfdt_)
static const std::string DEFAULT_TYPE
Definition: ode.h:59
static void print_types(std::ostream &)
const std::string & get_type() const
virtual bool has_jacobian() const
size_t get_dimension() const
virtual void action(double t_, double *y_, size_t dim_)
void set_type(const std::string &type_)
virtual void action(double t_, double *y_, size_t dim_)=0
System for ODE solving.
Definition: ode.h:19
virtual size_t get_dimension() const =0
void operator()(double t_, double *y_, size_t dim_)
Definition: ode.h:68
static default_step_action _default_step_action_
Definition: ode.h:84
void set_default_step_action()
virtual int compute_derivatives(double t_, const double *y_, double *f_)=0
static bool type_is_valid(const std::string &type_)
ode_driver(ode_system &sys_, const std::string &type_=DEFAULT_TYPE, double epsabs_=1.e-6, double epsrel_=1.e-6, bool regular_=false)
Top-level namespace of the Bayeux/mygsl module library.
Definition: base_decay_driver.h:47
int run(double t_begin_, double t_end_, double h_)
virtual void from_double_star(const double *y_, size_t dimension_)=0
static bool type_requires_jacobian(const std::string &type_)
static int gsl_ode_jacobian(double t_, const double *y_, double *dfdy_, double *dfdt_, void *params_)
static int gsl_ode_function(double t_, const double *y_, double *f_, void *params_)
virtual void to_double_star(double *y_, size_t dimension_) const =0