From f8158eeb8381c6b1da42f57b14e5bdff07ca2e78 Mon Sep 17 00:00:00 2001 From: bangerth Date: Thu, 4 Jun 2009 14:18:15 +0000 Subject: [PATCH] Use a more elegant way to re-set user pointers. This also avoids a crash we see when running in parallel. 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 | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/deal.II/examples/step-18/step-18.cc b/deal.II/examples/step-18/step-18.cc index ac3b795241..0aca5141ee 100644 --- a/deal.II/examples/step-18/step-18.cc +++ b/deal.II/examples/step-18/step-18.cc @@ -2509,11 +2509,10 @@ namespace QuasiStaticElasticity for (typename Triangulation::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 -- 2.39.5