From 7d26c955db0eb70a419027bb5cc263fae426e433 Mon Sep 17 00:00:00 2001 From: kanschat Date: Fri, 5 Feb 2010 21:34:00 +0000 Subject: [PATCH] fix argument by value and do not use user_flags anymore git-svn-id: https://svn.dealii.org/trunk@20517 0785d39b-7218-0410-832d-ea1e28bc413d --- .../deal.II/include/numerics/mesh_worker_info.h | 4 ++-- .../numerics/mesh_worker_info.templates.h | 4 ++-- .../deal.II/include/numerics/mesh_worker_loop.h | 16 +++++----------- 3 files changed, 9 insertions(+), 15 deletions(-) diff --git a/deal.II/deal.II/include/numerics/mesh_worker_info.h b/deal.II/deal.II/include/numerics/mesh_worker_info.h index f5944e2d34..8028b762f4 100644 --- a/deal.II/deal.II/include/numerics/mesh_worker_info.h +++ b/deal.II/deal.II/include/numerics/mesh_worker_info.h @@ -259,10 +259,10 @@ namespace MeshWorker private: /// Fill index vector - void get_indices(const typename DoFHandler::cell_iterator c); + void get_indices(const typename DoFHandler::cell_iterator& c); /// Fill index vector with level indices - void get_indices(const typename MGDoFHandler::cell_iterator c); + void get_indices(const typename MGDoFHandler::cell_iterator& c); /// Auxiliary vector std::vector indices_org; diff --git a/deal.II/deal.II/include/numerics/mesh_worker_info.templates.h b/deal.II/deal.II/include/numerics/mesh_worker_info.templates.h index 32ab8bceff..3061cff461 100644 --- a/deal.II/deal.II/include/numerics/mesh_worker_info.templates.h +++ b/deal.II/deal.II/include/numerics/mesh_worker_info.templates.h @@ -27,7 +27,7 @@ namespace MeshWorker template void - DoFInfo::get_indices(const typename DoFHandler::cell_iterator c) + DoFInfo::get_indices(const typename DoFHandler::cell_iterator& c) { indices.resize(c->get_fe().dofs_per_cell); @@ -45,7 +45,7 @@ namespace MeshWorker template void - DoFInfo::get_indices(const typename MGDoFHandler::cell_iterator c) + DoFInfo::get_indices(const typename MGDoFHandler::cell_iterator& c) { indices.resize(c->get_fe().dofs_per_cell); diff --git a/deal.II/deal.II/include/numerics/mesh_worker_loop.h b/deal.II/deal.II/include/numerics/mesh_worker_loop.h index aa5d0ba93c..140ac08a11 100644 --- a/deal.II/deal.II/include/numerics/mesh_worker_loop.h +++ b/deal.II/deal.II/include/numerics/mesh_worker_loop.h @@ -81,9 +81,6 @@ namespace MeshWorker const bool integrate_boundary = (boundary_worker != 0); const bool integrate_interior_face = (face_worker != 0); - const_cast&>( - begin->get_triangulation()).clear_user_flags(); - // Loop over all cells for (ITERATOR cell = begin; cell != end; ++cell) { @@ -101,9 +98,6 @@ namespace MeshWorker for (unsigned int face_no=0; face_no < GeometryInfo::faces_per_cell; ++face_no) { typename ITERATOR::AccessorType::Container::face_iterator face = cell->face(face_no); - // Treat every face only once - if (face->user_flag_set ()) continue; - if (cell->at_boundary(face_no)) { if (integrate_boundary) @@ -115,8 +109,6 @@ namespace MeshWorker } else if (integrate_interior_face) { - if (face->user_flag_set ()) continue; - face->set_user_flag (); // Interior face typename ITERATOR::AccessorType::Container::cell_iterator neighbor = cell->neighbor(face_no); @@ -153,8 +145,11 @@ namespace MeshWorker { // Neighbor is // on same - // level - + // level, but + // only do this + // from one side. + if (neighbor < cell) continue; + // If iterator // is active // and neighbor @@ -173,7 +168,6 @@ namespace MeshWorker face_worker(face_info, neighbor_info); assembler.assemble (face_info, neighbor_info); - neighbor->face(neighbor_face_no)->set_user_flag (); } } } // faces -- 2.39.5