lesgourg / class_public

Public repository of the Cosmic Linear Anisotropy Solving System (master for the most recent version of the standard code; GW_CLASS to include Cosmic Gravitational Wave Background anisotropies; classnet branch for acceleration with neutral networks; ExoCLASS branch for exotic energy injection; class_matter branch for FFTlog)
223 stars 292 forks source link

Defining proper time in the relations of \rho in background.c module #451

Open mahtaparsa opened 2 years ago

mahtaparsa commented 2 years ago

In the CLASS code in background.c module, \rho is defined analytically in term of scale factor. In my model \rho is a function of scale factor and proper time. So there is an analytical solution for \rho in term of both scale factor and proper time. How should one define the proper time in the relations of \rho? When I use "pvecback[pba->index_bi_time]" or "pvecback[pba->index_bg_time]" for proper time in the relations of \rho, the following error appears:

Error running background_init =>background_init(L:766) :error in background_solve(ppr,pba); =>background_solve(L:1751) :condition ((tau_end-tau_start)/tau_start < ppr->smallest_allowed_variation) is true; integration step: relative change in time =-nan < machine precision : leads either to numerical error or infinite loop

So what is the correct way for defining the proper time? Thanks