Skip to content
Snippets Groups Projects
Commit 3d8c79a1 authored by Tom Fischer's avatar Tom Fischer
Browse files

[NL/DOF] Sum loc. part of norm and distri. result.

parent 3e0ea4b5
No related branches found
No related tags found
No related merge requests found
......@@ -36,7 +36,12 @@ double norm(GlobalVector const& x, unsigned const global_component,
}
}
// TODO for PETSc some global accumulation is necessary.
#ifdef USE_PETSC
double global_result = 0.0;
MPI_Allreduce(&res, &global_result, 1, MPI_DOUBLE, MPI_SUM,
PETSC_COMM_WORLD);
res = global_result;
#endif
return res;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment