]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Remove unused const casts. 2910/head
authorDavid Wells <wellsd2@rpi.edu>
Wed, 3 Aug 2016 02:43:15 +0000 (22:43 -0400)
committerDavid Wells <wellsd2@rpi.edu>
Wed, 3 Aug 2016 13:34:03 +0000 (09:34 -0400)
make_flux_sparsity_pattern no longer uses on user flags so we do not
need to load and save them.

doc/news/changes.h
source/dofs/dof_tools_sparsity.cc

index c46542fe139ee3966ff6ef26c68b63df6687f707..90465076c4cd423103440a1cec1763cf3e70f360 100644 (file)
@@ -412,6 +412,14 @@ SparsityPattern.
 <h3>Specific improvements</h3>
 
 <ol>
+ <li> Improved: The regular and hp versions of
+ DoFTools::make_flux_sparsity_pattern() no longer use the user flags of the
+ underlying triangulation to determine if entries along a certain face have been
+ added to the sparsity pattern.
+ <br>
+ (David Wells, 2016/03/02 - 2016/08/02)
+ </li>
+
  <li> Improved: DoFTools::make_cell_patches() can create block lists
  only extending over local cells of distributed triangulations.
  <br>
index 1ac28b71b617710ae4d0c22f667f59d686ec595a..4bede2c1111f147b97919584f190b1c569221a56 100644 (file)
@@ -1252,23 +1252,10 @@ namespace DoFTools
                   "associated DoF handler objects, asking for any subdomain other "
                   "than the locally owned one does not make sense."));
 
-    // 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<bool> user_flags;
-    dof.get_triangulation().save_user_flags(user_flags);
-    const_cast<Triangulation<DoFHandlerType::dimension,DoFHandlerType::space_dimension> &>
-    (dof.get_triangulation()).clear_user_flags ();
-
     internal::make_flux_sparsity_pattern (dof, sparsity,
                                           constraints, keep_constrained_dofs,
                                           int_mask, flux_mask,
                                           subdomain_id);
-
-    // finally restore the user flags
-    const_cast<Triangulation<DoFHandlerType::dimension,DoFHandlerType::space_dimension> &>
-    (dof.get_triangulation()).load_user_flags(user_flags);
   }
 
 

In the beginning the Universe was created. This has made a lot of people very angry and has been widely regarded as a bad move.

Douglas Adams


Typeset in Trocchi and Trocchi Bold Sans Serif.