This commit is contained in:
Lukas 2018-06-12 11:11:36 +02:00
parent 20c62589d2
commit 30928eaaa8

View File

@ -247,12 +247,15 @@ void Ng_LoadMesh (const char * filename)
SetGlobalMesh (mesh); SetGlobalMesh (mesh);
mesh->SendRecvMesh(); mesh->SendRecvMesh();
} }
if(ntasks>1) { if(ntasks>1) {
/** Scatter the geometry-string **/ /** Scatter the geometry-string **/
MPI_Bcast(&strs, 1, MPI_INT, 0, MPI_COMM_WORLD); MPI_Bcast(&strs, 1, MPI_INT, 0, MPI_COMM_WORLD);
if(id!=0) if(id!=0)
buf = new char[strs]; buf = new char[strs];
MPI_Bcast(buf, strs, MPI_CHAR, 0, MPI_COMM_WORLD); MPI_Bcast(buf, strs, MPI_CHAR, 0, MPI_COMM_WORLD);
}
#endif
infile = new istringstream(string((const char*)buf, (size_t)strs)); infile = new istringstream(string((const char*)buf, (size_t)strs));
delete[] buf; delete[] buf;
for (int i = 0; i < geometryregister.Size(); i++) for (int i = 0; i < geometryregister.Size(); i++)
@ -270,8 +273,6 @@ void Ng_LoadMesh (const char * filename)
mesh->SetGeometry(ng_geometry); mesh->SetGeometry(ng_geometry);
delete infile; delete infile;
} }
#endif
}
void Ng_LoadMeshFromString (const char * mesh_as_string) void Ng_LoadMeshFromString (const char * mesh_as_string)
{ {