org.opensourcephysics.sip.ch16
Class Schroedinger

java.lang.Object
  extended by org.opensourcephysics.sip.ch16.Schroedinger
All Implemented Interfaces:
ODE

public class Schroedinger
extends java.lang.Object
implements ODE

Schroedinger solves the time independent Schroedinger equation


Constructor Summary
Schroedinger()
           
 
Method Summary
 double evaluatePotential(double x)
          Evaluates the potential using a step at x=0.
 void getRate(double[] state, double[] rate)
          Gets the rate using the given state.
 double[] getState()
          Gets the state.
 void initialize()
          Constructs a simple quantum mechanical model.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Schroedinger

public Schroedinger()
Method Detail

initialize

public void initialize()
Constructs a simple quantum mechanical model. The potential enegy is coded into the evaluate method.

Parameters:
numberOfPoints - number of grid points
a - half interval

getState

public double[] getState()
Gets the state. The state for the ode solver: phi, dphi/dx, x.

Specified by:
getState in interface ODE
Returns:
the state

getRate

public void getRate(double[] state,
                    double[] rate)
Gets the rate using the given state.

Specified by:
getRate in interface ODE
Parameters:
state -
rate -

evaluatePotential

public double evaluatePotential(double x)
Evaluates the potential using a step at x=0. Change this function to model other qm systems.

Parameters:
x -
Returns: