2014-11-20 14:45:00 +01:00
|
|
|
#include "config.hpp"
|
|
|
|
#include "loadGadget.hpp"
|
|
|
|
#include <string>
|
|
|
|
|
|
|
|
static inline
|
2016-01-29 10:24:50 +01:00
|
|
|
CosmoTool::SimuData *loadGadgetMulti_safe(const std::string& fname, int flags, int gadgetFormat)
|
2014-11-20 14:45:00 +01:00
|
|
|
{
|
|
|
|
try
|
|
|
|
{
|
2016-01-29 10:24:50 +01:00
|
|
|
return CosmoTool::loadGadgetMulti(fname.c_str(), -1, flags, gadgetFormat);
|
2014-11-20 14:45:00 +01:00
|
|
|
}
|
|
|
|
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;
|
|
|
|
}
|