public abstract class ContinuousODESolver
extends java.lang.Object
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 increased 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.
Modifier and Type | Field and Description |
---|---|
protected ContinuousDirector |
_director
The Continuous director that contains this solver.
|
Constructor and Description |
---|
ContinuousODESolver() |
Modifier and Type | Method and Description |
---|---|
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.
|
protected ContinuousDirector _director
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()