From f8f6912380adf891ea5758b37047c0c62315465d Mon Sep 17 00:00:00 2001 From: heister Date: Tue, 28 Aug 2012 15:37:14 +0000 Subject: [PATCH] add reduced testcase git-svn-id: https://svn.dealii.org/trunk@26142 0785d39b-7218-0410-832d-ea1e28bc413d --- tests/fail/constraints_c1_02.cc | 63 +++++++++++++++++++++++++++++++++ 1 file changed, 63 insertions(+) create mode 100644 tests/fail/constraints_c1_02.cc diff --git a/tests/fail/constraints_c1_02.cc b/tests/fail/constraints_c1_02.cc new file mode 100644 index 0000000000..c1e3434292 --- /dev/null +++ b/tests/fail/constraints_c1_02.cc @@ -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 + +#include +#include +#include + +using namespace dealii; + + + +template +void +run() +{ + ConstraintMatrix constraints; + + { + constraints.add_line(7); + std::vector > rhs; + rhs.push_back(std::pair(41,1.0)); + rhs.push_back(std::pair(42,1.0)); + constraints.add_entries(7, rhs); + } + + { + constraints.add_line(41); + std::vector > rhs; + rhs.push_back(std::pair(42,1.0)); + constraints.add_entries(41, rhs); + } + + { + constraints.add_line(42); + std::vector > rhs; + rhs.push_back(std::pair(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(); +} -- 2.39.5