Math 302, Differential Equations JHU

Math 302X
- HW3.pdf
- Statement on Disabilities
- Statement on Ethics
- Homework
- Java Tools
 
- An example of a circuit
- An example of a circuit
- An example of a circuit
- An Application to Population Dynamics
- An application to Population Dynamics
- Slope Field Calculator
- ODE 2D Calculator
- ODE 2D Calculator
- ODE 3D Calculator
- ODE 3D Calculator
- Slope Field Calculator
- Slope Field Calculator
- Solution Verifier
- Solution Verifier 2D
- Solution Verifier 2D
- Solution Verifier
- A Lotke-Volterra System
- A Lotke-Volterra system
- Labor Managed Oligopoly - Two firms
- ODE 3D Calculator
- 2D Map Calculator
- A model of sunami
- A model of sunami
- The three body problem
- The two body problem
- The two body problem
- Van der Pol Equation
- Van der Pol Equation
- List of parameters of the JOde Applet
- Browser test
- Generated Documentation (Untitled)
 
- All Classes
- All Classes
- Constant Field Values
- Deprecated List
- API Help
- Index
- Overview
- Overview
- Class Hierarchy
-
- Serialized Form
- ODE 2D Calculator
+ Using Marek Rychliks's Applet for Euler's Method
- JOde Manual Page
- JOde - An Applet for Studying Ordinary Differential Equations
- ODE 2D Calculator
- Syllabus
Math Dept. Home
Help room

com.rychlik.jode
Class JOde

java.lang.Object
  |
  +--com.rychlik.jode.JOde
All Implemented Interfaces:
Constraints, java.lang.Runnable, java.io.Serializable, VField

public class JOde
extends java.lang.Object
implements java.lang.Runnable, VField, Constraints, java.io.Serializable

This class JOde implements the functionality of an interactive ODE solver, or a tool for studying simple differential equations. Its capabilities include

  • Slope (direction) fields
  • Solution by several known algorithms
  • Interactive editing of equations
  • Parsing of arithmetical expressions

Version:
$Id: JOde.java,v 6.2 2004/05/31 06:48:58 marek Exp $
Author:
Marek Rychlik
See Also:
Serialized Form

Field Summary
static int ABSCISSA
          Constant ABSCISSA is the number of the axis which will be the abscissa of the coordinate system in the default GUI configuration.
static int MAX_STEPS_THRESHOLD
          Constant MAX_STEPS_THRESHOLD is the maximal number of steps for numerical solvers.
static int ORDINATE
          Constant ORDINATE is the number of the axis which will be the ordinate of the coordinate system in the default GUI configuration.
static int RANGE_MAX
          Constant RANGE_MAX represents the default for maximum of the range of a variable.
static int RANGE_MIN
          Constant RANGE_MIN represents the default for minimum of the range of a variable.
static boolean USING_FORMAT_FOR_TICKS
          If set, DecimalFormat is used to format tick labels.
 
Constructor Summary
JOde()
          Constructor without parameters
JOde(java.lang.String[] args, java.applet.Applet applet, java.lang.String options)
          Creates a new JOde instance.
JOde(java.lang.String[] args, java.applet.Applet applet, java.lang.String options, java.awt.Dimension preferredSize)
          Constructor using command-line-like arguments
 
Method Summary
 void addControls()
          Initialize input controls for a slopes diagram
 double evalString(java.lang.String s)
          Describe evalString method here.
 double evalString(java.lang.String s, boolean silent)
          Describe evalString method here.
 boolean evaluateAt(double[] y, double[] y1)
          Implements VField interface.
 boolean evaluateFormulas(com.rychlik.jode.JOde.FormulaControl[] formulaControls, double[] values)
          Evaluate a sequence of formulas.
 java.applet.Applet getApplet()
          Get the Applet value.
 com.rychlik.jode.JOdeFrame getFrame()
          Get the Frame value.
 java.lang.String getTitle()
          Get the Title value.
 java.lang.String initConditionToString(double[] data, boolean isAutonomous)
          Describe initConditionToString method here.
 java.lang.String initConditionToString(java.lang.String label, double[] data, boolean isAutonomous)
          Describe initConditionToString method here.
static void main(java.lang.String[] args)
          This method allows this class to be run as a standalone application.
 double[] makeInitCondition(com.rychlik.jode.JOde.UserPoint p)
          Describe makeInitCondition method here.
 void printCanvas()
          Describe printCanvas method here.
 void printPanel()
          Describe printPanel method here.
 void printPhaseDiagram()
          Describe printPhaseDiagram method here.
 void quit()
          The method quit removes this JODe panel from the applet and the frame and waits to be garbage-collected.
 void run()
          Run all calculations.
 boolean satisfies(double[] y)
          Implements Constraints interface.
 void setApplet(java.applet.Applet newApplet)
          Set the Applet value.
 void setFrame(com.rychlik.jode.JOdeFrame newFrame)
          Set the Frame value.
 void setTitle(java.lang.String newTitle)
          Set the Title value.
 void showFrame(boolean on)
          The method showFrame switches the container between the frame and the applet.
 void start()
          Describe start method here.
 void startCalculation()
          The startCalculation method initiates the calculation corresponding to the current applet settings.
 void stop()
          Describe stop method here.
 void stopCalculation()
          The stopCalculation method stops any running calculation.
 void updateVariableNames()
          Describe updateVariableNames method here.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

USING_FORMAT_FOR_TICKS

public static final boolean USING_FORMAT_FOR_TICKS
If set, DecimalFormat is used to format tick labels. Unfortunately, before Java 2 no exponential formatting can be performed, so formatting tick labels is done by an added hack.

See Also:
Constant Field Values

RANGE_MIN

public static final int RANGE_MIN
Constant RANGE_MIN represents the default for minimum of the range of a variable.

See Also:
Constant Field Values

RANGE_MAX

public static final int RANGE_MAX
Constant RANGE_MAX represents the default for maximum of the range of a variable.

See Also:
Constant Field Values

MAX_STEPS_THRESHOLD

public static final int MAX_STEPS_THRESHOLD
Constant MAX_STEPS_THRESHOLD is the maximal number of steps for numerical solvers.

See Also:
Constant Field Values

ABSCISSA

public static final int ABSCISSA
Constant ABSCISSA is the number of the axis which will be the abscissa of the coordinate system in the default GUI configuration.

See Also:
Constant Field Values

ORDINATE

public static final int ORDINATE
Constant ORDINATE is the number of the axis which will be the ordinate of the coordinate system in the default GUI configuration.

See Also:
Constant Field Values
Constructor Detail

JOde

public JOde(java.lang.String[] args,
            java.applet.Applet applet,
            java.lang.String options,
            java.awt.Dimension preferredSize)
Constructor using command-line-like arguments

Parameters:
applet - an Applet value
options - a String value
preferredSize - a Dimension value

JOde

public JOde(java.lang.String[] args,
            java.applet.Applet applet,
            java.lang.String options)
Creates a new JOde instance.

Parameters:
applet - an Applet value
options - a String value

JOde

public JOde()
Constructor without parameters

Method Detail

start

public void start()
Describe start method here.


stop

public void stop()
Describe stop method here.


evalString

public final double evalString(java.lang.String s)
                        throws ParseException
Describe evalString method here.

Parameters:
s - a String value
Returns:
a double value
Throws:
ParseException - if an error occurs

evalString

public final double evalString(java.lang.String s,
                               boolean silent)
                        throws ParseException
Describe evalString method here.

Parameters:
s - a String value
silent - a boolean value
Returns:
a double value
Throws:
ParseException - if an error occurs

satisfies

public boolean satisfies(double[] y)
Implements Constraints interface. Checks whether a point is in the coordinate range.

Specified by:
satisfies in interface Constraints
Parameters:
y - The point in the phase space.
Returns:
True if it is, false if not.

evaluateAt

public final boolean evaluateAt(double[] y,
                                double[] y1)
Implements VField interface.

Specified by:
evaluateAt in interface VField
Parameters:
y - Point where to evaluate vector field.
y1 - Vector field.
Returns:
True, if successfully evaluated, false if it could not be evaluated.

evaluateFormulas

public final boolean evaluateFormulas(com.rychlik.jode.JOde.FormulaControl[] formulaControls,
                                      double[] values)
Evaluate a sequence of formulas.

Parameters:
values - a double[] value
Returns:
True, if successfully evaluated, false if at least one of the formulas could not be evaluated.

run

public void run()
Run all calculations.

Specified by:
run in interface java.lang.Runnable

updateVariableNames

public void updateVariableNames()
Describe updateVariableNames method here.


makeInitCondition

public double[] makeInitCondition(com.rychlik.jode.JOde.UserPoint p)
Describe makeInitCondition method here.

Parameters:
p - an UserPoint value
Returns:
a double[] value

addControls

public void addControls()
Initialize input controls for a slopes diagram


printCanvas

public final void printCanvas()
Describe printCanvas method here.


printPanel

public final void printPanel()
Describe printPanel method here.


printPhaseDiagram

public final void printPhaseDiagram()
Describe printPhaseDiagram method here.


showFrame

public final void showFrame(boolean on)
The method showFrame switches the container between the frame and the applet. An instructive message is displayed in the applet window if the frame is used with an applet.

Parameters:
on - a boolean value

initConditionToString

public final java.lang.String initConditionToString(double[] data,
                                                    boolean isAutonomous)
Describe initConditionToString method here.

Parameters:
data - a double[] value
isAutonomous - a boolean value
Returns:
a String value

initConditionToString

public final java.lang.String initConditionToString(java.lang.String label,
                                                    double[] data,
                                                    boolean isAutonomous)
Describe initConditionToString method here.

Parameters:
label - a String value
data - a double[] value
isAutonomous - a boolean value
Returns:
a String value

getFrame

public com.rychlik.jode.JOdeFrame getFrame()
Get the Frame value.

Returns:
the Frame value.

setFrame

public void setFrame(com.rychlik.jode.JOdeFrame newFrame)
Set the Frame value.

Parameters:
newFrame - The new Frame value.

getApplet

public java.applet.Applet getApplet()
Get the Applet value.

Returns:
the Applet value.

setApplet

public void setApplet(java.applet.Applet newApplet)
Set the Applet value.

Parameters:
newApplet - The new Applet value.

getTitle

public java.lang.String getTitle()
Get the Title value.

Returns:
the Title value.

setTitle

public void setTitle(java.lang.String newTitle)
Set the Title value.

Parameters:
newTitle - The new Title value.

quit

public void quit()
The method quit removes this JODe panel from the applet and the frame and waits to be garbage-collected.


startCalculation

public void startCalculation()
The startCalculation method initiates the calculation corresponding to the current applet settings.


stopCalculation

public void stopCalculation()
The stopCalculation method stops any running calculation.


main

public static void main(java.lang.String[] args)
This method allows this class to be run as a standalone application.

Parameters:
args - Command line arguments.



This page last modified Sun Sep 12 12:30:55 2004
Questions? Comments? Please send feedback to jason howald