Main Page   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   Related Pages  

rdIntegCallback Class Reference

An abstract class for specifying an integration callback. More...

#include <rdIntegCallback.h>

Inheritance diagram for rdIntegCallback:

rdCallback rdObject rdmAnimationCallback List of all members.

Public Member Functions

 rdIntegCallback (rdModel *aModel)
 Default constructor.

virtual ~rdIntegCallback ()
 Destructor.

void setStepInterval (int aStepInterval)
 Set the step interval.

int getStepInterval () const
 Get the step interval.

virtual void begin (int aStep, double aDT, double aT, double *aX, double *aY, void *aClientData=NULL)
 This method is called at the beginning of an integration and is intended to be used for any initializations that are necessary.

virtual void step (double *aXPrev, double *aYPrev, int aStep, double aDT, double aT, double *aX, double *aY, void *aClientData=NULL)
 This method is called after each successful integration time step and is intended to be used for conducting analyses, driving animations, etc.

virtual void end (int aStep, double aDT, double aT, double *aX, double *aY, void *aClientData=NULL)
 This method is called after an integration has been completed and is intended to be used for performing any finalizations necessary.


Protected Attributes

int _stepInterval
 Step interval.


Private Member Functions

void setNull ()
 Set NULL values for member variables.


Detailed Description

An abstract class for specifying an integration callback.

Integration callbacks are registered with a model and provide a set of methods that the model calls at various stages of an integration. The methods are begin(), which is called at the beginning of an integration, step(), which is called after each successful integration step, and end(), which is called at the completion of an integration. These methods provide low-level access for performing analysis, animating simulations, etc.

On a final note, it is possible to register many integration callbacks with a model and no attempt is made to ensure that the the actions of registered callbacks are compatible. Ensuring compatibility is left to the user.

Author:
Frank C. Anderson
Version:
1.0


Constructor & Destructor Documentation

rdIntegCallback::rdIntegCallback rdModel aModel  ) 
 

Default constructor.

Note that this constructor adds the callback to the model. Derived classes should not also add themselves to the model.

Parameters:
aModel Model to which the callback mthods apply.


Member Function Documentation

void rdIntegCallback::begin int  aStep,
double  aDT,
double  aT,
double *  aX,
double *  aY,
void *  aClientData = NULL
[virtual]
 

This method is called at the beginning of an integration and is intended to be used for any initializations that are necessary.

Override this method in derived classes.

Parameters:
aStep Number of integrations steps that have been completed.
aDT Size of the integration time step that will be attempted.
aT Current time in the integration.
aX Current control values.
aY Current states.
aClientData General use pointer for sending in client data.

Reimplemented in rdmAnimationCallback.

void rdIntegCallback::end int  aStep,
double  aDT,
double  aT,
double *  aX,
double *  aY,
void *  aClientData = NULL
[virtual]
 

This method is called after an integration has been completed and is intended to be used for performing any finalizations necessary.

Override this method in derived classes.

Parameters:
aStep Number of integrations steps that have been completed.
aDT Size of the time step that WAS just completed.
aT Current time in the integration.
aX Current control values.
aY Current states.
aClientData General use pointer for sending in client data.

Reimplemented in rdmAnimationCallback.

int rdIntegCallback::getStepInterval  )  const
 

Get the step interval.

The step interval is used to specify how many integration steps must go by before the rdIntegCallback::step() method is executed. Specifically, unless the step number divided by the step interval has no remainder (i.e., (step stepInterval) == 0), the step method is not executed.

Returns:
Step interval.

void rdIntegCallback::setStepInterval int  aStepInterval  ) 
 

Set the step interval.

The step interval is used to specify how many integration steps must go by before the rdIntegCallback::step() method is executed. Specifically, unless the step number divided by the step interval has no remainder (i.e., (step stepInterval) == 0), the step method is not executed.

Parameters:
aStepInterval Step interval. Should be 1 or greater.

void rdIntegCallback::step double *  aXPrev,
double *  aYPrev,
int  aStep,
double  aDT,
double  aT,
double *  aX,
double *  aY,
void *  aClientData = NULL
[virtual]
 

This method is called after each successful integration time step and is intended to be used for conducting analyses, driving animations, etc.

Override this method in derived classes.

Parameters:
aXPrev Control values at the previous time step.
aYPrev State values at the previous time step.
aStep Number of integrations steps that have been completed.
aDT Size of the time step that WAS just completed.
aT Current time in the integration.
aX Current control values.
aY Current states.
aClientData General use pointer for sending in client data.

Reimplemented in rdmAnimationCallback.


The documentation for this class was generated from the following files:
Generated on Wed Aug 20 02:17:11 2003 for Simulation Software by doxygen1.3