From: Wolfgang Bangerth Date: Wed, 3 Feb 2021 05:00:07 +0000 (-0700) Subject: Move an exception to the top of a function. X-Git-Tag: v9.3.0-rc1~522^2 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F11665%2Fhead;p=dealii.git Move an exception to the top of a function. --- 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