48 nfft_init_2d(&my_plan,N,N,M);
50 fp=fopen(
"knots.dat",
"r");
54 fscanf(fp,
"%le %le ",&my_plan.
x[2*j+0],&my_plan.
x[2*j+1]);
58 fi=fopen(
"input_f.dat",
"r");
64 fscanf(fi,
"%le ",&real);
65 my_plan.
f_hat[(N*j+k)] = real;
69 if(my_plan.
flags & PRE_PSI)
70 nfft_precompute_psi(&my_plan);
76 fprintf(fk,
"%le %le %le %le\n",my_plan.
x[2*j+0],my_plan.
x[2*j+1],creal(my_plan.
f[j]),cimag(my_plan.
f[j]));
81 nfft_finalize(&my_plan);
84 int main(
int argc,
char **argv)
87 printf(
"usage: ./construct_data FILENAME N M\n");
91 construct(argv[1],atoi(argv[2]),atoi(argv[3]));
fftw_complex * f_hat
Fourier coefficients.
static void construct(char *file, int N, int M)
construct makes an 2d-nfft
data structure for an NFFT (nonequispaced fast Fourier transform) plan with double precision ...
NFFT_INT M_total
Total number of samples.
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 | ...