]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Use valid arguments in ChunkSparsityPattern constructor 4381/head
authorDaniel Arndt <daniel.arndt@iwr.uni-heidelberg.de>
Sat, 13 May 2017 16:08:17 +0000 (18:08 +0200)
committerDaniel Arndt <daniel.arndt@iwr.uni-heidelberg.de>
Sat, 13 May 2017 17:17:06 +0000 (19:17 +0200)
source/lac/chunk_sparsity_pattern.cc
tests/sparsity/chunk_sparsity_pattern_12.cc [new file with mode: 0644]
tests/sparsity/chunk_sparsity_pattern_12.output [new file with mode: 0644]

index 89bc4fbe3f92397b010e4a61c98eff795b3ca6b2..3db63c4b1df17804cbe6f4370767dd08056e181a 100644 (file)
@@ -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 (file)
index 0000000..752bc87
--- /dev/null
@@ -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 (file)
index 0000000..0fd8fc1
--- /dev/null
@@ -0,0 +1,2 @@
+
+DEAL::OK

In the beginning the Universe was created. This has made a lot of people very angry and has been widely regarded as a bad move.

Douglas Adams


Typeset in Trocchi and Trocchi Bold Sans Serif.