]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
Rewrite test so that it a) tests more, and b) aborts when something isn't right
authorbangerth <bangerth@0785d39b-7218-0410-832d-ea1e28bc413d>
Sun, 30 Jul 2006 16:02:03 +0000 (16:02 +0000)
committerbangerth <bangerth@0785d39b-7218-0410-832d-ea1e28bc413d>
Sun, 30 Jul 2006 16:02:03 +0000 (16:02 +0000)
git-svn-id: https://svn.dealii.org/trunk@13519 0785d39b-7218-0410-832d-ea1e28bc413d

tests/bits/fe_tools_14.cc

index bc4742ffb1d2fed4c6ce2c08387f60ca0fb23c2c..9c0fa56779afa0d71953361836108edb637fde4f 100644 (file)
@@ -11,7 +11,7 @@
 //----------------------------  fe_tools_14.cc  ---------------------------
 
 #include "../tests.h"
-#include "fe_tools_common.cc"
+#include "dof_tools_common.cc"
 
 // comparison of the results of
 //   FE::face_to_equivalent_cell_index (i)
@@ -25,27 +25,15 @@ std::string output_file_name = "fe_tools_14/output";
 
 template <int dim>
 void
-check_this (const FiniteElement<dim> &fe1,
-            const FiniteElement<dim> &fe2)
+check_this (const DoFHandler<dim> &dof_handler)
 {
-  bool ok = true;
+  const FiniteElement<dim> &fe = dof_handler.get_fe();
   
-  for (unsigned int i = 0; i < fe1.dofs_per_face; ++i)
-    {
-      if (fe1.face_to_equivalent_cell_index (i) !=
-         fe1.face_to_cell_index (i, 0))
-       ok = false;
-
-    }
-
-  for (unsigned int i = 0; i < fe2.dofs_per_face; ++i)
-    {
-      if (fe2.face_to_equivalent_cell_index (i) !=
-         fe2.face_to_cell_index (i, 0))
-       ok = false;
-    }
+  for (unsigned int i = 0; i < fe.dofs_per_face; ++i)
+    Assert (fe.face_to_equivalent_cell_index (i) ==
+           fe.face_to_cell_index (i, 0),
+           ExcInternalError());
   
-  ok ? deallog << "OK" << std::endl :
-    deallog << "Error!" << std::endl;
+  deallog << "OK" << std::endl;
 }
 

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.