Class Schrodinger

java.lang.Object
  |
  +--Schrodinger
Direct Known Subclasses:
ImprovedSchrodinger

class Schrodinger
extends java.lang.Object
implements Solvable

Numerically integrates the Schrodinger equation.


Field Summary
static double _2m_over_h_bar_sq
           
static double DEFAULT_ENERGY
           
static double E
           
protected  double energy
          The energy parameter
protected  double firstValue
          The initial value of the function (arbitrary)
static double H
           
static double M
           
protected  Function pot
          The potential function
 
Constructor Summary
Schrodinger()
          Creates a new Schrodinger solver, with a square well potential function
Schrodinger(Function fn)
          Creates a new Schrodinger solver
 
Method Summary
 double getEnergy()
          Returns the value of the energy parameter
 void setEnergy(double d)
          Sets the value of the energy parameter
 void setPotentialFunction(Function f)
           
 void solve(double x, double h, double[] vals)
          Requests that the supplied array be filled with solution data.
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, toString, wait, wait, wait
 

Field Detail

energy

protected double energy
The energy parameter

firstValue

protected double firstValue
The initial value of the function (arbitrary)

pot

protected Function pot
The potential function

DEFAULT_ENERGY

public static final double DEFAULT_ENERGY

H

public static final double H

E

public static final double E

M

public static final double M

_2m_over_h_bar_sq

public static final double _2m_over_h_bar_sq
Constructor Detail

Schrodinger

public Schrodinger(Function fn)
Creates a new Schrodinger solver
Parameters:
fn - The potential function

Schrodinger

public Schrodinger()
Creates a new Schrodinger solver, with a square well potential function
Method Detail

solve

public void solve(double x,
                  double h,
                  double[] vals)
Description copied from interface: Solvable
Requests that the supplied array be filled with solution data. The nth element of the array should be the solution at x = x0 + step*n.
Specified by:
solve in interface Solvable
Tags copied from interface: Solvable
Parameters:
x0 - The initial x-value
step - The increment to be applied to x0
vals - The array which will hold the solution data

getEnergy

public double getEnergy()
Returns the value of the energy parameter

setEnergy

public void setEnergy(double d)
Sets the value of the energy parameter

setPotentialFunction

public void setPotentialFunction(Function f)