Gyoto
GyotoDefs.h
Go to the documentation of this file.
1 
5 /*
6  Copyright 2011 Thibaut Paumard
7 
8  This file is part of Gyoto.
9 
10  Gyoto is free software: you can redistribute it and/or modify
11  it under the terms of the GNU General Public License as published by
12  the Free Software Foundation, either version 3 of the License, or
13  (at your option) any later version.
14 
15  Gyoto is distributed in the hope that it will be useful,
16  but WITHOUT ANY WARRANTY; without even the implied warranty of
17  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18  GNU General Public License for more details.
19 
20  You should have received a copy of the GNU General Public License
21  along with Gyoto. If not, see <http://www.gnu.org/licenses/>.
22  */
23 
24 #ifndef __GyotoDefs_H_
25 #define __GyotoDefs_H_
26 
27 
28 /* Typedef for various Gyoto data types */
29 namespace Gyoto {
38  typedef unsigned int SpectroKind_t;
39 #define GYOTO_SPECTRO_KIND_NONE 0
40 #define GYOTO_SPECTRO_KIND_FREQ 1
41 #define GYOTO_SPECTRO_KIND_FREQLOG 2
42 #define GYOTO_SPECTRO_KIND_WAVE 3
43 #define GYOTO_SPECTRO_KIND_WAVELOG 4
44 
45 
79  typedef unsigned int Quantity_t;
80 /* Generic */
81 #define GYOTO_QUANTITY_INTENSITY 1
82 #define GYOTO_QUANTITY_EMISSIONTIME 2
83 #define GYOTO_QUANTITY_MIN_DISTANCE 4
84 #define GYOTO_QUANTITY_FIRST_DMIN 8
85 #define GYOTO_QUANTITY_REDSHIFT 16
86 #define GYOTO_QUANTITY_IMPACTCOORDS 32
87 #define GYOTO_QUANTITY_SPECTRUM 512
88 #define GYOTO_QUANTITY_BINSPECTRUM 1024
89 /* Astrobj-specific */
90 #define GYOTO_QUANTITY_USER1 32768
91 #define GYOTO_QUANTITY_USER2 16384
92 #define GYOTO_QUANTITY_USER3 8192
93 #define GYOTO_QUANTITY_USER4 4096
94 #define GYOTO_QUANTITY_USER5 2048
95 
99  typedef unsigned int Verbosity_t;
100 #define GYOTO_DEFAULT_DEBUG_MODE 0
101 #define GYOTO_QUIET_VERBOSITY 1
102 #define GYOTO_SEVERE_VERBOSITY 3
103 #define GYOTO_DEFAULT_VERBOSITY 5
104 #define GYOTO_INFO_VERBOSITY 10
105 #define GYOTO_DEBUG_VERBOSITY 3000
106 
107 #define GYOTO_QUIET if (Gyoto::verbose() >= GYOTO_QUIET_VERBOSITY) cout
108 #define GYOTO_SEVERE if(Gyoto::verbose()>=GYOTO_SEVERE_VERBOSITY)cerr<<"SEVERE: "
109 #define GYOTO_WARNING if(Gyoto::verbose()>=GYOTO_SEVERE_VERBOSITY)cerr<<"WARNING: "
110 #define GYOTO_MSG if (Gyoto::verbose() >= GYOTO_DEFAULT_VERBOSITY) cout
111 #define GYOTO_INFO if (Gyoto::verbose() >= GYOTO_INFO_VERBOSITY) cerr<<"INFO: "
112 #define GYOTO_DEBUG if (Gyoto::debug()) cerr << "DEBUG: " \
113  << __PRETTY_FUNCTION__ << ": "
114 
119  typedef unsigned int CoordKind_t;
120 #define GYOTO_COORDKIND_UNSPECIFIED 0
121 #define GYOTO_COORDKIND_CARTESIAN 1
122 #define GYOTO_COORDKIND_SPHERICAL 2
123 
124 }
125 
126 /* Default values for various things */
127 
128 #define GYOTO_DEFAULT_X_SIZE 1024
129 
130 
136 #define GYOTO_DEFAULT_DELTA 0.01
137 
142 #define GYOTO_T_TOL 1e-4
143 
144 /* Plugins Stuff */
145 #ifndef GYOTO_DEFAULT_PLUGINS
146 #define GYOTO_DEFAULT_PLUGINS "stdplug,nofail:lorene"
147 #endif
148 
149 #ifndef GYOTO_PLUGIN_SFX
150 #ifdef __APPLE__
151 #define GYOTO_PLUGIN_SFX "dylib"
152 #else
153 #define GYOTO_PLUGIN_SFX "so"
154 #endif
155 #endif
156 
157 /* Physical constants */
158 
160 #define GYOTO_C 299792458.
161 
162 #define GYOTO_C_CGS 2.99792458e10
163 
164 #define GYOTO_G 6.67428e-11
165 
166 #define GYOTO_G_CGS 6.67428e-8
167 
168 #define GYOTO_G_OVER_C_SQUARE 7.426138e-28
169 
170 #define GYOTO_PLANCK 6.62606896e-34
171 #define GYOTO_PLANCK_CGS 6.62606896e-27
172 
173 #define GYOTO_PLANCK_OVER_C_SQUARE 7.372496e-51
174 
175 #define GYOTO_BOLTZMANN 1.3806504e-23
176 
177 #define GYOTO_BOLTZMANN_CGS 1.3806504e-16
178 
179 #define GYOTO_PLANCK_OVER_BOLTZMANN 4.7992373e-11
180 
181 #define GYOTO_GAS_CST 8.3144621
182 
183 #define GYOTO_GAS_CST_CGS 8.3144621e7
184 
185 #define GYOTO_AVOGADRO 6.0221413e23
186 
187 #define GYOTO_THOMSON_CGS 6.6524e-25
188 
189 #define GYOTO_ALPHA_F 0.00729927
190 
191 #define GYOTO_PROTON_MASS_CGS 1.67262158e-24
192 
193 #define GYOTO_ELECTRON_MASS_CGS 9.10938188e-28
194 
195 #define GYOTO_ELECTRON_CLASSICAL_RADIUS_CGS 2.8179e-13
196 
197 #define GYOTO_ELEMENTARY_CHARGE_CGS 4.80320427e-10
198 
199 #define GYOTO_EULER_MASCHERONI 0.577216
200 
201 #define GYOTO_ATOMIC_MASS_UNIT_CGS 1.660537781e-24
202 
203 
204 
206 #define GYOTO_SUN_MASS 1.98843e30
207 
208 #define GYOTO_SUN_MASS_CGS 1.98843e33
209 
210 #define GYOTO_SUN_RADIUS 6.955e8
211 
212 #define GYOTO_KPC 3.08568025e19
213 
214 #define GYOTO_ASTRONOMICAL_UNIT 1.49597870700e11
215 
216 #define GYOTO_LIGHT_YEAR 9.4607304725808e15
217 
219 #define GYOTO_RADEG 57.2957795130823
220 #define GYOTO_DEGRAD 0.0174532925199433
221 #define GYOTO_MINRAD 2.908882086657216e-04
222 #define GYOTO_SECRAD 4.848136811095360e-06
223 #define GYOTO_MASRAD 4.848136811095360e-09
224 #define GYOTO_MUASRAD 4.848136811095360e-12
225 
227 #define GYOTO_SCREEN_DMAX 1e7
228 
229 //For displays with setw and setprecision
230 #define GYOTO_PREC 15
231 #define GYOTO_WIDTH 25
232 
233 #endif