Write a routine of the below prototype in ``physics.c'' which calls
getPsi() to generate all of the wave functions
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:
- Psi[l][n][k]: values of
(properly normalized) for wave functions with angular momentum
and with n nodes
Input:
- E[l][n]: matrix of energies of states of angular momentum l and with n=0..nmax[l] nodes
- lmax: maximum angular momentum to consider (l=0..lmax)
- nmax[l]: maximum number of nodes sought for angular momentum l
- V[]: potential
- r[], dr[], N: standard grid information