From: Timo Heister Date: Wed, 24 Dec 2014 13:29:27 +0000 (-0500) Subject: improve SolutionTransfer exception X-Git-Tag: v8.2.0~3^2~12 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=cf40de3ded1bf5a8e6ee785214585e2b2a7a69bc;p=dealii.git improve SolutionTransfer exception parallel::distributed::SolutionTransfer only works with parallel::distributed::Triangulation. This is now checked in the constructor. --- diff --git a/source/distributed/solution_transfer.cc b/source/distributed/solution_transfer.cc index 27eee417eb..3455251bf1 100644 --- a/source/distributed/solution_transfer.cc +++ b/source/distributed/solution_transfer.cc @@ -47,7 +47,13 @@ namespace parallel SolutionTransfer::SolutionTransfer(const DH &dof) : dof_handler(&dof, typeid(*this).name()) - {} + { + parallel::distributed::Triangulation *tria + = (dynamic_cast*> + (const_cast*> + (&dof_handler->get_tria()))); + Assert (tria != 0, ExcMessage("parallel::distributed::SolutionTransfer requires a parallel::distributed::Triangulation object.")); + }