From b4cdfdd203b1c6280394fd827e4e7dff67e3fe9b Mon Sep 17 00:00:00 2001 From: heltai Date: Wed, 20 Nov 2013 23:19:52 +0000 Subject: [PATCH] Put the idea in the code. Not compiling for nasty circling around... git-svn-id: https://svn.dealii.org/branches/branch_manifold_id@31742 0785d39b-7218-0410-832d-ea1e28bc413d --- .../deal.II/grid/tria_accessor.templates.h | 15 ++++++++++++++- deal.II/include/deal.II/grid/tria_boundary.h | 8 ++++++-- 2 files changed, 20 insertions(+), 3 deletions(-) diff --git a/deal.II/include/deal.II/grid/tria_accessor.templates.h b/deal.II/include/deal.II/grid/tria_accessor.templates.h index 14fade0c7b..77354b8bab 100644 --- a/deal.II/include/deal.II/grid/tria_accessor.templates.h +++ b/deal.II/include/deal.II/grid/tria_accessor.templates.h @@ -1970,11 +1970,24 @@ TriaAccessor::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 (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 *> */ +/* (&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); diff --git a/deal.II/include/deal.II/grid/tria_boundary.h b/deal.II/include/deal.II/grid/tria_boundary.h index a4ea60c53d..c7894c5bc7 100644 --- a/deal.II/include/deal.II/grid/tria_boundary.h +++ b/deal.II/include/deal.II/grid/tria_boundary.h @@ -26,13 +26,13 @@ #include #include #include +#include DEAL_II_NAMESPACE_OPEN template 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 class Triangulation; * @author Wolfgang Bangerth, 1999, 2001, 2009, Ralf Hartmann, 2001, 2008 */ template -class Boundary : public Subscriptor + class Boundary : public Manifold { public: @@ -115,6 +115,10 @@ public: Point get_new_point_on_line (const typename Triangulation::line_iterator &line) const = 0; + virtual + Point + get_new_point(const std::vector > &, const std::vector &) 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 -- 2.39.5