* the hierarchy.
*/
virtual ~Triangulation ();
+
+ /**
+ * Reset this triangulation into a
+ * virgin state by deleting all data.
+ */
+ void clear ();
/**
* Assign a boundary object to
{
for (unsigned int i=0; i<levels.size(); ++i)
delete levels[i];
+ levels.clear ();
for (unsigned int i=0;i<255;++i)
boundary[i]->unsubscribe ();
+};
+
+
+
+template <int dim>
+void Triangulation<dim>::clear ()
+{
+ for (unsigned int i=0; i<levels.size(); ++i)
+ delete levels[i];
levels.clear ();
+
+ vertices.clear ();
+ vertices_used.clear ();
+
+ for (unsigned int i=0; i<255; ++i)
+ {
+ boundary[i]->unsubscribe ();
+ boundary[i] = 0;
+ };
+
+ number_cache = TriaNumberCache<dim>();
};
Assert (vertices.size() == 0, ExcTriangulationNotEmpty());
Assert (levels.size () == 0, ExcTriangulationNotEmpty());
+ Assert (old_tria.levels.size() != 0, ExcInternalError());
+ Assert (old_tria.vertices.size() != 0, ExcInternalError());
+
// copy normal elements
vertices = old_tria.vertices;
vertices_used = old_tria.vertices_used;