34 static void construct(
char * file,
int N,
int M,
int Z)
45 my_N[0]=Z; my_n[0]=ceil(Z*1.2);
46 my_N[1]=N; my_n[1]=ceil(N*1.2);
47 my_N[2]=N; my_n[2]=ceil(N*1.2);
48 nfft_init_guru(&my_plan, 3, my_N, M, my_n, 6,
51 FFTW_MEASURE| FFTW_DESTROY_INPUT);
53 fp=fopen(
"knots.dat",
"r");
56 fscanf(fp,
"%le %le %le",&my_plan.
x[3*(j)+1],
57 &my_plan.
x[3*(j)+2],&my_plan.
x[3*(j)+0]);
61 fp=fopen(
"input_f.dat",
"r");
70 fscanf(fp,
"%le ",&real);
71 my_plan.
f_hat[(N*N*l+N*j+k)] = real;
83 fprintf(fk,
"%le %le %le %le %le\n",my_plan.
x[3*j+1],
84 my_plan.
x[3*j+2],my_plan.
x[3*j+0],creal(my_plan.
f[j]),cimag(my_plan.
f[j]));
94 int main(
int argc,
char **argv)
97 printf(
"usage: ./construct_data FILENAME N M Z\n");
101 construct(argv[1], atoi(argv[2]),atoi(argv[3]),atoi(argv[4]));
fftw_complex * f_hat
Fourier coefficients.
void nfft_precompute_psi(nfft_plan *ths)
data structure for an NFFT (nonequispaced fast Fourier transform) plan with double precision ...
NFFT_INT M_total
Total number of samples.
void nfft_trafo(nfft_plan *ths)
void nfft_finalize(nfft_plan *ths)
Header file for the nfft3 library.
double * x
Nodes in time/spatial domain, size is doubles.
unsigned flags
Flags for precomputation, (de)allocation, and FFTW usage, default setting is PRE_PHI_HUT | PRE_PSI | ...