#ifndef well_h #define well_h #include "math.h" // calculate infinite well base wave functions, for a well running // from -width to +width // also calculate the kinetic part of the Hamiltonian (secdiv) by // using H=T+V =E , the known energies and potential class well { public: well(double inmass=3, double inwidth=3) { mass=inmass; width =inwidth;}; ~well() {}; double wav1d(int k, double x); // 1d infinite square well wave function void setwidth(double par) {width=par;}; void setmass(double par) {mass=par;}; double secdiv(int k) ; // kinetic energy part of the Hamiltonian double E(int k); // energy private: double mass; double width; }; #endif