CosmoBolognaLib
Free Software C++/Python libraries for cosmological calculations
Path.h
Go to the documentation of this file.
1 /********************************************************************
2  * Copyright (C) 2022 by Sofia Contarini *
3  * sofia.contarini3@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 
34 #ifndef __PATH__
35 #define __PATH__
36 
37 #include <iostream>
38 #include <sstream>
39 #include <unordered_map>
40 #include <fstream>
41 #include <cmath>
42 #include <complex>
43 #include <iomanip>
44 #include <vector>
45 #include <algorithm>
46 #include <memory>
47 #include <numeric>
48 #include <functional>
49 #include <stdlib.h>
50 #include <unistd.h>
51 #include <random>
52 #include <map>
53 #include <omp.h>
54 #include <stdio.h>
55 #include <time.h>
56 #include <fcntl.h>
57 #include <ctype.h>
58 #include <sys/stat.h>
59 #include <errno.h>
60 
61 #ifdef LINUX
62 #include "sys/types.h"
63 #include "sys/sysinfo.h"
64 #endif
65 
66 // Save compiler switches
67 #pragma GCC diagnostic push
68 #pragma GCC diagnostic ignored "-Wpedantic"
69 #pragma GCC diagnostic ignored "-Wparentheses"
70 #pragma GCC diagnostic ignored "-Wmisleading-indentation"
71 #pragma GCC diagnostic ignored "-Wunused-local-typedefs"
72 #pragma GCC diagnostic ignored "-Wunused-variable"
73 
75 #include <gsl/gsl_errno.h>
76 #include <gsl/gsl_deriv.h>
77 #include <gsl/gsl_integration.h>
78 #include <gsl/gsl_fit.h>
79 #include <gsl/gsl_math.h>
80 #include <gsl/gsl_monte_vegas.h>
81 #include <gsl/gsl_vector.h>
82 #include <gsl/gsl_spline.h>
83 #include <gsl/gsl_interp2d.h>
84 #include <gsl/gsl_spline2d.h>
85 #include <gsl/gsl_roots.h>
86 #include <gsl/gsl_min.h>
87 #include <gsl/gsl_histogram.h>
88 #include <gsl/gsl_histogram2d.h>
89 #include <gsl/gsl_rng.h>
90 #include <gsl/gsl_fft_real.h>
91 #include <gsl/gsl_fft_halfcomplex.h>
92 #include <gsl/gsl_multimin.h>
93 #include <gsl/gsl_matrix.h>
94 #include <gsl/gsl_linalg.h>
95 #include <gsl/gsl_eigen.h>
96 #include <gsl/gsl_cblas.h>
97 #include <gsl/gsl_sf.h>
98 #include <gsl/gsl_sf_bessel.h>
99 #include <gsl/gsl_sf_legendre.h>
100 #include <gsl/gsl_sf_expint.h>
101 #include <gsl/gsl_statistics_double.h>
102 #include <gsl/gsl_poly.h>
103 #include <gsl/gsl_sf_erf.h>
104 #include <gsl/gsl_bspline.h>
105 #include <gsl/gsl_multifit.h>
107 
109 #include <fftw3.h>
111 
113 #include <boost/numeric/odeint.hpp>
114 #include <boost/math/special_functions/binomial.hpp>
115 #include <boost/math/special_functions/beta.hpp>
117 
119 #include <Eigen/Dense>
121 
122 // Restore compiler switches
123 #pragma GCC diagnostic pop
124 
125 
126 
133 namespace cbl {
134 
144  class Path
145  {
146 
148  std::string m_DirCosmo;
149 
151  std::string m_DirLoc;
152 
153 
154  public:
155 
160 
165  Path ();
166 
170  ~Path () = default;
171 
178  inline std::string DirCosmo () { return m_DirCosmo; }
179 
185  inline std::string DirLoc () { return m_DirLoc; }
186 
195  inline void SetDirs (const std::string input_DirCosmo, const std::string input_DirLoc="./")
196  { m_DirCosmo = input_DirCosmo; m_DirLoc = input_DirLoc; }
197 
208  std::string fullpath (std::string path, const bool isDir=true);
209 
210  };
211 
212 }
213 
214 
215 #endif
The class Path.
Definition: Path.h:145
std::string m_DirLoc
local directory of the main code
Definition: Path.h:151
std::string DirCosmo()
get the directory where the CosmoBolognaLbi are stored
Definition: Path.h:178
std::string fullpath(std::string path, const bool isDir=true)
substitute ~ with the full path
Definition: Path.cpp:45
std::string m_DirCosmo
directory where the CosmoBolognaLib are stored
Definition: Path.h:148
~Path()=default
default destructor
void SetDirs(const std::string input_DirCosmo, const std::string input_DirLoc="./")
set the default directories
Definition: Path.h:195
std::string DirLoc()
get the local directory
Definition: Path.h:185
Path()
default constructor
Definition: Path.cpp:38
The global namespace of the CosmoBolognaLib
Definition: CAMB.h:38