57 character(LEN=:),
allocatable :: outroot
61 integer :: pureeftmodel
62 integer :: altpareftmodel
63 integer :: designereftmodel
64 integer :: fullmappingeftmodel
67 logical :: eft_mathematical_stability
68 logical :: eft_physical_stability
69 logical :: eft_additional_priors
72 class(eftcamb_model),
allocatable :: model
75 integer :: eftcamb_feedback_level
76 real(dl) :: eftcamb_turn_on_time
77 logical :: eftcamb_model_is_designer
82 procedure :: eftcamb_init_from_file => read_eftcamb_flags_from_file
83 procedure :: eftcamb_init_model_from_file => init_eftcamb_model_from_file
84 procedure :: eftcamb_print_header => print_eftcamb_header
85 procedure :: eftcamb_print_cosmomc_header => print_eftcosmomc_header
86 procedure :: eftcamb_print_model_feedback => print_eftcamb_flags
88 procedure :: eftcamb_allocate_model => allocate_eftcamb_model
89 procedure :: eftcamb_read_model_selection => read_eftcamb_model_selection
90 procedure :: eftcamb_allocate_model_functions => allocate_eftcamb_model_functions
91 procedure :: eftcamb_read_model_parameters => read_eftcamb_model_parameters
101 subroutine read_eftcamb_flags_from_file( self, Ini )
105 class(eftcamb) :: self
106 type(tinifile) :: ini
109 self%EFTflag = ini_read_int_file( ini,
'EFTflag' , 0 )
111 self%PureEFTmodel = ini_read_int_file( ini,
'PureEFTmodel' , 0 )
112 self%AltParEFTmodel = ini_read_int_file( ini,
'AltParEFTmodel' , 0 )
113 self%DesignerEFTmodel = ini_read_int_file( ini,
'DesignerEFTmodel' , 0 )
114 self%FullMappingEFTmodel = ini_read_int_file( ini,
'FullMappingEFTmodel', 0 )
116 self%EFT_mathematical_stability = ini_read_logical_file( ini,
'EFT_mathematical_stability', .true. )
117 self%EFT_physical_stability = ini_read_logical_file( ini,
'EFT_physical_stability' , .true. )
118 self%EFT_additional_priors = ini_read_logical_file( ini,
'EFT_additional_priors' , .true. )
121 self%EFTCAMB_feedback_level = ini_read_int_file( ini,
'feedback_level', 1 )
122 self%EFTCAMB_turn_on_time = ini_read_double_file( ini,
'EFTCAMB_turn_on_time',
eftturnonpiinitial )
124 end subroutine read_eftcamb_flags_from_file
128 subroutine init_eftcamb_model_from_file( self, Ini )
132 class(eftcamb) :: self
133 type(tinifile) :: ini
136 call self%EFTCAMB_allocate_model()
138 call self%EFTCAMB_read_model_selection( ini )
140 call self%EFTCAMB_allocate_model_functions( )
142 call self%EFTCAMB_read_model_parameters( ini )
144 call self%model%compute_param_number()
146 end subroutine init_eftcamb_model_from_file
150 subroutine print_eftcamb_header( self )
154 class(eftcamb) :: self
157 if ( .not. self%EFTCAMB_feedback_level > 0 )
return 159 if ( self%EFTflag == 0 )
return 161 write(*,
'(a)')
"***************************************************************" 162 write(*,
'(a)')
" ______________________ __ ______ " 163 write(*,
'(a)')
" / __/ __/_ __/ ___/ _ | / |/ / _ ) " 164 write(*,
'(a)')
" / _// _/ / / / /__/ __ |/ /|_/ / _ | " 165 write(*,
'(a)')
" /___/_/ /_/ \___/_/ |_/_/ /_/____/ "//
" "//
eftcamb_version 167 write(*,
'(a)')
"***************************************************************" 169 end subroutine print_eftcamb_header
173 subroutine print_eftcosmomc_header( self )
177 class(eftcamb) :: self
180 if ( .not. self%EFTCAMB_feedback_level > 0 )
return 182 if ( self%EFTflag == 0 )
return 184 write(*,
'(a)')
"***************************************************************" 185 write(*,
'(a)')
" ___________________ __ ________" 186 write(*,
'(a)')
" / __/ __/_ __/ ___/__ ___ __ _ ___ / |/ / ___/" 187 write(*,
'(a)')
" / _// _/ / / / /__/ _ \(_-</ ' \/ _ \/ /|_/ / /__ " 188 write(*,
'(a)')
" /___/_/ /_/ \___/\___/___/_/_/_/\___/_/ /_/\___/ " 191 write(*,
'(a)')
"***************************************************************" 193 end subroutine print_eftcosmomc_header
197 subroutine print_eftcamb_flags( self, print_params )
201 class(eftcamb) :: self
202 logical,
optional :: print_params
205 character(len=500) :: temp_name
206 real(dl) :: temp_value
210 if ( .not.
allocated(self%model) )
then 211 write(*,*)
'EFTCAMB WARNING: trying to call EFTCAMB model feedback without allocating the model' 212 call mpistop(
'EFTCAMB error')
215 if ( .not. self%EFTCAMB_feedback_level > 0 )
return 217 if ( self%EFTflag == 0 )
return 220 write(*,
'(a, I3)')
' EFTCAMB feedback level =', self%EFTCAMB_feedback_level
224 write(*,*)
'EFTCAMB stability flags:' 226 write(*,*)
' Mathematical stability = ', self%EFT_mathematical_stability
227 write(*,*)
' Physical stability = ', self%EFT_physical_stability
228 write(*,*)
' Additional priors = ', self%EFT_additional_priors
231 write(*,*)
'EFTCAMB model flags:' 232 write(*,
"(A24,I3)")
' EFTflag =', self%EFTflag
233 if ( self%EFTflag == 1 ) &
234 write(*,
"(A24,I3)")
' PureEFTmodel =', self%PureEFTmodel
235 if ( self%EFTflag == 2 ) &
236 write(*,
"(A24,I3)")
' AltParEFTmodel =', self%AltParEFTmodel
237 if ( self%EFTflag == 3 ) &
238 write(*,
"(A24,I3)")
' DesignerEFTmodel =', self%DesignerEFTmodel
239 if ( self%EFTflag == 4 ) &
240 write(*,
"(A24,I3)")
' FullMappingEFTmodel =', self%FullMappingEFTmodel
242 call self%model%feedback( print_params )
246 end subroutine print_eftcamb_flags
251 subroutine allocate_eftcamb_model( self )
255 class(eftcamb) :: self
258 if (
allocated(self%model) )
deallocate(self%model)
261 select case ( self%EFTflag )
267 select case ( self%PureEFTmodel )
269 allocate( eftcamb_std_pure_eft::self%model )
270 call self%model%init(
'Standard Pure EFT',
'Standard Pure EFT' )
272 write(*,
'(a,I3)')
'No model corresponding to EFTFlag =', self%EFTflag
273 write(*,
'(a,I3)')
'and PureEFTmodel =', self%PureEFTmodel
274 write(*,
'(a)')
'Please select an appropriate model:' 275 write(*,
'(a)')
'PureEFTmodel=1 standard Pure EFT' 276 call mpistop(
'EFTCAMB error')
281 select case ( self%AltParEFTmodel )
283 allocate( eftcamb_rph::self%model )
284 call self%model%init(
'RPH',
'RPH' )
286 write(*,
'(a,I3)')
'No model corresponding to EFTFlag =', self%EFTflag
287 write(*,
'(a,I3)')
'and AltParEFTmodel =', self%AltParEFTmodel
288 write(*,
'(a)')
'Please select an appropriate model:' 289 write(*,
'(a)')
'AltParEFTmodel=1 reparametrized Horndeski' 290 call mpistop(
'EFTCAMB error')
295 select case ( self%DesignerEFTmodel )
297 allocate( eftcamb_fr_designer::self%model )
298 call self%model%init(
'Designer f(R)',
'Designer f(R)' )
300 allocate( eftcamb_des_mc_quint::self%model )
301 call self%model%init(
'Designer minimally coupled quintessence',
'Designer minimally coupled quintessence' )
303 write(*,
'(a,I3)')
'No model corresponding to EFTFlag =', self%EFTflag
304 write(*,
'(a,I3)')
'and DesignerEFTmodel =', self%DesignerEFTmodel
305 write(*,
'(a)')
'Please select an appropriate model:' 306 write(*,
'(a)')
'DesignerEFTmodel=1 designer f(R)' 307 write(*,
'(a)')
'DesignerEFTmodel=2 designer minimally coupled quintessence' 308 call mpistop(
'EFTCAMB error')
313 select case ( self%FullMappingEFTmodel )
315 allocate( eftcamb_horava::self%model )
316 call self%model%init(
'Horava',
'Horava' )
318 write(*,
'(a,I3)')
'No model corresponding to EFTFlag =', self%EFTflag
319 write(*,
'(a,I3)')
'and FullMappingEFTmodel =', self%FullMappingEFTmodel
320 write(*,
'(a)')
'Please select an appropriate model:' 321 write(*,
'(a)')
'FullMappingEFTmodel=1 Horava gravity' 322 call mpistop(
'EFTCAMB error')
327 write(*,
'(a,I3)')
'No model corresponding to EFTFlag =', self%EFTflag
328 write(*,
'(a)')
'Please select an appropriate model:' 329 write(*,
'(a)')
'EFTFlag=0 GR code' 330 write(*,
'(a)')
'EFTFlag=1 Pure EFT' 331 write(*,
'(a)')
'EFTFlag=2 EFT alternative parametrizations' 332 write(*,
'(a)')
'EFTFlag=3 designer mapping EFT' 333 write(*,
'(a)')
'EFTFlag=4 full mapping EFT' 334 call mpistop(
'EFTCAMB error')
339 select type ( model => self%model )
340 class is ( eftcamb_full_model )
341 self%EFTCAMB_model_is_designer = .false.
342 class is ( eftcamb_designer_model )
343 self%EFTCAMB_model_is_designer = .true.
346 end subroutine allocate_eftcamb_model
350 subroutine read_eftcamb_model_selection( self, Ini )
354 class(eftcamb) :: self
355 type(tinifile) :: ini
358 if ( .not.
allocated(self%model) )
then 359 write(*,*)
'EFTCAMB WARNING: trying to call EFTCAMB model read_model_selection' 360 write(*,*)
' without allocating the model' 361 call mpistop(
'EFTCAMB error')
365 call self%model%read_model_selection( ini )
367 end subroutine read_eftcamb_model_selection
372 subroutine allocate_eftcamb_model_functions( self )
376 class(eftcamb) :: self
379 if ( .not.
allocated(self%model) )
then 380 write(*,*)
'EFTCAMB WARNING: trying to call EFTCAMB model allocate_model_selection' 381 write(*,*)
' without allocating the model' 382 call mpistop(
'EFTCAMB error')
386 call self%model%allocate_model_selection( )
388 end subroutine allocate_eftcamb_model_functions
392 subroutine read_eftcamb_model_parameters( self, Ini )
396 class(eftcamb) :: self
397 type(tinifile) :: ini
400 if ( .not.
allocated(self%model) )
then 401 write(*,*)
'EFTCAMB WARNING: trying to call EFTCAMB model read_model_parameters_from_file' 402 write(*,*)
' without allocating the model' 403 call mpistop(
'EFTCAMB error')
407 call self%model%init_model_parameters_from_file( ini )
409 end subroutine read_eftcamb_model_parameters
real(dl), parameter eftturnonpiinitial
Turn on pi field flag: Sets the scale factor at which the code starts to evolve the pi field...
This module contains the definition of the designer minimally coupled quintessence model...
This module contains the abstract definition of all the places where EFTCAMB interacts with CAMB...
This module contains the definition of low energy (LE) Horava gravity. Please refer to the numerical ...
This module contains the abstract definition of all the places where EFTCAMB interacts with CAMB in c...
This module contains the abstract definition of all the places where EFTCAMB interacts with CAMB in c...
This module contains the definitions of all the EFTCAMB compile time flags.
This module contains the definition of the Pure EFT model in which the EFT is described by six functi...
This module contains the general EFTCAMB driver. We have a type that encapsulate all EFTCAMB paramete...
This module contains the definition of an EFT reparametrization of Horndeski models. This is described by four functions of time and w_DE. Please refer to the numerical notes for details.
character(len=*), parameter, public eftcamb_version
This module contains the relevant code for designer f(R) models.