Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

new public version of hi_class (merged also latest Class) #15

Merged
merged 826 commits into from
May 31, 2024
Merged
Changes from 1 commit
Commits
Show all changes
826 commits
Select commit Hold shift + click to select a range
7a99f4b
Replace densities and added shift current for beyond horndeski
emiliobellini Mar 9, 2021
c5857da
Implemented alphas beyond horndeski
emiliobellini Mar 9, 2021
9a095ba
updated common.c/h and all other tools. Propagated change in input
lesgourg Mar 10, 2021
9b50541
placed RealSpaceInterface in external/ directory
lesgourg Mar 10, 2021
950745a
removed RealSpaceInterface from root directory
lesgourg Mar 10, 2021
2723a22
placed external_Pk in external/ directory
lesgourg Mar 10, 2021
49cb8b3
removed external_Pk from root directory
lesgourg Mar 10, 2021
2f69b71
placed bbn in external/ directory
lesgourg Mar 10, 2021
7ec31eb
removed bbn from root directory
lesgourg Mar 10, 2021
5845ae0
deleted CPU (old version of CPU.py), ready for 2.10.0
lesgourg Mar 10, 2021
4bc86b3
Implemented B0-B1 and massaged the other functions
emiliobellini Mar 10, 2021
8ca6a57
updated input.c/h and propagated changes to precisions, macro_precisi…
lesgourg Mar 10, 2021
d3099e2
updated background.c/h and propagated changes to precisions, cclassy,…
lesgourg Mar 11, 2021
3c5e16c
updated thermodynamics.c/h, added HyRec2020, RecfastCLASS, heating, p…
lesgourg Mar 11, 2021
204b722
deleted old hyrec
lesgourg Mar 11, 2021
175a4fb
updated four input files, ready for 2.10.3
lesgourg Mar 11, 2021
10f727b
updated perturbations.c/h, ready for 2.10.4
lesgourg Mar 11, 2021
e0743be
very minor updates to primordial, nonlinear, transfer, spectra, lensi…
lesgourg Mar 11, 2021
d14fcf1
added distortion module and noninjection, propagated changes to Makef…
lesgourg Mar 11, 2021
7803c19
updated all notebooks and pythin scripts, ready for 2.10.7
lesgourg Mar 11, 2021
22c2c2c
updated doc, cpp, output, test
lesgourg Mar 11, 2021
12b25f2
added CLASS_rename.py, ready for 2.10.8
lesgourg Mar 11, 2021
95eb770
Updated common.c/h and other tools. Propagated change to input. Moved…
lesgourg Mar 11, 2021
a848cd3
Updated input.c/h. Propagated changes to precisions, macros_precision…
lesgourg Mar 11, 2021
a5f2c6d
Updated background.c/h. Propagated changes to precisions, cclassy, cl…
lesgourg Mar 11, 2021
0604229
Updated thermodynamics.c/h and all input files. Added HyRec2020, Recf…
lesgourg Mar 11, 2021
7a1f320
Updated perturbations.c/h.
lesgourg Mar 11, 2021
b1cc5b2
Updated primordial.c/h, nonlinear.c/h, transfer.c/h, spectra.c/h, len…
lesgourg Mar 11, 2021
2076976
Updated distortion.c/h. Added noninjection.c/h, Oropagated changes to…
lesgourg Mar 11, 2021
7e6f778
Updated all notebooks and python scripts.
lesgourg Mar 11, 2021
3ab95b8
Added CLASS_rename. Updated doc, cpp/, output/, test/.
lesgourg Mar 11, 2021
873c54b
Automatically renamed with CLASS_rename. Version number updated to 3.…
lesgourg Mar 11, 2021
1689657
v3.0.0 obtained automatically from 2.10.8 with CLASS_rename. Doc reco…
lesgourg Mar 11, 2021
801a3bb
Fixed wrong sign in the new density definition and implemented B2
emiliobellini Mar 12, 2021
09a0239
Fixed notation for the B's
emiliobellini Mar 12, 2021
f91c162
Implemented B3-B7
emiliobellini Mar 15, 2021
4472e94
Implemented all B's
emiliobellini Mar 16, 2021
2edf0e3
Merge pull request #18 from carlosggarcia/hi_class
miguelzuma Mar 16, 2021
3d98901
Implemented alphaH_prime
emiliobellini Mar 16, 2021
eb0d104
Implemented structure for A's
emiliobellini Mar 16, 2021
da7877a
Updated Hyrec2020 to be aligned with the nanoomlee github repository …
schoeneberg Mar 19, 2021
fcb2008
Merge pull request #14 from lesgourg/13-hyrec2-update
lesgourg Mar 19, 2021
8794cf3
new version number 3.0.1
lesgourg Mar 19, 2021
4724295
Updated Hyrec2020
lesgourg Mar 19, 2021
b911118
Implemented all A's
emiliobellini Mar 23, 2021
1009fa5
Implemented structure for the C's
emiliobellini Mar 23, 2021
7dc7f88
Implemented C's
emiliobellini Mar 23, 2021
d903118
Implemented Einstein equations (follow TODO_EB for missing stuff)
emiliobellini Mar 23, 2021
fe2d422
Fixed indentation issues reported in issue #16. (#21)
dchooper Mar 24, 2021
37db994
Stabilised A6
emiliobellini Mar 24, 2021
8cead18
Massaged A12
emiliobellini Mar 24, 2021
a107104
Fixed typo in background output colunms
emiliobellini Mar 24, 2021
90ae966
Fixing the issue #6 (#15)
schoeneberg Mar 25, 2021
a660408
Implemented new formalism in perturbations. Still have to clean the o…
emiliobellini Mar 25, 2021
bb3a044
Implemented QS approximation
emiliobellini Mar 26, 2021
a979050
Moved D' in the third background loop
emiliobellini Mar 26, 2021
45f5187
changed name of quasi static quantities
emiliobellini Mar 26, 2021
d958d16
Merge remote-tracking branch 'miguelzuma/hi_class' into hi_class
emiliobellini Mar 29, 2021
b97f407
Merge branch 'hi_class' into gravity_dream
emiliobellini Mar 29, 2021
cc15622
Implemented Einstein 00 test
emiliobellini Apr 1, 2021
e7d906d
Replaced allow_bg_oscillations_smg with use_pert_var_deltaphi
emiliobellini Apr 1, 2021
7ae2ccb
Replaced all vx_smg's with x_smg's
emiliobellini Apr 1, 2021
f3ed0c7
Now the code complains if one chooses to evolve delta_phi and paramet…
emiliobellini Apr 1, 2021
f8db374
Improved background and perturbation output columns
emiliobellini Apr 1, 2021
cf5c14f
Extensive modification of test_class.py for use in workflows (#31)
ThomasTram Apr 27, 2021
3e26415
Fixed memory leak (#32)
ThomasTram Apr 27, 2021
531276f
Add workflows for continuous integration (#23)
ThomasTram Apr 29, 2021
9d9e1ee
Fix memory leak during shooting (#29)
ThomasTram Apr 29, 2021
8dc7625
25 fix ncdm memory leak in ncdm input (#30)
ThomasTram Apr 29, 2021
11eb089
Add test for scalar perturbations to avoid buffer overflow (#33)
ThomasTram Apr 29, 2021
db59433
Fixed two small bugs (#34)
ThomasTram Apr 29, 2021
99a594b
Modified .gitignore
emiliobellini May 6, 2021
6a9b03b
Merge commit '2dd9238f65ef14a02a7553716eb9c7581bc1c511' into classv3
emiliobellini May 6, 2021
cb09659
Merge commit '95eb770f3bfdd07ba92616a2ca22bcecd0f37a7e' into classv3
emiliobellini May 6, 2021
4d9890a
Fixing issue #37 to include the fraction of DM that annihilates. (#41)
schoeneberg May 7, 2021
8073c34
Fixing issue #35 (#42)
schoeneberg May 7, 2021
1fab26e
Renaming "fourier" to "nonlinear" in relevant functions (#47)
schoeneberg Jun 4, 2021
c5b7e70
Fix for issue 44 deprecated nonlinear fourier minkmax (#45)
schoeneberg Jun 4, 2021
0c90b7f
Increased default precision of nonlinear_min_k_max (#49)
schoeneberg Jun 4, 2021
bc87f7a
Fixed minor stile issue in if conditional
emiliobellini Jun 29, 2021
7941e9e
Added if statement to perform test only when has_smg
emiliobellini Aug 2, 2021
20e2ace
Added missing B0 definition (otherwise segfault)
emiliobellini Aug 3, 2021
cc4c506
Partially modified the perturb_einstein structure
emiliobellini Aug 5, 2021
cc7555a
Another set of equations for x and x' when QS and h' calculated throu…
emiliobellini Aug 6, 2021
d8f561c
Removed redoundant background and thermodynamics free to avoid segfault
emiliobellini Aug 9, 2021
9a395c2
Checking einstein00 vs trace
emiliobellini Aug 17, 2021
74a95f0
Implemented get_h_from_trace also for GR
emiliobellini Sep 1, 2021
d6ea663
Added if (input_verbose > 0) on some warning messages
emiliobellini Sep 7, 2021
f4b5535
version number updated to 3.0.2 (#53)
lesgourg Sep 8, 2021
f57047a
Fixing issues of indentation, memory leaks (in hyrec, shooting, ncdm)…
lesgourg Sep 8, 2021
2ed7cfd
Changed reference branch from master to devel (#58)
ThomasTram Sep 9, 2021
7ccb83d
Implemented a single function to calculate qs quantities at a given time
emiliobellini Sep 14, 2021
6637c64
Added to the output of perturbations the QS quantities
emiliobellini Sep 14, 2021
c27508e
Added a function to get the QS quantities from the python wrapper
emiliobellini Sep 15, 2021
b20bf6e
Fixed bug when computing kinetic_D_over_phiphi
emiliobellini Sep 16, 2021
0cb2c1a
Added a)ini_test_qs_smg to control the initial state of the QS approx…
emiliobellini Sep 20, 2021
ad11bc0
Added G_eff functions (with different conventions) from transfer module
emiliobellini Sep 21, 2021
7e96c53
Implementation of varying fundamental constants in CLASS (agrees with…
schoeneberg Sep 23, 2021
c993c2f
fixes issue #54
lesgourg Sep 8, 2021
73657dc
Fixed a few more char sizes, as well as uninitialized variable errors.
schoeneberg Sep 23, 2021
515b799
Implemented placeholder for hi_class externalisation
emiliobellini Sep 24, 2021
4814b7d
Externalised background_gravity_functions
emiliobellini Sep 27, 2021
4caa9fe
Prepared structure for external modules and moved background_gravity_…
emiliobellini Sep 27, 2021
121d13d
externalised nonlinear module
emiliobellini Sep 27, 2021
5a2cf19
externalised already defined functions from perturbations
emiliobellini Sep 27, 2021
9d8bba4
work in progress
emiliobellini Sep 28, 2021
103b22d
59 update hyrec bis (#61)
lesgourg Sep 29, 2021
ef8c203
Fixing some small memory issues (uninitialized variables) for the var…
schoeneberg Sep 29, 2021
70500cc
defined Omega0_nfsm (non-free-streaming matter) used by HyRec; update…
lesgourg Sep 29, 2021
a8ffc62
updated doxygen doc for the release of 3.1 (#66)
lesgourg Sep 30, 2021
af4e589
Implementation of varying fundamental constants alpha and m_e
lesgourg Sep 30, 2021
553aad7
Defined three ew macros in common.h to call hi_class code
emiliobellini Oct 12, 2021
0df55d1
Implemented new hi_class macros in nonlinear.c
emiliobellini Oct 12, 2021
d6e9c34
Moved some code to background_smg
emiliobellini Oct 12, 2021
849b8be
Simplified the main hi_class macros structure and externalised more b…
emiliobellini Oct 13, 2021
f8b5be8
Externalised all background.c
emiliobellini Oct 13, 2021
3f69812
Externalised background.h
emiliobellini Oct 13, 2021
cefa277
Added tau_scheme_qs_smg to the perturb_workspace
emiliobellini Oct 14, 2021
669e1c4
externalised perturb IC
emiliobellini Oct 15, 2021
2a78501
Externalised perturbations.c
emiliobellini Oct 15, 2021
d991114
Externalised precision parameters
emiliobellini Oct 15, 2021
e95ed9f
Started externalisation of input
emiliobellini Oct 18, 2021
5f4c7ea
Externalised some input.c
emiliobellini Oct 19, 2021
78f4b85
Exported input (and defined other macros)
emiliobellini Oct 19, 2021
8e283f2
Fixed few bugs related to the externalisation
emiliobellini Oct 19, 2021
fa9f126
Removed macros
emiliobellini Oct 20, 2021
cd055a1
Added Omega_m (#68)
schoeneberg Nov 23, 2021
ce5f265
Merge commit 'd6ea663acd633acf8c04d286d3e133b1562e34d8' into classv3
emiliobellini Nov 29, 2021
12a1608
Merge commit '8e283f293723a5704b7dfd0c9772cdb84bcc4421' into classv3
emiliobellini Nov 29, 2021
ee25e36
Merge branch 'gravity_dream_no_macros' into classv3
emiliobellini Nov 29, 2021
eea7b7a
replace source with class v3.1.0 vanilla
emiliobellini Nov 29, 2021
487e4cf
Replaced include with class v3.1.0 vanilla
emiliobellini Nov 29, 2021
963a169
Merge remote-tracking branch 'class_public/master' into classv3
emiliobellini Nov 29, 2021
3467992
restored smg in includes
emiliobellini Nov 29, 2021
eb9f8f5
restored smg fourier.c
emiliobellini Nov 30, 2021
1bbf82d
restored smg in background.c
emiliobellini Nov 30, 2021
8ab65d8
restored smg in input.c
emiliobellini Nov 30, 2021
5dec38f
restored smg in perturbations.c
emiliobellini Nov 30, 2021
f0a4311
Now hi_class compiles
emiliobellini Nov 30, 2021
22a55d8
fixed few bgs in the background integration (mainly because now the i…
emiliobellini Dec 2, 2021
374b0cf
Fixed bug with M_pl_tuning_smg
emiliobellini Dec 2, 2021
aa3bdcc
Ad hoc fix to avoid 0/0 in G_eff and slip (derived parameters)
emiliobellini Dec 2, 2021
382d5df
Encapsulated Bs and Cs in if field_evolution_smg
emiliobellini Dec 2, 2021
5d6ee22
pvecback_derivs are now w.r.t. loga
emiliobellini Dec 2, 2021
42dd918
Fixing the bug pointed out by Fereshteh Majidi, where a MU distortion…
schoeneberg Dec 3, 2021
2fb21a4
If Omega_smg==0 no shooting
emiliobellini Dec 3, 2021
c6a8ff3
70 perturbations at tau and k (#73)
lesgourg Dec 7, 2021
93a219c
version number updated to 3.1.1 (#75)
lesgourg Dec 7, 2021
8b0722f
added Omega_m and perturbations_at_tau features, fixed minor errors
lesgourg Dec 7, 2021
2b46509
Fixed bug with current and shift computation
emiliobellini Dec 7, 2021
3257842
Merge remote-tracking branch 'class_public/master' into classv3
emiliobellini Dec 14, 2021
a0eb57f
Moved few background quantities to field_evolution_smg
emiliobellini Dec 15, 2021
679f3ef
Removed some redountant definition in the classy wrapper
emiliobellini Dec 15, 2021
804bc19
Fixed a segfault
emiliobellini Dec 15, 2021
1264a3e
Added regulator to cs2
emiliobellini Dec 15, 2021
9d33a8d
Implemented allowing h_units for the radius input of sigma(R,z) (#77)
schoeneberg Jan 18, 2022
7516c4c
fixed minor bug with k_max
emiliobellini Feb 22, 2022
7f133e0
79 euclid additions (#82)
lesgourg Feb 22, 2022
0a93fad
Several small changes, mainly in classy, and mainly for the purpose o…
lesgourg Feb 22, 2022
1842f08
Disallowing negative values of the energy density fractions for the v…
schoeneberg Feb 22, 2022
b7f14ec
Implemented improved shooting for sigma8 (#84)
schoeneberg Feb 25, 2022
6a13674
Merge tag 'v3.1.2' into classv3
emiliobellini Feb 28, 2022
870116e
86 segfault transfer k and z (#87)
schoeneberg Mar 2, 2022
b6acd12
Added documentation plus some small maquillage to the fourier_smg.c f…
emiliobellini Mar 4, 2022
efcae8f
Polished a bit perturbations.c and related files
emiliobellini Mar 5, 2022
ffbf1c6
Polished a bit perturbations.c and related files (2nd round)
emiliobellini Mar 7, 2022
917008b
Polished a bit perturbations.c and related files (3rd round)
emiliobellini Mar 8, 2022
97a0a31
Polished a bit perturbations.c and related files (final round)
emiliobellini Mar 8, 2022
f22b386
moved hiclass headers to gravity_Smg
emiliobellini Mar 8, 2022
42ccd3b
Polished a bit input.c and related files
emiliobellini Mar 8, 2022
366b2e2
Polished a bit background.c and related files
emiliobellini Mar 8, 2022
aa190e4
Created function to copy to background_table
emiliobellini Mar 9, 2022
ab3a706
Modified gravity_functions and gravity_models. 1st step
emiliobellini Mar 10, 2022
cefe500
Modified gravity_functions and gravity_models. 1st step
emiliobellini Mar 10, 2022
f9d7b38
externalised gravity_functions
emiliobellini Mar 11, 2022
df20165
externalised gravity_modules
emiliobellini Mar 11, 2022
7af23cd
Fixed bug in gravity models
emiliobellini Mar 14, 2022
705f4c9
Adjusted minimum scale factor at which stability is tested
emiliobellini Mar 16, 2022
39c8003
line endings compatibility
emiliobellini Mar 16, 2022
77f2938
88 missing dcdmdr budget (#89)
schoeneberg Mar 24, 2022
de055a9
Improved shooting method for sigma8; bug fix for dcdm; removed memory…
lesgourg Mar 24, 2022
bc29711
90 Implement interacting dark matter following 2010.04074 (#91)
dchooper Mar 29, 2022
ea56c5d
doc updated for 3.2.0 (#93)
lesgourg Mar 29, 2022
aa92943
Implement interacting dark matter following 2010.04074
lesgourg Mar 29, 2022
46959e2
Fixed bug setting source for x_prime_smg
emiliobellini Apr 4, 2022
635126d
Moved hiclass includes in their own folder
emiliobellini Apr 12, 2022
3a6bc84
In perturbations.c moved perturbations_tests_smg after perturbations_…
emiliobellini Jun 8, 2022
b8fdda2
changed hi_class.ini
emiliobellini Jun 8, 2022
7b65725
new classy function scale_dependent_growth_factor_f() (#96)
lesgourg Jun 22, 2022
dbe9dea
Fixed typo in verbose gravity_models
emiliobellini Jun 22, 2022
c3a4f4c
Made more uniform the notation for the effective planck mass (mpl, m_…
emiliobellini Jun 22, 2022
4b67065
Further step to fix the notation
emiliobellini Jun 22, 2022
cb05dd2
Added todo comment
emiliobellini Jun 23, 2022
7f90cfe
Fixed bug for M2_evolution_smg == False
emiliobellini Jun 27, 2022
f80632f
Stripped parameter names before inserting in file struct so parameter…
schoeneberg Aug 30, 2022
8147907
Made get_pk_all more efficient by re-using the k-based spline (#106)
schoeneberg Nov 14, 2022
29dac42
Added python compatible input and derived parameters (#100)
schoeneberg Nov 15, 2022
60513da
Updating the default file paths (#109)
schoeneberg Nov 15, 2022
c5e9f8b
fixed rounding errors for issue 107 (#108)
lesgourg Nov 16, 2022
ee02945
Proper iteration through dicts (#110)
schoeneberg Nov 16, 2022
a0fe3e0
Removing the memory leak of reionization reading list of doubles. (#112)
schoeneberg Nov 16, 2022
f28ad3d
Fixed bug in attractor_ic_smg
emiliobellini Nov 25, 2022
ef98345
Fixed bug when getting tuning index
emiliobellini Nov 25, 2022
7bc249c
removed hardcoded 7 in class_alloc parameters_smg for galileons
emiliobellini Nov 25, 2022
91afceb
Fixed bug with tuning_dxdy_guess_smg. it was read as integer
emiliobellini Nov 25, 2022
58560c3
Merge tag 'v3.1.3' into gravity_dream
emiliobellini Dec 6, 2022
bf6b57c
Merge tag 'v3.2.0' into gravity_dream
emiliobellini Dec 6, 2022
8c57649
Fixed bug in QS approximation
emiliobellini Feb 21, 2023
11b361d
Added gitignore
emiliobellini Feb 27, 2023
69a66b7
Implemented scale dependent growth factor D and growth rate f in clas…
emiliobellini Feb 27, 2023
0edbdc3
Improved algorithm to calculate scale dependent D and f
emiliobellini Feb 28, 2023
a51b4c7
Fixes segmentation fault (issue 127) when including tensor modes (#128)
ThomasTram Feb 28, 2023
469787f
Implemented one sided derivative for f close to z_max_pk
emiliobellini Mar 1, 2023
a3e7bef
Fixed bug in scale dep f
emiliobellini Mar 1, 2023
1d82cca
Fixed bug in scale dep f 2
emiliobellini Mar 1, 2023
901b4bb
Fixed the negative dimension bug in classy (#113)
schoeneberg Apr 26, 2023
1ad8078
Removed memory usage mismatch (#115)
schoeneberg Apr 26, 2023
639b5e9
Corrected uninitialized PhiL instead being set to zero (#126)
schoeneberg Apr 26, 2023
1c8b77c
Corrected the typos accoridng to class_public issue #472 (#117)
schoeneberg Apr 26, 2023
3160be0
fixed bug in quintessence monomial
emiliobellini Apr 28, 2023
54e1e96
implemented beyond horndeski cs2
emiliobellini Jun 15, 2023
eecf0e0
fixed memory leaks
emiliobellini Jul 4, 2023
52104d5
removed redoundant allocation
emiliobellini Jul 5, 2023
60a9d67
fixed memory leaks
emiliobellini Jul 5, 2023
e7afe53
fixed segfault
emiliobellini Jul 5, 2023
6d0a3fe
Removed cpdef'ed variables and DEF statements (#136)
ThomasTram Oct 10, 2023
4e1788d
Increased precision of background table by one order of magnitude acc…
schoeneberg Oct 10, 2023
b8b0a6e
Implemented S8 as an input/output parameter (#124)
schoeneberg Oct 10, 2023
8dec190
Replaced nasty segmentation faults when requesting sigma8 without hav…
schoeneberg Oct 10, 2023
62053c2
In perturbations_output_data_at_z, the external loop on index_k when …
CyrilPitrou Oct 10, 2023
4519530
cl_ref.pre in agreement with new perturbations_ denominations (#134)
CyrilPitrou Oct 10, 2023
affc5c9
updated version number to v3.2.1 (#139)
lesgourg Oct 10, 2023
d486987
in classy, new function function scale_dependent_growth_factor(), and…
lesgourg Oct 10, 2023
997d1ac
updated version number to v3.2.1
lesgourg Oct 10, 2023
7faf5f1
Preventing segmentation faults when fourier_at_z is called, and preve…
schoeneberg Nov 16, 2023
d355601
Fixing 142 by using cubic interpolation of lnPk (#143)
schoeneberg Nov 16, 2023
0f2af6c
memory leaks
emiliobellini Jan 17, 2024
ad9b792
memory leaks
emiliobellini Jan 18, 2024
20ddf6c
New limber (#147)
lesgourg Feb 3, 2024
8df566c
new version number v3.2.2 (#148)
lesgourg Feb 3, 2024
a7304a5
New full_limber scheme. Also, cubic interpolation of lnPk, and minor …
lesgourg Feb 3, 2024
a936c6f
Removing OpenMP from CLASS (#122)
schoeneberg Feb 5, 2024
adafaec
Fix Makefile pypi compatibility (#145)
schoeneberg Feb 8, 2024
f846726
Merge remote-tracking branch 'class_public/master' into gravity_dream
emiliobellini Feb 19, 2024
dcb8be0
fix compiler warnings (#150)
schoeneberg Feb 20, 2024
ae99bce
Use of C++ compiler, OpenMP removed, pip installable
lesgourg Feb 20, 2024
03f9de9
solved some todo
emiliobellini Apr 19, 2024
fa55c07
fixed todos
emiliobellini Apr 23, 2024
a283b74
Merge remote-tracking branch 'class_public/master' into gravity_dream
emiliobellini Apr 23, 2024
3d7b65e
Merge branch 'gravity_dream' into hi_class
emiliobellini May 21, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
restored smg in includes
emiliobellini committed Nov 29, 2021

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
commit 346799252b1f7a5b48d972f43264cb0d1d35f3a6
205 changes: 205 additions & 0 deletions include/background.h
Original file line number Diff line number Diff line change
@@ -129,6 +129,70 @@ struct background
//@}


/** @name - hi_class (_smg) related parameters */

double hubble_friction; /** friction coefficient in H' equation: H' = ... + H_friction*(H^2 - rho_crit) [NOT ONLY IN SMG!] */
int hubble_evolution; /** whether to evolve H' from the equation */

enum gravity_model gravity_model_smg; /** Horndeski model */
// enum gravity_model_subclass gravity_submodel_smg; /** Horndeski model */
enum expansion_model expansion_model_smg; /* choice of expansion rate */

short initial_conditions_set_smg; /* whether IC have been established. For printing and information */
short parameters_tuned_smg; /* whether model has been tuned. For doing stability tests, etc... */
short is_quintessence_smg; /* is the scalar field from a quintessence model?*/

double Omega0_smg; /**< \f$ \Omega_{0_\phi} \f$ : scalar field energy fraction */
double Omega_smg_debug; /**< debug value when no tuning is wanted */
short attractor_ic_smg; /** < whether the scalar field has attractor initial conditions */

double xi_0_smg; /** < final value of xi = phi' H/(aH_0^2) */
double phi_0_smg; /** < final value of phi */
double M2_0_smg; /** < final value of M_*^2 */

double cs2_safe_smg; /**< threshold for the speed of sound to consider it negative */
double D_safe_smg; /* threshold to consider the kinetic term of scalars negative in the stability check */
double ct2_safe_smg; /* threshold to consider the sound speed of tensors negative in the stability check */
double M2_safe_smg; /* threshold to consider the kinetic term of tensors (M2) negative in the stability check */
double kineticity_safe_smg; /**< minimum value of the kineticity, to avoid problems with the perturbations */
double quintessence_w_safe_smg; /**< threshold to consider the quintessence equation of state less than -1 in the stability check */

double min_M2_smg; /**< minimum value of planck mass (for stability test) */
double min_ct2_smg; /**< minimum value of tensor speed of sound squared (for stability test) */
double min_D_smg; /**< minimum value of scalar kinetic term (for stability test) */
double min_cs2_smg; /**< minimum value of scalar speed of sound squared (for stability test) */

double min_bra_smg; /**< minimum value of the braiding */
double max_bra_smg; /**< maximum value of the braiding */

int skip_stability_tests_smg; /**< specify if you want to skip the stability tests for the field perturbations */
double a_min_stability_test_smg; /** < skip stability tests for a < a_min */


int field_evolution_smg; /**< does the model require solving the equation for the scalar field at the background? this is typically not the case for parameterized models */
int M_pl_evolution_smg; /**< does the model require integrating the Planck mass from alpha_M? */
int rho_evolution_smg; /**< does the model require integrating the energy density? */

/* Modified gravity parameters
* parameters_smg -> contains the primary parameters. Any param that might be varied to determine Omega_smg should be here
* tuning_index_smg -> which parameter is varied to obtain the right Omega_smg
* parameters_2_smg -> contains auxiliary parameters. These will not be varied to obtain Omega_smg
* for non-dynamical models: the expansion history in parameters_smg, while the alphas are in parameters_2_smg
*/
double * parameters_smg; /**< list of parameters describing the modified gravity model (must contain the shooting parameter) */
int parameters_size_smg; /**< size of scf_parameters */
int tuning_index_smg; /**< index in parameters_smg used for tuning */
double tuning_dxdy_guess_smg; /**< guess for the scale of the tuning value */

double * parameters_2_smg; /**< list of auxiliary parameters describing the modified gravity model */
int parameters_2_size_smg; /**< size of parameters_smg */

int M_pl_tuning_smg; /**< whether we want secondary tuning for M_pl(today) */
int tuning_index_2_smg; /**< index in scf_parameters used for tuning (the Planck mass) */
double M_pl_today_smg;

short output_background_smg; /**< flag regulating the amount of information printed onbackground.dat output */

/** @name - related parameters */

//@{
@@ -185,6 +249,138 @@ struct background
int index_bg_p_scf; /**< scalar field pressure */
int index_bg_p_prime_scf; /**< scalar field pressure */

/** @name - hi_class (_smg) related parameters */

int index_bg_phi_smg; /**< scalar field value */
int index_bg_phi_prime_smg; /**< scalar field derivative wrt conformal time */
int index_bg_phi_prime_prime_smg; /**< scalar field second derivative wrt conformal time */
int index_bg_rho_smg; /**< scalar field energy density */
int index_bg_p_smg; /**< scalar field pressure */
int index_bg_rho_prime_smg; /**< derivative of the scalar field energy density */
int index_bg_current_smg; /**< scalar field current */
int index_bg_shift_smg; /**< scalar field shift */
int index_bg_M2_smg; /**< relative Planck mass */
int index_bg_delta_M2_smg; /**< relative Planck mass -1. */
int index_bg_kineticity_over_phiphi_smg;/**< scalar field kineticity alpha_k*(a*H/phi')^2 (BS eq A.8)*/
int index_bg_braiding_over_phi_smg;/**< scalar field braiding alpha_b*a*H/phi' (BS eq A.9)*/
int index_bg_beyond_horndeski_over_phi_smg;/**<scalar field beyond horndeski alpha_H*a*H/phi'*/
int index_bg_braiding_over_phi_prime_smg;/**< scalar field braiding alpha_b*a*H/phi' derivative*/
int index_bg_beyond_horndeski_over_phi_prime_smg;/**<scalar field beyond horndeski alpha_H*a*H/phi' derivative*/
int index_bg_kineticity_smg;/**< scalar field kineticity alpha_k (BS eq A.8)*/
int index_bg_braiding_smg;/**< scalar field braiding alpha_b (BS eq A.9)*/
int index_bg_tensor_excess_smg;/**< scalar field tensor excess alpha_t (BS eq A.10)*/
int index_bg_mpl_running_smg; /**< scalar field relative Planck mass running*/
int index_bg_beyond_horndeski_smg;/**<scalar field beyond horndeski alpha_H*/
int index_bg_kineticity_prime_smg;/**< derivative of kineticity wrt tau (BS eq A.8)*/
int index_bg_braiding_prime_smg;/**< derivative of braiding wrt tau (BS eq A.9)*/
int index_bg_mpl_running_prime_smg;/**< derivative of Planck mass running wrt tau (BS eq A.7)*/
int index_bg_tensor_excess_prime_smg;/**< derivative of tensor excess wrt tau (BS eq A.10)*/
int index_bg_beyond_horndeski_prime_smg;/**<derivative of beyond horndeski alpha_H*/
int index_bg_cs2_smg; /**< speed of sound for scalar perturbations */

int index_bg_E0_smg; /**< Hubble constraint */
int index_bg_E1_smg; /**< Hubble constraint */
int index_bg_E2_smg; /**< Hubble constraint */
int index_bg_E3_smg; /**< Hubble constraint */

int index_bg_P0_smg; /**< Hubble dynamical */
int index_bg_P1_smg; /**< Hubble dynamical */
int index_bg_P2_smg; /**< Hubble dynamical */
int index_bg_R0_smg; /**< Klein-Gordon */
int index_bg_R1_smg; /**< Klein-Gordon */
int index_bg_R2_smg; /**< Klein-Gordon */

int index_bg_A0_smg;
int index_bg_A1_smg;
int index_bg_A2_smg;
int index_bg_A3_smg;
int index_bg_A4_smg;
int index_bg_A5_smg;
int index_bg_A6_smg;
int index_bg_A7_smg;
int index_bg_A8_smg;
int index_bg_A9_smg;
int index_bg_A10_smg;
int index_bg_A11_smg;
int index_bg_A12_smg;
int index_bg_A13_smg;
int index_bg_A14_smg;
int index_bg_A15_smg;
int index_bg_A16_smg;
int index_bg_A9_prime_smg;
int index_bg_A10_prime_smg;
int index_bg_A12_prime_smg;
int index_bg_A13_prime_smg;

int index_bg_B0_smg;
int index_bg_B1_smg;
int index_bg_B2_smg;
int index_bg_B3_smg;
int index_bg_B4_smg;
int index_bg_B5_smg;
int index_bg_B6_smg;
int index_bg_B7_smg;
int index_bg_B8_smg;
int index_bg_B9_smg;
int index_bg_B10_smg;
int index_bg_B11_smg;
int index_bg_B12_smg;

int index_bg_C0_smg;
int index_bg_C1_smg;
int index_bg_C2_smg;
int index_bg_C3_smg;
int index_bg_C4_smg;
int index_bg_C5_smg;
int index_bg_C6_smg;
int index_bg_C7_smg;
int index_bg_C8_smg;
int index_bg_C9_smg;
int index_bg_C10_smg;
int index_bg_C11_smg;
int index_bg_C12_smg;
int index_bg_C13_smg;
int index_bg_C14_smg;
int index_bg_C15_smg;
int index_bg_C16_smg;
int index_bg_C9_prime_smg;
int index_bg_C10_prime_smg;
int index_bg_C12_prime_smg;
int index_bg_C13_prime_smg;


int index_bg_kinetic_D_smg;
int index_bg_kinetic_D_prime_smg;
int index_bg_kinetic_D_over_phiphi_smg;
int index_bg_kinetic_D_over_phiphi_prime_smg;
int index_bg_lambda_1_smg;
int index_bg_lambda_2_smg;
int index_bg_lambda_3_smg;
int index_bg_lambda_4_smg;
int index_bg_lambda_5_smg;
int index_bg_lambda_6_smg;
int index_bg_lambda_7_smg;
int index_bg_lambda_8_smg;
int index_bg_lambda_9_smg;
int index_bg_lambda_10_smg;
int index_bg_lambda_11_smg;
int index_bg_lambda_2_prime_smg;
int index_bg_lambda_8_prime_smg;
int index_bg_lambda_9_prime_smg;
int index_bg_lambda_11_prime_smg;
int index_bg_cs2num_smg;
int index_bg_cs2num_prime_smg;

int index_bg_rho_tot_wo_smg; /**< total density minus scalar field */
int index_bg_p_tot_wo_smg; /**< total pressure minus scalar field */
int index_bg_H_prime_prime; /**< second derivative of the hubble parameter (necessary for BS perturbations equation for h'') */
int index_bg_p_tot_wo_prime_smg; /**< derivative of the total pressure minus scalar field */
int index_bg_p_prime_smg; /**< derivative of the pressure of the scalar field */
int index_bg_w_smg; /**< equation of state of the scalar field */

int index_bg_G_eff_smg; /**< G effective in the infinite k limit */
int index_bg_slip_eff_smg; /**< slip effective in the infinite k limit */

int index_bg_rho_ncdm1; /**< density of first ncdm species (others contiguous) */
int index_bg_p_ncdm1; /**< pressure of first ncdm species (others contiguous) */
int index_bg_pseudo_p_ncdm1;/**< another statistical momentum useful in ncdma approximation */
@@ -195,6 +391,8 @@ struct background

int index_bg_Omega_r; /**< relativistic density fraction (\f$ \Omega_{\gamma} + \Omega_{\nu r} \f$) */

int index_bg_Omega_de; /**< dark energy density fraction (\f$ \Omega_{\Lambda} + \Omega_{\rm quint} + + \Omega_{\rm fld} + + \Omega_{\rm smg} \f$) */

/* end of vector in normal format, now quantities in long format */

int index_bg_rho_crit; /**< critical density */
@@ -261,6 +459,12 @@ struct background
int index_bi_phi_scf; /**< {B} scalar field value */
int index_bi_phi_prime_scf; /**< {B} scalar field derivative wrt conformal time */

int index_bi_H; /**< {B} Hubble rate factor */
int index_bi_phi_smg; /**< scalar field */
int index_bi_phi_prime_smg; /**< scalar field derivative wrt conformal time*/
int index_bi_delta_M_pl_smg; //*> integrate the Planck mass (only in certain parameterizations **/
int index_bi_rho_smg; //*> integrate the smg energy density (only in certain parameterizations) **/

int index_bi_time; /**< {C} proper (cosmological) time in Mpc */
int index_bi_rs; /**< {C} sound horizon */
int index_bi_tau; /**< {C} conformal time in Mpc */
@@ -292,6 +496,7 @@ struct background
short has_fld; /**< presence of fluid with constant w and cs2? */
short has_ur; /**< presence of ultra-relativistic neutrinos/relics? */
short has_idr; /**< presence of interacting dark radiation? */
short has_smg; /**< presence of scalar field? */
short has_curvature; /**< presence of global spatial curvature? */
short has_varconst; /**< presence of varying fundamental constants? */

4 changes: 2 additions & 2 deletions include/input.h
Original file line number Diff line number Diff line change
@@ -203,9 +203,9 @@
* For shooting method: definition of the possible targets
*/

enum target_names {theta_s, Omega_dcdmdr, omega_dcdmdr, Omega_scf, Omega_ini_dcdm, omega_ini_dcdm, sigma8};
enum target_names {theta_s, Omega_dcdmdr, omega_dcdmdr, Omega_scf, Omega_ini_dcdm, omega_ini_dcdm, sigma8, Omega_smg, M_pl_today_smg};
/* Important: Keep this number equal to the number of target_names */
#define _NUM_TARGETS_ 7
#define _NUM_TARGETS_ 9
/* Important: add one for each new target_names */
enum computation_stage {cs_background, cs_thermodynamics, cs_perturbations, cs_primordial, cs_nonlinear, cs_transfer, cs_spectra};

56 changes: 56 additions & 0 deletions include/perturbations.h
Original file line number Diff line number Diff line change
@@ -16,6 +16,7 @@
* (tca = tight-coupling approximation,
* rsa = radiation streaming approximation,
* ufa = massless neutrinos / ultra-relativistic relics fluid approximation)
* qs_smg = quasi-static scalar field approximation)
*
* CAUTION: must be listed below in chronological order, and cannot be
* reversible. When integrating equations for a given mode, it is only
@@ -31,6 +32,14 @@ enum rsa_idr_flags {rsa_idr_off, rsa_idr_on};
enum ufa_flags {ufa_off, ufa_on};
enum ncdmfa_flags {ncdmfa_off, ncdmfa_on};

/**
* implemented quasi-static approximation scheme (qs_smg).
* Check that "qs_smg_flags" and "_VALUES_QS_SMG_FLAGS_" agree each other
*/
enum qs_smg_flags {qs_smg_fd_0, qs_smg_qs_1, qs_smg_fd_2, qs_smg_qs_3, qs_smg_fd_4, qs_smg_qs_5, qs_smg_fd_6};

#define _VALUES_QS_SMG_FLAGS_ {0, 1, 0, 1, 0, 1, 0} // values associated to the quasi-static approximation scheme. FD = 0, QS = 1.

//@}

/**
@@ -47,6 +56,14 @@ enum ufa_method {ufa_mb,ufa_hu,ufa_CLASS,ufa_none};
enum ncdmfa_method {ncdmfa_mb,ncdmfa_hu,ncdmfa_CLASS,ncdmfa_none};
enum tensor_methods {tm_photons_only,tm_massless_approximation,tm_exact};

enum possible_methods_qs_smg {
automatic, /**< uses the approximation scheme implemented */
fully_dynamic, /**< forces the fully-dynamic evolution of the perturbations at all times */
quasi_static, /**< forces the quasi-static evolution of the perturbations at all times */
fully_dynamic_debug, /**< forces the fully-dynamic evolution but evaluates the approximation scheme */
quasi_static_debug /**< forces the quasi-static evolution but evaluates the approximation scheme */
};

//@}

/**
@@ -267,6 +284,8 @@ struct perturbations
short has_source_eta_prime; /**< do we need source for metric fluctuation eta'? */
short has_source_H_T_Nb_prime; /**< do we need source for metric fluctuation H_T_Nb'? */
short has_source_k2gamma_Nb; /**< do we need source for metric fluctuation gamma in Nbody gauge? */
short has_source_phi_smg; /**< do we need source for scalar field smg? */
short has_source_phi_prime_smg;/**< do we need source for scalar field smg prime? */


/* remember that the temperature source function includes three
@@ -319,6 +338,8 @@ struct perturbations
int index_tp_eta_prime; /**< index value for metric fluctuation eta' */
int index_tp_H_T_Nb_prime; /**< index value for metric fluctuation H_T_Nb' */
int index_tp_k2gamma_Nb; /**< index value for metric fluctuation gamma times k^2 in Nbody gauge */
int index_tp_phi_smg; /**< index value for scalar field smg */
int index_tp_phi_prime_smg; /**< index value for scalar field smg prime */

int * tp_size; /**< number of types tp_size[index_md] included in computation for each mode */

@@ -435,6 +456,32 @@ struct perturbations

//@}

/** @name - different options for the quasi-static approximation scheme */

//@{

enum possible_methods_qs_smg method_qs_smg;
short initial_approx_qs_smg; /**< flag regulating the initial state of qs_smg */

//@}

//@{

/** enumerator defining type of dynamical initial conditions */

enum pert_possible_initial_conditions pert_initial_conditions_smg;

//@}

/*
Decide whether to use the equations with Vx (singular when phi_prime=0)
or the equations with delta_phi (defined only with covariant theories)
*/
short use_pert_var_deltaphi_smg;

/* Get h' from Einstein trace rather than 00 (not only _smg!!) */
short get_h_from_trace;

};

/**
@@ -469,6 +516,8 @@ struct perturbations_vector
int index_pt_Gamma_fld; /**< unique dark energy dynamical variable in PPF case */
int index_pt_phi_scf; /**< scalar field density */
int index_pt_phi_prime_scf; /**< scalar field velocity */
int index_pt_x_smg; /**< scalar field perturbation */
int index_pt_x_prime_smg; /**< scalar field perturbation derivative */
int index_pt_delta_ur; /**< density of ultra-relativistic neutrinos/relics */
int index_pt_theta_ur; /**< velocity of ultra-relativistic neutrinos/relics */
int index_pt_shear_ur; /**< shear of ultra-relativistic neutrinos/relics */
@@ -539,6 +588,11 @@ struct perturbations_workspace
int index_mt_gw_prime_prime;/**< second derivative wrt conformal time of gravitational wave field, often called h */
int index_mt_V_prime; /**< derivative of Newtonian gauge vector metric perturbation V */
int index_mt_hv_prime_prime;/**< Second derivative of Synchronous gauge vector metric perturbation \f$ h_v\f$ */
int index_mt_einstein00; /**< measure the deviations from the Einstein 00 equation. Useful if get_h_from_trace == _TRUE_ but also to add a friction term to the Einstein trace equation for h'' (not only _smg!!) */
int index_mt_x_smg; /**< scalar field perturbation */
int index_mt_x_prime_smg; /**< first derivative of the scalar field perturb wrt conformal time */
int index_mt_x_prime_prime_smg;/**< second derivative of the scalar field perturb wrt confromal time - computed in perturb_einstein and passed to the integrator */
int index_mt_rsa_p_smg; /**< correction to the evolution of ur and g species in radiation streaming approximation due to non-negligible pressure at late-times*/
int mt_size; /**< size of metric perturbation vector */

//@}
@@ -619,6 +673,8 @@ struct perturbations_workspace
int index_ap_rsa_idr; /**< index for dark radiation streaming approximation */
int index_ap_ufa; /**< index for ur fluid approximation */
int index_ap_ncdmfa; /**< index for ncdm fluid approximation */
int index_ap_qs_smg; /**< index for smg quasi-static approximation */
double * tau_scheme_qs_smg; /* array with the quasi-static approximation times */
int ap_size; /**< number of relevant approximations for a given mode */

int * approx; /**< array of approximation flags holding at a given time: approx[index_ap] */
26 changes: 26 additions & 0 deletions include/precisions.h
Original file line number Diff line number Diff line change
@@ -574,6 +574,32 @@ class_precision_parameter(tol_sd_detector,double,1.e-5)
class_string_parameter(sd_external_path,"/external/distortions","sd_external_path")


class_precision_parameter(tol_einstein00_reldev,double,1.e-3) /**< tolerance to deviations w.r.t. the Einstein 00 equation. Useful if get_h_from_trace,int==_TRUE_. (not only _smg!!) */

class_precision_parameter(einstein00_friction,double,1.) /**< friction term muliplying the Einstein 00 equation to correct for h''. (not only _smg!!) */

/*
* hi_class (_smg) parameters
* */

/* This is the time at which we test for the initial value of the QS approximation.
It has to be at least a_ini_over_a_today_default */
class_precision_parameter(a_ini_test_qs_smg,double,1.e-14)

class_precision_parameter(n_min_qs_smg,int,1e2) /**< minimum number of steps used to sample the quantities in the quasi-static approximation (qs_smg) */
class_precision_parameter(n_max_qs_smg,int,1e4) /**< maximum number of steps used to sample the quantities in the quasi-static approximation (qs_smg) */
class_precision_parameter(z_fd_qs_smg,double,10.) /**< minimum redshift after which the user requires the full-dynamic evolution */
class_precision_parameter(trigger_mass_qs_smg,double,1.e3) /**< if the mass is above this trigger the quasi-static approximation is switched on */
class_precision_parameter(trigger_rad_qs_smg,double,1.e3) /**< if the radiation component is still important w.r.t.\ the scalar field the quasi-static approximation can not be used */
class_precision_parameter(eps_s_qs_smg,double,0.01) /**< when the system enters the quasi-static evolution this parameter measures how much the oscillation are decaying with time */


class_precision_parameter(min_a_pert_smg,double,1.) /**< minimum value of scale factor to start integration (important to test some ede models */
class_precision_parameter(pert_ic_tolerance_smg,double,2.e-2) /**< tolerance to deviations from n=2 for IC h~tau^n. Negative values override test */
class_precision_parameter(pert_ic_ini_z_ref_smg,double,1.e10) /**<Reference z to carry out test for conservation of curvature before pert evolution*/
class_precision_parameter(pert_ic_regulator_smg,double,1.e-15) /* minumum size of denominator in IC expressions: regulate to prevent infinities. Negative => off */
class_precision_parameter(pert_qs_ic_tolerance_test_smg,double,1.) /* maximal fractional contribution to (0i) equation of SMG terms in QS initial condition */

#undef class_precision_parameter
#undef class_string_parameter
#undef class_type_parameter