From 6452b802f767eeb9dcc17a220b701e12d211f512 Mon Sep 17 00:00:00 2001 From: Marc Fehling Date: Tue, 23 Feb 2021 15:21:58 -0700 Subject: [PATCH] Remove double negation from exception message. --- include/deal.II/dofs/dof_handler.h | 2 +- source/dofs/dof_handler.cc | 4 ++-- source/dofs/dof_handler_policy.cc | 32 +++++++++++++----------------- source/hp/refinement.cc | 27 +++++++++---------------- 4 files changed, 26 insertions(+), 39 deletions(-) diff --git a/include/deal.II/dofs/dof_handler.h b/include/deal.II/dofs/dof_handler.h index 6930091e8f..c74286fd7f 100644 --- a/include/deal.II/dofs/dof_handler.h +++ b/include/deal.II/dofs/dof_handler.h @@ -1387,7 +1387,7 @@ public: * Exception used when a certain feature doesn't make sense when * DoFHandler does not hp-capabilities. */ - DeclExceptionMsg(ExcNotAvailableWithoutHP, + DeclExceptionMsg(ExcOnlyAvailableWithHP, "The current function doesn't make sense when used with a " "DoFHandler without hp-capabilities."); diff --git a/source/dofs/dof_handler.cc b/source/dofs/dof_handler.cc index d88ce7c135..6abec40208 100644 --- a/source/dofs/dof_handler.cc +++ b/source/dofs/dof_handler.cc @@ -1713,7 +1713,7 @@ namespace internal { Assert( dof_handler.hp_capability_enabled == true, - (typename DoFHandler::ExcNotAvailableWithoutHP())); + (typename DoFHandler::ExcOnlyAvailableWithHP())); if (const dealii::parallel::shared::Triangulation *tr = dynamic_cast< @@ -3115,7 +3115,7 @@ template void DoFHandler::create_active_fe_table() { - AssertThrow(hp_capability_enabled == true, ExcNotAvailableWithoutHP()); + AssertThrow(hp_capability_enabled == true, ExcOnlyAvailableWithHP()); // Create sufficiently many hp::DoFLevels. diff --git a/source/dofs/dof_handler_policy.cc b/source/dofs/dof_handler_policy.cc index 2d9bc98a4e..76de280b8a 100644 --- a/source/dofs/dof_handler_policy.cc +++ b/source/dofs/dof_handler_policy.cc @@ -216,7 +216,7 @@ namespace internal { Assert( dof_handler.hp_capability_enabled == true, - (typename DoFHandler::ExcNotAvailableWithoutHP())); + (typename DoFHandler::ExcOnlyAvailableWithHP())); std::map dof_identities; @@ -374,9 +374,8 @@ namespace internal compute_line_dof_identities(const DoFHandler<1, spacedim> &dof_handler) { (void)dof_handler; - Assert( - dof_handler.hp_capability_enabled == true, - (typename DoFHandler<1, spacedim>::ExcNotAvailableWithoutHP())); + Assert(dof_handler.hp_capability_enabled == true, + (typename DoFHandler<1, spacedim>::ExcOnlyAvailableWithHP())); return std::map(); } @@ -389,7 +388,7 @@ namespace internal { Assert( dof_handler.hp_capability_enabled == true, - (typename DoFHandler::ExcNotAvailableWithoutHP())); + (typename DoFHandler::ExcOnlyAvailableWithHP())); std::map dof_identities; @@ -743,7 +742,7 @@ namespace internal (void)dof_handler; Assert( dof_handler.hp_capability_enabled == true, - (typename DoFHandler::ExcNotAvailableWithoutHP())); + (typename DoFHandler::ExcOnlyAvailableWithHP())); // this function should only be called for dim<3 where there are // no quad dof identies. for dim==3, the specialization below should @@ -758,9 +757,8 @@ namespace internal static std::map compute_quad_dof_identities(const DoFHandler<3, spacedim> &dof_handler) { - Assert( - dof_handler.hp_capability_enabled == true, - (typename DoFHandler<3, spacedim>::ExcNotAvailableWithoutHP())); + Assert(dof_handler.hp_capability_enabled == true, + (typename DoFHandler<3, spacedim>::ExcOnlyAvailableWithHP())); const int dim = 3; @@ -1066,7 +1064,7 @@ namespace internal { Assert( dof_handler.hp_capability_enabled == true, - (typename DoFHandler::ExcNotAvailableWithoutHP())); + (typename DoFHandler::ExcOnlyAvailableWithHP())); // Note: we may wish to have something here similar to what // we do for lines and quads, namely that we only identify @@ -1223,9 +1221,8 @@ namespace internal DoFHandler<1, spacedim> &dof_handler) { (void)dof_handler; - Assert( - dof_handler.hp_capability_enabled == true, - (typename DoFHandler<1, spacedim>::ExcNotAvailableWithoutHP())); + Assert(dof_handler.hp_capability_enabled == true, + (typename DoFHandler<1, spacedim>::ExcOnlyAvailableWithHP())); } @@ -1236,7 +1233,7 @@ namespace internal { Assert( dof_handler.hp_capability_enabled == true, - (typename DoFHandler::ExcNotAvailableWithoutHP())); + (typename DoFHandler::ExcOnlyAvailableWithHP())); // we will mark lines that we have already treated, so first save and // clear the user flags on lines and later restore them @@ -1499,7 +1496,7 @@ namespace internal (void)dof_handler; Assert( dof_handler.hp_capability_enabled == true, - (typename DoFHandler::ExcNotAvailableWithoutHP())); + (typename DoFHandler::ExcOnlyAvailableWithHP())); // this function should only be called for dim<3 where there are // no quad dof identies. for dim>=3, the specialization below should @@ -1512,9 +1509,8 @@ namespace internal static void merge_invalid_quad_dofs_on_ghost_interfaces( DoFHandler<3, spacedim> &dof_handler) { - Assert( - dof_handler.hp_capability_enabled == true, - (typename DoFHandler<3, spacedim>::ExcNotAvailableWithoutHP())); + Assert(dof_handler.hp_capability_enabled == true, + (typename DoFHandler<3, spacedim>::ExcOnlyAvailableWithHP())); const int dim = 3; diff --git a/source/hp/refinement.cc b/source/hp/refinement.cc index 3a2c80e6e0..ac0549bd48 100644 --- a/source/hp/refinement.cc +++ b/source/hp/refinement.cc @@ -45,8 +45,7 @@ namespace hp { Assert( dof_handler.has_hp_capabilities(), - (typename dealii::DoFHandler::ExcNotAvailableWithoutHP())); + (typename dealii::DoFHandler::ExcOnlyAvailableWithHP())); std::vector p_flags( dof_handler.get_triangulation().n_active_cells(), true); @@ -64,8 +63,7 @@ namespace hp { Assert( dof_handler.has_hp_capabilities(), - (typename dealii::DoFHandler::ExcNotAvailableWithoutHP())); + (typename dealii::DoFHandler::ExcOnlyAvailableWithHP())); AssertDimension(dof_handler.get_triangulation().n_active_cells(), p_flags.size()); @@ -110,8 +108,7 @@ namespace hp { Assert( dof_handler.has_hp_capabilities(), - (typename dealii::DoFHandler::ExcNotAvailableWithoutHP())); + (typename dealii::DoFHandler::ExcOnlyAvailableWithHP())); AssertDimension(dof_handler.get_triangulation().n_active_cells(), criteria.size()); @@ -146,8 +143,7 @@ namespace hp { Assert( dof_handler.has_hp_capabilities(), - (typename dealii::DoFHandler::ExcNotAvailableWithoutHP())); + (typename dealii::DoFHandler::ExcOnlyAvailableWithHP())); AssertDimension(dof_handler.get_triangulation().n_active_cells(), criteria.size()); Assert((p_refine_fraction >= 0) && (p_refine_fraction <= 1), @@ -240,8 +236,7 @@ namespace hp { Assert( dof_handler.has_hp_capabilities(), - (typename dealii::DoFHandler::ExcNotAvailableWithoutHP())); + (typename dealii::DoFHandler::ExcOnlyAvailableWithHP())); AssertDimension(dof_handler.get_triangulation().n_active_cells(), criteria.size()); Assert((p_refine_fraction >= 0) && (p_refine_fraction <= 1), @@ -433,8 +428,7 @@ namespace hp { Assert( dof_handler.has_hp_capabilities(), - (typename dealii::DoFHandler::ExcNotAvailableWithoutHP())); + (typename dealii::DoFHandler::ExcOnlyAvailableWithHP())); AssertDimension(dof_handler.get_triangulation().n_active_cells(), sobolev_indices.size()); @@ -492,8 +486,7 @@ namespace hp { Assert( dof_handler.has_hp_capabilities(), - (typename dealii::DoFHandler::ExcNotAvailableWithoutHP())); + (typename dealii::DoFHandler::ExcOnlyAvailableWithHP())); AssertDimension(dof_handler.get_triangulation().n_active_cells(), criteria.size()); AssertDimension(dof_handler.get_triangulation().n_active_cells(), @@ -639,8 +632,7 @@ namespace hp { Assert( dof_handler.has_hp_capabilities(), - (typename dealii::DoFHandler::ExcNotAvailableWithoutHP())); + (typename dealii::DoFHandler::ExcOnlyAvailableWithHP())); for (const auto &cell : dof_handler.active_cell_iterators()) if (cell->is_locally_owned() && cell->future_fe_index_set()) @@ -658,8 +650,7 @@ namespace hp { Assert( dof_handler.has_hp_capabilities(), - (typename dealii::DoFHandler::ExcNotAvailableWithoutHP())); + (typename dealii::DoFHandler::ExcOnlyAvailableWithHP())); // Siblings of cells to be coarsened may not be owned by the same // processor. We will exchange coarsening flags on ghost cells and -- 2.39.5