From: heister Date: Fri, 27 Sep 2013 12:52:48 +0000 (+0000) Subject: merge r30977 from mainline X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=fa436b44f9a2e0d283fed290e24ffc6fa0e96765;p=dealii-svn.git merge r30977 from mainline git-svn-id: https://svn.dealii.org/branches/branch_port_the_testsuite@30979 0785d39b-7218-0410-832d-ea1e28bc413d --- diff --git a/deal.II/doc/news/changes.h b/deal.II/doc/news/changes.h index 50ee4dca19..28389d0e3b 100644 --- a/deal.II/doc/news/changes.h +++ b/deal.II/doc/news/changes.h @@ -85,6 +85,13 @@ inconvenience this causes.

Specific improvements

    +
  1. + Fixed: ConstraintMatrix would not compress() the IndexSet in the constructor + leading to crashes that only happen in release mode. This is now fixed. +
    + (Timo Heister, 2013/09/27) +
  2. +
  3. Fixed: PetscWrappers::MatrixBase::row_length() no longer worked after recent changes to PETSc (around PETSc release 3.4). This is now fixed. diff --git a/deal.II/include/deal.II/lac/constraint_matrix.h b/deal.II/include/deal.II/lac/constraint_matrix.h index 7d5ae2e78b..4bb240c83c 100644 --- a/deal.II/include/deal.II/lac/constraint_matrix.h +++ b/deal.II/include/deal.II/lac/constraint_matrix.h @@ -1850,7 +1850,12 @@ ConstraintMatrix::ConstraintMatrix (const IndexSet &local_constraints) lines (), local_lines (local_constraints), sorted (false) -{} +{ + // make sure the IndexSet is compressed. Otherwise this can lead to crashes + // that are hard to find (only happen in release mode). + // see tests/mpi/constraint_matrix_crash_01 + local_lines.compress(); +} diff --git a/deal.II/source/lac/constraint_matrix.cc b/deal.II/source/lac/constraint_matrix.cc index 79f46bad9c..4c1a7e8fac 100644 --- a/deal.II/source/lac/constraint_matrix.cc +++ b/deal.II/source/lac/constraint_matrix.cc @@ -631,6 +631,12 @@ void ConstraintMatrix::clear () void ConstraintMatrix::reinit (const IndexSet &local_constraints) { local_lines = local_constraints; + + // make sure the IndexSet is compressed. Otherwise this can lead to crashes + // that are hard to find (only happen in release mode). + // see tests/mpi/constraint_matrix_crash_01 + local_lines.compress(); + clear(); }