In [1]:
import dvr_1d
import dvr_2d
import dvr_3d
%matplotlib inline

2-D Sinc Basis


In [2]:
d1d = dvr_1d.SincDVR(npts = 30, L=10)
d2d = dvr_2d.DVR(dvr1d=d1d)
E, U = d2d.sho_test(num_eigs=5, precision=14)


Testing 2-D DVR with an SHO potential
The first 5 energies are:
[ 1.00000000004332  2.00000000111529  2.00000000111529  3.00000000218725
  3.00000002647711]

2-D Hermite Basis

We only need a few basis functions (i.e. a few points) to get perfect eigenvalues.


In [4]:
d1d = dvr_1d.HermiteDVR(npts=5)
d2d = dvr_2d.DVR(dvr1d=d1d)
E, U = d2d.sho_test(num_eigs=5, precision=14)


Testing 2-D DVR with an SHO potential
The first 5 energies are:
[ 1.                2.                2.00000000000001  3.
  3.00000000000001]

Plot Stuff


In [6]:
%matplotlib osx

In [8]:
d1d = dvr_1d.SincDVR(npts = 30, L=10)
d2d = dvr_2d.DVR(dvr1d=d1d)
E, U = d2d.sho_test(num_eigs=5, precision=10, uscale=3, doshow=True)


Testing 2-D DVR with an SHO potential
The first 5 energies are:
[ 1.            2.0000000011  2.0000000011  3.0000000022  3.0000000265]


In [ ]: