]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
Fixed return value for get_manifold when querying cells.
authorheltai <heltai@0785d39b-7218-0410-832d-ea1e28bc413d>
Mon, 27 Jan 2014 11:17:35 +0000 (11:17 +0000)
committerheltai <heltai@0785d39b-7218-0410-832d-ea1e28bc413d>
Mon, 27 Jan 2014 11:17:35 +0000 (11:17 +0000)
git-svn-id: https://svn.dealii.org/branches/branch_manifold_id@32325 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/include/deal.II/grid/tria_accessor.templates.h
deal.II/source/grid/tria.cc

index c56468ae0706fdfd6a3b5de05c22712eec6f901d..7e9cffa7e3906e2f3f993b1d808fe2e2e5c7d163 100644 (file)
@@ -1958,7 +1958,9 @@ TriaAccessor<structdim, dim, spacedim>::get_manifold () const
     mi =  static_cast<types::manifold_id>
          (structdim < dim ?
           this->objects().boundary_or_material_id[this->present_index].boundary_id:
-          this->objects().boundary_or_material_id[this->present_index].material_id);
+          dim < spacedim ? 
+          this->objects().boundary_or_material_id[this->present_index].material_id:
+          numbers::invalid_manifold_id);
   
   return this->tria->get_manifold(mi);
 }
index 8666be38127fc4b2a31150167471f4772744aa5e..85da38d151ead3be180471897e7b50d314c945e9 100644 (file)
@@ -4922,9 +4922,9 @@ namespace internal
                   triangulation.vertices_used[next_unused_vertex] = true;
 
                  // Ask the manifold where to put the new point. To
-                 // maintain backward compatibility, if the line does
-                 // not have a manifold id, query the cell boundary
-                 // instead
+                 // maintain backward compatibility, in codimension
+                 // one if the line does not have a manifold id,
+                 // query the cell boundary instead
                  get_default_points_and_weights(sp, wp, line);
                  if(dim < spacedim && line->manifold_id() == numbers::invalid_manifold_id)
                    triangulation.vertices[next_unused_vertex] =
@@ -4932,33 +4932,6 @@ namespace internal
                  else
                    triangulation.vertices[next_unused_vertex] =
                      line->get_manifold().get_new_point(sp, wp);
-                 
-//                   if (spacedim == dim)
-//                     {
-                      // for the case of a domain
-                      // in an equal-dimensional
-                      // space we only have to
-                      // treat boundary lines
-                      // differently; for interior
-                      // lines we can compute the
-                      // midpoint as the mean of
-                      // the two vertices:
-//                      if (line->at_boundary())
-//                         triangulation.vertices[next_unused_vertex]
-//                           = line->get_boundary().get_new_point_on_line(line);
-//                       triangulation.get_boundary(line->boundary_indicator())
-//                             .get_new_point_on_line (line);
-//                       else
-//                         triangulation.vertices[next_unused_vertex]
-//                          = (line->vertex(0) + line->vertex(1)) / 2;
-//                     }
-//                   else
-                    // however, if spacedim>dim, we
-                    // always have to ask the
-                    // boundary object for its
-//                     // answer
-//                     triangulation.vertices[next_unused_vertex]
-//                       = triangulation.get_boundary(line->user_index()).get_new_point_on_line (line);
 
                   // now that we created
                   // the right point, make
@@ -5497,14 +5470,6 @@ namespace internal
                  triangulation.vertices[next_unused_vertex] =
                    line->get_manifold().get_new_point(sp, wp);
 
-
-//                   if (line->at_boundary())
-//                     triangulation.vertices[next_unused_vertex]
-//                       = triangulation.get_boundary(line->boundary_indicator()).get_new_point_on_line (line);
-//                   else
-//                     triangulation.vertices[next_unused_vertex]
-//                       = (line->vertex(0) + line->vertex(1)) / 2;
-
                   // now that we created
                   // the right point, make
                   // up the two child lines
@@ -9168,8 +9133,6 @@ namespace internal
                        get_default_points_and_weights(sp,wp,face);
                         const Point<spacedim> new_bound
                           = face->get_manifold().get_new_point(sp,wp);
-//                        triangulation.get_boundary(face->boundary_indicator())
-//                             .get_new_point_on_face (face);
                         // to check it,
                         // transform to the
                         // unit cell with

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.