From fc3242867f36d1f25db27f756d903898cb256a32 Mon Sep 17 00:00:00 2001 From: wolf Date: Tue, 30 Sep 2003 16:18:02 +0000 Subject: [PATCH] Add some assertions. git-svn-id: https://svn.dealii.org/trunk@8075 0785d39b-7218-0410-832d-ea1e28bc413d --- deal.II/deal.II/source/fe/mapping_q1.cc | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/deal.II/deal.II/source/fe/mapping_q1.cc b/deal.II/deal.II/source/fe/mapping_q1.cc index ae4d183d46..4980e301fc 100644 --- a/deal.II/deal.II/source/fe/mapping_q1.cc +++ b/deal.II/deal.II/source/fe/mapping_q1.cc @@ -42,6 +42,11 @@ namespace internal const unsigned int face_no, const unsigned int n_quadrature_points) { + Assert (dim != 1, ExcInternalError()); + Assert (face_no < GeometryInfo::faces_per_cell, + ExcInternalError()); + Assert (n_quadrature_points > 0, ExcInternalError()); + switch (dim) { case 1: @@ -77,6 +82,15 @@ namespace internal const unsigned int subface_no, const unsigned int n_quadrature_points) { + Assert (dim != 1, ExcInternalError()); + Assert (face_no < GeometryInfo::faces_per_cell, + ExcInternalError()); + // the trick with +1 prevents + // that we get a warning in 1d + Assert (subface_no+1 < GeometryInfo::subfaces_per_face+1, + ExcInternalError()); + Assert (n_quadrature_points > 0, ExcInternalError()); + switch (dim) { case 1: -- 2.39.5