]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Add an assertion to GridGenerator::create_union_triangulation(). 666/head
authorWolfgang Bangerth <bangerth@math.tamu.edu>
Sun, 15 Mar 2015 04:48:07 +0000 (23:48 -0500)
committerWolfgang Bangerth <bangerth@math.tamu.edu>
Sun, 15 Mar 2015 04:48:07 +0000 (23:48 -0500)
include/deal.II/grid/grid_generator.h
source/grid/grid_generator.cc

index 11d691e452e78bc8e31b900e2d138824f15955bb..3e549022cc6bce8d6c6b458a7ea88bb82944b300 100644 (file)
@@ -698,6 +698,10 @@ namespace GridGenerator
    * meshes, for example in order to compose a mesh for a complicated geometry
    * from meshes for simpler geometries, then this is not the function for
    * you. Instead, consider GridGenerator::merge_triangulations().
+   *
+   * @pre Both of the source conditions need to be available entirely
+   *   locally. In other words, they can not be objects of type
+   *   parallel::distributed::Triangulation.
    */
   template <int dim, int spacedim>
   void
index 6ff40765ffccddd4ba2daf781b88fff6e27d96d8..e64b19fcd77072905b280d389e9f69195b129f40 100644 (file)
@@ -3397,6 +3397,12 @@ namespace GridGenerator
     Assert (GridTools::have_same_coarse_mesh (triangulation_1, triangulation_2),
             ExcMessage ("The two input triangulations are not derived from "
                         "the same coarse mesh as required."));
+    Assert ((dynamic_cast<const parallel::distributed::Triangulation<dim,spacedim>*>(&triangulation_1) == 0)
+            &&
+            (dynamic_cast<const parallel::distributed::Triangulation<dim,spacedim>*>(&triangulation_2) == 0),
+            ExcMessage ("The source triangulations for this function must both "
+                        "be available entirely locally, and not be distributed "
+                        "triangulations."));
 
     // first copy triangulation_1, and
     // then do as many iterations as

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.