fix rank/ntasks in curvedelems

This commit is contained in:
Lukas 2019-02-28 16:24:57 +01:00
parent 568f918ae8
commit 16421b4be3

View File

@ -547,12 +547,10 @@ namespace netgen
void CurvedElements :: BuildCurvedElements(const Refinement * ref, int aorder, void CurvedElements :: BuildCurvedElements(const Refinement * ref, int aorder,
bool arational) bool arational)
{ {
bool working = (ntasks == 1) || (id > 0);
ishighorder = 0; ishighorder = 0;
order = 1; order = 1;
// MPI_Comm curve_comm; // MPI_Comm curve_comm;
const auto & curve_comm = mesh.GetCommunicator(); const auto & curve_comm = mesh.GetCommunicator();
#ifdef PARALLEL #ifdef PARALLEL
@ -567,6 +565,8 @@ namespace netgen
int rank = curve_comm.Rank(); int rank = curve_comm.Rank();
int ntasks = curve_comm.Size(); int ntasks = curve_comm.Size();
bool working = (ntasks == 1) || (id > 0);
if (working) if (working)
order = aorder; order = aorder;