]> https://gitweb.dealii.org/ - dealii.git/commitdiff
improve SolutionTransfer exception 377/head
authorTimo Heister <timo.heister@gmail.com>
Wed, 24 Dec 2014 13:29:27 +0000 (08:29 -0500)
committerTimo Heister <timo.heister@gmail.com>
Wed, 24 Dec 2014 13:29:49 +0000 (08:29 -0500)
parallel::distributed::SolutionTransfer only works with parallel::distributed::Triangulation. This is now checked in the constructor.

source/distributed/solution_transfer.cc

index 27eee417eba0447ddedc141eea77183aed878d3f..3455251bf1ba9d89a3975196512a6a767f3b4812 100644 (file)
@@ -47,7 +47,13 @@ namespace parallel
     SolutionTransfer<dim, VECTOR, DH>::SolutionTransfer(const DH &dof)
       :
       dof_handler(&dof, typeid(*this).name())
-    {}
+    {
+      parallel::distributed::Triangulation<dim> *tria
+        = (dynamic_cast<parallel::distributed::Triangulation<dim>*>
+           (const_cast<dealii::Triangulation<dim>*>
+            (&dof_handler->get_tria())));
+      Assert (tria != 0, ExcMessage("parallel::distributed::SolutionTransfer requires a parallel::distributed::Triangulation object."));
+    }
 
 
 

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.