From 4157724e5cd5dba53d219f2b03203b478da00d94 Mon Sep 17 00:00:00 2001 From: David Wells Date: Sat, 30 Apr 2016 20:42:33 -0400 Subject: [PATCH] Remove unnecessary const_cast. The non-multigrid algorithms have never needed to use user flags to indicate progress. --- source/dofs/dof_handler_policy.cc | 29 ++--------------------------- 1 file changed, 2 insertions(+), 27 deletions(-) diff --git a/source/dofs/dof_handler_policy.cc b/source/dofs/dof_handler_policy.cc index dcd1f3d60d..816b49f8b3 100644 --- a/source/dofs/dof_handler_policy.cc +++ b/source/dofs/dof_handler_policy.cc @@ -97,10 +97,6 @@ namespace internal dset_dof_index (d, next_free_dof++); - // note that this cell has been - // processed - cell->set_user_flag (); - return next_free_dof; } @@ -145,10 +141,6 @@ namespace internal for (unsigned int d=0; dset_dof_index (d, next_free_dof++); - - // note that this cell has been processed - cell->set_user_flag (); - return next_free_dof; } @@ -208,11 +200,6 @@ namespace internal for (unsigned int d=0; dset_dof_index (d, next_free_dof++); - - // note that this cell has been - // processed - cell->set_user_flag (); - return next_free_dof; } @@ -230,17 +217,8 @@ namespace internal const types::subdomain_id subdomain_id, DoFHandler &dof_handler) { - const dealii::Triangulation &tria - = dof_handler.get_triangulation(); - Assert (tria.n_levels() > 0, ExcMessage("Empty triangulation")); - - // Clear user flags because we will need them. But first we save - // them and make sure that we restore them later such that at the - // end of this function the Triangulation will be in the same state - // as it was at the beginning of this function. - std::vector user_flags; - tria.save_user_flags(user_flags); - const_cast &>(tria).clear_user_flags (); + Assert (dof_handler.get_triangulation().n_levels() > 0, + ExcMessage("Empty triangulation")); types::global_dof_index next_free_dof = offset; typename DoFHandler::active_cell_iterator @@ -261,9 +239,6 @@ namespace internal if (!cell->is_artificial()) cell->update_cell_dof_indices_cache (); - // finally restore the user flags - const_cast &>(tria).load_user_flags(user_flags); - return next_free_dof; } -- 2.39.5