cpg-network Reference Manual | ||||
---|---|---|---|---|
Top | Description | Object Hierarchy | Properties | Signals |
CpgIntegratorState; CpgIntegratorClass; CpgIntegrator; CpgIntegratorState * cpg_integrator_state_new (CpgProperty *property); void cpg_integrator_run (CpgIntegrator *integrator, GSList *state, gdouble from, gdouble timestep, gdouble to); gdouble cpg_integrator_step (CpgIntegrator *integrator, GSList *state, gdouble t, gdouble timestep); void cpg_integrator_evaluate (CpgIntegrator *integrator, GSList *state, gdouble t, gdouble timestep); gchar const * cpg_integrator_get_name (CpgIntegrator *integrator); gdouble cpg_integrator_get_time (CpgIntegrator *integrator); void cpg_integrator_reset (CpgIntegrator *integrator, GSList *state); gdouble cpg_integrator_state_get_update (CpgIntegratorState *state); CpgProperty * cpg_integrator_state_get_property (CpgIntegratorState *state); void cpg_integrator_state_set_update (CpgIntegratorState *state, gdouble value); struct _CpgNetwork * cpg_integrator_get_network (CpgIntegrator *integrator);
GObject +----CpgObject +----CpgIntegrator +----CpgIntegratorPredictCorrect +----CpgIntegratorStub +----CpgIntegratorEuler +----CpgIntegratorRungeKutta
typedef struct { CpgObjectClass parent_class; /* virtual functions */ void (*run) (CpgIntegrator *integrator, GSList *state, gdouble from, gdouble timestep, gdouble to); gdouble (*step) (CpgIntegrator *integrator, GSList *state, gdouble t, gdouble timestep); gchar const *(*get_name) (CpgIntegrator *integrator); void (*reset) (CpgIntegrator *integrator, GSList *state); /* private field */ gchar const *integrator_id; } CpgIntegratorClass;
CpgIntegratorState * cpg_integrator_state_new (CpgProperty *property);
Create a new integrator state.
|
A CpgProperty |
Returns : |
A CpgIntegratorState |
void cpg_integrator_run (CpgIntegrator *integrator, GSList *state, gdouble from, gdouble timestep, gdouble to);
Integrate the network for a certain period of time.
|
A CpgIntegrator |
|
A GSList of CpgIntegratorState |
|
The time at which to start integrating |
|
The timestep to use for integration |
|
The time until which to run the integration |
gdouble cpg_integrator_step (CpgIntegrator *integrator, GSList *state, gdouble t, gdouble timestep);
Perform a single integration step. Use cpg_integrator_run if you want to run the integration for a period of time.
|
A CpgIntegrator |
|
A GSList of CpgIntegratorState |
|
The time at which to perform the integration step |
|
The timestep with which to perform the integration step |
Returns : |
The real time step with which the integration was performed |
void cpg_integrator_evaluate (CpgIntegrator *integrator, GSList *state, gdouble t, gdouble timestep);
Evaluate the system of equations comprising the network. This is a utility
function for integrator implementations. Call this function to calculate
all the states. After this function completes, the update values for the
states can be found (see
cpg_integrator_state_get_update)
|
A CpgIntegrator |
|
A GSList of CpgIntegratorState |
|
The time at which to evaluate the network |
|
The timestep with which the current step is evaluating |
gchar const * cpg_integrator_get_name (CpgIntegrator *integrator);
The integrator name.
|
A CpgIntegrator |
Returns : |
the integrator name |
gdouble cpg_integrator_get_time (CpgIntegrator *integrator);
Get the current time at which the network is being integrated.
|
A CpgIntegrator |
Returns : |
the current integration time |
void cpg_integrator_reset (CpgIntegrator *integrator, GSList *state);
Reset the integrator. This is usually called from cpg_network_reset.
|
A CpgIntegrator |
|
A list of CpgIntegratorState |
gdouble cpg_integrator_state_get_update (CpgIntegratorState *state);
Get the update value for the state.
|
A CpgIntegratorState |
Returns : |
the update value |
CpgProperty * cpg_integrator_state_get_property (CpgIntegratorState *state);
Get the CpgProperty for the state.
|
A CpgIntegratorState |
Returns : |
A CpgProperty |
void cpg_integrator_state_set_update (CpgIntegratorState *state, gdouble value);
Set the state update value.
|
A # CpgIntegratorState |
|
State update value |
struct _CpgNetwork * cpg_integrator_get_network (CpgIntegrator *integrator);
Get the network associated with the integrator.
|
A CpgIntegrator |
Returns : |
A CpgNetwork |
"begin"
signalvoid user_function (CpgIntegrator *arg0, gpointer user_data) : Run Last
Emitted before running an integration of several steps
|
user data set when the signal handler was connected. |
"end"
signalvoid user_function (CpgIntegrator *arg0, gpointer user_data) : Run Last
Emitted after running an integration of several steps has finished
|
user data set when the signal handler was connected. |
"step"
signalvoid user_function (CpgIntegrator *arg0, gpointer user_data) : Run Last
Emitted when an integrator step has been performed
|
user data set when the signal handler was connected. |