org.opensourcephysics.sip.ch10
Class LaplaceApp

java.lang.Object
  extended by org.opensourcephysics.controls.AbstractAnimation
      extended by org.opensourcephysics.controls.AbstractSimulation
          extended by org.opensourcephysics.sip.ch10.LaplaceApp
All Implemented Interfaces:
java.lang.Runnable, Animation, Simulation, InteractiveMouseHandler

public class LaplaceApp
extends AbstractSimulation
implements InteractiveMouseHandler

LaplaceApp uses the Jacobi relaxation method to solve Laplace's equation. Revised 04/04/2006 to fix missing "size" parameter in initialize method.


Field Summary
 
Fields inherited from class org.opensourcephysics.controls.AbstractSimulation
control, showStepsPerDisplay, stepCounter, stepsPerDisplay
 
Fields inherited from class org.opensourcephysics.controls.AbstractAnimation
animationThread, decimalFormat, delayTime, mainFrame
 
Constructor Summary
LaplaceApp()
          The LaplaceApp constructor.
 
Method Summary
 void doStep()
          Does a single relaxation step and redraws the panel.
 void handleMouseAction(InteractivePanel panel, java.awt.event.MouseEvent evt)
          Handles mouse actions by dragging the current interactive drawable object.
 void initArrays()
          Initialize voltage and conductor arrays.
 void initialize()
          Initializes the animation and reads parameters from the control.
static void main(java.lang.String[] args)
          Starts the Java application.
 void reset()
          Resets the animation model to a predefined state.
 
Methods inherited from class org.opensourcephysics.controls.AbstractSimulation
enableStepsPerDisplay, getControl, getLoader, getStepCounter, getStepsPerDisplay, initializeAnimation, resetAnimation, run, setControl, setStepsPerDisplay, start, startAnimation, startRunning, startSimulation, stepAnimation, stop, stopAnimation, stopRunning, stopSimulation
 
Methods inherited from class org.opensourcephysics.controls.AbstractAnimation
addChildFrame, clearChildFrames, getChildFrames, getDelayTime, getMainFrame, getOSPApp, isRunning, setDelayTime
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.opensourcephysics.controls.Simulation
isRunning
 

Constructor Detail

LaplaceApp

public LaplaceApp()
The LaplaceApp constructor.

Method Detail

initialize

public void initialize()
Initializes the animation and reads parameters from the control.

Overrides:
initialize in class AbstractSimulation

initArrays

public void initArrays()
Initialize voltage and conductor arrays.


doStep

public void doStep()
Does a single relaxation step and redraws the panel.

Specified by:
doStep in class AbstractAnimation

reset

public void reset()
Resets the animation model to a predefined state.

Overrides:
reset in class AbstractSimulation

handleMouseAction

public void handleMouseAction(InteractivePanel panel,
                              java.awt.event.MouseEvent evt)
Handles mouse actions by dragging the current interactive drawable object.

Specified by:
handleMouseAction in interface InteractiveMouseHandler
Parameters:
panel -
evt -

main

public static void main(java.lang.String[] args)
Starts the Java application.

Parameters:
args - command line parameters