Tons of fixes in python binder. Loadgadget slightly more verbose
This commit is contained in:
parent
f4187185a7
commit
5d3b56bfcb
4 changed files with 104 additions and 24 deletions
|
@ -274,12 +274,16 @@ void CosmoTool::writeGadget(const std::string& fname, SimuData *data, int Gadget
|
|||
int npart[6], npartTotal[6];
|
||||
float mass[6];
|
||||
|
||||
if (data->Pos[0] == 0 || data->Vel[0] == 0 || data->Id == 0)
|
||||
if (data->Pos[0] == 0 || data->Vel[0] == 0 || data->Id == 0) {
|
||||
cerr << "Invalid simulation data array" << endl;
|
||||
return;
|
||||
}
|
||||
|
||||
f = new UnformattedWrite(fname);
|
||||
if (f == 0)
|
||||
if (f == 0) {
|
||||
cerr << "Cannot create file" << endl;
|
||||
return;
|
||||
}
|
||||
|
||||
for (int i = 0; i < 6; i++)
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue