]> https://gitweb.dealii.org/ - dealii.git/commitdiff
initialize sizes
authorStefano Zampini <stefano.zampini@gmail.com>
Tue, 11 Apr 2023 21:11:10 +0000 (00:11 +0300)
committerStefano Zampini <stefano.zampini@gmail.com>
Tue, 11 Apr 2023 21:11:10 +0000 (00:11 +0300)
source/lac/petsc_parallel_block_sparse_matrix.cc

index fe4c291c058cac30bbcb0335c4b8b43a2f83acfc..f75fb5513d7074ebd93f2e4ba50d7df92dd6767c 100644 (file)
@@ -166,10 +166,10 @@ namespace PETScWrappers
       // Create empty matrices if needed
       // This is neeeded by the base class
       // not by MATNEST
-      std::vector<size_type> row_sizes(m);
-      std::vector<size_type> col_sizes(n);
-      std::vector<size_type> row_local_sizes(m);
-      std::vector<size_type> col_local_sizes(n);
+      std::vector<size_type> row_sizes(m, size_type(-1));
+      std::vector<size_type> col_sizes(n, size_type(-1));
+      std::vector<size_type> row_local_sizes(m, size_type(-1));
+      std::vector<size_type> col_local_sizes(n, size_type(-1));
       MPI_Comm               comm = MPI_COMM_NULL;
       for (size_type r = 0; r < m; r++)
         {

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.