We can do better than an internal error in the GridTools function.
"See the glossary entry on 'Ghosted vectors' for more "
"information.");
+ /**
+ * Exception indicating that one of the cells in the input to
+ * Triangulation::create_triangulation() or a related function cannot be used.
+ */
+ DeclException1(ExcGridHasInvalidCell,
+ int,
+ << "Something went wrong when making cell " << arg1
+ << ". Read the docs and the source code "
+ << "for more information.");
+
/**
* Some of our numerical classes allow for setting all entries to zero using
* the assignment operator <tt>=</tt>.
Assert(false, ExcNotImplemented());
std::size_t n_negative_cells = 0;
+ std::size_t cell_no = 0;
for (auto &cell : cells)
{
const ArrayView<const unsigned int> vertices(cell.vertices);
// If not, then the grid is seriously broken and
// we just give up.
AssertThrow(GridTools::cell_measure(all_vertices, vertices) > 0,
- ExcInternalError());
+ ExcGridHasInvalidCell(cell_no));
}
+ ++cell_no;
}
return n_negative_cells;
}
// internal::TriangulationImplementation
using dealii::Triangulation;
- /**
- * Exception
- * @ingroup Exceptions
- */
- DeclException1(ExcGridHasInvalidCell,
- int,
- << "Something went wrong when making cell " << arg1
- << ". Read the docs and the source code "
- << "for more information.");
/**
* Exception
* @ingroup Exceptions
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