]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
Removed the map boundary. Now only manifold is there.
authorheltai <heltai@0785d39b-7218-0410-832d-ea1e28bc413d>
Fri, 24 Jan 2014 19:41:17 +0000 (19:41 +0000)
committerheltai <heltai@0785d39b-7218-0410-832d-ea1e28bc413d>
Fri, 24 Jan 2014 19:41:17 +0000 (19:41 +0000)
git-svn-id: https://svn.dealii.org/branches/branch_manifold_id@32302 0785d39b-7218-0410-832d-ea1e28bc413d

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

index 5eea08a8bc9268f061c8cba31e1957675235553f..433ff1856bb0037d55c4124bd5f3a4cc648692db 100644 (file)
@@ -1236,18 +1236,9 @@ public:
   /**
    * Default manifold object. This is used
    * for those objects for which no
-   * manifold description has been explicitly
-   * set using set_manifold().
-   */
-  static const FlatManifold<spacedim> flat_manifold;
-
-  /**
-   * Default boundary object. This is used
-   * for those objects for which no
    * boundary description has been explicitly
    * set using set_manifold().
    */
-
     static const StraightBoundary<dim,spacedim> straight_boundary;
 
   /**
@@ -1814,7 +1805,7 @@ public:
    * @see @ref GlossBoundaryIndicator "Glossary entry on boundary indicators"
    */
   void set_boundary (const types::manifold_id   number,
-                     const Manifold<spacedim> &boundary_object) DEAL_II_DEPRECATED;
+                     const Manifold<spacedim> &boundary_object);
   /**
    * Assign a Manifold object to a certain part of the
    * triangulation. The Manifold object is used to find the location
@@ -3208,14 +3199,6 @@ private:
    */
   std::vector<bool>                     vertices_used;
 
-    
-  /**
-   *  Collection of boundary objects. We store only objects, which are
-   *  not of type StraightBoundary.
-   */
-  std::map<types::manifold_id, SmartPointer<const Manifold<spacedim> , Triangulation<dim, spacedim> > >  boundary;
-
-    
   /**
    *  Collection of manifold objects. We store only objects, which are
    *  not of type FlatManifold.
index df31c0d49c1ac6f78f93bbb42906e6593db7d2ca..c56468ae0706fdfd6a3b5de05c22712eec6f901d 100644 (file)
@@ -1939,30 +1939,14 @@ template <int structdim, int dim, int spacedim>
 const Manifold<spacedim> &
 TriaAccessor<structdim, dim, spacedim>::get_boundary () const
 {
-  Assert (structdim<spacedim, ExcImpossibleInDim(dim));
-  Assert (this->used(), TriaAccessorExceptions::ExcCellNotUsed());
-                                  // Get the default (manifold_id)
-  types::manifold_id mi = this->objects().manifold_id[this->present_index];
-
-                                  // If the manifold_id is set to
-                                  // invalid, then ask for a
-                                  // boundary_id
-  if(mi == numbers::invalid_manifold_id)
-    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);
-  
-  return this->tria->get_boundary(mi);
+  return get_manifold();
 }
 
 
-
 template <int structdim, int dim, int spacedim>
 const Manifold<spacedim> &
 TriaAccessor<structdim, dim, spacedim>::get_manifold () const
-{
-                                 
+{                                
   Assert (this->used(), TriaAccessorExceptions::ExcCellNotUsed());
                                   // Get the default (manifold_id)
   types::manifold_id mi = this->objects().manifold_id[this->present_index];
@@ -1970,27 +1954,12 @@ TriaAccessor<structdim, dim, spacedim>::get_manifold () const
                                   // In case this is not valid, check
                                   // the boundary id, after having
                                   // casted it to a manifold id
-  if(mi == numbers::invalid_manifold_id) {
+  if(mi == numbers::invalid_manifold_id) 
     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);
-    // If structdim < dim or structdim == dim and dim < spacedim,
-    // we have to query the old style boundary, to preserve backward compatibilty,
-    // otherwise we will run into troubles...
-    if( (structdim < dim) ||
-       (dim < spacedim) )
-      return get_boundary();    
-//       return this->tria->get_manifold
-//     (numbers::invalid_manifold_id);
-/*     *dynamic_cast<const Manifold<spacedim> *> */
-/*     (&this->tria->get_boundary(mi)); */
-    else
-      return this->tria->get_manifold
-       (numbers::invalid_manifold_id);
-  }
-
-                                  // Now recover the manifold itself
+  
   return this->tria->get_manifold(mi);
 }
 
index 82ebaa7dc6e61fac46274fd0b003df367b97e316..8666be38127fc4b2a31150167471f4772744aa5e 100644 (file)
@@ -9537,15 +9537,11 @@ namespace internal
   }
 }
 
-
-template <int dim, int spacedim>
-const FlatManifold<spacedim>
-Triangulation<dim, spacedim>::flat_manifold = FlatManifold<spacedim>();
-
 template <int dim, int spacedim>
 const StraightBoundary<dim,spacedim>
 Triangulation<dim, spacedim>::straight_boundary = StraightBoundary<dim,spacedim>();
 
+
 template <int dim, int spacedim>
 const unsigned int
 Triangulation<dim, spacedim>::dimension;
@@ -9817,9 +9813,9 @@ copy_triangulation (const Triangulation<dim, spacedim> &old_tria)
 
   typename std::map<types::boundary_id,
     SmartPointer<const Manifold<spacedim> , Triangulation<dim, spacedim> > >::const_iterator
-  bdry_iterator = old_tria.boundary.begin();
-  for (; bdry_iterator != old_tria.boundary.end() ; bdry_iterator++)
-    boundary[bdry_iterator->first] = bdry_iterator->second;
+  bdry_iterator = old_tria.manifold.begin();
+  for (; bdry_iterator != old_tria.manifold.end() ; bdry_iterator++)
+    manifold[bdry_iterator->first] = bdry_iterator->second;
 
 
   levels.reserve (old_tria.levels.size());
@@ -12295,7 +12291,7 @@ Triangulation<dim, spacedim>::clear_despite_subscriptions()
   vertices.clear ();
   vertices_used.clear ();
 
-  boundary.clear();
+  manifold.clear();
 
   number_cache = internal::Triangulation::NumberCache<dim>();
 }
@@ -14280,7 +14276,7 @@ Triangulation<dim, spacedim>::memory_consumption () const
     mem += MemoryConsumption::memory_consumption (*levels[i]);
   mem += MemoryConsumption::memory_consumption (vertices);
   mem += MemoryConsumption::memory_consumption (vertices_used);
-  mem += sizeof(boundary);
+  mem += sizeof(manifold);
   mem += sizeof(smooth_grid);
   mem += MemoryConsumption::memory_consumption (number_cache);
   mem += sizeof (faces);
index a2b42bcbb3b2f8802c813f6adcdccf1a96a98c10..61c86b0e8e6ca86cb55394a3bb092261482526e0 100644 (file)
@@ -237,7 +237,7 @@ HyperBallBoundary<dim,spacedim>::get_intermediate_point(const Point<spacedim> &p
                         v1=p1-center;
   const double length=std::sqrt((v1-v0).square());
 
-  double eps=1e-3;
+//   double eps=1e-3;
   double r=0;
   if (compute_radius_automatically)
     {
@@ -247,7 +247,7 @@ HyperBallBoundary<dim,spacedim>::get_intermediate_point(const Point<spacedim> &p
   else
     r=radius;
 
-  const double r2=r*r;
+//   const double r2=r*r;
 //   Assert(std::fabs(v0.square()-r2)<eps*r2, ExcInternalError());
 //   Assert(std::fabs(v1.square()-r2)<eps*r2, ExcInternalError());
 
@@ -335,7 +335,7 @@ normal_vector (const Point<dim> &vertex) const
   // is not well defined.
   bool at_distance_R = (std::abs(vertex.distance(this->center)-this->radius)<1e-10);
   
-  if (abs(vertex(0)) < 1e-10 && !at_distance_R)
+  if (std::abs(vertex(0)) < 1e-10 && !at_distance_R)
     {
       Point<dim> normal;
       normal[0] = -1;

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.