From ddaac4a97a7e2f7b4e73cf6bed2665f6506b4b98 Mon Sep 17 00:00:00 2001 From: Guilhem Lavaux Date: Tue, 28 Apr 2015 22:15:40 +0200 Subject: [PATCH] Linked to python --- python/_cosmo_power.pyx | 5 ++++- src/cosmopower.cpp | 6 ++++++ src/cosmopower.hpp | 1 + 3 files changed, 11 insertions(+), 1 deletion(-) diff --git a/python/_cosmo_power.pyx b/python/_cosmo_power.pyx index c23da1f..b417bd9 100644 --- a/python/_cosmo_power.pyx +++ b/python/_cosmo_power.pyx @@ -17,7 +17,8 @@ cdef extern from "cosmopower.hpp" namespace "CosmoTool": POWER_BARDEEN "CosmoTool::CosmoPower::POWER_BARDEEN", POWER_SUGIYAMA "CosmoTool::CosmoPower::POWER_SUGIYAMA", POWER_BDM, - POWER_TEST + POWER_TEST, + HU_WIGGLES_ORIGINAL "CosmoTool::CosmoPower::HU_WIGGLES_ORIGINAL" cdef cppclass CosmoPower: double n @@ -113,6 +114,8 @@ cdef class CosmologyPower: f = POWER_BARDEEN elif funcname=='SUGIYAMA': f = POWER_SUGIYAMA + elif funcname=='HU_WIGGLES_ORIGINAL': + f = HU_WIGGLES_ORIGINAL self.power.setFunction(f) diff --git a/src/cosmopower.cpp b/src/cosmopower.cpp index 87baf6d..3aa2854 100644 --- a/src/cosmopower.cpp +++ b/src/cosmopower.cpp @@ -75,6 +75,12 @@ CosmoPower::CosmoPower() updateCosmology(); } +CosmoPower::~CosmoPower() +{ + if (ehu_params) + delete ehu_params; +} + /* * This is \hat{tophat} */ diff --git a/src/cosmopower.hpp b/src/cosmopower.hpp index 3a395b4..a04442b 100644 --- a/src/cosmopower.hpp +++ b/src/cosmopower.hpp @@ -91,6 +91,7 @@ namespace CosmoTool { }; CosmoPower(); + ~CosmoPower(); void setFunction(CosmoFunction f);