|
||||||||||
| 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.ExplicitRK23Solver
This class implements the Explicit Runge-Kutta 2(3) ODE solving method. For an ODE of the form:
dx/dt = f(x, t), x(0) = x0it does the following:
K0 = f(x(n), tn); K1 = f(x(n)+0.5*h*K0, tn+0.5*h); K2 = f(x(n)+0.75*h*K1, tn+0.75*h); x(n+1) = x(n)+(2/9)*h*K0+(1/3)*h*K0+(4/9)*h*K2;, and error control:
K3 = f(x(n+1), tn+h); LTE = h*[(-5.0/72.0)*K0 + (1.0/12.0)*K1 + (1.0/9.0)*K2 + (-1.0/8.0)*K3]
If the LTE is less than the error tolerance, then this step is considered successful, and the next integration step is predicted as:
h' = 0.8*Math.pow((ErrorTolerance/LTE), 1.0/3.0)This is a second order method, but uses a third order procedure to estimate the local truncation error.
| Yellow (liuxj) |
| Yellow (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 | |
ExplicitRK23Solver()
Construct a solver in the default workspace. |
|
ExplicitRK23Solver(Workspace workspace)
Construct a solver in the given workspace. |
|
| Method Summary | |
int |
getHistoryCapacityRequirement()
Return 0 to indicate that no history information is needed by this solver. |
int |
getIntegratorAuxVariableCount()
Return 4 to indicate that four auxiliary variables are needed by this solver. |
void |
integratorFire(CTBaseIntegrator integrator)
Provide the fire() method for integrators under this solver. |
boolean |
integratorIsAccurate(CTBaseIntegrator integrator)
Return true if the integration is accurate for the given integrator. |
double |
integratorPredictedStepSize(CTBaseIntegrator integrator)
Provide the predictedStepSize() method for the integrators under this solver. |
boolean |
resolveStates()
Advance the current time by the current step size, and resolve the state of the integrators at that time. |
| 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 ExplicitRK23Solver()
public ExplicitRK23Solver(Workspace workspace)
workspace - Object for synchronization and version tracking.| Method Detail |
public final int getHistoryCapacityRequirement()
getHistoryCapacityRequirement in class ODESolverpublic final 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 of that calls this method.
public double integratorPredictedStepSize(CTBaseIntegrator integrator)
integratorPredictedStepSize in class ODESolverintegrator - The integrator of that calls this method.
public boolean resolveStates()
throws IllegalActionException
resolveStates in class ODESolverIllegalActionException - If there is no director,
no scheduler, or one of the actors throw it in its fire()
method or emitTentativeOutput() method.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||