]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Fix a test to not write past the end of an array. 6489/head
authorDavid Wells <wellsd2@rpi.edu>
Sun, 6 May 2018 02:02:31 +0000 (22:02 -0400)
committerDavid Wells <wellsd2@rpi.edu>
Sun, 6 May 2018 02:02:31 +0000 (22:02 -0400)
tests/matrix_free/matrix_vector_faces_18.cc

index f5b5c6ec6c2e47cb5f64cf806981cac3089d7565..036731fd68a642d0be697c4ad82a556fd1fc972d 100644 (file)
@@ -80,13 +80,16 @@ void test ()
   refinements_left[1] = 5;
   refinements_right[1] = 5;
   refinements_bottom[1] = 1;
-  refinements_left[2] = 4;
-  refinements_right[2] = 4;
-  refinements_bottom[2] = 4;
   refinements_left[0] = 10;
   refinements_right[0] = 20;
   refinements_bottom[0] = 20;
 
+  if (dim == 3)
+    {
+      refinements_left[2] = 4;
+      refinements_right[2] = 4;
+      refinements_bottom[2] = 4;
+    }
   GridGenerator::subdivided_hyper_rectangle(left, refinements_left,left_one,left_two,false);
   GridGenerator::subdivided_hyper_rectangle(right, refinements_right,right_one,right_two,false);
   GridGenerator::subdivided_hyper_rectangle(bottom, refinements_bottom,bottom_one,bottom_two,false);

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.