]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Avoid a global communication by using a function that's already there.
authorWolfgang Bangerth <bangerth@colostate.edu>
Wed, 21 Jun 2017 09:35:44 +0000 (03:35 -0600)
committerWolfgang Bangerth <bangerth@colostate.edu>
Wed, 21 Jun 2017 09:35:44 +0000 (03:35 -0600)
source/dofs/dof_handler_policy.cc

index 4cd55706a0b1ff1d9e47f247de9d7361bf92c47a..db6e1098c95d118499ac10aec3e67ca2a34db4ba 100644 (file)
@@ -2277,8 +2277,7 @@ namespace internal
         // have any cells on that level or if the local part of the
         // Triangulation has fewer levels. we need to do this because
         // we need to communicate across all processors on all levels
-        const unsigned int n_levels = Utilities::MPI::max(dof_handler.get_triangulation().n_levels(),
-                                                          tr->get_communicator());
+        const unsigned int n_levels = tr->n_global_levels();
         for (unsigned int level = 0; level < n_levels; ++level)
           {
             NumberCache &number_cache = number_caches[level];

In the beginning the Universe was created. This has made a lot of people very angry and has been widely regarded as a bad move.

Douglas Adams


Typeset in Trocchi and Trocchi Bold Sans Serif.