From 7d4d2596838ba02b95e06e39264f44b91a45a8f5 Mon Sep 17 00:00:00 2001 From: Stefano Zampini Date: Wed, 12 Apr 2023 00:11:10 +0300 Subject: [PATCH] initialize sizes --- source/lac/petsc_parallel_block_sparse_matrix.cc | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/source/lac/petsc_parallel_block_sparse_matrix.cc b/source/lac/petsc_parallel_block_sparse_matrix.cc index fe4c291c05..f75fb5513d 100644 --- a/source/lac/petsc_parallel_block_sparse_matrix.cc +++ b/source/lac/petsc_parallel_block_sparse_matrix.cc @@ -166,10 +166,10 @@ namespace PETScWrappers // Create empty matrices if needed // This is neeeded by the base class // not by MATNEST - std::vector row_sizes(m); - std::vector col_sizes(n); - std::vector row_local_sizes(m); - std::vector col_local_sizes(n); + std::vector row_sizes(m, size_type(-1)); + std::vector col_sizes(n, size_type(-1)); + std::vector row_local_sizes(m, size_type(-1)); + std::vector col_local_sizes(n, size_type(-1)); MPI_Comm comm = MPI_COMM_NULL; for (size_type r = 0; r < m; r++) { -- 2.39.5