-
Notifications
You must be signed in to change notification settings - Fork 1
/
input.f90
338 lines (170 loc) · 9.09 KB
/
input.f90
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
Module input
use fiducial
Implicit none
Contains
subroutine test_input_parameters()
Implicit none
Logical :: dir_exist ! CHECK EXISTENCE OF FILES
inquire(file='./output',exist=dir_exist)
If (dir_exist) then
continue
Else
call system('mkdir output')
End if
inquire(file='./figures',exist=dir_exist)
If (dir_exist) then
inquire(file='./figures/background',exist=dir_exist)
If (dir_exist) then
continue
Else
call system('mkdir figures/background')
End if
inquire(file='./figures/perturbations',exist=dir_exist)
If (dir_exist) then
continue
Else
call system('mkdir figures/perturbations')
End if
Else
call system('mkdir figures')
call system('mkdir figures/background')
call system('mkdir figures/perturbations')
End if
open(UNIT_EXE_FILE,file=Execution_information)
If (MG_parametrisation .eq. 'GR_LAMBDA') then
open(UNIT_OUTPUT_FILE,file=NUMERICAL_SOLUTION_GR_LAMBDA)
Else if (MG_parametrisation .eq. 'GR_DE') then
open(UNIT_OUTPUT_FILE,file=NUMERICAL_SOLUTION_GR_DE)
Else
open(UNIT_OUTPUT_FILE,file=NUMERICAL_SOLUTION)
End if
open(UNIT_OUTPUT_FILE2,file=ANALYTICAL_SOLUTION)
write(UNIT_EXE_FILE,*) 'STARTING ANALYSIS. COMMON PARAMETERS FOR CURRENT RUN ARE AS FOLLOWS: '
write(UNIT_EXE_FILE,*) ' '
If (Omega_m .gt. 1.d0) then
write(UNIT_EXE_FILE,*) 'MATTER DENSITY PARAMETER IS GREATER THAN 1. ANALYSIS ASSUMES FLAT UNIVERSE'
stop
Else if (Omega_m .lt. 0.d0) then
write(UNIT_EXE_FILE,*) 'MATTER DENSITY PARAMETER IS NEGATIVE'
stop
Else
write(UNIT_EXE_FILE,*) 'MATTER DENSITY PARAMETER: ', Omega_m
End if
If (wavenumber_k .lt. 0.d0) then
write(UNIT_EXE_FILE,*) 'WAVENUMBER MUST BE A POSITIVE NUMBER'
stop
Else
If (approach .eq. 'GI') then
write(UNIT_EXE_FILE,*) 'DIMENSIONLESS WAVENUMBER IS: ', dimensionless_wavenumber_K
Else
write(UNIT_EXE_FILE,*) 'WAVENUMBER: ', wavenumber_k, ' Mpc^{-1}'
End if
End if
write(UNIT_EXE_FILE,*) 'HUBBLE CONSTANT IS: ', H0, ' Mpc^{-1}'
If (MG_parametrisation .eq. 'GR_DE') then
write(UNIT_EXE_FILE,*) ''
If ( (dimension_system_ode .eq. 4) .and. (approach .eq. 'EF') ) then
write(UNIT_EXE_FILE,*) 'THIS ANALYSIS ASSUMES GENERAL RELATIVITY AND DARK ENERGY IS MODELLED AS A FLUID: '
write(UNIT_OUTPUT_FILE,*) '# scale_factor \delta_m \delta_de V_m V_de '
Else if ( (dimension_system_ode .eq. 6) .and. (approach .eq. 'EF') ) then
write(UNIT_OUTPUT_FILE,*) '# scale_factor \delta_m \delta_de V_m V_de \phi \psi'
write(UNIT_EXE_FILE,*) 'THIS ANALYSIS ASSUMES GENERAL RELATIVITY AND DARK ENERGY IS MODELLED AS A FLUID: '
write(UNIT_EXE_FILE,*) 'SYSTEM OF EQUATIONS INCLUDES POTENTIALS'
Else
write(UNIT_EXE_FILE,*) 'THIS PARAMETRISATION MUST USE THE EFFECTIVE FLUID APPROACH'
write(UNIT_EXE_FILE,*) 'DIMENSION OF THE SYSTEM OF DIFFERENTIAL EQUATIONS MUST BE 4 OR 6:'
write(UNIT_EXE_FILE,*) '\delta_m, V_m, \delta_de, V_de, \phi, \psi.'
stop
End if
write(UNIT_EXE_FILE,*) 'CONSTANT EQUATION OF STATE: ', w0_fld
write(UNIT_EXE_FILE,*) 'CONSTANT "SOUND SPEED SQUARED": ', cs2_fld
write(UNIT_EXE_FILE,*) 'ANISOSTROPIC STRESS GIVEN BY THE MODEL IN 1402.5993:'
write(UNIT_EXE_FILE,*) 'DEA PARAMETER e_\pi : ', e_pi
write(UNIT_EXE_FILE,*) 'DEA PARAMETER f_\pi : ', f_pi
write(UNIT_EXE_FILE,*) 'DEA PARAMETER g_\pi : ', g_pi
Else if (MG_parametrisation .eq. 'GR_LAMBDA') then
write(UNIT_EXE_FILE,*) ''
If (dimension_system_ode .eq. 4) then
write(UNIT_OUTPUT_FILE,*) '# scale_factor \delta_m V_m \phi_+ \chi'
continue
Else
write(UNIT_EXE_FILE,*) 'DIMENSION OF THE SYSTEM OF DIFFERENTIAL EQUATIONS MUST BE 4:'
write(UNIT_EXE_FILE,*) '\delta_m, V_m, \Phi_+, \chi.'
stop
End if
If (approach .eq. 'EF') then
write(UNIT_EXE_FILE,*) 'EFFECTIVE FLUID APPROACH IS NOT IMPLEMENTED FOR A COSMOLOGICAL CONSTANT'
write(UNIT_EXE_FILE,*) 'BY DEFINITION, IT DOES NOT HAVE PERTURBATIONS'
stop
Else
write(UNIT_EXE_FILE,*) 'USING MODIFICATIONS TO GENERAL RELATIVITY WRITTEN IN TERMS OF \PHI_+ AND \CHI'
End if
write(UNIT_EXE_FILE,*) 'THIS ANALYSIS ASSUMES GENERAL RELATIVITY AND A COSMOLOGICAL CONSTANT'
Else if (MG_parametrisation .eq. 'Savvas') then
write(UNIT_EXE_FILE,*) ''
If ( (dimension_system_ode .eq. 6) .and. (approach .eq. 'EF') ) then
write(UNIT_OUTPUT_FILE,*) '# scale_factor \delta_m \delta_de V_m V_de \phi \psi'
write(UNIT_EXE_FILE,*) 'USING EFFECTIVE FLUID APPROACH'
Else if ( (dimension_system_ode .eq. 5) .and. (approach .eq. 'GI') ) then
write(UNIT_OUTPUT_FILE,*) '# scale_factor \Delta_m \Delta_de Theta_m Theta_de Z'
write(UNIT_EXE_FILE,*) 'USING EFFECTIVE FLUID APPROACH AND GAUGE INVARIANT FORMALISM'
Else if ( (dimension_system_ode .eq. 4) .and. (approach .eq. 'CHI') ) then
write(UNIT_OUTPUT_FILE,*) '# scale_factor \delta_m V_m \phi_+ \chi'
write(UNIT_EXE_FILE,*) 'USING MODIFICATIONS TO GENERAL RELATIVITY WRITTEN IN TERMS OF \PHI_+ AND \CHI'
Else
write(UNIT_EXE_FILE,*) 'DIMENSION OF THE SYSTEM OF DIFFERENTIAL EQUATIONS MUST BE 4, 5 OR 6:'
stop
End if
write(UNIT_EXE_FILE,*) 'THIS ANALYSIS ASSUMES A MODIFICATION TO GENERAL RELATIVITY GIVEN BY THE f(R)'
write(UNIT_EXE_FILE,*) 'PARAMETRISATION IN 1309.1055. THE EQUATION OF STATE DOES NOT EVOLVE WITH TIME; IT IS -1'
write(UNIT_EXE_FILE,*) 'THE PARAMETER alpha IN THIS PARAMETRISATION IS CHOSEN SO THAT THE CONDITION'
write(UNIT_EXE_FILE,*) 'f_R(a=1) = ', fR0, ' BE SATISFIED'
Else if (MG_parametrisation .eq. 'HS_Basilakos') then
write(UNIT_EXE_FILE,*) ''
If ( (dimension_system_ode .eq. 6) .and. (approach .eq. 'EF') ) then
write(UNIT_OUTPUT_FILE,*) '# scale_factor \delta_m \delta_de V_m V_de \phi \psi '
write(UNIT_EXE_FILE,*) 'USING EFFECTIVE FLUID APPROACH'
Else if ( (dimension_system_ode .eq. 4) .and. (approach .eq. 'CHI') ) then
write(UNIT_OUTPUT_FILE,*) '# scale_factor \delta_m V_m \phi_+ \chi'
write(UNIT_EXE_FILE,*) 'USING MODIFICATIONS TO GENERAL RELATIVITY WRITTEN IN TERMS OF \PHI_+ AND \CHI'
Else
write(UNIT_EXE_FILE,*) 'DIMENSION OF THE SYSTEM OF DIFFERENTIAL EQUATIONS MUST BE 4 OR 6:'
stop
End if
write(UNIT_EXE_FILE,*) 'THIS ANALYSIS ASSUMES A MODIFICATION TO GENERAL RELATIVITY GIVEN BY THE f(R)'
write(UNIT_EXE_FILE,*) 'PARAMETRISATION IN 1302.6051 (HU & SAWICKI MODEL). THE EQUATION OF STATE EVOLVES WITH TIME'
write(UNIT_EXE_FILE,*) 'THE PARAMETER b IN THIS PARAMETRISATION IS CHOSEN TO BE:'
write(UNIT_EXE_FILE,*) 'b : ', b_fR
Else if (MG_parametrisation .eq. 'Starobinsky_Basilakos') then
write(UNIT_EXE_FILE,*) ''
If ( (dimension_system_ode .eq. 6) .and. (approach .eq. 'EF') ) then
write(UNIT_OUTPUT_FILE,*) '# scale_factor \delta_m \delta_de V_m '//trim(' ')//&
'V_de \phi \psi \delta_m_prime'
write(UNIT_EXE_FILE,*) 'USING EFFECTIVE FLUID APPROACH'
Else if (dimension_system_ode .eq. 4) then
write(UNIT_OUTPUT_FILE,*) '# scale_factor \delta_m V_m \phi_+ \chi'
write(UNIT_EXE_FILE,*) 'USING MODIFICATIONS TO GENERAL RELATIVITY WRITTEN IN TERMS OF \PHI_+ AND \CHI'
write(UNIT_EXE_FILE,*) 'DIMENSION OF THE SYSTEM OF DIFFERENTIAL EQUATIONS MUST BE 6:'
write(UNIT_EXE_FILE,*) '\delta_m, V_m, \delta_de, V_de, \Phi, \Psi'
write(UNIT_EXE_FILE,*) 'IN THE CURRENT IMPLEMENTATION'
stop
Else
write(UNIT_EXE_FILE,*) 'DIMENSION OF THE SYSTEM OF DIFFERENTIAL EQUATIONS MUST BE 4 OR 6:'
stop
End if
write(UNIT_EXE_FILE,*) 'THIS ANALYSIS ASSUMES A MODIFICATION TO GENERAL RELATIVITY GIVEN BY THE f(R)'
write(UNIT_EXE_FILE,*) 'PARAMETRISATION IN 1302.6051 (STAROBINSKY MODEL). THE EQUATION OF STATE EVOLVES WITH TIME'
write(UNIT_EXE_FILE,*) 'THE PARAMETER b IN THIS PARAMETRISATION IS CHOSEN TO BE:'
write(UNIT_EXE_FILE,*) 'b : ', b_fR
write(UNIT_EXE_FILE,*) 'THIS MODEL IS NOT IMPLEMENTED YET'
stop
Else
write(UNIT_EXE_FILE,*) 'MG_PARAMETRISATION IS NOT IMPLEMENTED. CHECK fiducial.f90. CODE WILL STOP'
stop
End if
If (initial_scale_factor .gt. final_scale_factor) then
write(UNIT_EXE_FILE,*) 'INITIAL SCALE FACTOR MUST BE LESS THAN FINAL SCALE FACTOR'
stop
End if
end subroutine test_input_parameters
End Module input