]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Add another test that currently fails. Will fix it next.
authorWolfgang Bangerth <bangerth@math.tamu.edu>
Fri, 25 Sep 2009 03:39:48 +0000 (03:39 +0000)
committerWolfgang Bangerth <bangerth@math.tamu.edu>
Fri, 25 Sep 2009 03:39:48 +0000 (03:39 +0000)
git-svn-id: https://svn.dealii.org/trunk@19543 0785d39b-7218-0410-832d-ea1e28bc413d

tests/bits/Makefile
tests/bits/gerold_2.cc [new file with mode: 0644]
tests/bits/gerold_2/cmp/generic [new file with mode: 0644]

index 850529a03d62c575d6f2c749b5c77ad191c91339..a117de34526fc811037a74594b78b0215af44889 100644 (file)
@@ -39,7 +39,7 @@ tests_x = grid_generator_?? \
          fe_face_to_cell_index \
          fe_field_function \
           anna_? \
-         gerold_1 \
+         gerold_? \
          roy_1 \
           denis_1 \
          unit_support_points \
diff --git a/tests/bits/gerold_2.cc b/tests/bits/gerold_2.cc
new file mode 100644 (file)
index 0000000..6e6cceb
--- /dev/null
@@ -0,0 +1,104 @@
+//----------------------------  gerold_2.cc  ---------------------------
+//    $Id$
+//    Version: $Name$
+//
+//    Copyright (C) 2002, 2003, 2004, 2005, 2009 by the deal.II authors and Anna Schneebeli
+//
+//    This file is subject to QPL and may not be  distributed
+//    without copyright and license information. Please refer
+//    to the file deal.II/doc/license.html for the  text  and
+//    further information on this license.
+//
+//----------------------------  gerold_2.cc  ---------------------------
+
+
+// apply SparsityTools::reorder_Cuthill_McKee to the cell connectivity
+// graph for the mesh used in gerold_2. apparently the mesh consists
+// of two or more non-connected parts, and the reordering algorithm
+// trips over that
+
+#include "../tests.h"
+#include <grid/tria.h>
+#include <grid/grid_generator.h>
+#include <grid/grid_tools.h>
+
+#include <lac/sparsity_pattern.h>
+#include <lac/sparsity_tools.h>
+
+#include <fstream>
+#include <iomanip>
+
+#include <base/logstream.h>
+
+#include <grid/grid_in.h>
+#include <grid/tria_boundary_lib.h>
+
+
+template <int dim>
+class LaplaceProblem
+{
+  public:
+    void run ();
+  private:
+    Triangulation<dim>   triangulation;
+};
+
+
+template <int dim>
+void LaplaceProblem<dim>::run ()
+{
+  GridIn<dim> grid_in;
+  grid_in.attach_triangulation (triangulation);
+
+  std::ifstream input_file("gerold_1.inp");
+  grid_in.read_ucd(input_file);
+
+  SparsityPattern cell_connectivity;
+  GridTools::get_face_connectivity_of_cells (triangulation,
+                                            cell_connectivity);
+  std::vector<unsigned int> permutation(triangulation.n_active_cells());
+  SparsityTools::reorder_Cuthill_McKee (cell_connectivity, permutation);
+
+  for (unsigned int i=0; i<permutation.size(); ++i)
+    deallog << permutation[i] << std::endl;
+}
+
+
+int main ()
+{
+  std::ofstream logfile("gerold_2/output");
+  deallog.attach(logfile);
+  deallog.depth_console(0);
+  deallog.threshold_double(1.e-10);
+
+  try
+    {
+      LaplaceProblem<3> laplace_problem_3d;
+      laplace_problem_3d.run ();
+    }
+  catch (std::exception &exc)
+    {
+      deallog << std::endl << std::endl
+               << "----------------------------------------------------"
+               << std::endl;
+      deallog << "Exception on processing: " << std::endl
+               << exc.what() << std::endl
+               << "Aborting!" << std::endl
+               << "----------------------------------------------------"
+               << std::endl;
+      return 1;
+    }
+  catch (...)
+    {
+      deallog << std::endl << std::endl
+               << "----------------------------------------------------"
+               << std::endl;
+      deallog << "Unknown exception!" << std::endl
+               << "Aborting!" << std::endl
+               << "----------------------------------------------------"
+               << std::endl;
+      return 1;
+    };
+
+  return 0;
+}
diff --git a/tests/bits/gerold_2/cmp/generic b/tests/bits/gerold_2/cmp/generic
new file mode 100644 (file)
index 0000000..8274245
--- /dev/null
@@ -0,0 +1,4 @@
+
+DEAL::Solving problem in 3 space dimensions.
+DEAL::read ucd data file
+DEAL::ucd data file readin exe

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.