From: Martin Kronbichler Date: Wed, 1 Feb 2017 20:48:50 +0000 (+0100) Subject: New test X-Git-Tag: v8.5.0-rc1~168^2 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e27f910b97d20bf3f37ebeee4a062d2ec3bade0d;p=dealii.git New test --- diff --git a/tests/lac/constraints_merge_12.cc b/tests/lac/constraints_merge_12.cc new file mode 100644 index 0000000000..d64041bda4 --- /dev/null +++ b/tests/lac/constraints_merge_12.cc @@ -0,0 +1,64 @@ +// --------------------------------------------------------------------- +// +// Copyright (C) 2017 by the deal.II authors +// +// This file is part of the deal.II library. +// +// The deal.II library is free software; you can use it, redistribute +// it, and/or modify it under the terms of the GNU Lesser General +// Public License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// The full text of the license can be found in the file LICENSE at +// the top level of the deal.II distribution. +// +// --------------------------------------------------------------------- + + + +// Merge two ConstraintMatrix objects initialized with IndexSets where entries +// have been added in a way that local_lines extends beyond the end of the +// IndexSet + +#include "../tests.h" +#include +#include + +#include +#include + + +void merge_check () +{ + deallog << "Checking ConstraintMatrix::merge with localized lines" << std::endl; + + // set local lines to a very large range that surely triggers an error if + // the implementation is wrong + IndexSet local_lines (100000000); + local_lines.add_range (99999800, 100000000); + local_lines.compress(); + + // works correctly + ConstraintMatrix c1 (local_lines), c2 (local_lines); + for (types::global_dof_index i=99999800; i