1 #ifndef G_U239L9IU4I9YYJGH4M9CD6ADMGT66 2 #define G_U239L9IU4I9YYJGH4M9CD6ADMGT66 30 #include "restrict_begin.h" 36 #define SG_ODE_FSTRICT 0x1 40 #define SG_ODE_FMAXNUM 0x2 48 #define SG_ODE_ETOLER 3 52 #define SG_ODE_ESTEPS 4 56 #define SG_ODE_ESTIFF 5 59 #define SG_ODE_EINVAL 6 68 typedef void SgDerivFn(
void *f_ctx,
75 SG_EXTERN
void sg_ode_del(
struct SgOde *
self);
77 SG_EXTERN
int sg_ode_traverse(
struct SgOde *
self,
180 void *restrict f_ctx,
181 double *restrict eps);
213 const double *restrict psi);
333 void *restrict f_ctx,
337 double *restrict relerr,
338 double *restrict abserr,
407 SG_EXTERN
int sg_ode(
void *f_ctx,
408 void (*f)(
void *,
double,
const double *,
double *),
416 double *restrict work,
417 int *restrict iwork);
422 #include "restrict_end.h" A vector driver.
Definition: vector.h:132
void sg_ode_interpolate(struct SgVectorDriver drv, double x, const SgVector *restrict y, double xout, SgVector *restrict yout, SgVector *restrict ypout, unsigned kold, SgVector *const restrict *phi, const double *restrict psi)
The methods in function step approximate the solution near x by a polynomial.
Definition: ode.c:800
double x
Independent variable.
Definition: ode.c:380
A generic interface for elementwise and aggregate operations on vectors.
int sg_ode_step(struct SgOde *self, SgDerivFn *f, void *restrict f_ctx, double *restrict eps)
Integrates a system of first order ordinary differential equations one step, normally from x to x+h...
Definition: ode.c:443
int sg_ode(void *f_ctx, void(*f)(void *, double, const double *, double *), size_t neqn, double *restrict y, double *restrict t, double tout, double relerr, double abserr, int flag, double *restrict work, int *restrict iwork)
Simple interface to the ODE solver.
void sg_ode_de(struct SgOde *self, SgDerivFn *f, void *restrict f_ctx, SgVector *restrict y, double *restrict t, double tout, double *restrict relerr, double *restrict abserr, int *restrict iflag, unsigned maxnum)
Integrates a system of neqn first order ordinary differential equations.
Definition: ode.c:855
unsigned kold
Order used for last successful step.
Definition: ode.c:391
void SgVector
A vector is an opaque data type containing a finite number of doubles.
Definition: vector.h:15