NFFT Logo 3.1.2 API Reference

fastsum.h

Go to the documentation of this file.
00001 /*
00002  * Copyright (c) 2002, 2009 Jens Keiner, Stefan Kunis, Daniel Potts
00003  *
00004  * This program is free software; you can redistribute it and/or modify it under
00005  * the terms of the GNU General Public License as published by the Free Software
00006  * Foundation; either version 2 of the License, or (at your option) any later
00007  * version.
00008  *
00009  * This program is distributed in the hope that it will be useful, but WITHOUT
00010  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
00011  * FOR A PARTICULAR PURPOSE.  See the GNU General Public License for more
00012  * details.
00013  *
00014  * You should have received a copy of the GNU General Public License along with
00015  * this program; if not, write to the Free Software Foundation, Inc., 51
00016  * Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
00017  */
00018 
00019 /* $Id: fastsum.h 3298 2009-08-14 12:32:31Z keiner $ */
00020 
00038 #ifndef fastsum_h_inc
00039 #define fastsum_h_inc
00040 
00042 #include <complex.h>
00044 #include "nfft3util.h"
00046 #include "nfft3.h"
00047 
00048 typedef double _Complex (*kernel)(double , int , const double *);
00049 
00053 #define EXACT_NEARFIELD  (1U<< 0)
00054 
00056 typedef struct fastsum_plan_
00057 {
00060   int d;                                
00062   int N_total;                          
00063   int M_total;                          
00065   double _Complex *alpha;                       
00066   double _Complex *f;                           
00068   double *x;                            
00069   double *y;                            
00071   kernel k;  
00072   double *kernel_param;                 
00074   unsigned flags;                       
00079   double _Complex *pre_K;                       
00082   int n;                                
00083   fftw_complex *b;                      
00085   int p;                                
00086   double eps_I;                           /* fixed to p/n so far  */
00087   double eps_B;                           /* fixed to 1/16 so far */
00088 
00089   nfft_plan mv1;                        
00090   nfft_plan mv2;                        
00093   int Ad;                               
00094   double _Complex *Add;                 
00096   /* things for computing *b - are they used only once?? */
00097   fftw_plan fft_plan;
00098 } fastsum_plan;
00099 
00116 void fastsum_init_guru(fastsum_plan *ths, int d, int N_total, int M_total, kernel k, double *param, unsigned flags, int nn, int m, int p, double eps_I, double eps_B);
00117 
00122 void fastsum_finalize(fastsum_plan *ths);
00123 
00128 void fastsum_exact(fastsum_plan *ths);
00129 
00134 void fastsum_precompute(fastsum_plan *ths);
00135 
00140 void fastsum_trafo(fastsum_plan *ths);
00141 /* \} */
00142 
00143 double _Complex regkern(kernel k, double xx, int p, const double *param, double a, double b);
00144 
00146 double _Complex kubintkern(const double x, const double _Complex *Add,
00147   const int Ad, const double a);
00148 
00149 #endif
00150 /* fastsum.h */

Generated on 16 Sep 2009 by Doxygen 1.5.3