]> https://gitweb.dealii.org/ - dealii.git/commitdiff
make interpolate_to_different_mesh work in parallel
authorTimo Heister <timo.heister@gmail.com>
Fri, 17 Apr 2015 16:31:17 +0000 (12:31 -0400)
committerTimo Heister <timo.heister@gmail.com>
Tue, 21 Apr 2015 18:20:56 +0000 (14:20 -0400)
include/deal.II/numerics/vector_tools.h
include/deal.II/numerics/vector_tools.templates.h

index a35cbd384a6f04f82f1d669280d28271e7977b58..3ed365c84dc1cf56f529be040c32bb43e40c3b84 100644 (file)
@@ -515,6 +515,10 @@ namespace VectorTools
    * ConstraintMatrix argument, see below, or make the field conforming
    * yourself by calling the @p ConstraintsMatrix::distribute function of your
    * hanging node constraints object.
+   *
+   * @note: This function works with parallel::distributed::Triangulation, but only
+   * if the parallel partitioning is the same for both meshes (see the
+   * no_automatic_repartitioning flag).
    */
   template <int dim, int spacedim,
             template <int,int> class DH,
index 77e7605a48e8d84f648081cdf351f5f2d106aac4..71efeb6d14af4f3030fae66d3d9c88181f61a8b6 100644 (file)
@@ -631,6 +631,12 @@ namespace VectorTools
         if (!cell1->active() && !cell2->active())
           continue;
 
+        // skip foreign cells
+        if (cell1->active() && !cell1->is_locally_owned())
+          continue;
+        if (cell2->active() && !cell2->is_locally_owned())
+          continue;
+
         Assert(cell1->get_fe().get_name() ==
                cell2->get_fe().get_name(),
                ExcMessage ("Source and destination cells need to use the same finite element"));

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.