]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
Add some assertions.
authorwolf <wolf@0785d39b-7218-0410-832d-ea1e28bc413d>
Tue, 30 Sep 2003 16:18:02 +0000 (16:18 +0000)
committerwolf <wolf@0785d39b-7218-0410-832d-ea1e28bc413d>
Tue, 30 Sep 2003 16:18:02 +0000 (16:18 +0000)
git-svn-id: https://svn.dealii.org/trunk@8075 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/deal.II/source/fe/mapping_q1.cc

index ae4d183d4646526cf52ddd8345a0d388315ba13d..4980e301fc08786d42382c427e9b4208fc07f74a 100644 (file)
@@ -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<dim>::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<dim>::faces_per_cell,
+            ExcInternalError());
+                                     // the trick with +1 prevents
+                                     // that we get a warning in 1d
+    Assert (subface_no+1 < GeometryInfo<dim>::subfaces_per_face+1,
+            ExcInternalError());
+    Assert (n_quadrature_points > 0, ExcInternalError());
+    
     switch (dim)
       {
         case 1:

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


Typeset in Trocchi and Trocchi Bold Sans Serif.