50 public eftcamb_std_pure_eft
54 type,
extends ( eftcamb_designer_model ) :: eftcamb_std_pure_eft
57 integer :: pureeftmodelomega
59 integer :: pureeftmodelgamma1
60 integer :: pureeftmodelgamma2
61 integer :: pureeftmodelgamma3
62 integer :: pureeftmodelgamma4
63 integer :: pureeftmodelgamma5
64 integer :: pureeftmodelgamma6
67 logical :: pureefthorndeski
70 class( parametrized_function_1d ),
allocatable :: pureeftomega
71 class( parametrized_function_1d ),
allocatable :: pureeftwde
72 class( parametrized_function_1d ),
allocatable :: pureeftgamma1
73 class( parametrized_function_1d ),
allocatable :: pureeftgamma2
74 class( parametrized_function_1d ),
allocatable :: pureeftgamma3
75 class( parametrized_function_1d ),
allocatable :: pureeftgamma4
76 class( parametrized_function_1d ),
allocatable :: pureeftgamma5
77 class( parametrized_function_1d ),
allocatable :: pureeftgamma6
82 procedure :: read_model_selection => eftcambpureeftstdreadmodelselectionfromfile
83 procedure :: allocate_model_selection => eftcambpureeftstdallocatemodelselection
84 procedure :: init_model_parameters => eftcambpureeftstdinitmodelparameters
85 procedure :: init_model_parameters_from_file => eftcambpureeftstdinitmodelparametersfromfile
87 procedure :: compute_param_number => eftcambpureeftstdcomputeparametersnumber
88 procedure :: feedback => eftcambpureeftstdfeedback
89 procedure :: parameter_names => eftcambpureeftstdparameternames
90 procedure :: parameter_names_latex => eftcambpureeftstdparameternameslatex
91 procedure :: parameter_values => eftcambpureeftstdparametervalues
93 procedure :: compute_background_eft_functions => eftcambpureeftstdbackgroundeftfunctions
94 procedure :: compute_secondorder_eft_functions => eftcambpureeftstdsecondordereftfunctions
95 procedure :: compute_dtauda => eftcambpureeftstdcomputedtauda
96 procedure :: compute_adotoa => eftcambpureeftstdcomputeadotoa
97 procedure :: compute_h_derivs => eftcambpureeftstdcomputehubbleder
99 procedure :: additional_model_stability => eftcambpureeftstdadditionalmodelstability
101 end type eftcamb_std_pure_eft
109 subroutine eftcambpureeftstdreadmodelselectionfromfile( self, Ini )
113 class(eftcamb_std_pure_eft) :: self
114 type(tinifile) :: ini
117 self%PureEFTmodelOmega = ini_read_int_file( ini,
'PureEFTmodelOmega' , 0 )
118 self%EFTwDE = ini_read_int_file( ini,
'EFTwDE' , 0 )
119 self%PureEFTmodelGamma1 = ini_read_int_file( ini,
'PureEFTmodelGamma1' , 0 )
120 self%PureEFTmodelGamma2 = ini_read_int_file( ini,
'PureEFTmodelGamma2' , 0 )
121 self%PureEFTmodelGamma3 = ini_read_int_file( ini,
'PureEFTmodelGamma3' , 0 )
122 self%PureEFTmodelGamma4 = ini_read_int_file( ini,
'PureEFTmodelGamma4' , 0 )
123 self%PureEFTmodelGamma5 = ini_read_int_file( ini,
'PureEFTmodelGamma5' , 0 )
124 self%PureEFTmodelGamma6 = ini_read_int_file( ini,
'PureEFTmodelGamma6' , 0 )
126 self%PureEFTHorndeski = ini_read_logical_file( ini,
'PureEFTHorndeski' , .false. )
128 end subroutine eftcambpureeftstdreadmodelselectionfromfile
132 subroutine eftcambpureeftstdallocatemodelselection( self )
136 class(eftcamb_std_pure_eft) :: self
139 if (
allocated(self%PureEFTOmega) )
deallocate(self%PureEFTOmega)
140 select case ( self%PureEFTmodelOmega )
142 allocate( zero_parametrization_1d::self%PureEFTOmega )
144 allocate( constant_parametrization_1d::self%PureEFTOmega )
146 allocate( linear_parametrization_1d::self%PureEFTOmega )
148 allocate( power_law_parametrization_1d::self%PureEFTOmega )
149 call self%PureEFTOmega%set_param_names( [
'EFTOmega0 ',
'EFTOmegaExp'], [
'\Omega_0^{\rm EFT}',
'n^{\rm EFT} '] )
151 allocate( exponential_parametrization_1d::self%PureEFTOmega )
152 call self%PureEFTOmega%set_param_names( [
'EFTOmega0 ',
'EFTOmegaExp'], [
'\Omega_0^{\rm EFT}',
'n^{\rm EFT} '] )
154 write(*,
'(a,I3)')
'No model corresponding to PureEFTmodelOmega =', self%PureEFTmodelOmega
155 write(*,
'(a)')
'Please select an appropriate model.' 158 if (
allocated(self%PureEFTwDE) )
deallocate(self%PureEFTwDE)
159 select case ( self%EFTwDE )
161 allocate( wde_lcdm_parametrization_1d::self%PureEFTwDE )
163 allocate( constant_parametrization_1d::self%PureEFTwDE )
165 allocate( cpl_parametrization_1d::self%PureEFTwDE )
166 call self%PureEFTwDE%set_param_names( [
'EFTw0',
'EFTwa'], [
'w_0',
'w_a'] )
168 allocate( jbp_parametrization_1d::self%PureEFTwDE )
169 call self%PureEFTwDE%set_param_names( [
'EFTw0',
'EFTwa',
'EFTwn'], [
'w_0',
'w_a',
'n ' ] )
171 allocate( turning_point_parametrization_1d::self%PureEFTwDE )
172 call self%PureEFTwDE%set_param_names( [
'EFTw0 ',
'EFTwa ',
'EFTwat'], [
'w_0',
'w_a',
'a_t'] )
174 allocate( taylor_parametrization_1d::self%PureEFTwDE )
175 call self%PureEFTwDE%set_param_names( [
'EFTw0',
'EFTwa',
'EFTw2',
'EFTw3'], [
'w_0',
'w_a',
'w_2',
'w_3'] )
177 write(*,
'(a,I3)')
'No model corresponding to EFTwDE =', self%EFTwDE
178 write(*,
'(a)')
'Please select an appropriate model.' 181 if (
allocated(self%PureEFTGamma1) )
deallocate(self%PureEFTGamma1)
182 select case ( self%PureEFTmodelGamma1 )
184 allocate( zero_parametrization_1d::self%PureEFTGamma1 )
186 allocate( constant_parametrization_1d::self%PureEFTGamma1 )
188 allocate( linear_parametrization_1d::self%PureEFTGamma1 )
190 allocate( power_law_parametrization_1d::self%PureEFTGamma1 )
191 call self%PureEFTGamma1%set_param_names( [
'EFTGamma10 ',
'EFTGamma1Exp'], [
'\gamma_0^{(1) {\rm EFT}} ',
'\gamma_{\rm exp}^{(1) {\rm EFT}}'] )
193 allocate( exponential_parametrization_1d::self%PureEFTGamma1 )
194 call self%PureEFTGamma1%set_param_names( [
'EFTGamma10 ',
'EFTGamma1Exp'], [
'\gamma_0^{(1) {\rm EFT}} ',
'\gamma_{\rm exp}^{(1) {\rm EFT}}'] )
196 write(*,
'(a,I3)')
'No model corresponding to PureEFTmodelGamma1 =', self%PureEFTmodelGamma1
197 write(*,
'(a)')
'Please select an appropriate model.' 200 if (
allocated(self%PureEFTGamma2) )
deallocate(self%PureEFTGamma2)
201 select case ( self%PureEFTmodelGamma2 )
203 allocate( zero_parametrization_1d::self%PureEFTGamma2 )
205 allocate( constant_parametrization_1d::self%PureEFTGamma2 )
207 allocate( linear_parametrization_1d::self%PureEFTGamma2 )
209 allocate( power_law_parametrization_1d::self%PureEFTGamma2 )
210 call self%PureEFTGamma2%set_param_names( [
'EFTGamma20 ',
'EFTGamma2Exp'], [
'\gamma_0^{(2) {\rm EFT}} ',
'\gamma_{\rm exp}^{(2) {\rm EFT}}'] )
212 allocate( exponential_parametrization_1d::self%PureEFTGamma2 )
213 call self%PureEFTGamma2%set_param_names( [
'EFTGamma20 ',
'EFTGamma2Exp'], [
'\gamma_0^{(2) {\rm EFT}} ',
'\gamma_{\rm exp}^{(2) {\rm EFT}}'] )
215 write(*,
'(a,I3)')
'No model corresponding to PureEFTmodelGamma2 =', self%PureEFTmodelGamma2
216 write(*,
'(a)')
'Please select an appropriate model.' 219 if (
allocated(self%PureEFTGamma3) )
deallocate(self%PureEFTGamma3)
220 select case ( self%PureEFTmodelGamma3 )
222 allocate( zero_parametrization_1d::self%PureEFTGamma3 )
224 allocate( constant_parametrization_1d::self%PureEFTGamma3 )
226 allocate( linear_parametrization_1d::self%PureEFTGamma3 )
228 allocate( power_law_parametrization_1d::self%PureEFTGamma3 )
229 call self%PureEFTGamma3%set_param_names( [
'EFTGamma30 ',
'EFTGamma3Exp'], [
'\gamma_0^{(3) {\rm EFT}} ',
'\gamma_{\rm exp}^{(3) {\rm EFT}}'] )
231 allocate( exponential_parametrization_1d::self%PureEFTGamma3 )
232 call self%PureEFTGamma3%set_param_names( [
'EFTGamma30 ',
'EFTGamma3Exp'], [
'\gamma_0^{(3) {\rm EFT}} ',
'\gamma_{\rm exp}^{(3) {\rm EFT}}'] )
234 write(*,
'(a,I3)')
'No model corresponding to PureEFTmodelGamma3 =', self%PureEFTmodelGamma3
235 write(*,
'(a)')
'Please select an appropriate model.' 238 if ( .not. self%PureEFTHorndeski )
then 240 if (
allocated(self%PureEFTGamma4) )
deallocate(self%PureEFTGamma4)
241 select case ( self%PureEFTmodelGamma4 )
243 allocate( zero_parametrization_1d::self%PureEFTGamma4 )
245 allocate( constant_parametrization_1d::self%PureEFTGamma4 )
247 allocate( linear_parametrization_1d::self%PureEFTGamma4 )
249 allocate( power_law_parametrization_1d::self%PureEFTGamma4 )
250 call self%PureEFTGamma4%set_param_names( [
'EFTGamma40 ',
'EFTGamma4Exp'], [
'\gamma_0^{(4) {\rm EFT}} ',
'\gamma_{\rm exp}^{(4) {\rm EFT}}'] )
252 allocate( exponential_parametrization_1d::self%PureEFTGamma4 )
253 call self%PureEFTGamma4%set_param_names( [
'EFTGamma40 ',
'EFTGamma4Exp'], [
'\gamma_0^{(4) {\rm EFT}} ',
'\gamma_{\rm exp}^{(4) {\rm EFT}}'] )
255 write(*,
'(a,I3)')
'No model corresponding to PureEFTmodelGamma4 =', self%PureEFTmodelGamma4
256 write(*,
'(a)')
'Please select an appropriate model.' 259 if (
allocated(self%PureEFTGamma5) )
deallocate(self%PureEFTGamma5)
260 select case ( self%PureEFTmodelGamma5 )
262 allocate( zero_parametrization_1d::self%PureEFTGamma5 )
264 allocate( constant_parametrization_1d::self%PureEFTGamma5 )
266 allocate( linear_parametrization_1d::self%PureEFTGamma5 )
268 allocate( power_law_parametrization_1d::self%PureEFTGamma5 )
269 call self%PureEFTGamma5%set_param_names( [
'EFTGamma50 ',
'EFTGamma5Exp'], [
'\gamma_0^{(5) {\rm EFT}} ',
'\gamma_{\rm exp}^{(5) {\rm EFT}}'] )
271 allocate( exponential_parametrization_1d::self%PureEFTGamma5 )
272 call self%PureEFTGamma5%set_param_names( [
'EFTGamma50 ',
'EFTGamma5Exp'], [
'\gamma_0^{(5) {\rm EFT}} ',
'\gamma_{\rm exp}^{(5) {\rm EFT}}'] )
274 write(*,
'(a,I3)')
'No model corresponding to PureEFTmodelGamma5 =', self%PureEFTmodelGamma5
275 write(*,
'(a)')
'Please select an appropriate model.' 278 if (
allocated(self%PureEFTGamma6) )
deallocate(self%PureEFTGamma6)
279 select case ( self%PureEFTmodelGamma6 )
281 allocate( zero_parametrization_1d::self%PureEFTGamma6 )
283 allocate( constant_parametrization_1d::self%PureEFTGamma6 )
285 allocate( linear_parametrization_1d::self%PureEFTGamma6 )
287 allocate( power_law_parametrization_1d::self%PureEFTGamma6 )
288 call self%PureEFTGamma6%set_param_names( [
'EFTGamma60 ',
'EFTGamma6Exp'], [
'\gamma_0^{(6) {\rm EFT}} ',
'\gamma_{\rm exp}^{(6) {\rm EFT}}'] )
290 allocate( exponential_parametrization_1d::self%PureEFTGamma6 )
291 call self%PureEFTGamma6%set_param_names( [
'EFTGamma60 ',
'EFTGamma6Exp'], [
'\gamma_0^{(6) {\rm EFT}} ',
'\gamma_{\rm exp}^{(6) {\rm EFT}}'] )
293 write(*,
'(a,I3)')
'No model corresponding to PureEFTmodelGamma6 =', self%PureEFTmodelGamma6
294 write(*,
'(a)')
'Please select an appropriate model.' 299 call self%PureEFTOmega%set_name (
'EFTOmega' ,
'\Omega' )
300 call self%PureEFTwDE%set_name (
'EFTw' ,
'w' )
301 call self%PureEFTGamma1%set_name(
'EFTGamma1',
'\gamma^{(1)}' )
302 call self%PureEFTGamma2%set_name(
'EFTGamma2',
'\gamma^{(2)}' )
303 call self%PureEFTGamma3%set_name(
'EFTGamma3',
'\gamma^{(3)}' )
305 if ( .not. self%PureEFTHorndeski )
then 306 call self%PureEFTGamma4%set_name(
'EFTGamma4',
'\gamma^{(4)}' )
307 call self%PureEFTGamma5%set_name(
'EFTGamma5',
'\gamma^{(5)}' )
308 call self%PureEFTGamma6%set_name(
'EFTGamma6',
'\gamma^{(6)}' )
311 end subroutine eftcambpureeftstdallocatemodelselection
315 subroutine eftcambpureeftstdinitmodelparameters( self, array )
319 class(eftcamb_std_pure_eft) :: self
320 real(dl),
dimension(self%parameter_number),
intent(in) :: array
322 real(dl),
allocatable,
dimension(:) :: temp
323 integer :: num_params_function, num_params_temp, i
328 num_params_function = self%PureEFTOmega%parameter_number
329 allocate( temp(num_params_function) )
330 do i = 1, num_params_function
331 temp(i) = array(num_params_temp)
332 num_params_temp = num_params_temp +1
334 call self%PureEFTOmega%init_parameters(temp)
337 num_params_function = self%PureEFTwDE%parameter_number
338 allocate( temp(num_params_function) )
339 do i = 1, num_params_function
340 temp(i) = array(num_params_temp)
341 num_params_temp = num_params_temp +1
343 call self%PureEFTwDE%init_parameters(temp)
346 num_params_function = self%PureEFTGamma1%parameter_number
347 allocate( temp(num_params_function) )
348 do i = 1, num_params_function
349 temp(i) = array(num_params_temp)
350 num_params_temp = num_params_temp +1
352 call self%PureEFTGamma1%init_parameters(temp)
355 num_params_function = self%PureEFTGamma2%parameter_number
356 allocate( temp(num_params_function) )
357 do i = 1, num_params_function
358 temp(i) = array(num_params_temp)
359 num_params_temp = num_params_temp +1
361 call self%PureEFTGamma2%init_parameters(temp)
364 num_params_function = self%PureEFTGamma3%parameter_number
365 allocate( temp(num_params_function) )
366 do i = 1, num_params_function
367 temp(i) = array(num_params_temp)
368 num_params_temp = num_params_temp +1
370 call self%PureEFTGamma3%init_parameters(temp)
374 if ( .not. self%PureEFTHorndeski )
then 377 num_params_function = self%PureEFTGamma4%parameter_number
378 allocate( temp(num_params_function) )
379 do i = 1, num_params_function
380 temp(i) = array(num_params_temp)
381 num_params_temp = num_params_temp +1
383 call self%PureEFTGamma4%init_parameters(temp)
386 num_params_function = self%PureEFTGamma5%parameter_number
387 allocate( temp(num_params_function) )
388 do i = 1, num_params_function
389 temp(i) = array(num_params_temp)
390 num_params_temp = num_params_temp +1
392 call self%PureEFTGamma5%init_parameters(temp)
395 num_params_function = self%PureEFTGamma6%parameter_number
396 allocate( temp(num_params_function) )
397 do i = 1, num_params_function
398 temp(i) = array(num_params_temp)
399 num_params_temp = num_params_temp +1
401 call self%PureEFTGamma6%init_parameters(temp)
407 if ( num_params_temp-1 /= self%parameter_number )
then 408 write(*,*)
'In EFTCAMBPureEFTstdInitModelParameters:' 409 write(*,*)
'Length of num_params_temp and self%parameter_number do not coincide.' 410 write(*,*)
'num_params_temp:', num_params_temp-1
411 write(*,*)
'self%parameter_number:', self%parameter_number
412 call mpistop(
'EFTCAMB error')
415 end subroutine eftcambpureeftstdinitmodelparameters
419 subroutine eftcambpureeftstdinitmodelparametersfromfile( self, Ini )
423 class(eftcamb_std_pure_eft) :: self
424 type(tinifile) :: ini
426 call self%PureEFTOmega%init_from_file ( ini )
427 call self%PureEFTwDE%init_from_file ( ini )
428 call self%PureEFTGamma1%init_from_file( ini )
429 call self%PureEFTGamma2%init_from_file( ini )
430 call self%PureEFTGamma3%init_from_file( ini )
432 if ( .not. self%PureEFTHorndeski )
then 433 call self%PureEFTGamma4%init_from_file( ini )
434 call self%PureEFTGamma5%init_from_file( ini )
435 call self%PureEFTGamma6%init_from_file( ini )
438 end subroutine eftcambpureeftstdinitmodelparametersfromfile
442 subroutine eftcambpureeftstdcomputeparametersnumber( self )
446 class(eftcamb_std_pure_eft) :: self
448 self%parameter_number = 0
449 self%parameter_number = self%parameter_number +self%PureEFTOmega%parameter_number
450 self%parameter_number = self%parameter_number +self%PureEFTwDE%parameter_number
451 self%parameter_number = self%parameter_number +self%PureEFTGamma1%parameter_number
452 self%parameter_number = self%parameter_number +self%PureEFTGamma2%parameter_number
453 self%parameter_number = self%parameter_number +self%PureEFTGamma3%parameter_number
454 if ( .not. self%PureEFTHorndeski )
then 455 self%parameter_number = self%parameter_number +self%PureEFTGamma4%parameter_number
456 self%parameter_number = self%parameter_number +self%PureEFTGamma5%parameter_number
457 self%parameter_number = self%parameter_number +self%PureEFTGamma6%parameter_number
460 end subroutine eftcambpureeftstdcomputeparametersnumber
464 subroutine eftcambpureeftstdfeedback( self, print_params )
468 class(eftcamb_std_pure_eft) :: self
469 logical,
optional :: print_params
474 write(*,
'(a,a)')
' Model = ', self%name
475 if ( self%PureEFTHorndeski )
then 476 write(*,
"(a)")
' Pure EFT Horndeski' 478 write(*,
'(a,I3)')
' Number of params =' , self%parameter_number
482 if ( self%PureEFTmodelOmega /= 0 )
write(*,
'(a,I3)')
' PureEFTmodelOmega =', self%PureEFTmodelOmega
483 if ( self%EFTwDE /= 0 )
write(*,
'(a,I3)')
' EFTwDE =', self%EFTwDE
484 if ( self%PureEFTmodelGamma1 /= 0 )
write(*,
'(a,I3)')
' PureEFTmodelGamma1 =', self%PureEFTmodelGamma1
485 if ( self%PureEFTmodelGamma2 /= 0 )
write(*,
'(a,I3)')
' PureEFTmodelGamma2 =', self%PureEFTmodelGamma2
486 if ( self%PureEFTmodelGamma3 /= 0 )
write(*,
'(a,I3)')
' PureEFTmodelGamma3 =', self%PureEFTmodelGamma3
487 if ( .not. self%PureEFTHorndeski )
then 488 if ( self%PureEFTmodelGamma4 /= 0 )
write(*,
'(a,I3)')
' PureEFTmodelGamma4 =', self%PureEFTmodelGamma4
489 if ( self%PureEFTmodelGamma5 /= 0 )
write(*,
'(a,I3)')
' PureEFTmodelGamma5 =', self%PureEFTmodelGamma5
490 if ( self%PureEFTmodelGamma6 /= 0 )
write(*,
'(a,I3)')
' PureEFTmodelGamma6 =', self%PureEFTmodelGamma6
495 call self%PureEFTOmega%feedback ( print_params )
496 call self%PureEFTwDE%feedback ( print_params )
497 call self%PureEFTGamma1%feedback ( print_params )
498 call self%PureEFTGamma2%feedback ( print_params )
499 call self%PureEFTGamma3%feedback ( print_params )
500 if ( .not. self%PureEFTHorndeski )
then 501 call self%PureEFTGamma4%feedback( print_params )
502 call self%PureEFTGamma5%feedback( print_params )
503 call self%PureEFTGamma6%feedback( print_params )
506 end subroutine eftcambpureeftstdfeedback
510 subroutine eftcambpureeftstdparameternames( self, i, name )
514 class(eftcamb_std_pure_eft) :: self
515 integer ,
intent(in) :: i
516 character(*),
intent(out) :: name
518 integer :: nomega, nw, n1, n2, n3, n4, n5, n6
522 nomega = self%PureEFTOmega%parameter_number
523 nw = nomega + self%PureEFTwDE%parameter_number
524 n1 = nw + self%PureEFTGamma1%parameter_number
525 n2 = n1 + self%PureEFTGamma2%parameter_number
526 n3 = n2 + self%PureEFTGamma3%parameter_number
527 if ( .not. self%PureEFTHorndeski )
then 528 n4 = n3 + self%PureEFTGamma4%parameter_number
529 n5 = n4 + self%PureEFTGamma5%parameter_number
530 n6 = n5 + self%PureEFTGamma6%parameter_number
534 if ( i > self%parameter_number .or. i <= 0 )
then 535 write(*,
'(a,I3)')
'No parameter corresponding to: ', i
536 write(*,
'(a,I3)')
'Total number of parameters is: ', self%parameter_number
537 call mpistop(
'EFTCAMB error')
540 else if ( i <= nomega )
then 541 do j = 1, self%PureEFTOmega%parameter_number
542 if ( i == j )
call self%PureEFTOmega%parameter_names( j, name )
547 else if ( i <= nw )
then 548 do j = 1, self%PureEFTwDE%parameter_number
549 if ( i-nomega == j )
call self%PureEFTwDE%parameter_names( j, name )
554 else if ( i <= n1)
then 555 do j = 1, self%PureEFTGamma1%parameter_number
556 if ( i-nw == j )
call self%PureEFTGamma1%parameter_names( j, name )
561 else if ( i <= n2 )
then 562 do j = 1, self%PureEFTGamma2%parameter_number
563 if ( i-n1 == j )
call self%PureEFTGamma2%parameter_names( j, name )
568 else if ( i <= n3 )
then 570 do j = 1, self%PureEFTGamma3%parameter_number
571 if ( i-n2 == j )
call self%PureEFTGamma3%parameter_names( j, name )
576 else if ( .not. self%PureEFTHorndeski .and. i <= n4 )
then 578 do j = 1, self%PureEFTGamma4%parameter_number
579 if ( i-n3 == j )
call self%PureEFTGamma4%parameter_names( j, name )
584 else if ( .not. self%PureEFTHorndeski .and. i <= n5 )
then 586 do j = 1, self%PureEFTGamma5%parameter_number
587 if ( i-n4 == j )
call self%PureEFTGamma5%parameter_names( j, name )
592 else if ( .not. self%PureEFTHorndeski .and. i <= n6 )
then 594 do j = 1, self%PureEFTGamma6%parameter_number
595 if ( i-n5 == j )
call self%PureEFTGamma6%parameter_names( j, name )
601 end subroutine eftcambpureeftstdparameternames
605 subroutine eftcambpureeftstdparameternameslatex( self, i, latexname )
609 class(eftcamb_std_pure_eft) :: self
610 integer ,
intent(in) :: i
611 character(*),
intent(out) :: latexname
613 integer :: nomega, nw, n1, n2, n3, n4, n5, n6
617 nomega = self%PureEFTOmega%parameter_number
618 nw = nomega + self%PureEFTwDE%parameter_number
619 n1 = nw + self%PureEFTGamma1%parameter_number
620 n2 = n1 + self%PureEFTGamma2%parameter_number
621 n3 = n2 + self%PureEFTGamma3%parameter_number
622 if ( .not. self%PureEFTHorndeski )
then 623 n4 = n3 + self%PureEFTGamma4%parameter_number
624 n5 = n4 + self%PureEFTGamma5%parameter_number
625 n6 = n5 + self%PureEFTGamma6%parameter_number
629 if ( i > self%parameter_number .or. i <= 0)
then 630 write(*,
'(a,I3)')
'No parameter corresponding to: ', i
631 write(*,
'(a,I3)')
'Total number of parameters is: ', self%parameter_number
632 call mpistop(
'EFTCAMB error')
635 else if ( i <= nomega )
then 636 do j = 1, self%PureEFTOmega%parameter_number
637 if ( i == j )
call self%PureEFTOmega%parameter_names_latex( j, latexname )
642 else if ( i <= nw )
then 643 do j = 1, self%PureEFTwDE%parameter_number
644 if ( i-nomega == j )
call self%PureEFTwDE%parameter_names_latex( j, latexname )
649 else if ( i <= n1)
then 650 do j = 1, self%PureEFTGamma1%parameter_number
651 if ( i-nw == j )
call self%PureEFTGamma1%parameter_names_latex( j, latexname )
656 else if ( i <= n2 )
then 657 do j = 1, self%PureEFTGamma2%parameter_number
658 if ( i-n1 == j )
call self%PureEFTGamma2%parameter_names_latex( j, latexname )
663 else if ( i <= n3 )
then 664 do j = 1, self%PureEFTGamma3%parameter_number
665 if ( i-n2 == j )
call self%PureEFTGamma3%parameter_names_latex( j, latexname )
670 else if ( .not. self%PureEFTHorndeski .and. i <= n4 )
then 671 do j = 1, self%PureEFTGamma4%parameter_number
672 if ( i-n3 == j )
call self%PureEFTGamma4%parameter_names_latex( j, latexname )
677 else if ( .not. self%PureEFTHorndeski .and. i <= n5 )
then 678 do j = 1, self%PureEFTGamma5%parameter_number
679 if ( i-n4 == j )
call self%PureEFTGamma5%parameter_names_latex( j, latexname )
684 else if ( .not. self%PureEFTHorndeski .and. i <= n6 )
then 685 do j = 1, self%PureEFTGamma6%parameter_number
686 if ( i-n5 == j )
call self%PureEFTGamma6%parameter_names_latex( j, latexname )
692 end subroutine eftcambpureeftstdparameternameslatex
696 subroutine eftcambpureeftstdparametervalues( self, i, value )
700 class(eftcamb_std_pure_eft) :: self
701 integer ,
intent(in) :: i
702 real(dl),
intent(out) ::
value 704 integer :: nomega, nw, n1, n2, n3, n4, n5, n6
708 nomega = self%PureEFTOmega%parameter_number
709 nw = nomega + self%PureEFTwDE%parameter_number
710 n1 = nw + self%PureEFTGamma1%parameter_number
711 n2 = n1 + self%PureEFTGamma2%parameter_number
712 n3 = n2 + self%PureEFTGamma3%parameter_number
713 if ( .not. self%PureEFTHorndeski )
then 714 n4 = n3 + self%PureEFTGamma4%parameter_number
715 n5 = n4 + self%PureEFTGamma5%parameter_number
716 n6 = n5 + self%PureEFTGamma6%parameter_number
720 if ( i > self%parameter_number .or. i <= 0)
then 721 write(*,
'(a,I3)')
'EFTCAMB error: no parameter corresponding to number ',i
722 write(*,
'(a,I3)')
'Total number of parameters is ', self%parameter_number
723 call mpistop(
'EFTCAMB error')
726 else if ( i <= nomega )
then 727 do j = 1, self%PureEFTOmega%parameter_number
728 if ( i == j )
call self%PureEFTOmega%parameter_value( j,
value )
733 else if ( i <= nw )
then 734 do j = 1, self%PureEFTwDE%parameter_number
735 if ( i-nomega == j )
call self%PureEFTwDE%parameter_value( j,
value )
740 else if ( i <= n1)
then 741 do j = 1, self%PureEFTGamma1%parameter_number
742 if ( i-nw == j )
call self%PureEFTGamma1%parameter_value( j,
value )
747 else if ( i <= n2 )
then 748 do j = 1, self%PureEFTGamma2%parameter_number
749 if ( i-n1 == j )
call self%PureEFTGamma2%parameter_value( j,
value )
754 else if ( i <= n3 )
then 755 do j = 1, self%PureEFTGamma3%parameter_number
756 if ( i-n2 == j )
call self%PureEFTGamma3%parameter_value( j,
value )
761 else if ( .not. self%PureEFTHorndeski .and. i <= n4 )
then 762 do j = 1, self%PureEFTGamma4%parameter_number
763 if ( i-n3 == j )
call self%PureEFTGamma4%parameter_value( j,
value )
768 else if ( .not. self%PureEFTHorndeski .and. i <= n5 )
then 769 do j = 1, self%PureEFTGamma5%parameter_number
770 if ( i-n4 == j )
call self%PureEFTGamma5%parameter_value( j,
value )
775 else if ( .not. self%PureEFTHorndeski .and. i <= n6 )
then 776 do j = 1, self%PureEFTGamma6%parameter_number
777 if ( i-n5 == j )
call self%PureEFTGamma6%parameter_value( j,
value )
783 end subroutine eftcambpureeftstdparametervalues
787 subroutine eftcambpureeftstdbackgroundeftfunctions( self, a, eft_par_cache, eft_cache )
791 class(eftcamb_std_pure_eft) :: self
792 real(dl),
intent(in) :: a
793 type(eftcamb_parameter_cache),
intent(inout) :: eft_par_cache
794 type(eftcamb_timestep_cache ),
intent(inout) :: eft_cache
796 eft_cache%EFTOmegaV = self%PureEFTOmega%value(a)
797 eft_cache%EFTOmegaP = self%PureEFTOmega%first_derivative(a)
798 eft_cache%EFTOmegaPP = self%PureEFTOmega%second_derivative(a)
799 eft_cache%EFTOmegaPPP = self%PureEFTOmega%third_derivative(a)
800 eft_cache%EFTc = ( eft_cache%adotoa**2 - eft_cache%Hdot )*( eft_cache%EFTOmegaV + 0.5_dl*a*eft_cache%EFTOmegaP ) &
801 & -0.5_dl*( a*eft_cache%adotoa )**2*eft_cache%EFTOmegaPP&
802 & +0.5_dl*eft_cache%grhov_t*( 1._dl+ self%PureEFTwDE%value(a) )
803 eft_cache%EFTLambda = -eft_cache%EFTOmegaV*( 2._dl*eft_cache%Hdot +eft_cache%adotoa**2 ) &
804 & -a*eft_cache%EFTOmegaP*( 2._dl*eft_cache%adotoa**2 + eft_cache%Hdot ) &
805 & -( a*eft_cache%adotoa )**2*eft_cache%EFTOmegaPP &
806 & +self%PureEFTwDE%value(a)*eft_cache%grhov_t
807 eft_cache%EFTcdot = +0.5_dl*eft_cache%adotoa*eft_cache%grhov_t*( -3._dl*(1._dl +self%PureEFTwDE%value(a))**2 + a*self%PureEFTwDE%first_derivative(a) ) &
808 & -eft_cache%EFTOmegaV*( eft_cache%Hdotdot -4._dl*eft_cache%adotoa*eft_cache%Hdot +2._dl*eft_cache%adotoa**3 ) &
809 & +0.5_dl*a*eft_cache%EFTOmegaP*( -eft_cache%Hdotdot +eft_cache%adotoa*eft_cache%Hdot +eft_cache%adotoa**3) &
810 & +0.5_dl*a**2*eft_cache%adotoa*eft_cache%EFTOmegaPP*( eft_cache%adotoa**2 -3._dl*eft_cache%Hdot ) &
811 & -0.5_dl*(a*eft_cache%adotoa)**3*eft_cache%EFTOmegaPPP
812 eft_cache%EFTLambdadot = -2._dl*eft_cache%EFTOmegaV*( eft_cache%Hdotdot -eft_cache%adotoa*eft_cache%Hdot -eft_cache%adotoa**3 ) &
813 & -a*eft_cache%EFTOmegaP*( +eft_cache%Hdotdot +5._dl*eft_cache%adotoa*eft_cache%Hdot -eft_cache%adotoa**3 ) &
814 & -a**2*eft_cache%EFTOmegaPP*eft_cache%adotoa*( +2._dl*eft_cache%adotoa**2 +3._dl*eft_cache%Hdot )&
815 & -(a*eft_cache%adotoa)**3*eft_cache%EFTOmegaPPP &
816 & +eft_cache%grhov_t*eft_cache%adotoa*( a*self%PureEFTwDE%first_derivative(a) -3._dl*self%PureEFTwDE%value(a)*(1._dl +self%PureEFTwDE%value(a) ))
818 end subroutine eftcambpureeftstdbackgroundeftfunctions
822 subroutine eftcambpureeftstdsecondordereftfunctions( self, a, eft_par_cache, eft_cache )
826 class(eftcamb_std_pure_eft) :: self
827 real(dl),
intent(in) :: a
828 type(eftcamb_parameter_cache),
intent(inout) :: eft_par_cache
829 type(eftcamb_timestep_cache ),
intent(inout) :: eft_cache
831 eft_cache%EFTGamma1V = self%PureEFTGamma1%value(a)
832 eft_cache%EFTGamma1P = self%PureEFTGamma1%first_derivative(a)
833 eft_cache%EFTGamma2V = self%PureEFTGamma2%value(a)
834 eft_cache%EFTGamma2P = self%PureEFTGamma2%first_derivative(a)
835 eft_cache%EFTGamma3V = self%PureEFTGamma3%value(a)
836 eft_cache%EFTGamma3P = self%PureEFTGamma3%first_derivative(a)
837 if ( self%PureEFTHorndeski )
then 838 eft_cache%EFTGamma4V = -eft_cache%EFTGamma3V
839 eft_cache%EFTGamma4P = -eft_cache%EFTGamma3P
840 eft_cache%EFTGamma4PP = -self%PureEFTGamma3%second_derivative(a)
841 eft_cache%EFTGamma5V = +0.5_dl*eft_cache%EFTGamma3V
842 eft_cache%EFTGamma5P = +0.5_dl*eft_cache%EFTGamma3P
843 eft_cache%EFTGamma6V = 0._dl
844 eft_cache%EFTGamma6P = 0._dl
846 eft_cache%EFTGamma4V = self%PureEFTGamma4%value(a)
847 eft_cache%EFTGamma4P = self%PureEFTGamma4%first_derivative(a)
848 eft_cache%EFTGamma4PP = self%PureEFTGamma4%second_derivative(a)
849 eft_cache%EFTGamma5V = self%PureEFTGamma5%value(a)
850 eft_cache%EFTGamma5P = self%PureEFTGamma5%first_derivative(a)
851 eft_cache%EFTGamma6V = self%PureEFTGamma6%value(a)
852 eft_cache%EFTGamma6P = self%PureEFTGamma6%first_derivative(a)
855 end subroutine eftcambpureeftstdsecondordereftfunctions
860 function eftcambpureeftstdcomputedtauda( self, a, eft_par_cache, eft_cache )
864 class(eftcamb_std_pure_eft) :: self
865 real(dl),
intent(in) :: a
866 type(eftcamb_parameter_cache),
intent(inout) :: eft_par_cache
867 type(eftcamb_timestep_cache ),
intent(inout) :: eft_cache
869 real(dl) :: eftcambpureeftstdcomputedtauda
873 temp = eft_cache%grhoa2 +eft_par_cache%grhov*a*a*self%PureEFTwDE%integral(a)
874 eftcambpureeftstdcomputedtauda = sqrt(3/temp)
876 end function eftcambpureeftstdcomputedtauda
880 subroutine eftcambpureeftstdcomputeadotoa( self, a, eft_par_cache, eft_cache )
884 class(eftcamb_std_pure_eft) :: self
885 real(dl),
intent(in) :: a
886 type(eftcamb_parameter_cache),
intent(inout) :: eft_par_cache
887 type(eftcamb_timestep_cache ),
intent(inout) :: eft_cache
889 eft_cache%grhov_t = eft_par_cache%grhov*self%PureEFTwDE%integral(a)
890 eft_cache%adotoa = sqrt( ( eft_cache%grhom_t +eft_cache%grhov_t )/3._dl )
892 end subroutine eftcambpureeftstdcomputeadotoa
896 subroutine eftcambpureeftstdcomputehubbleder( self, a, eft_par_cache, eft_cache )
900 class(eftcamb_std_pure_eft) :: self
901 real(dl),
intent(in) :: a
902 type(eftcamb_parameter_cache),
intent(inout) :: eft_par_cache
903 type(eftcamb_timestep_cache ),
intent(inout) :: eft_cache
905 eft_cache%gpiv_t = self%PureEFTwDE%value(a)*eft_cache%grhov_t
906 eft_cache%Hdot = -0.5_dl*( eft_cache%adotoa**2 +eft_cache%gpresm_t +eft_cache%gpiv_t )
907 eft_cache%Hdotdot = eft_cache%adotoa*( ( eft_cache%grhob_t +eft_cache%grhoc_t)/6._dl +2._dl*( eft_cache%grhor_t +eft_cache%grhog_t)/3._dl ) &
908 & +eft_cache%adotoa*eft_cache%grhov_t*( 1._dl/6._dl +self%PureEFTwDE%value(a) +1.5_dl*self%PureEFTwDE%value(a)**2 -0.5_dl*a*self%PureEFTwDE%first_derivative(a) ) &
909 & +eft_cache%adotoa*eft_cache%grhonu_tot/6._dl -0.5_dl*eft_cache%adotoa*eft_cache%gpinu_tot -0.5_dl*eft_cache%gpinudot_tot
911 end subroutine eftcambpureeftstdcomputehubbleder
915 function eftcambpureeftstdadditionalmodelstability( self, a, eft_par_cache, eft_cache )
919 class(eftcamb_std_pure_eft) :: self
920 real(dl),
intent(in) :: a
921 type(eftcamb_parameter_cache),
intent(inout) :: eft_par_cache
922 type(eftcamb_timestep_cache ),
intent(inout) :: eft_cache
924 logical :: eftcambpureeftstdadditionalmodelstability
926 eftcambpureeftstdadditionalmodelstability = .true.
927 if ( self%PureEFTwDE%value(a) > -1._dl/3._dl ) eftcambpureeftstdadditionalmodelstability = .false.
929 end function eftcambpureeftstdadditionalmodelstability
This module contains the definition of the constant parametrization, inheriting from parametrized_fun...
This module contains the definition of the Taylor expansion parametrization, around a=0...
This module contains the definition of the EFTCAMB caches. These are used to store parameters that ca...
This module contains the definition of the linear parametrization, inheriting from parametrized_funct...
This module contains the definition of the turning point parametrization, inheriting from parametrize...
This module contains the abstract definition of all the places where EFTCAMB interacts with CAMB in c...
This module contains the definition of the CPL parametrization, inheriting from parametrized_function...
This module contains the definition of the power law parametrization, inheriting from parametrized_fu...
This module contains the definition of neutral parametrizations that can be used when parametrized fu...
This module contains the definitions of all the EFTCAMB compile time flags.
This module contains the definition of the generalized Jassal-Bagla-Padmanabhan (JBP) parametrization...
This module contains the definition of the Pure EFT model in which the EFT is described by six functi...
This module contains the definition of the exponential parametrization, inheriting from parametrized_...
This module contains the abstract class for generic parametrizations for 1D functions that are used b...