From: heltai Date: Fri, 24 Jan 2014 19:41:17 +0000 (+0000) Subject: Removed the map boundary. Now only manifold is there. X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=0fed28d931386a20d27d606710162391060b9641;p=dealii-svn.git Removed the map boundary. Now only manifold is there. git-svn-id: https://svn.dealii.org/branches/branch_manifold_id@32302 0785d39b-7218-0410-832d-ea1e28bc413d --- diff --git a/deal.II/include/deal.II/grid/tria.h b/deal.II/include/deal.II/grid/tria.h index 5eea08a8bc..433ff1856b 100644 --- a/deal.II/include/deal.II/grid/tria.h +++ b/deal.II/include/deal.II/grid/tria.h @@ -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 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 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 &boundary_object) DEAL_II_DEPRECATED; + const Manifold &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 vertices_used; - - /** - * Collection of boundary objects. We store only objects, which are - * not of type StraightBoundary. - */ - std::map , Triangulation > > boundary; - - /** * Collection of manifold objects. We store only objects, which are * not of type FlatManifold. 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 df31c0d49c..c56468ae07 100644 --- a/deal.II/include/deal.II/grid/tria_accessor.templates.h +++ b/deal.II/include/deal.II/grid/tria_accessor.templates.h @@ -1939,30 +1939,14 @@ template const Manifold & TriaAccessor::get_boundary () const { - Assert (structdimused(), 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 - (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 const Manifold & TriaAccessor::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::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 get_boundary(); -// 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/source/grid/tria.cc b/deal.II/source/grid/tria.cc index 82ebaa7dc6..8666be3812 100644 --- a/deal.II/source/grid/tria.cc +++ b/deal.II/source/grid/tria.cc @@ -9537,15 +9537,11 @@ namespace internal } } - -template -const FlatManifold -Triangulation::flat_manifold = FlatManifold(); - template const StraightBoundary Triangulation::straight_boundary = StraightBoundary(); + template const unsigned int Triangulation::dimension; @@ -9817,9 +9813,9 @@ copy_triangulation (const Triangulation &old_tria) typename std::map , Triangulation > >::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::clear_despite_subscriptions() vertices.clear (); vertices_used.clear (); - boundary.clear(); + manifold.clear(); number_cache = internal::Triangulation::NumberCache(); } @@ -14280,7 +14276,7 @@ Triangulation::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); diff --git a/deal.II/source/grid/tria_boundary_lib.cc b/deal.II/source/grid/tria_boundary_lib.cc index a2b42bcbb3..61c86b0e8e 100644 --- a/deal.II/source/grid/tria_boundary_lib.cc +++ b/deal.II/source/grid/tria_boundary_lib.cc @@ -237,7 +237,7 @@ HyperBallBoundary::get_intermediate_point(const Point &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::get_intermediate_point(const Point &p else r=radius; - const double r2=r*r; +// const double r2=r*r; // Assert(std::fabs(v0.square()-r2) &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 normal; normal[0] = -1;