The output of getallPsis() will be a three-dimensional array, one full wave function for each value of (n,l): Psi[l][n][0..N]. For some reason, Numerical Recipes provides routines for three-dimensional arrays in single precision, but not double precision. Accordingly, generalize the Numerical Recipes utility routines f3tensor() and free_f3tensor() to double precision by replacing all occurrences of float with double, thereby producing routines with the two prototypes below. You should place these routines at the top of ``p480.c'' (and their prototypes in ``p480.h''). Your new routines will have the following prototypes:
double ***d3tensor(long nrl,long nrh,long ncl,long nch,long ndl,long ndh)
Return value:
Input:
void free_d3tensor(double ***t,
long nrl,long nrh,long ncl,long nch,long ndl,long ndh)
Input:
Compiling Hints:
To compile, you'll probably need to copy the macro lines
#define NR_END 1 #define FREE_ARG char*to define variables that are needed by the d3tensor routines. You should put these lines just before the point where you place those routines. Also, you'll probably need to put the line
#include <stddef.h>near the top of the file so as to define ``size_t'' in d3tensor().
Tomas Arias 2006-02-22