From: tcclevenger Date: Sat, 18 Mar 2017 14:28:37 +0000 (-0400) Subject: const settings and assert for construct_mg X-Git-Tag: v9.0.0-rc1~1769^2~1 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=122848316c85d554dea7157a6ccc712d7ede166f;p=dealii.git const settings and assert for construct_mg --- diff --git a/include/deal.II/distributed/shared_tria.h b/include/deal.II/distributed/shared_tria.h index c420786c92..c1a53576b5 100644 --- a/include/deal.II/distributed/shared_tria.h +++ b/include/deal.II/distributed/shared_tria.h @@ -211,7 +211,7 @@ namespace parallel /** * Settings */ - Settings settings; + const Settings settings; /** * A flag to decide whether or not artificial cells are allowed. diff --git a/source/distributed/shared_tria.cc b/source/distributed/shared_tria.cc index 31903f812b..2c8c7b9431 100644 --- a/source/distributed/shared_tria.cc +++ b/source/distributed/shared_tria.cc @@ -46,7 +46,11 @@ namespace parallel (settings & (partition_metis | partition_zorder | partition_custom_signal)) == partition_zorder || (settings & (partition_metis | partition_zorder | partition_custom_signal)) == partition_custom_signal, ExcMessage ("Settings must contain exactly one type of active cell partitioning scheme.")) - } + + if (settings & construct_multigrid_hierarchy) + Assert(allow_artificial_cells, + ExcMessage ("construct_multigrid_hierarchy requires allow_artificial_cells to be set to true.")) + }