]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
Rejuggle parallelepiped tests.
authoryoung <young@0785d39b-7218-0410-832d-ea1e28bc413d>
Mon, 14 Jan 2013 10:44:51 +0000 (10:44 +0000)
committeryoung <young@0785d39b-7218-0410-832d-ea1e28bc413d>
Mon, 14 Jan 2013 10:44:51 +0000 (10:44 +0000)
git-svn-id: https://svn.dealii.org/trunk@28044 0785d39b-7218-0410-832d-ea1e28bc413d

tests/deal.II/grid_parallelepiped.cc
tests/deal.II/grid_parallelepiped/cmp/generic
tests/deal.II/grid_parallelepiped_01.cc
tests/deal.II/grid_parallelepiped_01/cmp/generic
tests/deal.II/grid_parallelepiped_01/cmp/x86_64-unknown-linux-gnu+gcc4.5 [new file with mode: 0644]

index ee23e494d13d039a2520c1073f384c645570c523..be23a496d77e2d0476d28994a21b48d732099a55 100644 (file)
@@ -36,7 +36,9 @@ std::ofstream logfile ("grid_parallelepiped/output");
 template<int dim>
 void check_parallelepiped (bool colorize, bool log)
 {
-  Tensor<2, dim> corners = Tensor<2, dim> ();
+  // Data structure defining dim coordinates that make up a
+  // parallelepiped.
+  Point<dim> (corners) [dim];
 
   // build corners for this particular dim:
   switch (dim)
index 8034c6edc42294c606f70c071cf88cc5dafed923..291083fd775dcfd547c5d216642fdfb3b1a81dbd 100644 (file)
@@ -3,8 +3,8 @@
 
 0 0 0 0
 0 0.5 0 0
-0.5 0.5 0 0
-0.5 0 0 0
+0 1 0 0
+0 0.5 0 0
 0 0 0 0
 
 
index faaf2b6f0a287ad34828e3cdac92ccc0f4e333ac..d369e844459728fb3c77f63e298669a769f94aa9 100644 (file)
@@ -39,8 +39,9 @@ std::ofstream logfile ("grid_parallelepiped_01/output");
 // Here is the implementation in 1d:
 void check_1d_parallelepiped_by_comparison (bool log)
 {
-  // build corners for this particular dim:
-  Tensor<2, 1> corners = Tensor<2, 1> ();
+  // Data structure defining dim coordinates that make up a
+  // parallelepiped.
+  Point<1> (corners) [1];
   corners[0] = Point<1> (0.5);
   
   Triangulation<1> triangulation_parallelepiped;
@@ -56,17 +57,20 @@ void check_1d_parallelepiped_by_comparison (bool log)
                                            triangulation_cube))
        logfile << "OK" << std::endl;
       else
-       logfile << "not OK... coarse grid are different but they should be the same!
+       logfile << "not OK... coarse grids are different but they should be the same
                << std::endl;
     }
 }
 
+// @todo When the interface to parallelogram is updated, define TWO_D_TEST
+
+#ifdef TWO_D_TEST
 // Here is the implementation in 2d:
 void check_2d_parallelepiped_by_comparison (bool log)
 {
   // build corners for this particular dim that are known to give the
   // same output order as parallelogram:
-  Tensor<2, 2> corners = Tensor<2, 2> ();
+  Point<2> (corners) [2];
   corners[0] = Point<2> (0.0, 0.5);
   corners[1] = Point<2> (0.5, 0.0);
   
@@ -82,15 +86,19 @@ void check_2d_parallelepiped_by_comparison (bool log)
       if (GridTools::have_same_coarse_mesh (triangulation_parallelepiped,
                                            triangulation_parallelogram))
        logfile << "OK" << std::endl;
+
       else
-       logfile << "not OK... coarse grid are different but they should be the same!
+       logfile << "not OK... coarse grids are different but they should be the same
                << std::endl;
     }
 }
+#endif
 
 int main ()
 {
   // Check parallelepiped 
   check_1d_parallelepiped_by_comparison (true);
+#ifdef TWO_D_TEST
   check_2d_parallelepiped_by_comparison (true);
+#endif
 }
index 8c27f27d981d65b00946f181723556e181e60eba..3d32855d21d6dd673809bf74ebb9678b4a2de232 100644 (file)
@@ -1,4 +1,2 @@
 
-check 1d parallelepiped (hyper_cube): OK
-
-check 2d parallelepiped (parallelogram): OK
+check 1d parallelpiped (hyper_cube): OK
diff --git a/tests/deal.II/grid_parallelepiped_01/cmp/x86_64-unknown-linux-gnu+gcc4.5 b/tests/deal.II/grid_parallelepiped_01/cmp/x86_64-unknown-linux-gnu+gcc4.5
new file mode 100644 (file)
index 0000000..7201ca2
--- /dev/null
@@ -0,0 +1,2 @@
+
+check 1d parallelepiped (hyper_cube): OK

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.