]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
Use a more elegant way to re-set user pointers. This also avoids a crash we see when...
authorbangerth <bangerth@0785d39b-7218-0410-832d-ea1e28bc413d>
Thu, 4 Jun 2009 14:18:15 +0000 (14:18 +0000)
committerbangerth <bangerth@0785d39b-7218-0410-832d-ea1e28bc413d>
Thu, 4 Jun 2009 14:18:15 +0000 (14:18 +0000)
git-svn-id: https://svn.dealii.org/branches/releases/Branch-6-2@18898 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/examples/step-18/step-18.cc

index ac3b795241122ad6ca9fb6923bdaea44f8d06745..0aca5141eefc4a6a9584b5384e9d063a06138e51 100644 (file)
@@ -2509,11 +2509,10 @@ namespace QuasiStaticElasticity
     for (typename Triangulation<dim>::active_cell_iterator
           cell = triangulation.begin_active();
         cell != triangulation.end(); ++cell)
-      {
-       cell->clear_user_pointer();
-       if (cell->subdomain_id() == this_mpi_process)
-         ++our_cells;
-      }
+      if (cell->subdomain_id() == this_mpi_process)
+       ++our_cells;
+      
+    triangulation.clear_user_data();
 
                                     // Next, allocate as many quadrature
                                     // objects as we need. Since the

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.