/**
* 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;
/**
* @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
*/
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.
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];
// 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);
}
}
}
-
-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;
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());
vertices.clear ();
vertices_used.clear ();
- boundary.clear();
+ manifold.clear();
number_cache = internal::Triangulation::NumberCache<dim>();
}
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);
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)
{
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());
// 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;