From 522444094337adc3dc1fa41bc51f131b29b0640e Mon Sep 17 00:00:00 2001 From: Stefano Zampini Date: Tue, 17 Jan 2023 11:59:13 +0300 Subject: [PATCH] Add missing compress in tests --- tests/petsc/slowness_02.cc | 2 ++ tests/petsc/slowness_03.cc | 2 ++ tests/petsc/slowness_04.cc | 2 ++ 3 files changed, 6 insertions(+) diff --git a/tests/petsc/slowness_02.cc b/tests/petsc/slowness_02.cc index 7597c22075..bddad8aeb4 100644 --- a/tests/petsc/slowness_02.cc +++ b/tests/petsc/slowness_02.cc @@ -76,6 +76,8 @@ test() v2(indices, MPI_COMM_WORLD); for (unsigned int i = 0; i < N * N; ++i) v1(i) = i; + v1.compress(VectorOperation::insert); + matrix.vmult(v2, v1); deallog << v1 * v2 << std::endl; diff --git a/tests/petsc/slowness_03.cc b/tests/petsc/slowness_03.cc index d00fa85233..e4f59d91b7 100644 --- a/tests/petsc/slowness_03.cc +++ b/tests/petsc/slowness_03.cc @@ -112,6 +112,8 @@ test() PETScWrappers::MPI::Vector v2(PETSC_COMM_WORLD, N * N, N * N); for (unsigned int i = 0; i < N * N; ++i) v1(i) = i; + v1.compress(VectorOperation::insert); + matrix.vmult(v2, v1); deallog << v1 * v2 << std::endl; diff --git a/tests/petsc/slowness_04.cc b/tests/petsc/slowness_04.cc index d4b91a0dfb..f4d7d40897 100644 --- a/tests/petsc/slowness_04.cc +++ b/tests/petsc/slowness_04.cc @@ -145,6 +145,8 @@ test() PETScWrappers::MPI::Vector v2(PETSC_COMM_WORLD, N * N, N * N); for (unsigned int i = 0; i < N * N; ++i) v1(i) = i; + v1.compress(VectorOperation::insert); + matrix.vmult(v2, v1); deallog << v1 * v2 << std::endl; -- 2.39.5