vmm.ode.firstorder1D
Class ODE1stOrder1D
java.lang.Object
vmm.core.Exhibit
vmm.ode.ODE_2D
vmm.ode.ODE_1D
vmm.ode.firstorder1D.ODE1stOrder1D
- All Implemented Interfaces:
- java.util.EventListener, javax.swing.event.ChangeListener, Decorateable, Parameterizable
- Direct Known Subclasses:
- Logistic, MassAction, UserODEFirstOrder1D
public abstract class ODE1stOrder1D
- extends ODE_1D
Represents a 1D ODE in the usual way as a vector field in two dimensions,
with the abilty to compute integral curves of the field. The user starts
a curve by clicking the start point with the middle mouse button, or by
clicking with the ALT key down (Option key on Mac). The most recently added
curve is shown in green; older curves are in red. The green curve
integral can be extended using the "Continue Orbit" command in the Action menu.
Fields inherited from class vmm.ode.ODE_2D |
addAnimateCheckBoxToControlPanel, addLinesCheckBoxToControlPanel, addOrbitTypesToControlPanel, addProjectedOrbitsAction, canShowVectorField, dtDefault, initialDataDefault, inputLabelNames, isAutonomous, ORBIT_TYPE_BOTH, ORBIT_TYPE_EULER, ORBIT_TYPE_RUNGE_KUTTA, timeSpanDefault |
Method Summary |
protected MouseTask |
makeDefaultMouseTask(ODE_2D.ODEView view)
Should construct and return a mouse task appropriate for this exhibit, to be used
in the specified view. |
protected void |
nextEulerPoint(double[] pointData,
double dt)
Computes the next point on an integral curve, using Euler's method. |
protected void |
nextRungeKuttaPoint(double[] pointData,
double dt)
Computes the next point on an integral curve, using the Runge-Kutta method. |
protected double |
vectorField_x(double x,
double y,
double t)
Returns the x-component of the vector field at point (x,y) and time t. |
protected double |
vectorField_y(double x,
double y,
double t)
Returns the x-component of the vector field at point (x,y) and time t. |
Methods inherited from class vmm.core.Exhibit |
addChangeListener, addDecoration, addExtraXML, addParameter, addView, clearDecorations, computeDrawData, computeDrawDataHook, doDrawHook, fireExhibitChangeEvent, forceRedraw, getActionsForView, getAdditionalAnimationsForView, getAlternativeViews, getBuildAnimation, getDecorations, getDefaultBackground, getDefaultForeground, getDefaultTransform, getDefaultWindow, getFramesForMorphing, getMorphingAnimation, getName, getParameterByName, getParameters, getSettingsCommandsForView, getTitle, getUseFilmstripForMorphing, getViews, parameterChanged, readExtraXML, removeChangeListener, removeDecoration, removeParameter, removeView, render, setDefaultBackground, setDefaultForeground, setDefaultWindow, setDefaultWindow, setFramesForMorphing, setName, setUseFilmstripForMorphing, stateChanged |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ODE1stOrder1D
public ODE1stOrder1D()
nextEulerPoint
protected void nextEulerPoint(double[] pointData,
double dt)
- Description copied from class:
ODE_1D
- Computes the next point on an integral curve, using Euler's method.
The pointData parameter array contains the data for the current point.
This data should be replaced with the data for the next point. The
size of the array and the meaning of the data that it contains will
vary from one subclass to another. However, for non-autonomous ODEs,
the time should always be the first parameter in the array.
The second parameter, dt, gives the time step from the current
point to the next point.
- Specified by:
nextEulerPoint
in class ODE_1D
vectorField_x
protected final double vectorField_x(double x,
double y,
double t)
- Description copied from class:
ODE_2D
- Returns the x-component of the vector field at point (x,y) and time t.
For autonomous ODEs, the result should be independent of t. The
default implementation here simply returns 0. An exhibit that
sets the
ODE_2D.canShowVectorField
propery to true should
override this method to compute the correct value.
- Overrides:
vectorField_x
in class ODE_2D
vectorField_y
protected final double vectorField_y(double x,
double y,
double t)
- Description copied from class:
ODE_2D
- Returns the x-component of the vector field at point (x,y) and time t.
For autonomous ODEs, the result should be independent of t. The
default implementation here simply returns 0. An exhibit that
sets the
ODE_2D.canShowVectorField
propery to true should
override this method to compute the correct value.
- Overrides:
vectorField_y
in class ODE_2D
nextRungeKuttaPoint
protected void nextRungeKuttaPoint(double[] pointData,
double dt)
- Description copied from class:
ODE_1D
- Computes the next point on an integral curve, using the Runge-Kutta method.
The pointData parameter array contains the data for the current point.
This data should be replaced with the data for the next point. The
size of the array and the meaning of the data that it contains will
vary from one subclass to another. But for the non-autonmous case,
the time should always be the first value in the array.
The second parameter, dt, gives the time step from the current point to the next point.
- Specified by:
nextRungeKuttaPoint
in class ODE_1D
makeDefaultMouseTask
protected MouseTask makeDefaultMouseTask(ODE_2D.ODEView view)
- Description copied from class:
ODE_2D
- Should construct and return a mouse task appropriate for this exhibit, to be used
in the specified view. The default return value is a standard
BasicMouseTask2D; subclasses can redefine this to add the ability to input
the initial conditions with the mouse.
- Overrides:
makeDefaultMouseTask
in class ODE_2D