From: heister Date: Tue, 28 Aug 2012 15:37:14 +0000 (+0000) Subject: add reduced testcase X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f8f6912380adf891ea5758b37047c0c62315465d;p=dealii-svn.git add reduced testcase git-svn-id: https://svn.dealii.org/trunk@26142 0785d39b-7218-0410-832d-ea1e28bc413d --- 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(); +}