1 subroutine int_init_dip(maxbuf,maxscr,basis) 2c 3c $Id$ 4c 5 implicit none 6c 7#include "hnd_pointers.fh" 8#include "bas.fh" 9#include "errquit.fh" 10#include "hnd_tol.fh" 11c 12 integer maxbuf ! [output] buffer space for integrals 13 integer maxscr ! [output] scratch space needed 14 integer basis ! [input] basis set info 15c 16 integer lmax, i 17c 18c set default tolerance 19c 20 itol = 15 21c 22c Define Hermite polynomial values 23c 24 call hnd_whermt 25c 26c set up memory requirements: get max L first 27c 28 lmax = -1 29 if (.not.bas_high_angular(basis,lmax)) 30 & call errquit('int_init_dso: lmax error',lmax, INT_ERR) 31 lmax = lmax + 1 32c 33c Calculate maximum buffer needed 34c 35 maxbuf = lmax*(lmax+1)*lmax*(lmax+1)/4 36c 37c Calculate maximum scratch space needed 38c 39 maxscr = 9*lmax*(lmax+1) 40 maxscr = max(maxbuf,maxscr) 41c 42c Set pointers for scratch space 43c 44 dip(1) = 1 45 do i = 2, 9 46 dip(i) = 1 + (i-1)*lmax*(lmax+1) 47 enddo 48c 49c If spherical basis, allocate scratch space for transformation 50c A little smaller than maxbuf: we will use maxbuf size 51c 52 maxscr = max(maxscr,maxbuf) 53c 54 return 55 end 56