From: Daniel Arndt Date: Sat, 13 May 2017 16:08:17 +0000 (+0200) Subject: Use valid arguments in ChunkSparsityPattern constructor X-Git-Tag: v9.0.0-rc1~1599^2 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=1c7b8fd9f43ee4871bf5de087af862e44a081d82;p=dealii.git Use valid arguments in ChunkSparsityPattern constructor --- diff --git a/source/lac/chunk_sparsity_pattern.cc b/source/lac/chunk_sparsity_pattern.cc index 89bc4fbe3f..3db63c4b1d 100644 --- a/source/lac/chunk_sparsity_pattern.cc +++ b/source/lac/chunk_sparsity_pattern.cc @@ -40,7 +40,7 @@ ChunkSparsityPattern::ChunkSparsityPattern (const ChunkSparsityPattern &s) "is the sparsity pattern for an empty matrix. This constructor can " "not be used to copy-construct a non-empty sparsity pattern.")); - reinit (0,0,0,0); + reinit (0,0,0,chunk_size); } diff --git a/tests/sparsity/chunk_sparsity_pattern_12.cc b/tests/sparsity/chunk_sparsity_pattern_12.cc new file mode 100644 index 0000000000..752bc8741f --- /dev/null +++ b/tests/sparsity/chunk_sparsity_pattern_12.cc @@ -0,0 +1,30 @@ +// --------------------------------------------------------------------- +// +// 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. +// +// --------------------------------------------------------------------- + + + +// check the copy constructor of ChunkSparsityPattern + +#include "sparsity_pattern_common.h" + +int main () +{ + initlog(); + + ChunkSparsityPattern chunk1 (); + ChunkSparsityPattern chunk2 = chunk1; + + deallog << "OK" << std::endl; +} diff --git a/tests/sparsity/chunk_sparsity_pattern_12.output b/tests/sparsity/chunk_sparsity_pattern_12.output new file mode 100644 index 0000000000..0fd8fc12f0 --- /dev/null +++ b/tests/sparsity/chunk_sparsity_pattern_12.output @@ -0,0 +1,2 @@ + +DEAL::OK