]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
Put the idea in the code. Not compiling for nasty circling around...
authorheltai <heltai@0785d39b-7218-0410-832d-ea1e28bc413d>
Wed, 20 Nov 2013 23:19:52 +0000 (23:19 +0000)
committerheltai <heltai@0785d39b-7218-0410-832d-ea1e28bc413d>
Wed, 20 Nov 2013 23:19:52 +0000 (23:19 +0000)
git-svn-id: https://svn.dealii.org/branches/branch_manifold_id@31742 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/include/deal.II/grid/tria_accessor.templates.h
deal.II/include/deal.II/grid/tria_boundary.h

index 14fade0c7b3c9a01b9db50e3e41cb1d3765817e4..77354b8bab1b3a048f278b06089524671f55da3f 100644 (file)
@@ -1970,11 +1970,24 @@ 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 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 a4ea60c53ddc2313df7384fc099cda7fcd2bcbfc..c7894c5bc7638d93281001e7ffd183495b90375a 100644 (file)
 #include <deal.II/base/thread_management.h>
 #include <deal.II/base/point.h>
 #include <deal.II/grid/tria.h>
+#include <deal.II/grid/manifold.h>
 
 DEAL_II_NAMESPACE_OPEN
 
 template <int dim, int space_dim> class Triangulation;
 
 
-
 /**
  *   This class is used to represent a boundary to a triangulation.
  *   When a triangulation creates a new vertex on the boundary of the
@@ -82,7 +82,7 @@ template <int dim, int space_dim> class Triangulation;
  * @author Wolfgang Bangerth, 1999, 2001, 2009, Ralf Hartmann, 2001, 2008
  */
 template <int dim, int spacedim=dim>
-class Boundary : public Subscriptor
+  class Boundary : public Manifold<spacedim>
 {
 public:
 
@@ -115,6 +115,10 @@ public:
   Point<spacedim>
   get_new_point_on_line (const typename Triangulation<dim,spacedim>::line_iterator &line) const = 0;
 
+  virtual
+  Point<spacedim> 
+  get_new_point(const std::vector<Point<spacedim> > &, const std::vector<double> &) const;
+
   /**
    * Return the point which shall become the common point of the four children
    * of a quad at the boundary in three or more spatial dimensions. This

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.