GLAMERDOC++
Gravitational Lensing Code Library
SLsimLib
include
standard.h
Go to the documentation of this file.
1
4
#ifndef _STANDARD_DECLARE_
5
#define _STANDARD_DECLARE_
6
7
//#define NDEBUG // Un-commenting this line will remove all assert() statements in the executable.
8
9
#include <iostream>
10
#include <cstdio>
11
#include <cstdlib>
12
#include <fstream>
13
#include <cfloat>
14
#include <stdexcept>
15
#ifdef _OPENMP
16
#include <omp.h>
17
#endif
18
//#include <pthread.h>
19
20
#include <list>
21
#include <math.h>
22
#include <assert.h>
23
#include <time.h>
24
#include <limits>
25
#include <cstring>
26
#include <string>
27
#include <sstream>
28
#include <vector>
29
#include <valarray>
30
31
#include <nr.h>
32
#include <nrD.h>
33
//#include <utilities.h>
34
35
#include <cosmo.h>
36
#include <halo.h>
37
38
#ifndef PI
39
#define PI M_PI
40
#endif
41
42
#ifndef Grav
43
#define Grav 4.7788e-20 // G/c^2 in Mpc
44
#endif
45
46
#ifndef arcminTOradians
47
#define arcminTOradians 0.0002908882086657216 // convert arcesconds to radians
48
#endif
49
50
#ifndef arcsecTOradians
51
#define arcsecTOradians 0.000004848136811 // convert arcesconds to radians
52
#endif
53
54
#ifndef degreesTOradians
55
#define degreesTOradians 0.01745329251994 // convert degrees to radians
56
#endif
57
58
#ifndef hplanck
59
#define hplanck 6.626068e-27 // in erg*sec
60
#endif
61
62
#ifndef inv_hplanck
63
#define inv_hplanck 1.50919e26 // in 1/(erg*sec)
64
#endif
65
66
#ifndef kmpersecTOmpcperday
67
#define kmpersecTOmpcperday 2.80003e-15
68
#endif
69
70
#ifndef error_message
71
#define error_message
72
#define ERROR_MESSAGE() std::cout << "ERROR: file: " << __FILE__ << " line: " << __LINE__ << std::endl;
73
#endif
74
75
#ifndef line_message
76
#define line_message
77
#define PRINT_LINE(msg) std::cout << "[file: " << __FILE__ << " line: " << __LINE__ << "]" << msg << std::endl;
78
#endif
79
80
#ifndef boo_declare
81
#define boo_declare
82
typedef
enum
{NO, YES, MAYBE} Boo;
83
#endif
84
85
#ifndef lensquant_declare
86
#define lensquant_declare
87
89
enum class
LensingVariable
{
90
DELAYT
91
,
ALPHA
92
,
ALPHA1
93
,
ALPHA2
94
,
KAPPA
95
,
GAMMA
96
,
GAMMA1
97
,
GAMMA2
98
,
GAMMA3
99
,
INVMAG
100
,
PHI
101
,
SurfBrightness
102
,
EigenV
103
} ;
104
#endif
105
106
#ifndef PosType_declare
107
#define PosType_declare
108
typedef
double
PosType;
109
#endif
110
111
#ifndef IndexType_declare
112
#define IndexType_declare
113
typedef
size_t
IndexType;
114
#endif
115
116
#ifndef swap_declare
117
#define swap_declare
118
#define SWAP(a,b) temp=(a);(a)=(b);(b)=temp;
119
#endif
120
121
#ifndef treeNBdim
122
#define treeNBdim 2 // dimension of boxes in tree
123
#endif
124
125
//#ifdef DOUBLE_PRECISION
126
typedef
double
KappaType;
127
//#else
128
//typedef float KappaType;
129
//#endif
130
131
// unit test definitions
132
// GlamerTest overrides these as necessary
133
#ifndef GLAMER_TEST
134
#define GLAMER_TEST_USES(t)
135
#define GLAMER_TEST_FRIEND(t)
136
#endif
137
138
#ifndef MpcToSeconds
139
#define MpcToSeconds (3.085677e22 / 2.99792458e8)
140
// Computed as MpcToMeter(m) / SpeedOfLight(m.s^{-1})
141
#endif
142
143
#ifndef SecondToDays
144
#define SecondToDays (1. / 86400.)
145
#endif
146
147
#ifndef SecondToYears
148
#define SecondToYears (1. / 86400. / 365.25)
149
// Taking 365.25 days per year.
150
#endif
151
152
#endif
153
154
155
156
LensingVariable::GAMMA3
@ GAMMA3
third component of shear
LensingVariable::PHI
@ PHI
lensing potential
LensingVariable::ALPHA2
@ ALPHA2
y component of deflection
LensingVariable::GAMMA
@ GAMMA
magnitude of shear
LensingVariable::KAPPA
@ KAPPA
convergence
LensingVariable::ALPHA
@ ALPHA
magnitude of deflection in radians
LensingVariable::SurfBrightness
@ SurfBrightness
Surface brightness.
LensingVariable::EigenV
@ EigenV
angle of the eigenvector of the magnification matrix with the smallest absolute eigenvalue
LensingVariable::ALPHA1
@ ALPHA1
x component of deflection
LensingVariable::GAMMA2
@ GAMMA2
second component of shear
LensingVariable::DELAYT
@ DELAYT
time delay
LensingVariable::GAMMA1
@ GAMMA1
first component of shear
LensingVariable::INVMAG
@ INVMAG
inverse of magnification
LensingVariable
LensingVariable
output lensing variables
Definition:
standard.h:89
Generated on Sun Sep 27 2026 14:12:56 for GLAMERDOC++ by
1.8.18