From 2574d21df58545a8c229f34f0d2a39899ebd0bd6 Mon Sep 17 00:00:00 2001 From: Wolfgang Bangerth Date: Fri, 27 Feb 2015 20:09:46 -0600 Subject: [PATCH] Address Timo's concerns during review. --- source/grid/tria.cc | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/source/grid/tria.cc b/source/grid/tria.cc index ee06cbaa4e..fdb58da941 100644 --- a/source/grid/tria.cc +++ b/source/grid/tria.cc @@ -8767,7 +8767,8 @@ template void Triangulation::set_mesh_smoothing(const MeshSmoothing mesh_smoothing) { - Assert (n_levels() == 0, ExcTriangulationNotEmpty (vertices.size(), levels.size())); + Assert (n_levels() == 0, + ExcTriangulationNotEmpty (vertices.size(), levels.size())); smooth_grid=mesh_smoothing; } @@ -8932,10 +8933,10 @@ void Triangulation:: copy_triangulation (const Triangulation &old_tria) { - 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 ((vertices.size() == 0) && + (levels.size () == 0) && + (faces == NULL), + ExcTriangulationNotEmpty(vertices.size(), levels.size())); Assert (old_tria.levels.size() != 0, ExcInternalError()); Assert (old_tria.vertices.size() != 0, ExcInternalError()); Assert (dim == 1 || old_tria.faces != NULL, ExcInternalError()); @@ -9015,9 +9016,10 @@ create_triangulation (const std::vector > &v, const std::vector > &cells, const SubCellData &subcelldata) { - 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 ((vertices.size() == 0) && + (levels.size () == 0) && + (faces == NULL), + ExcTriangulationNotEmpty(vertices.size(), levels.size())); // check that no forbidden arrays // are used Assert (subcelldata.check_consistency(dim), ExcInternalError()); -- 2.39.5