SEVN
Loading...
Searching...
No Matches
lookup_and_phases.h
Go to the documentation of this file.
1//
2// Created by spera on 11/02/19.
3//
4
5#ifndef SEVN_LOOKUP_AND_PHASES_H
6#define SEVN_LOOKUP_AND_PHASES_H
7
8#include <utility>
9#include <vector>
10#include <map>
11#include <string>
12
13class Orbital_change;
14
15
16
17namespace Lookup{
18
19 enum Tables {
20 _Time = 0,
39 };
40
42 enum Phases {
52 };
53
63 };
64
65 enum Material {
66 H = 0,
74 };
75
76 //Different remnants have different way to handle property::remnant
78 enum Remnants {
89 };
90
92 _hdf5 = 0,
97 };
98
99 enum WindsMode {
104 };
105
106 enum RLMode {
112 };
113
118 };
119
120 enum GWMode {
123 };
124
125 enum MixMode {
128 };
129
133 };
134
135 enum CEMode {
138 };
139
140 /*Vector containing available xspin modes*/
141 const std::vector<std::string> xspinmodes = {"geneva", "mesa", "fuller", "maxwellian", "zeros", "accretion", "disabled"};
142
149 _new = 0,
151 _Niop
152 };
153
179 SNIa
180 };
181
184 enum DTout_type : unsigned int {
193 };
194
195
196 //TODO Make an input map also for single stellar evolution?
197
198
199 //GI 81219: Map to handle the output options
200 typedef std::map<std::string, OutputOption > OUTPUTMAP;
201 extern const OUTPUTMAP outputmap;
202
203
204 std::string literal(Phases A); //converts phases to strings
205 std::string literal(Remnants A); //converts phases to strings
206 std::string literal(EventsList A); //convert events to strings
207
208
209 /***************************************************
210 * GI 230120: Map to handle the input options
211 * This part handle the input params for the binary evolution.
212 * All the possibile modality are reported in the enum InputBinaryOption.
213 * I attached to the modalities the expected number of parameters to read from the file
214 * to be able to properly handle the possible errors and exceptions.
215 * This info is stored in the map INPUTMAPBIN_PARAM.
216 * Finally the map INPUTMAPBIN maps a string that can be given as option in io.load to
217 * a pair containing the Input modality and the associated number of expected parameters.
218 **************************************************/
219 //GI 230120: Map to manage the input options
220 typedef std::pair<InputBinaryOption,int> _INPAIR; //PAIR INPUT OPTION - NUMBER OF EXPECTED INPUT PARAMETERS
221 typedef std::map<InputBinaryOption, int> INPUTMAPBIN_NPARAM; //Map between Input option and Number of expected input parameters
222 typedef std::map<std::string, _INPAIR> INPUTMAPBIN; //MAP string - PAIR (Input Option, N expected)
223 //They are defined in cpp
224 extern const INPUTMAPBIN inputmapbin;
226 /***************************************************/
227
228
229 //GI 210220: Map to handle the binary process options
230 typedef std::map<std::string, WindsMode > WINDSMAP;
231 typedef std::map<std::string, RLMode > RLMAP;
232 typedef std::map<std::string, TidesMode > TIDESMAP;
233 typedef std::map<std::string, GWMode > GWMAP;
234 typedef std::map<std::string, RLMode > RLMAP;
235 typedef std::map<std::string, MixMode > MIXMAP;
236 typedef std::map<std::string, SNKickMode > SNKMAP;
237 typedef std::map<std::string, CEMode > CEMAP;
238 //These are defined in cpp
239 extern const WINDSMAP windsmap;
240 extern const RLMAP rlmap;
241 extern const TIDESMAP tidesmap;
242 extern const GWMAP gwmap;
243 extern const RLMAP rlmap;
244 extern const MIXMAP mixmap;
245 extern const SNKMAP snkmap;
246 extern const CEMAP cemap;
247 //These are defined in static_main.h
248 typedef std::map<WindsMode, std::string> WINDSMAP_NAME;
249 extern const WINDSMAP_NAME windsmap_name;
250 typedef std::map<TidesMode, std::string> TIDESMAP_NAME;
251 extern const TIDESMAP_NAME tidesmap_name;
252 typedef std::map<GWMode, std::string> GW_NAME;
253 extern const GW_NAME gwmap_name;
254 typedef std::map<RLMode, std::string> RL_NAME;
255 extern const RL_NAME rlmap_name;
256 typedef std::map<MixMode, std::string> MIX_NAME;
257 extern const MIX_NAME mixmap_name;
258 typedef std::map<SNKickMode, std::string> SNK_NAME;
259 extern const SNK_NAME snkmap_name;
260 typedef std::map<CEMode , std::string> CE_NAME;
261 extern const CE_NAME cemap_name;
262
263
264 typedef std::map<std::string, Tables> FILEMAP;
265 extern const FILEMAP filemap; //filemap containing all the required tables
266 extern const FILEMAP filemap_optional; //Filemap containing all the tables that are optional
267
268
269}
270
271
272#endif //SEVN_LOOKUP_AND_PHASES_H
Definition: star.h:2602
Definition: Orbit.h:39
Definition: lookup_and_phases.h:17
const GWMAP gwmap
Definition: lookup_and_phases.cpp:172
std::map< std::string, GWMode > GWMAP
Definition: lookup_and_phases.h:233
std::map< std::string, MixMode > MIXMAP
Definition: lookup_and_phases.h:235
CEMode
Definition: lookup_and_phases.h:135
@ _CEdisabled
Definition: lookup_and_phases.h:137
@ _CEEnergy
Definition: lookup_and_phases.h:136
const GW_NAME gwmap_name
GW.
Definition: static_main.h:409
Remnants
NOTICE, the order is important (mass ordered): WD, NS, BH.
Definition: lookup_and_phases.h:78
@ COWD
Definition: lookup_and_phases.h:83
@ HeWD
Definition: lookup_and_phases.h:82
@ ONeWD
Definition: lookup_and_phases.h:84
@ Nremnants
Definition: lookup_and_phases.h:88
@ NS_ECSN
Definition: lookup_and_phases.h:85
@ NS_CCSN
Definition: lookup_and_phases.h:86
@ Zombie
Definition: lookup_and_phases.h:79
@ NotARemnant
Definition: lookup_and_phases.h:81
@ BH
Definition: lookup_and_phases.h:87
std::map< std::string, CEMode > CEMAP
Definition: lookup_and_phases.h:237
const TIDESMAP_NAME tidesmap_name
Tides.
Definition: static_main.h:397
OutputOption
Definition: lookup_and_phases.h:91
@ _binary
Definition: lookup_and_phases.h:95
@ _ascii
Definition: lookup_and_phases.h:93
@ _csv
Definition: lookup_and_phases.h:94
@ _Noption
Definition: lookup_and_phases.h:96
@ _hdf5
Definition: lookup_and_phases.h:92
Phases
NOTICE: The order is important from less evolved to more evolved.
Definition: lookup_and_phases.h:42
@ TerminalMainSequence
Definition: lookup_and_phases.h:45
@ ShellHeBurning
Definition: lookup_and_phases.h:49
@ Nphases
Definition: lookup_and_phases.h:51
@ ShellHBurning
Definition: lookup_and_phases.h:46
@ PreMainSequence
Definition: lookup_and_phases.h:43
@ Remnant
Definition: lookup_and_phases.h:50
@ MainSequence
Definition: lookup_and_phases.h:44
@ CoreHeBurning
Definition: lookup_and_phases.h:47
@ TerminalCoreHeBurning
Definition: lookup_and_phases.h:48
const FILEMAP filemap
Definition: lookup_and_phases.cpp:69
std::map< std::string, SNKickMode > SNKMAP
Definition: lookup_and_phases.h:236
TidesMode
Definition: lookup_and_phases.h:114
@ _Tdisabled
Definition: lookup_and_phases.h:117
@ _Tsimple_notab
Definition: lookup_and_phases.h:116
@ _Tsimple
Definition: lookup_and_phases.h:115
std::map< std::string, Tables > FILEMAP
Definition: lookup_and_phases.h:264
std::map< InputBinaryOption, int > INPUTMAPBIN_NPARAM
Definition: lookup_and_phases.h:221
std::map< std::string, RLMode > RLMAP
Definition: lookup_and_phases.h:231
std::map< std::string, WindsMode > WINDSMAP
Definition: lookup_and_phases.h:230
std::map< GWMode, std::string > GW_NAME
Definition: lookup_and_phases.h:252
Tables
Definition: lookup_and_phases.h:19
@ _Nsup
Definition: lookup_and_phases.h:33
@ _Phase
Definition: lookup_and_phases.h:28
@ _HEsup
Definition: lookup_and_phases.h:31
@ _Osup
Definition: lookup_and_phases.h:34
@ _Hsup
Definition: lookup_and_phases.h:30
@ _Qconv
Definition: lookup_and_phases.h:35
@ _Tconv
Definition: lookup_and_phases.h:37
@ _MHE
Definition: lookup_and_phases.h:23
@ _MCO
Definition: lookup_and_phases.h:24
@ _Inertia
Definition: lookup_and_phases.h:29
@ _Time
Definition: lookup_and_phases.h:20
@ _Depthconv
Definition: lookup_and_phases.h:36
@ _Radius
Definition: lookup_and_phases.h:22
@ _Mass
Definition: lookup_and_phases.h:21
@ _RHE
Definition: lookup_and_phases.h:25
@ _RCO
Definition: lookup_and_phases.h:26
@ _Lumi
Definition: lookup_and_phases.h:27
@ _Ntables
Definition: lookup_and_phases.h:38
@ _Csup
Definition: lookup_and_phases.h:32
std::map< CEMode, std::string > CE_NAME
Definition: lookup_and_phases.h:260
const SNKMAP snkmap
Definition: lookup_and_phases.cpp:188
const INPUTMAPBIN inputmapbin
Definition: lookup_and_phases.cpp:112
const FILEMAP filemap_optional
Definition: lookup_and_phases.cpp:78
DTout_type
Definition: lookup_and_phases.h:184
@ _DTEND
Definition: lookup_and_phases.h:190
@ _DTEVNTRLO
Definition: lookup_and_phases.h:192
@ _DTUNKNOWN
Definition: lookup_and_phases.h:185
@ _DTVAL
Definition: lookup_and_phases.h:186
@ _DTEVNT
Definition: lookup_and_phases.h:191
@ _DTLIST
Definition: lookup_and_phases.h:187
@ _DTALL
Definition: lookup_and_phases.h:189
@ _DTGENINTERVAL
Definition: lookup_and_phases.h:188
SNExplosionType
Definition: lookup_and_phases.h:54
@ Unknown
Definition: lookup_and_phases.h:55
@ Ia
Definition: lookup_and_phases.h:60
@ ElectronCapture
Definition: lookup_and_phases.h:56
@ PPISN
Definition: lookup_and_phases.h:58
@ NSNexplosiontypes
Definition: lookup_and_phases.h:62
@ CoreCollapse
Definition: lookup_and_phases.h:57
@ PISN
Definition: lookup_and_phases.h:59
@ WDformation
Definition: lookup_and_phases.h:61
WindsMode
Definition: lookup_and_phases.h:99
@ _WFaniAD
Definition: lookup_and_phases.h:101
@ _WHurley
Definition: lookup_and_phases.h:100
@ _WFaniDE
Definition: lookup_and_phases.h:102
@ _Wdisabled
Definition: lookup_and_phases.h:103
std::map< std::string, _INPAIR > INPUTMAPBIN
Definition: lookup_and_phases.h:222
InputBinaryOption
Definition: lookup_and_phases.h:148
@ _new
Definition: lookup_and_phases.h:149
@ _legacy
Definition: lookup_and_phases.h:150
@ _Niop
Definition: lookup_and_phases.h:151
MixMode
Definition: lookup_and_phases.h:125
@ _Mixsimple
Definition: lookup_and_phases.h:126
@ _Mixdisabled
Definition: lookup_and_phases.h:127
const WINDSMAP_NAME windsmap_name
std::map< MixMode, std::string > MIX_NAME
Definition: lookup_and_phases.h:256
SNKickMode
Definition: lookup_and_phases.h:130
@ _SNKickdisabled
Definition: lookup_and_phases.h:132
@ _SNKickHurley
Definition: lookup_and_phases.h:131
Material
Definition: lookup_and_phases.h:65
@ CO
Definition: lookup_and_phases.h:68
@ Nmaterial
Definition: lookup_and_phases.h:73
@ He
Definition: lookup_and_phases.h:67
@ ONe
Definition: lookup_and_phases.h:69
@ Neutron
Definition: lookup_and_phases.h:70
@ BHmaterial
Definition: lookup_and_phases.h:71
@ H
Definition: lookup_and_phases.h:66
@ Unknownmaterial
Definition: lookup_and_phases.h:72
const OUTPUTMAP outputmap
Definition: lookup_and_phases.cpp:92
std::map< RLMode, std::string > RL_NAME
Definition: lookup_and_phases.h:254
const INPUTMAPBIN_NPARAM inputmapbin_nparam
Definition: lookup_and_phases.cpp:106
const WINDSMAP windsmap
Definition: lookup_and_phases.cpp:121
std::map< TidesMode, std::string > TIDESMAP_NAME
Definition: lookup_and_phases.h:250
const std::vector< std::string > xspinmodes
Definition: lookup_and_phases.h:141
std::map< WindsMode, std::string > WINDSMAP_NAME
Definition: lookup_and_phases.h:248
const RLMAP rlmap
Definition: lookup_and_phases.h:243
RLMode
Definition: lookup_and_phases.h:106
@ _RLHurleymod
Definition: lookup_and_phases.h:109
@ _RLHurley
Definition: lookup_and_phases.h:107
@ _RLdisabled
Definition: lookup_and_phases.h:111
@ _RLHurleyBSE
Definition: lookup_and_phases.h:108
@ _RLHurleyprop
Definition: lookup_and_phases.h:110
std::string literal(Phases A)
Definition: lookup_and_phases.cpp:8
std::map< std::string, TidesMode > TIDESMAP
Definition: lookup_and_phases.h:232
const MIX_NAME mixmap_name
Definition: static_main.h:434
const CE_NAME cemap_name
Definition: static_main.h:452
const TIDESMAP tidesmap
Definition: lookup_and_phases.cpp:157
std::map< SNKickMode, std::string > SNK_NAME
Definition: lookup_and_phases.h:258
const SNK_NAME snkmap_name
Definition: static_main.h:443
const CEMAP cemap
Definition: lookup_and_phases.cpp:197
std::pair< InputBinaryOption, int > _INPAIR
Definition: lookup_and_phases.h:220
const RL_NAME rlmap_name
Definition: static_main.h:419
const MIXMAP mixmap
Definition: lookup_and_phases.cpp:181
std::map< std::string, OutputOption > OUTPUTMAP
Definition: lookup_and_phases.h:200
GWMode
Definition: lookup_and_phases.h:120
@ _GWPeters
Definition: lookup_and_phases.h:121
@ _GWdisabled
Definition: lookup_and_phases.h:122
EventsList
Definition: lookup_and_phases.h:157
@ RLOBegin
Definition: lookup_and_phases.h:163
@ Merger
Definition: lookup_and_phases.h:167
@ ChangeRemnant
Definition: lookup_and_phases.h:160
@ RLOB_CE_Merger
Definition: lookup_and_phases.h:171
@ RLOB_Swallowed
Definition: lookup_and_phases.h:176
@ RLOB_CE
Definition: lookup_and_phases.h:170
@ Collision
Definition: lookup_and_phases.h:165
@ NoEvent
Definition: lookup_and_phases.h:158
@ SNBroken
Definition: lookup_and_phases.h:178
@ Collision_CE_Merger
Definition: lookup_and_phases.h:174
@ GWBegin
Definition: lookup_and_phases.h:162
@ ChangePhase
Definition: lookup_and_phases.h:159
@ RLOEnd
Definition: lookup_and_phases.h:164
@ CE
Definition: lookup_and_phases.h:166
@ SNIa
Definition: lookup_and_phases.h:179
@ RLOB_Merger
Definition: lookup_and_phases.h:169
@ Swallowed
Definition: lookup_and_phases.h:175
@ Collision_CE
Definition: lookup_and_phases.h:173
@ Collision_Merger
Definition: lookup_and_phases.h:172
@ CE_Merger
Definition: lookup_and_phases.h:168
@ GW_Merger
Definition: lookup_and_phases.h:177
@ QHE
Definition: lookup_and_phases.h:161