Top |
gdouble | (*NcmOdeSplineDydx) () |
NcmOdeSpline * | ncm_ode_spline_new () |
NcmOdeSpline * | ncm_ode_spline_new_full () |
void | ncm_ode_spline_prepare () |
void | ncm_ode_spline_free () |
void | ncm_ode_spline_clear () |
void | ncm_ode_spline_set_interval () |
void | ncm_ode_spline_set_reltol () |
void | ncm_ode_spline_set_abstol () |
void | ncm_ode_spline_set_xi () |
void | ncm_ode_spline_set_xf () |
void | ncm_ode_spline_set_yi () |
void | ncm_ode_spline_set_yf () |
void | ncm_ode_spline_auto_abstol () |
void | ncm_ode_spline_set_ini_step () |
gdouble | ncm_ode_spline_get_ini_step () |
NcmSpline * | ncm_ode_spline_peek_spline () |
double | abstol | Read / Write / Construct |
gboolean | auto-abstol | Read / Write / Construct |
gpointer | dydx | Read / Write / Construct Only |
double | ini-step | Read / Write / Construct |
double | reltol | Read / Write / Construct |
NcmSpline * | spline | Read / Write |
gboolean | stop-hnil | Read / Write / Construct |
double | xf | Read / Write |
double | xi | Read / Write |
double | yf | Read / Write |
double | yi | Read / Write |
#define | NCM_TYPE_ODE_SPLINE |
#define | NCM_ODE_SPLINE_DEFAULT_RELTOL |
#define | NCM_ODE_SPLINE_DEFAULT_ABSTOL |
#define | NCM_ODE_SPLINE_MIN_STEP |
NcmOdeSpline |
This class defines an object that integrates an ODE and generates a spline from the solution.
NcmOdeSpline * ncm_ode_spline_new (NcmSpline *s
,NcmOdeSplineDydx dydx
);
This function creates a new NcmOdeSpline.
NcmOdeSpline * ncm_ode_spline_new_full (NcmSpline *s
,NcmOdeSplineDydx dydx
,gdouble yi
,gdouble xi
,gdouble xf
);
This function creates a new NcmOdeSpline setting all its members.
void ncm_ode_spline_prepare (NcmOdeSpline *os
,gpointer userdata
);
This function prepares the NcmOdeSpline os
and fills its internal NcmSpline with the evaluated ode's solution.
void
ncm_ode_spline_free (NcmOdeSpline *os
);
Decreases the reference count of os
by one.
void
ncm_ode_spline_clear (NcmOdeSpline **os
);
Atomically decrements the reference count of os
by one. If the reference count drops to 0, all memory allocated by os
is released. The pointer is set to NULL.
void ncm_ode_spline_set_interval (NcmOdeSpline *os
,gdouble yi
,gdouble xi
,gdouble xf
);
This function sets os
interval [xi
, xf
] and its initial value yi
in order to integrate the ode.
void ncm_ode_spline_set_reltol (NcmOdeSpline *os
,gdouble reltol
);
This functions sets the relative tolerance, reltol
, of the edo integrator.
void ncm_ode_spline_set_abstol (NcmOdeSpline *os
,gdouble abstol
);
This functions sets the absolute tolerance, abstol
, of the edo integrator.
void ncm_ode_spline_set_xi (NcmOdeSpline *os
,gdouble xi
);
This function sets the initial point, xi
, to integrate the edo.
void ncm_ode_spline_set_xf (NcmOdeSpline *os
,gdouble xf
);
This function sets the final point, xf
, to integrate the edo.
Note that if yf
is also set, yf
will take precedence.
void ncm_ode_spline_set_yi (NcmOdeSpline *os
,gdouble yi
);
This function sets the initial value of the function to be evaluated.
void ncm_ode_spline_set_yf (NcmOdeSpline *os
,gdouble yf
);
This function sets the final value of the function to be evaluated.
When yf
is reached, the edo's integration is stopped.
Note that if xf
is also set, yf
will take precedence.
void ncm_ode_spline_auto_abstol (NcmOdeSpline *os
,gboolean on
);
If on
is TRUE, the object uses the value of $\mathrm{d}y_i$ to estimate the
abstol as $T_\mathrm{abs} = \dot{y}_i \mathrm{d}t_m T_\mathrm{rel}$,
where $T_\mathrm{rel}$ is the relative tolerance and $\mathrm{d}t_m$ is the
minimum time step NCM_ODE_SPLINE_MIN_STEP. Useful when computing integrals as ODEs.
void ncm_ode_spline_set_ini_step (NcmOdeSpline *os
,gdouble ini_step
);
Sets a guess for the initial step size. If ini_step
is
zero it uses the automatic determination based on the
tolerances.
gdouble
ncm_ode_spline_get_ini_step (NcmOdeSpline *os
);
Gets the current guess for the initial step size.
NcmSpline *
ncm_ode_spline_peek_spline (NcmOdeSpline *os
);
Peeks at the last prepared spline.
“abstol”
property “abstol” double
Integrator's absolute tolerance.
Owner: NcmOdeSpline
Flags: Read / Write / Construct
Allowed values: [0,1]
Default value: 0
“auto-abstol”
property “auto-abstol” gboolean
Boolean to set whether or not the absolute tolerance is going to be estimated internally by the ode integrator.
Owner: NcmOdeSpline
Flags: Read / Write / Construct
Default value: FALSE
“dydx”
property “dydx” gpointer
A pointer to the dydx function, a.k.a. the jacobian.
Owner: NcmOdeSpline
Flags: Read / Write / Construct Only
“ini-step”
property “ini-step” double
The integration initial step size.
Owner: NcmOdeSpline
Flags: Read / Write / Construct
Allowed values: >= 0
Default value: 0
“reltol”
property “reltol” double
Integrator's relative tolerance.
Owner: NcmOdeSpline
Flags: Read / Write / Construct
Allowed values: [0,1]
Default value: 2.22045e-16
“spline”
property“spline” NcmSpline *
The spline algorithm to be used.
Owner: NcmOdeSpline
Flags: Read / Write
“stop-hnil”
property “stop-hnil” gboolean
Whether treat hnil as error.
Owner: NcmOdeSpline
Flags: Read / Write / Construct
Default value: TRUE
“xf”
property “xf” double
The final point to integrate the ode.
Owner: NcmOdeSpline
Flags: Read / Write
Default value: 0
“xi”
property “xi” double
The initial point to integrate the ode.
Owner: NcmOdeSpline
Flags: Read / Write
Default value: 0
“yf”
property “yf” double
The final value of the function to be evaluated.
Owner: NcmOdeSpline
Flags: Read / Write
Default value: 0