]> https://gitweb.dealii.org/ - dealii.git/commitdiff
failing test for constraint_matrix
authorTimo Heister <timo.heister@gmail.com>
Thu, 20 Jan 2011 08:29:30 +0000 (08:29 +0000)
committerTimo Heister <timo.heister@gmail.com>
Thu, 20 Jan 2011 08:29:30 +0000 (08:29 +0000)
git-svn-id: https://svn.dealii.org/trunk@23221 0785d39b-7218-0410-832d-ea1e28bc413d

tests/lac/constraints_01.cc [new file with mode: 0644]
tests/lac/constraints_01/cmp/generic [new file with mode: 0644]

diff --git a/tests/lac/constraints_01.cc b/tests/lac/constraints_01.cc
new file mode 100644 (file)
index 0000000..ca96e08
--- /dev/null
@@ -0,0 +1,68 @@
+//----------------------------  constraints_zero.cc  ---------------------------
+//    $Id: constraints_zero.cc 18471 2009-03-10 13:20:31Z kronbichler $
+//    Version: $Name$ 
+//
+//    Copyright (C) 2005, 2006, 2007, 2008 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.
+//
+//----------------------------  constraints_zero.cc  ---------------------------
+
+
+
+
+#include "../tests.h"
+#include <base/logstream.h>
+#include <lac/constraint_matrix.h>
+
+#include <fstream>
+
+// bug in ConstraintMatrix
+
+//index=18466 line_index=652 lines_cache[line_index]=919940456 lines.size()=21
+
+void test ()
+{
+  IndexSet rel;
+  std::ifstream f("constraints_01/is.23");
+  rel.read(f);
+  
+  ConstraintMatrix cm;
+  cm.clear();
+  cm.reinit(rel);
+
+  unsigned int inhoms[]={
+8385, 8386, 8391, 17886, 17892, 17895, 18066, 18069, 18072, 18075, 18086, 18089, 18092, 18095, 18138, 18141, 18144, 18147, 18158, 18161, 18164
+  };
+
+  for (unsigned int i=0;i<sizeof(inhoms) / sizeof(inhoms[0]);++i)
+    {
+      deallog << inhoms[i] << std::endl;
+      cm.add_line(inhoms[i]);
+      cm.set_inhomogeneity(inhoms[i],1.0);
+    }  
+  
+  cm.print (deallog.get_file_stream());
+
+  bool is = cm.is_inhomogeneously_constrained(18466);
+  deallog << "constraint 18466 inhom? " << is << std::endl;  
+  Assert(!is, ExcInternalError());
+}
+
+
+int main ()
+{
+  std::ofstream logfile("constraints_01/output");
+  logfile.precision(2);
+  
+  deallog.attach(logfile);
+  deallog.depth_console(0);
+  deallog.threshold_double(1.e-10);  
+
+  test ();
+  
+  deallog << "OK" << std::endl;
+}
diff --git a/tests/lac/constraints_01/cmp/generic b/tests/lac/constraints_01/cmp/generic
new file mode 100644 (file)
index 0000000..0be5392
--- /dev/null
@@ -0,0 +1,4 @@
+
+    1 2:  42.
+    4 = 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.