Class Schrodinger
java.lang.Object
|
+--Schrodinger
- Direct Known Subclasses:
- ImprovedSchrodinger
- class Schrodinger
- extends java.lang.Object
- implements Solvable
Numerically integrates the Schrodinger equation.
|
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 |
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
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
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-valuestep - The increment to be applied to x0vals - 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)