mirror of
https://bitbucket.org/cosmicvoids/vide_public.git
synced 2025-07-05 07:41:11 +00:00
Updated again cosmotoolbox
This commit is contained in:
parent
e41c26a46c
commit
e44d51442d
14 changed files with 195 additions and 332 deletions
29
external/cosmotool/sample/test_cosmopower.cpp
vendored
Normal file
29
external/cosmotool/sample/test_cosmopower.cpp
vendored
Normal file
|
@ -0,0 +1,29 @@
|
|||
#include <cmath>
|
||||
#include <iostream>
|
||||
#include "cosmopower.hpp"
|
||||
|
||||
using namespace std;
|
||||
using namespace CosmoTool;
|
||||
|
||||
int main()
|
||||
{
|
||||
CosmoPower cp;
|
||||
CosmoPower::CosmoFunction f[] = { CosmoPower::POWER_EFSTATHIOU, CosmoPower::HU_WIGGLES, CosmoPower::HU_BARYON, CosmoPower::POWER_SUGIYAMA };
|
||||
int num_F = sizeof(f)/sizeof(f[0]);
|
||||
|
||||
cp.setFunction(f[0]);
|
||||
cp.normalize();
|
||||
for (int ik = 0; ik < 100; ik++)
|
||||
{
|
||||
double k = pow(10.0, 4*ik/100.-3);
|
||||
|
||||
cout << k << " ";
|
||||
for (int q = 0; q < num_F; q++)
|
||||
{
|
||||
cp.setFunction(f[q]);
|
||||
cout << cp.power(k) << " ";
|
||||
}
|
||||
cout << endl;
|
||||
}
|
||||
return 0;
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue