c---------------------------------------------------------------------- subroutine hooken(nm,nmat,omega,cud,cd,dd,h,z,o,en,fv1,fv2,h0,h1, & over,gaml,tu,veeu,vextu,dcusp) c basically Kieron's program to diagonalize the Hamiltonian for Hooke's c atom. Only modified so that it can be called as subroutine c c author: Heiko Appel, modified by Kieron, 8.15.99, to get energies also c HOOKEN solves Hooke's atom for any spring constant k. c by expanding the interparticle wavefunction in powers of u. c c in: nm - max matrix size for inversion c nm2 - bigger vector size for stroing gamma functions c h - hamiltonian matrix c en - list of eignevalues c z - list of eigenvectors c fv1,fv2 - dummy vectors c o - overlap matrix c gaml - list of log(gamma) functions c h0,h1,over - long vectors containing useful quantities for constructing c Hamiltonian c out: c - coefficients in wavefunction expansion in powers of x c cu - coefficients in expansion in powers of u c d - coefficients in square of wavefunction c tu,veeu,vextu,dcusp - ? c calls: ? c---------------------------------------------------------------------- implicit real*8(a-h,o-z) real*8 h(0:nm,0:nm),en(0:nm),z(0:nm,0:nm),fv1(0:nm),fv2(0:nm) real*8 o(0:nm,0:nm),gaml(0:2*nm+2),cud(0:2*nm),cd(0:nm) real*8 h0((nm+1)*(nm+2)/2),h1((nm+1)*(nm+2)/2) real*8 over((nm+1)*(nm+2)/2),dd(0:2*nm) c integer nm2=(nm+1)*(nm+2)/2