From 535f25d710584c1c72853e02639d3e05e95f9c3a Mon Sep 17 00:00:00 2001 From: Guilhem Lavaux Date: Tue, 24 Feb 2015 14:45:09 +0100 Subject: [PATCH] Moved s_tilde --- src/cosmopower.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/cosmopower.cpp b/src/cosmopower.cpp index 8544c25..8e6b940 100644 --- a/src/cosmopower.cpp +++ b/src/cosmopower.cpp @@ -172,9 +172,10 @@ double CosmoPower::powerHuWiggles(double k) double beta_c = ehu.beta_c; double alpha_b = ehu.alpha_b; double beta_b = ehu.beta_b; - double s_tilde = s * pow(1 + pow(ehu.beta_node / (k * s), 3), -1./3); - double xx = k * s; + + double s_tilde = s * pow(1 + pow(ehu.beta_node / (xx), 3), -1./3); + double f = 1 / (1 + pow(xx / 5.4, 4)); double q = k / (13.41 * k_eq); double T_c = f * T_tilde_0(q, 1, beta_c) + (1 - f) * T_tilde_0(q, alpha_c, beta_c);