]> https://gitweb.dealii.org/ - dealii.git/commitdiff
add failing test for no_flux
authorTimo Heister <timo.heister@gmail.com>
Fri, 15 Nov 2013 18:52:33 +0000 (18:52 +0000)
committerTimo Heister <timo.heister@gmail.com>
Fri, 15 Nov 2013 18:52:33 +0000 (18:52 +0000)
git-svn-id: https://svn.dealii.org/trunk@31674 0785d39b-7218-0410-832d-ea1e28bc413d

tests/deal.II/no_flux_13.cc [new file with mode: 0644]
tests/deal.II/no_flux_13.debug.output [new file with mode: 0644]

diff --git a/tests/deal.II/no_flux_13.cc b/tests/deal.II/no_flux_13.cc
new file mode 100644 (file)
index 0000000..c87f079
--- /dev/null
@@ -0,0 +1,75 @@
+// ---------------------------------------------------------------------\r
+// $Id: no_flux_11.cc 31349 2013-10-20 19:07:06Z maier $\r
+//\r
+// Copyright (C) 2012 - 2013 by the deal.II authors\r
+//\r
+// This file is part of the deal.II library.\r
+//\r
+// The deal.II library is free software; you can use it, redistribute\r
+// it, and/or modify it under the terms of the GNU Lesser General\r
+// Public License as published by the Free Software Foundation; either\r
+// version 2.1 of the License, or (at your option) any later version.\r
+// The full text of the license can be found in the file LICENSE at\r
+// the top level of the deal.II distribution.\r
+//\r
+// ---------------------------------------------------------------------\r
+\r
+// bug report from mailing list from 11/15/2013 (simplified). no_normal_flux throws\r
+// an exception:\r
+/*\r
+--------------------------------------------------------\r
+An error occurred in line <4314> of file </scratch/deal-trunk/deal.II/include/deal.II/numerics/vector_tools.templates.h> in function\r
+    void dealii::VectorTools::compute_no_normal_flux_constraints(const DH<dim, spacedim>&, unsigned int, const std::set<unsigned char>&, dealii::ConstraintMatrix&, const dealii::Mapping<dim, spacedim>&) [with int dim = 3; DH = dealii::DoFHandler; int spacedim = 3]\r
+The violated condition was: \r
+    vector_dofs.dof_indices[d] < dof_handler.n_dofs()\r
+The name and call sequence of the exception was:\r
+    ExcInternalError()\r
+Additional Information: \r
+(none)\r
+*/  \r
+\r
+#include "../tests.h"\r
+\r
+#include <deal.II/base/function.h>\r
+#include <deal.II/base/logstream.h>\r
+#include <deal.II/lac/constraint_matrix.h>\r
+#include <deal.II/lac/compressed_sparsity_pattern.h>\r
+#include <deal.II/grid/tria.h>\r
+#include <deal.II/grid/grid_generator.h>\r
+#include <deal.II/dofs/dof_handler.h>\r
+#include <deal.II/fe/fe_q.h>\r
+#include <deal.II/numerics/vector_tools.h>\r
+\r
+using namespace dealii;\r
+\r
+template <int dim>\r
+void test()\r
+{\r
+  Triangulation<dim> triangulation;\r
+  GridGenerator::hyper_cube (triangulation,-1.0,1.0);\r
+  triangulation.begin_active()->face(1)->set_all_boundary_indicators(1);\r
+\r
+  FE_Q<dim> fe(1);\r
+  DoFHandler<dim> dof_handler(triangulation);\r
+  dof_handler.distribute_dofs(fe);\r
+  \r
+  ConstraintMatrix constraints;\r
+  std::set<types::boundary_id> no_normal_flux_boundaries;\r
+  no_normal_flux_boundaries.insert (1);\r
+  VectorTools::compute_no_normal_flux_constraints (dof_handler,\r
+                                                  0,\r
+                                                  no_normal_flux_boundaries,\r
+                                                  constraints);\r
+\r
+  constraints.close();\r
+  constraints.print(deallog.get_file_stream ());\r
+}\r
+\r
+\r
+int main ()\r
+{\r
+  initlog();\r
+  deallog.depth_console (0);\r
+\r
+  test<3> ();\r
+}\r
diff --git a/tests/deal.II/no_flux_13.debug.output b/tests/deal.II/no_flux_13.debug.output
new file mode 100644 (file)
index 0000000..543e413
--- /dev/null
@@ -0,0 +1,31 @@
+
+    202 = 0
+    566 = 0
+    570 = 0
+    576 = 0
+    1098 = 0
+    1100 = 0
+    1104 = 0
+    1616 = 0
+    1620 = 0
+    1708 = 0
+    1918 = 0
+    1920 = 0
+    1922 = 0
+    1930 = 0
+    1962 = 0
+    2138 = 0
+    2140 = 0
+    2156 = 0
+    2160 = 0
+    2196 = 0
+    2198 = 0
+    2246 = 0
+    2416 = 0
+    2892 = 0
+    2894 = 0
+    2902 = 0
+    2906 = 0
+    2912 = 0
+    2918 = 0
+DEAL::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.