On Thu, Jun 28, 2018 at 9:49 AM, Renato Poli <rebp...@gmail.com> wrote:
> Should I copy-paste code from NumericVector to build mine? > Any suggestion? > I definitely suggest _not_ copy/pasting code! Another alternative is to sync the solution vector to all processors so > that everybody can do the same calculation. > Seems a little inefficient, but is simple-and-easy. > If you are not using NumericVector, then there is a Communicator::max() overload that takes a std::vector<T> of values, but I believe this only works if there is a valid StandardType<T> specialization for the type T. Most libMesh objects (LibMeshInit, Mesh, EquationSystems, etc.) provide a Communicator object via the comm() method, e.g. mesh.comm().max(vec). -- John ------------------------------------------------------------------------------ Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot _______________________________________________ Libmesh-users mailing list Libmesh-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/libmesh-users