NcmOdeSpline

NcmOdeSpline — Automatic generation of splines from ODE solvers.

Properties

gdouble abs Read / Write / Construct
gboolean auto-abstol Read / Write / Construct
gpointer dydx Read / Write / Construct Only
gdouble ini-step Read / Write / Construct
gdouble reltol Read / Write / Construct
NcmSpline * spline Read / Write
gboolean stop-hnil Read / Write / Construct
gdouble xf Read / Write
gdouble xi Read / Write
gdouble yf Read / Write
gdouble yi Read / Write

Object Hierarchy

    GObject
    ╰── NcmOdeSpline

Description

FIXME

Functions

NcmOdeSplineDydx ()

gdouble
(*NcmOdeSplineDydx) (gdouble y,
                     gdouble x,
                     gpointer userdata);

ncm_ode_spline_new ()

NcmOdeSpline *
ncm_ode_spline_new (NcmSpline *s,
                    NcmOdeSplineDydx dydx);

FIXME

Parameters

s

a NcmSpline

 

dydx

a NcmOdeSplineDydx.

[scope notified]

Returns

FIXME


ncm_ode_spline_new_full ()

NcmOdeSpline *
ncm_ode_spline_new_full (NcmSpline *s,
                         NcmOdeSplineDydx dydx,
                         gdouble yi,
                         gdouble xi,
                         gdouble xf);

FIXME

Parameters

s

a NcmSpline

 

dydx

a NcmOdeSplineDydx.

[scope notified]

yi

FIXME

 

xi

FIXME

 

xf

FIXME

 

Returns

FIXME


ncm_ode_spline_prepare ()

void
ncm_ode_spline_prepare (NcmOdeSpline *os,
                        gpointer userdata);

FIXME

Parameters

os

a NcmOdeSpline

 

userdata

FIXME.

[closure]

ncm_ode_spline_free ()

void
ncm_ode_spline_free (NcmOdeSpline *os);

FIXME

Parameters

os

a NcmOdeSpline

 

ncm_ode_spline_clear ()

void
ncm_ode_spline_clear (NcmOdeSpline **os);

FIXME

Parameters

os

a NcmOdeSpline

 

ncm_ode_spline_set_interval ()

void
ncm_ode_spline_set_interval (NcmOdeSpline *os,
                             gdouble yi,
                             gdouble xi,
                             gdouble xf);

FIXME

Parameters

os

a NcmOdeSpline

 

yi

FIXME

 

xi

FIXME

 

xf

FIXME

 

ncm_ode_spline_set_reltol ()

void
ncm_ode_spline_set_reltol (NcmOdeSpline *os,
                           gdouble reltol);

FIXME

Parameters

os

a NcmOdeSpline

 

reltol

FIXME

 

ncm_ode_spline_set_abstol ()

void
ncm_ode_spline_set_abstol (NcmOdeSpline *os,
                           gdouble abstol);

FIXME

Parameters

os

a NcmOdeSpline

 

abstol

FIXME

 

ncm_ode_spline_set_xi ()

void
ncm_ode_spline_set_xi (NcmOdeSpline *os,
                       gdouble xi);

FIXME

Parameters

os

a NcmOdeSpline

 

xi

FIXME

 

ncm_ode_spline_set_xf ()

void
ncm_ode_spline_set_xf (NcmOdeSpline *os,
                       gdouble xf);

FIXME

Parameters

os

a NcmOdeSpline

 

xf

FIXME

 

ncm_ode_spline_set_yi ()

void
ncm_ode_spline_set_yi (NcmOdeSpline *os,
                       gdouble yi);

FIXME

Parameters

os

a NcmOdeSpline

 

yi

FIXME

 

ncm_ode_spline_set_yf ()

void
ncm_ode_spline_set_yf (NcmOdeSpline *os,
                       gdouble yf);

FIXME

Parameters

os

a NcmOdeSpline

 

yf

FIXME

 

ncm_ode_spline_auto_abstol ()

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.

Parameters

os

a NcmOdeSpline

 

on

Whether to turn on the auto-abstol

 

ncm_ode_spline_set_ini_step ()

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.

Parameters

os

a NcmOdeSpline

 

ini_step

the initial step

 

ncm_ode_spline_get_ini_step ()

gdouble
ncm_ode_spline_get_ini_step (NcmOdeSpline *os);

Gets the current guess for the initial step size.

Parameters

os

a NcmOdeSpline

 

Returns

the current value of the initial guess (zero means disabled).


ncm_ode_spline_peek_spline ()

NcmSpline *
ncm_ode_spline_peek_spline (NcmOdeSpline *os);

Peeks at the last prepared spline.

Parameters

os

a NcmOdeSpline

 

Returns

the last prepared spline.

[transfer none]

Types and Values

NCM_ODE_SPLINE_DEFAULT_RELTOL

#define NCM_ODE_SPLINE_DEFAULT_RELTOL (1.0e-13)

NCM_ODE_SPLINE_DEFAULT_ABSTOL

#define NCM_ODE_SPLINE_DEFAULT_ABSTOL (0.0)

NCM_ODE_SPLINE_MIN_STEP

#define NCM_ODE_SPLINE_MIN_STEP (1.0e-10)

Property Details

The “abs” property

  “abs”                      gdouble

Absolute tolerance.

Owner: NcmOdeSpline

Flags: Read / Write / Construct

Allowed values: [0,1]

Default value: 0


The “auto-abstol” property

  “auto-abstol”              gboolean

Automatic abstol.

Owner: NcmOdeSpline

Flags: Read / Write / Construct

Default value: FALSE


The “dydx” property

  “dydx”                     gpointer

Pointer to the dydx function.

Owner: NcmOdeSpline

Flags: Read / Write / Construct Only


The “ini-step” property

  “ini-step”                 gdouble

Integration initial step size.

Owner: NcmOdeSpline

Flags: Read / Write / Construct

Allowed values: >= 0

Default value: 0


The “reltol” property

  “reltol”                   gdouble

Relative tolerance.

Owner: NcmOdeSpline

Flags: Read / Write / Construct

Allowed values: [0,1]

Default value: 1e-13


The “spline” property

  “spline”                   NcmSpline *

Spline algorithm to be used.

Owner: NcmOdeSpline

Flags: Read / Write


The “stop-hnil” property

  “stop-hnil”                gboolean

Whether treat hnil as error.

Owner: NcmOdeSpline

Flags: Read / Write / Construct

Default value: TRUE


The “xf” property

  “xf”                       gdouble

Final point.

Owner: NcmOdeSpline

Flags: Read / Write

Default value: 0


The “xi” property

  “xi”                       gdouble

Initial point.

Owner: NcmOdeSpline

Flags: Read / Write

Default value: 0


The “yf” property

  “yf”                       gdouble

Final Value.

Owner: NcmOdeSpline

Flags: Read / Write

Default value: 0


The “yi” property

  “yi”                       gdouble

Initial Value.

Owner: NcmOdeSpline

Flags: Read / Write

Default value: 0