Skip to content

Commit

Permalink
Code tidy
Browse files Browse the repository at this point in the history
  • Loading branch information
melley95 committed Oct 2, 2024
1 parent de568b3 commit dd03352
Showing 1 changed file with 5 additions and 14 deletions.
19 changes: 5 additions & 14 deletions Source/Background/FRW.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -84,8 +84,7 @@ class FRW
data_t K0 = -sqrt(24.0 * M_PI * m_params.rho0); // Ham constraint

data_t t0 =
-1.0 / ((1.0 + m_params.omega) *
K0); // Defining t0 from time evolution of scale factor
-1.0 / ((1.0 + m_params.omega) * K0); // Defining t0 from time evolution of scale factor

if (m_params.omega == -1)
{ // Cosmo constant
Expand All @@ -98,22 +97,14 @@ class FRW
else
{

scalefac = pow(
(m_time / t0) + 1,
2 / (3 * (1 + m_params.omega))); // Scale factor evolution
scalefac = pow((m_time / t0) + 1, 2 / (3 * (1 + m_params.omega))); // Scale factor evolution

hubparam = 2.0 / (3.0 * (1 + m_params.omega) *
(m_time + t0)); // Hubble parameter evolution
hubparam = 2.0 / (3.0 * (1 + m_params.omega) * (m_time + t0)); // Hubble parameter evolution
}

vars.lapse = pow(
scalefac,
m_params
.alpha); // Cosmic time alpha = 0, conformal time alpha = 1
vars.lapse = pow(scalefac,m_params.alpha); // Cosmic time alpha = 0, conformal time alpha = 1

vars.K =
-3.0 *
hubparam; // K = -3H (not used but included for completeness)
vars.K =-3.0 * hubparam; // K = -3H (not used but included for completeness)

FOR(i) vars.gamma[i][i] = pow(scalefac, 2.0); // gamma_ij = a^2

Expand Down

0 comments on commit dd03352

Please sign in to comment.