|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectptolemy.domains.continuous.kernel.ContinuousODESolver
public abstract class ContinuousODESolver
Abstract base class for ODE solvers. A complete integration consists of one or more rounds of executions. One round of execution requires the model time to be advanced and this advancement is handled by the Continuous director. Derived classes need to tell how many rounds of execution are necessary and how much time to advance for each round.
How many rounds are needed in one integration is solver dependent. For some solving algorithms, (i.e. the so called explicit methods) the number of rounds is fixed. For some others (i.e. implicit methods), the number of rounds can not be decided beforehand.
A round counter is a counter for the number of rounds in one integration. It helps the solvers to decide how to behave under different rounds. The round counter can be increated by the calling the _incrementRound() method. The _reset() method always resets the counter to 0. These methods are protected because they are only used by Continuous directors.
Conceptually, ODE solvers do not maintain simulation parameters, like step sizes and error tolerance. They get these parameters from the director. So the same set of parameters are shared by all the solvers in a simulation.
Green (hyzheng) |
Green (hyzheng) |
Field Summary | |
---|---|
protected ContinuousDirector |
_director
The Continuous director that contains this solver. |
Constructor Summary | |
---|---|
ContinuousODESolver()
|
Method Summary | |
---|---|
protected void |
_debug(java.lang.String message)
Report a debug message via the director. |
protected abstract int |
_getRound()
Return the current round. |
protected abstract double |
_getRoundTimeIncrement()
Get the current round factor. |
protected boolean |
_isDebugging()
Return true if debugging is turned on in the director. |
protected abstract boolean |
_isStepFinished()
Return true if the current integration step is finished. |
protected void |
_makeSolverOf(ContinuousDirector director)
Make this solver the solver of the given Director. |
protected abstract void |
_reset()
Reset the solver, indicating to it that we are starting an integration step. |
protected abstract void |
_setRound(int round)
Set the round for the next integration step. |
abstract int |
getIntegratorAuxVariableCount()
Return the number of auxiliary variables that an integrator should provide when solving the ODE. |
abstract void |
integratorIntegrate(ContinuousIntegrator integrator)
Perform one integration step. |
abstract boolean |
integratorIsAccurate(ContinuousIntegrator integrator)
Return true if the current integration step is accurate from the argument integrator's point of view. |
abstract double |
integratorSuggestedStepSize(ContinuousIntegrator integrator)
The suggestedStepSize() method of the integrator delegates to this method. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected ContinuousDirector _director
Constructor Detail |
---|
public ContinuousODESolver()
Method Detail |
---|
public abstract int getIntegratorAuxVariableCount()
public abstract void integratorIntegrate(ContinuousIntegrator integrator) throws IllegalActionException
integrator
- The integrator that calls this method.
IllegalActionException
- Not thrown in this base class.public abstract boolean integratorIsAccurate(ContinuousIntegrator integrator)
integrator
- The integrator that calls this method.
public abstract double integratorSuggestedStepSize(ContinuousIntegrator integrator)
integrator
- The integrator that calls this method.
protected final void _debug(java.lang.String message)
message
- The message.protected abstract double _getRoundTimeIncrement()
_isStepFinished()
protected abstract int _getRound()
protected final boolean _isDebugging()
protected abstract boolean _isStepFinished()
protected final void _makeSolverOf(ContinuousDirector director)
director
- The CT director that contains this solver.protected abstract void _reset()
protected abstract void _setRound(int round)
round
- The round for the next integration step.getIntegratorAuxVariableCount()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |