From a881e3bcfa41d15650441cb8faf7fad943ea8d14 Mon Sep 17 00:00:00 2001 From: Wolfgang Bangerth Date: Tue, 2 Feb 2021 22:00:07 -0700 Subject: [PATCH] Move an exception to the top of a function. --- source/distributed/tria.cc | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/source/distributed/tria.cc b/source/distributed/tria.cc index b0d447cf9f..65d4bd03ed 100644 --- a/source/distributed/tria.cc +++ b/source/distributed/tria.cc @@ -3213,6 +3213,11 @@ namespace parallel Triangulation::copy_triangulation( const dealii::Triangulation &other_tria) { + Assert(other_tria.n_levels() == 1, + ExcMessage( + "Parallel distributed triangulations can only be copied, " + "if they are not refined!")); + try { dealii::parallel::TriangulationBase:: @@ -3232,11 +3237,6 @@ namespace parallel // separate) triangulation_has_content = true; - Assert(other_tria.n_levels() == 1, - ExcMessage( - "Parallel distributed triangulations can only be copied, " - "if they are not refined!")); - if (const dealii::parallel::distributed::Triangulation *other_tria_x = dynamic_cast