CosmoBolognaLib
Free Software C++/Python libraries for cosmological calculations
FFTlog.h
Go to the documentation of this file.
1 /*******************************************************************
2  * Copyright (C) 2016 by Alfonso Veropalumbo *
3  * alfonso.veropalumbo@unibo.it *
4  * *
5  * This program is free software; you can redistribute it and/or *
6  * modify it under the terms of the GNU General Public License as *
7  * published by the Free Software Foundation; either version 2 of *
8  * the License, or (at your option) any later version. *
9  * *
10  * This program is distributed in the hope that it will be useful,*
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of *
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
13  * GNU General Public License for more details. *
14  * *
15  * You should have received a copy of the GNU General Public *
16  * License along with this program; if not, write to the Free *
17  * Software Foundation, Inc., *
18  * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
19  *******************************************************************/
20 
35 #ifndef __FFTlog__
36 #define __FFTlog__
37 
38 #include "FuncGrid.h"
39 
40 namespace cbl {
41 
42  namespace wrapper {
43 
53  namespace fftlog {
54 
55  extern"C"
56  {
78  void fhti_ (int *_n, double *_mu, double *_q, double *_dlnr, double *_kr, int *_kropt, double *_wsave, int *_ok);
79 
98  void fftl_ (int *_n, double *_a, double *_rk, int *_dir, double *_wsave);
99  }
100 
126  std::vector<double> transform_FFTlog (const std::vector<double> yy, const int dir, const std::vector<double> xx, const std::vector<double> fx, const double mu=0, const double q=0, const double kr=1, const int kropt=0);
127 
152  void transform_FFTlog (std::vector<double> &yy, std::vector<double> &fy, const int dir, const std::vector<double> xx, const std::vector<double> fx, const double mu=0, const double q=0, const double kr=1, const int kropt=0);
153 
154  }
155  }
156 
157 }
158 
159 #endif
Class used to handle functions stored on a grid.
std::vector< double > transform_FFTlog(const std::vector< double > yy, const int dir, const std::vector< double > xx, const std::vector< double > fx, const double mu=0, const double q=0, const double kr=1, const int kropt=0)
wrapper of the FFTlog to compute the discrete Fourier sine or cosine transform of a logarithmically...
Definition: FFTlog.cpp:43
void fftl_(int *_n, double *_a, double *_rk, int *_dir, double *_wsave)
wrapper of the fftl subroutine contained in External/fftlog-f90-master/fftlog.f This subroutine compu...
void fhti_(int *_n, double *_mu, double *_q, double *_dlnr, double *_kr, int *_kropt, double *_wsave, int *_ok)
wrapper of the fhti subroutine contained in External/fftlog-f90-master/fftlog.f This is an initializa...
The global namespace of the CosmoBolognaLib
Definition: CAMB.h:38