]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
fix argument by value and do not use user_flags anymore
authorkanschat <kanschat@0785d39b-7218-0410-832d-ea1e28bc413d>
Fri, 5 Feb 2010 21:34:00 +0000 (21:34 +0000)
committerkanschat <kanschat@0785d39b-7218-0410-832d-ea1e28bc413d>
Fri, 5 Feb 2010 21:34:00 +0000 (21:34 +0000)
git-svn-id: https://svn.dealii.org/trunk@20517 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/deal.II/include/numerics/mesh_worker_info.h
deal.II/deal.II/include/numerics/mesh_worker_info.templates.h
deal.II/deal.II/include/numerics/mesh_worker_loop.h

index f5944e2d34e554ec90bd8862d2d66017f467031b..8028b762f477757a9adb0a72904ad6a389fc3e6e 100644 (file)
@@ -259,10 +259,10 @@ namespace MeshWorker
 
     private:
                                       /// Fill index vector
-      void get_indices(const typename DoFHandler<dim, spacedim>::cell_iterator c);
+      void get_indices(const typename DoFHandler<dim, spacedim>::cell_iterator& c);
 
                                       /// Fill index vector with level indices
-      void get_indices(const typename MGDoFHandler<dim, spacedim>::cell_iterator c);
+      void get_indices(const typename MGDoFHandler<dim, spacedim>::cell_iterator& c);
 
                                       /// Auxiliary vector
       std::vector<unsigned int> indices_org;
index 32ab8bceff013bf0e1fda33919dd0d437d9d6d5c..3061cff4615ee1542e1f24dedb34d214371fa479 100644 (file)
@@ -27,7 +27,7 @@ namespace MeshWorker
 
   template <int dim, int spacedim>
   void
-  DoFInfo<dim,spacedim>::get_indices(const typename DoFHandler<dim, spacedim>::cell_iterator c)
+  DoFInfo<dim,spacedim>::get_indices(const typename DoFHandler<dim, spacedim>::cell_iterator& c)
   {
     indices.resize(c->get_fe().dofs_per_cell);
   
@@ -45,7 +45,7 @@ namespace MeshWorker
 
   template <int dim, int spacedim>
   void
-  DoFInfo<dim,spacedim>::get_indices(const typename MGDoFHandler<dim, spacedim>::cell_iterator c)
+  DoFInfo<dim,spacedim>::get_indices(const typename MGDoFHandler<dim, spacedim>::cell_iterator& c)
   {
     indices.resize(c->get_fe().dofs_per_cell);
   
index aa5d0ba93c44a1cfd924c958b1e68fb17e83a384..140ac08a11f26b4177940849c0596a7cfad5c211 100644 (file)
@@ -81,9 +81,6 @@ namespace MeshWorker
     const bool integrate_boundary      = (boundary_worker != 0);
     const bool integrate_interior_face = (face_worker != 0);
 
-    const_cast<Triangulation<ITERATOR::AccessorType::Container::dimension>&>(
-      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<ITERATOR::AccessorType::Container::dimension>::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

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.