]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
add failing test for quarter_hyper_shell & no_normal_flux
authorheister <heister@0785d39b-7218-0410-832d-ea1e28bc413d>
Mon, 5 Mar 2012 16:45:00 +0000 (16:45 +0000)
committerheister <heister@0785d39b-7218-0410-832d-ea1e28bc413d>
Mon, 5 Mar 2012 16:45:00 +0000 (16:45 +0000)
git-svn-id: https://svn.dealii.org/trunk@25211 0785d39b-7218-0410-832d-ea1e28bc413d

tests/deal.II/no_flux_09.cc [new file with mode: 0644]
tests/deal.II/no_flux_09/cmp/generic [new file with mode: 0644]

diff --git a/tests/deal.II/no_flux_09.cc b/tests/deal.II/no_flux_09.cc
new file mode 100644 (file)
index 0000000..e803d18
--- /dev/null
@@ -0,0 +1,77 @@
+//----------------------------  vectors_rhs_hp_02.cc  ---------------------------
+//    $Id: vectors_rhs_hp_02.cc 23710 2011-05-17 04:50:10Z bangerth $
+//    Version: $Name$
+//
+//    Copyright (C) 2000, 2001, 2003, 2004, 2006, 2007, 2011 by the deal.II authors
+//
+//    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.
+//
+//----------------------------  ---------------------------
+
+
+// Currently fails. We get this crash in 3d with the quarter shell and no normal flux conditions:
+//
+//An error occurred in line <2571> of file </w/heister/deal-trunk/deal.II/include/deal.II/numerics/vectors.templates.h> in function
+//    void dealii::VectorTools::internal::compute_orthonormal_vectors(const dealii::Tensor<1, dim>&, dealii::Tensor<1, dim> (&)[(dim - 1)]) [with int dim = 3]
+//The violated condition was:
+//    std::fabs(vector * tmp) < 1e-12
+//The name and call sequence of the exception was:
+//    ExcInternalError()
+//Additional Information:
+//(none)
+
+
+#include "../tests.h"
+
+#include <deal.II/grid/tria.h>
+#include <deal.II/grid/grid_generator.h>
+#include <deal.II/hp/dof_handler.h>
+#include <deal.II/lac/constraint_matrix.h>
+#include <deal.II/fe/fe_system.h>
+#include <deal.II/fe/mapping_q.h>
+#include <deal.II/numerics/vectors.h>
+
+
+template <int dim>
+void
+check ()
+{
+  Triangulation<dim> tr;
+  GridGenerator::quarter_hyper_shell (tr,
+                                      Point<dim>(),
+                                      0.5, 1.0,
+                                      3, true);
+
+  ConstraintMatrix cm;
+  MappingQ<dim> mapping(1);
+
+  FESystem<dim> fe(FE_Q<dim>(1),dim);
+  DoFHandler<dim> dofh(tr);
+
+  dofh.distribute_dofs (fe);
+
+  std::set<unsigned char> no_normal_flux_boundaries;
+  no_normal_flux_boundaries.insert (1);
+  //  no_normal_flux_boundaries.insert (2); // not required for the crash for now, please test with it later!
+  no_normal_flux_boundaries.insert (3);
+  no_normal_flux_boundaries.insert (4);
+  VectorTools::compute_no_normal_flux_constraints (dofh, 0, no_normal_flux_boundaries, cm, mapping);
+
+  cm.print (deallog.get_file_stream ());
+}
+
+
+
+int main ()
+{
+  std::ofstream logfile ("no_flux_09/output");
+  logfile.precision (4);
+  logfile.setf(std::ios::fixed);
+  deallog.attach(logfile);
+  deallog.depth_console (0);
+
+  check<3> ();
+}
diff --git a/tests/deal.II/no_flux_09/cmp/generic b/tests/deal.II/no_flux_09/cmp/generic
new file mode 100644 (file)
index 0000000..b77282a
--- /dev/null
@@ -0,0 +1,49 @@
+
+    0 = 0
+    1 = 0
+    3 2:  0.7265
+    4 = 0
+    5 = 0
+    7 6:  0.7265
+    8 9:  0.3249
+    10 11:  0.3249
+    12 13:  -0.3249
+    14 15:  -0.3249
+    17 16:  -0.7265
+    19 18:  -0.7265
+    20 = 0
+    21 = 0
+    22 = 0
+    23 = 0
+    0 = 0
+    2 1:  -1.0000
+    3 = 0
+    5 4:  -1.0000
+    6 7:  -0.5273
+    6 8:  0.5273
+    9 10:  0.5273
+    9 11:  0.5273
+    12 = 0
+    14 13:  -1.0000
+    15 = 0
+    17 16:  -1.0000
+    18 19:  -0.5273
+    18 20:  0.5273
+    21 22:  0.5273
+    21 23:  0.5273
+    24 = 0
+    26 25:  -1.0000
+    27 = 0
+    29 28:  -1.0000
+    30 31:  -0.5273
+    30 32:  -0.5273
+    33 34:  -0.5273
+    33 35:  -0.5273
+    36 = 0
+    38 37:  -1.0000
+    39 40:  0.5273
+    39 41:  -0.5273
+    42 = 0
+    44 43:  -1.0000
+    45 46:  0.5273
+    45 47:  -0.5273

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.