37 static void construct(
char * file, 
int N, 
int M, 
int Z)
 
   48   my_N[0]=Z; my_n[0]=ceil(Z*1.2);
 
   49   my_N[1]=N; my_n[1]=ceil(N*1.2);
 
   50   my_N[2]=N; my_n[2]=ceil(N*1.2);
 
   51   nfft_init_guru(&my_plan, 3, my_N, M, my_n, 6,
 
   52                       PRE_PHI_HUT| PRE_PSI |MALLOC_X| MALLOC_F_HAT|
 
   53                       MALLOC_F| FFTW_INIT| FFT_OUT_OF_PLACE,
 
   54                       FFTW_MEASURE| FFTW_DESTROY_INPUT);
 
   56   fp=fopen(
"knots.dat",
"r");
 
   59     fscanf(fp,
"%le %le %le",&my_plan.
x[3*(j)+1],
 
   60       &my_plan.
x[3*(j)+2],&my_plan.
x[3*(j)+0]);
 
   64   fp=fopen(
"input_f.dat",
"r");
 
   73         fscanf(fp,
"%le ",&real);
 
   74         my_plan.
f_hat[(N*N*l+N*j+k)] = real;
 
   80       nfft_precompute_psi(&my_plan);
 
   86       fprintf(fk,
"%le %le %le %le %le\n",my_plan.
x[3*j+1],
 
   87       my_plan.
x[3*j+2],my_plan.
x[3*j+0],creal(my_plan.
f[j]),cimag(my_plan.
f[j]));
 
   94   nfft_finalize(&my_plan);
 
   97 int main(
int argc, 
char **argv)
 
  100     printf(
"usage: ./construct_data FILENAME N M Z\n");
 
  104   construct(argv[1], atoi(argv[2]),atoi(argv[3]),atoi(argv[4]));