diff --git a/AMDiS/src/ProblemVec.cc b/AMDiS/src/ProblemVec.cc index 532c65902790750ceffe2bd5829f8bd9dada132e..81dd6b45dbe85ec5e716af84c8432130360912ad 100644 --- a/AMDiS/src/ProblemVec.cc +++ b/AMDiS/src/ProblemVec.cc @@ -943,6 +943,10 @@ namespace AMDiS { tmpVector->set(0.0); } + // Because we are using the parallel traverse stack, each thread will + // traverse only a part of the mesh. + ElInfo *elInfo = stack.traverseFirst(mesh, -1, assembleFlag); + // After creating privat copies of the DOFMatrix and the DOFVector, all threads // have to wait at this barrier. Especially for small problems this is required, // because otherwise one thread may be finished with assembling, before another @@ -950,10 +954,6 @@ namespace AMDiS { #ifdef _OPENMP #pragma omp barrier #endif - - // Because we are using the parallel traverse stack, each thread will - // traverse only a part of the mesh. - ElInfo *elInfo = stack.traverseFirst(mesh, -1, assembleFlag); while (elInfo) { if (useGetBound_) { basisFcts->getBound(elInfo, bound);