From 2b7e4453dd4998b75f5f1578626e5dbf517e7430 Mon Sep 17 00:00:00 2001 From: Guilhem Lavaux Date: Wed, 1 Dec 2010 18:09:14 -0500 Subject: [PATCH] Compute the linear growth factor --- src/growthFactor.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/growthFactor.cpp b/src/growthFactor.cpp index b68473d..485d876 100644 --- a/src/growthFactor.cpp +++ b/src/growthFactor.cpp @@ -75,7 +75,10 @@ Interpolate CosmoTool::buildLinearGrowth(double OmegaLambda, double OmegaMatter, f.params = &cosmology; f.function = integrandGrowthFactor; - for (int i = 0; i < numPoints; i++) + a_input[0] = 0; + D_output[0] = 0; + + for (int i = 1; i < numPoints; i++) { double a_dest = 0 + 1.0*i/(numPoints-1); double result, abserr;