*
* @ingroup Exceptions
*/
- DeclException0 (ExcTriangulationNotEmpty);
+ DeclException2 (ExcTriangulationNotEmpty,
+ int, int,
+ << "You are trying to perform an operation on a triangulation "
+ << "that is only allowed if the triangulation is currently empty. "
+ << "However, it currently stores " << arg1 << " vertices and has "
+ << "cells on " << arg2 << " levels.");
/**
* Trying to re-read a grid, an error occurred.
*
void
Triangulation<dim, spacedim>::set_mesh_smoothing(const MeshSmoothing mesh_smoothing)
{
- Assert (n_levels() == 0, ExcTriangulationNotEmpty ());
+ Assert (n_levels() == 0, ExcTriangulationNotEmpty (vertices.size(), levels.size()));
smooth_grid=mesh_smoothing;
}
Triangulation<dim, spacedim>::
copy_triangulation (const Triangulation<dim, spacedim> &old_tria)
{
- Assert (vertices.size() == 0, ExcTriangulationNotEmpty());
- Assert (levels.size () == 0, ExcTriangulationNotEmpty());
- Assert (faces == NULL, ExcTriangulationNotEmpty());
+ Assert (vertices.size() == 0, ExcTriangulationNotEmpty(vertices.size(), levels.size()));
+ Assert (levels.size () == 0, ExcTriangulationNotEmpty(vertices.size(), levels.size()));
+ Assert (faces == NULL, ExcTriangulationNotEmpty(vertices.size(), levels.size()));
Assert (old_tria.levels.size() != 0, ExcInternalError());
Assert (old_tria.vertices.size() != 0, ExcInternalError());
const std::vector<CellData<dim> > &cells,
const SubCellData &subcelldata)
{
- Assert (vertices.size() == 0, ExcTriangulationNotEmpty());
- Assert (levels.size() == 0, ExcTriangulationNotEmpty());
- Assert (faces == NULL, ExcTriangulationNotEmpty());
+ Assert (vertices.size() == 0, ExcTriangulationNotEmpty(vertices.size(), levels.size()));
+ Assert (levels.size() == 0, ExcTriangulationNotEmpty(vertices.size(), levels.size()));
+ Assert (faces == NULL, ExcTriangulationNotEmpty(vertices.size(), levels.size()));
// check that no forbidden arrays
// are used
Assert (subcelldata.check_consistency(dim), ExcInternalError());