|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectptolemy.kernel.util.NamedObj
ptolemy.domains.ct.kernel.ODESolver
ptolemy.domains.ct.kernel.solver.TrapezoidalRuleSolver
NOTE: The step size control mechanism in this class is not very elegant. Please avoiding using this class if possible. This is a second order variable step size ODE solver that uses the trapezoidal rule algorithm. For an ODE
x' = f(x, t) x(0) = x0the solver iterates:
x(t+h) = x(t) + (h/2)*(x'(t) + x'(t+h))This is the most accurate second order multi-step ODE solver. It is an implicit algorithm, which involves a fixed-point iteration to find x(t+h) and x'(t+h).
| Red (cxh) |
| Red (liuj) |
| Nested Class Summary |
| Nested classes inherited from class ptolemy.kernel.util.NamedObj |
NamedObj.ContainedObjectsIterator |
| Field Summary |
| Fields inherited from class ptolemy.kernel.util.NamedObj |
_changeListeners, _changeLock, _changeRequests, _debugging, _debugListeners, _elementName, _isPersistent, _workspace, ATTRIBUTES, CLASSNAME, COMPLETE, CONTENTS, DEEP, FULLNAME, LINKS |
| Constructor Summary | |
TrapezoidalRuleSolver()
Construct a solver in the default workspace with an empty string as name. |
|
TrapezoidalRuleSolver(Workspace workspace)
Construct a solver in the given workspace. |
|
| Method Summary | |
protected boolean |
_isConverged()
Return true if the fixed point iteration is converged. |
protected void |
_setConvergence(boolean converge)
Set the convergence flag. |
protected void |
_voteForConvergence(boolean converge)
Vote for whether a fixed point has reached. |
int |
getHistoryCapacityRequirement()
Return 0 to indicate that this solver needs no history information. |
int |
getIntegratorAuxVariableCount()
Return 2 to indicate that an integrator under this solver needs 2 auxiliary variables. |
void |
integratorFire(CTBaseIntegrator integrator)
The fire() method for integrators under this solver. |
boolean |
integratorIsAccurate(CTBaseIntegrator integrator)
Perform the isThisStepAccurate() test for the integrator under this solver. |
double |
integratorPredictedStepSize(CTBaseIntegrator integrator)
Provide the suggestedNextStepSize() method for integrators under this solver. |
boolean |
resolveStates()
Resolve the state of the integrators at time CurrentTime+CurrentStepSize. |
| Methods inherited from class ptolemy.domains.ct.kernel.ODESolver |
_makeSolverOf, _prefireIfNecessary, getContainer, getRound, incrementRound, resetRound |
| Methods inherited from class java.lang.Object |
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
public TrapezoidalRuleSolver()
public TrapezoidalRuleSolver(Workspace workspace)
workspace - Object for synchronization and version tracking| Method Detail |
public int getHistoryCapacityRequirement()
getHistoryCapacityRequirement in class ODESolverpublic int getIntegratorAuxVariableCount()
getIntegratorAuxVariableCount in class ODESolver
public void integratorFire(CTBaseIntegrator integrator)
throws IllegalActionException
integratorFire in class ODESolverintegrator - The integrator of that calls this method.
IllegalActionException - If there is no director.public boolean integratorIsAccurate(CTBaseIntegrator integrator)
integratorIsAccurate in class ODESolverintegrator - The integrator that calls this method.
public double integratorPredictedStepSize(CTBaseIntegrator integrator)
h* max(0.5, power((3.0*tolerance/localError), 1.0/3.0))
integratorPredictedStepSize in class ODESolverintegrator - The integrator of that calls this method.
public boolean resolveStates()
throws IllegalActionException
resolveStates in class ODESolverIllegalActionException - Not thrown in this base class
May be needed by the derived class.protected boolean _isConverged()
protected void _setConvergence(boolean converge)
converge - The flag setting.protected void _voteForConvergence(boolean converge)
converge - True if vote for converge.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||