*/
PersistentTriangulation (const Triangulation<dim> &coarse_grid);
+ /**
+ * Copy constructor. This operation
+ * is only allowed, if the triangulation
+ * underlying the object to be copied
+ * is presently empty. Refinement flags
+ * as well as the pointer to the
+ * coarse grid are copied, however.
+ */
+ PersistentTriangulation (const PersistentTriangulation<dim> &old_tria);
+
/**
* Destructor.
*/
* Exception.
*/
DeclException0 (ExcFunctionNotUseful);
+ /**
+ * Exception.
+ */
+ DeclException0 (ExcTriaNotEmpty);
private:
/**
{};
+template <int dim>
+PersistentTriangulation<dim>::
+PersistentTriangulation (const PersistentTriangulation<dim> &old_tria) :
+ // default initialize
+ // tria, i.e. it will be
+ // empty on first use
+ Triangulation<dim> (),
+ coarse_grid (old_tria.coarse_grid),
+ refine_flags (old_tria.refine_flags),
+ coarsen_flags (old_tria.coarsen_flags)
+{
+ Assert (old_tria.n_levels() == 0, ExcTriaNotEmpty ());
+};
+
+
template <int dim>
PersistentTriangulation<dim>::~PersistentTriangulation ()
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