From 1bbfecf988d4e9e46d2cded8a2f260751a6ab246 Mon Sep 17 00:00:00 2001 From: Timo Heister Date: Wed, 24 Dec 2014 08:29:27 -0500 Subject: [PATCH] improve SolutionTransfer exception parallel::distributed::SolutionTransfer only works with parallel::distributed::Triangulation. This is now checked in the constructor. --- source/distributed/solution_transfer.cc | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) 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.")); + } -- 2.39.5