]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
add reduced testcase
authorheister <heister@0785d39b-7218-0410-832d-ea1e28bc413d>
Tue, 28 Aug 2012 15:37:14 +0000 (15:37 +0000)
committerheister <heister@0785d39b-7218-0410-832d-ea1e28bc413d>
Tue, 28 Aug 2012 15:37:14 +0000 (15:37 +0000)
git-svn-id: https://svn.dealii.org/trunk@26142 0785d39b-7218-0410-832d-ea1e28bc413d

tests/fail/constraints_c1_02.cc [new file with mode: 0644]

diff --git a/tests/fail/constraints_c1_02.cc b/tests/fail/constraints_c1_02.cc
new file mode 100644 (file)
index 0000000..c1e3434
--- /dev/null
@@ -0,0 +1,63 @@
+/**********************************************************************
+ * $Id: constraint_test.cc -1   $
+ *
+ * Copyright Guido Kanschat, 2010, 2012
+ *
+ **********************************************************************/
+
+// reduced test case from constraint_c1.cc, causes a hang in close()
+
+
+#include <deal.II/base/job_identifier.h>
+
+#include <iostream>
+#include <iomanip>
+#include <fstream>
+
+using namespace dealii;
+
+
+
+template <int dim>
+void
+run()
+{
+  ConstraintMatrix     constraints;
+
+  {
+  constraints.add_line(7);
+  std::vector<std::pair<unsigned int, double> > rhs;
+  rhs.push_back(std::pair<unsigned int, double>(41,1.0));
+  rhs.push_back(std::pair<unsigned int, double>(42,1.0));
+  constraints.add_entries(7, rhs);
+  }
+
+  {
+  constraints.add_line(41);
+  std::vector<std::pair<unsigned int, double> > rhs;
+  rhs.push_back(std::pair<unsigned int, double>(42,1.0));
+  constraints.add_entries(41, rhs);
+  }
+
+  {
+  constraints.add_line(42);
+  std::vector<std::pair<unsigned int, double> > rhs;
+  rhs.push_back(std::pair<unsigned int, double>(41,1.0));
+  constraints.add_entries(42, rhs);
+  }
+
+  deallog << "Closing" << std::endl;
+  constraints.close();
+  deallog << "Closed" << std::endl;
+
+}
+
+
+int main()
+{
+  const std::string logname = JobIdentifier::base_name(__FILE__) + std::string("/output");
+  std::ofstream logfile(logname.c_str());
+  deallog.attach(logfile);
+  
+  run();
+}

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.