Update cosmotool 2nd part

This commit is contained in:
Guilhem Lavaux 2018-07-19 15:11:23 +03:00
parent 64e05fc180
commit 003bc39d4a
70 changed files with 8708 additions and 0 deletions

View file

@ -0,0 +1,29 @@
#include "config.hpp"
#include "loadGadget.hpp"
#include <string>
static inline
CosmoTool::SimuData *loadGadgetMulti_safe(const std::string& fname, int flags, int gadgetFormat)
{
try
{
return CosmoTool::loadGadgetMulti(fname.c_str(), -1, flags, gadgetFormat);
}
catch (const CosmoTool::Exception& e)
{
return 0;
}
}
static inline
CosmoTool::SimuData **alloc_simudata(int n)
{
return new CosmoTool::SimuData *[n];
}
static inline
void del_simudata(CosmoTool::SimuData **s)
{
delete[] s;
}