vmm.ode
Class ODE_1D

java.lang.Object
  extended by vmm.core.Exhibit
      extended by vmm.ode.ODE_2D
          extended by vmm.ode.ODE_1D
All Implemented Interfaces:
java.util.EventListener, javax.swing.event.ChangeListener, Decorateable, Parameterizable
Direct Known Subclasses:
ODE1stOrder1D

public abstract class ODE_1D
extends ODE_2D

Represents a first order ODE exhibit y' = f(y,t). This is subsumed under the ODE_2D class by the standard trick; namely setting x'(t) = 1 and x(0) = t_0 (so that x(t) = t_0 + t) and putting y' = f(y,x).


Nested Class Summary
 
Nested classes/interfaces inherited from class vmm.ode.ODE_2D
ODE_2D.ODEView
 
Field Summary
 
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
 
Fields inherited from class vmm.core.Exhibit
decorations, exhibitNeedsRedraw, isMorphing, morphingView, parameters, previousTransform
 
Constructor Summary
protected ODE_1D(boolean canShowVectorField, boolean isAutonomous, java.lang.String... inputLabelName)
           
 
Method Summary
protected abstract  void nextEulerPoint(double[] pointData, double dt)
          Computes the next point on an integral curve, using Euler's method.
protected abstract  void nextRungeKuttaPoint(double[] pointData, double dt)
          Computes the next point on an integral curve, using the Runge-Kutta method.
protected abstract  double x1Prime(double x, double y)
          Defines the x1-component of the vector field.
protected abstract  double x2Prime(double x, double y)
          Defines the x2-component of the vector field.
 
Methods inherited from class vmm.ode.ODE_2D
doDraw, extractPointFromData, getCreateAnimation, getDefaultView, makeDefaultMouseTask, vectorField_x, vectorField_y
 
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
 

Constructor Detail

ODE_1D

protected ODE_1D(boolean canShowVectorField,
                 boolean isAutonomous,
                 java.lang.String... inputLabelName)
Method Detail

x1Prime

protected abstract double x1Prime(double x,
                                  double y)
Defines the x1-component of the vector field.


x2Prime

protected abstract double x2Prime(double x,
                                  double y)
Defines the x2-component of the vector field.


nextEulerPoint

protected abstract void nextEulerPoint(double[] pointData,
                                       double dt)
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_2D

nextRungeKuttaPoint

protected abstract void nextRungeKuttaPoint(double[] pointData,
                                            double dt)
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_2D