next up previous contents
Next: Debugging Up: Getting all of the Previous: d3tensor() and free_d3tensor()

getallPsis()

Write a routine of the below prototype in ``physics.c'' which calls getPsi() to generate all of the wave functions tex2html_wrap_inline464 for l=0..lmax and, for each l, n=0..nmax[l]. A suitable code fragment is

                    .
                    .
  for (l=0; l<=lmax; l++)
    for (n=0; n<=nmax[l]; n++)
      getPsi(Psi[l][n],E[l][n],l,V,r,dr,N);
                    .
                    .
Note that the object Psi[l][n] is, as getPsi expects, actually a pointer to the first storage location among the elements Psi[l][n][0..N]. (Note also that your ``getallPsis'' routine will be rather short.)

void getallPsis(double ***Psi,double **E,
		int lmax, int *nmax,
		double *V,
		double r[], double dr[], int N)
Output:

Input:



Tomas Arias
Sun Feb 24 18:36:39 EST 2002