Linked to python

This commit is contained in:
Guilhem Lavaux 2015-04-28 22:15:40 +02:00
parent db1d63b04f
commit ddaac4a97a
3 changed files with 11 additions and 1 deletions

View File

@ -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)

View File

@ -75,6 +75,12 @@ CosmoPower::CosmoPower()
updateCosmology();
}
CosmoPower::~CosmoPower()
{
if (ehu_params)
delete ehu_params;
}
/*
* This is \hat{tophat}
*/

View File

@ -91,6 +91,7 @@ namespace CosmoTool {
};
CosmoPower();
~CosmoPower();
void setFunction(CosmoFunction f);