examples/schrodinger/schrodinger.cpp
/*
 * compute Kn using the numeric values that we already found
 */
compute Kn using the numeric values that we already found
compute Kn using the numeric values that we already found
Sdouble Schrodinger::calculateKSSquared(int n)
{
    FUNCTION_BLOCK;
    Sdouble x = (((double) n)*xMax + xMin*((double) numberDivisions-n)) / ((double) numberDivisions);
    return ((0.05 * ECurrent) - ((x*x) * 5.63e-3));
}
Sdouble Schrodinger :: calculateKSSquared ( int n ) { FUNCTION_BLOCK ; Sdouble x = ( ( ( double ) n ) * xMax + xMin * ( ( double ) numberDivisions - n ) ) / ( ( double ) numberDivisions ) ; return ( ( 0.05 * ECurrent ) - ( ( x * x ) * 5.63e-3 ) ) ; }
compute Kn using the numeric values that we already found
compute Kn using the numeric values that we already found
//number x = (hZero * n) + xMin;