From 2c42823fc4b8d19933b0c684ae055dbe106e634e Mon Sep 17 00:00:00 2001 From: Timo Heister Date: Tue, 24 Feb 2015 12:51:50 -0500 Subject: [PATCH] fix a few broken tests Looks like somebody messed up the VectorOperation in compress() in many places. --- tests/mpi/petsc_distribute_01_block.cc | 2 +- tests/petsc/01.cc | 2 +- tests/petsc/05.cc | 2 +- tests/petsc/06.cc | 2 +- tests/petsc/07.cc | 2 +- tests/petsc/08.cc | 2 +- tests/petsc/09.cc | 2 +- tests/petsc/10.cc | 2 +- tests/petsc/11.cc | 2 +- tests/petsc/12.cc | 2 +- tests/petsc/17.cc | 2 +- tests/petsc/19.cc | 2 +- tests/petsc/20.cc | 2 +- tests/petsc/21.cc | 2 +- tests/petsc/22.cc | 4 ++-- tests/petsc/23.cc | 4 ++-- tests/petsc/24.cc | 2 +- tests/petsc/25.cc | 2 +- tests/petsc/26.cc | 2 +- tests/petsc/27.cc | 2 +- tests/petsc/28.cc | 2 +- tests/petsc/31.cc | 2 +- tests/petsc/32.cc | 2 +- tests/petsc/33.cc | 2 +- tests/petsc/34.cc | 2 +- tests/petsc/35.cc | 4 ++-- tests/petsc/36.cc | 4 ++-- tests/petsc/37.cc | 2 +- tests/petsc/38.cc | 4 ++-- tests/petsc/39.cc | 4 ++-- tests/petsc/40.cc | 6 +++--- tests/petsc/41.cc | 4 ++-- tests/petsc/42.cc | 4 ++-- tests/petsc/43.cc | 6 +++--- tests/petsc/45.cc | 4 ++-- tests/petsc/46.cc | 4 ++-- tests/petsc/47.cc | 6 +++--- tests/petsc/48.cc | 6 +++--- tests/petsc/51.cc | 3 +-- tests/petsc/52.cc | 2 +- tests/petsc/55.cc | 2 +- tests/petsc/56.cc | 2 +- tests/petsc/64.cc | 2 +- tests/petsc/deal_solver_01.cc | 4 +--- tests/petsc/deal_solver_02.cc | 4 +--- tests/petsc/deal_solver_03.cc | 4 +--- tests/petsc/deal_solver_04.cc | 4 +--- tests/petsc/deal_solver_05.cc | 4 +--- tests/petsc/full_matrix_00.cc | 4 ++-- tests/petsc/full_matrix_01.cc | 2 +- tests/petsc/full_matrix_05.cc | 2 +- tests/petsc/full_matrix_06.cc | 2 +- tests/petsc/full_matrix_08.cc | 2 +- tests/petsc/full_matrix_09.cc | 2 +- tests/petsc/full_matrix_10.cc | 2 +- tests/petsc/full_matrix_iterator_01.cc | 2 +- tests/petsc/full_matrix_vector_01.cc | 5 ++--- tests/petsc/full_matrix_vector_02.cc | 5 ++--- tests/petsc/full_matrix_vector_03.cc | 6 +++--- tests/petsc/full_matrix_vector_05.cc | 6 +++--- tests/petsc/full_matrix_vector_06.cc | 4 ++-- tests/petsc/full_matrix_vector_07.cc | 6 +++--- tests/petsc/solver_01.cc | 4 +--- tests/petsc/solver_02.cc | 4 +--- tests/petsc/solver_03.cc | 4 +--- tests/petsc/solver_03_mf.cc | 4 +--- tests/petsc/solver_03_precondition_boomeramg.cc | 4 +--- tests/petsc/solver_03_precondition_boomeramg_symmetric.cc | 4 +--- tests/petsc/solver_03_precondition_eisenstat.cc | 4 +--- tests/petsc/solver_03_precondition_icc.cc | 4 +--- tests/petsc/solver_03_precondition_lu.cc | 4 +--- tests/petsc/solver_03_precondition_parasails.cc | 4 +--- tests/petsc/solver_03_precondition_sor.cc | 4 +--- tests/petsc/solver_03_precondition_ssor.cc | 4 +--- tests/petsc/solver_04.cc | 4 +--- tests/petsc/solver_05.cc | 4 +--- tests/petsc/solver_06.cc | 4 +--- tests/petsc/solver_07.cc | 4 +--- tests/petsc/solver_08.cc | 4 +--- tests/petsc/solver_09.cc | 4 +--- tests/petsc/solver_10.cc | 4 +--- tests/petsc/solver_11.cc | 4 +--- tests/petsc/solver_12.cc | 4 +--- tests/petsc/solver_13.cc | 4 +--- tests/petsc/sparse_direct_mumps.cc | 4 +--- tests/petsc/sparse_matrix_01.cc | 4 ++-- tests/petsc/sparse_matrix_02.cc | 2 +- tests/petsc/sparse_matrix_iterator_01.cc | 2 +- tests/petsc/sparse_matrix_vector_01.cc | 5 ++--- tests/petsc/sparse_matrix_vector_02.cc | 5 ++--- tests/petsc/sparse_matrix_vector_03.cc | 6 +++--- tests/petsc/sparse_matrix_vector_04.cc | 6 +++--- tests/petsc/sparse_matrix_vector_05.cc | 6 +++--- tests/petsc/sparse_matrix_vector_06.cc | 4 ++-- tests/petsc/sparse_matrix_vector_07.cc | 6 +++--- 95 files changed, 135 insertions(+), 196 deletions(-) diff --git a/tests/mpi/petsc_distribute_01_block.cc b/tests/mpi/petsc_distribute_01_block.cc index 631a1d9dab..43fafab6b5 100644 --- a/tests/mpi/petsc_distribute_01_block.cc +++ b/tests/mpi/petsc_distribute_01_block.cc @@ -52,7 +52,7 @@ void test() vec.block(0)(i) = i; for (unsigned int i=vec.block(1).local_range().first; i void test (MatrixType &m) { m.add(0,0,1); + m.compress(VectorOperation::add); m = 0; - m.compress(); Assert(fabs(m.frobenius_norm())<1e-15, ExcInternalError()); diff --git a/tests/petsc/deal_solver_01.cc b/tests/petsc/deal_solver_01.cc index 51fe084280..c9ad7e4c87 100644 --- a/tests/petsc/deal_solver_01.cc +++ b/tests/petsc/deal_solver_01.cc @@ -83,13 +83,11 @@ int main(int argc, char **argv) FDMatrix testproblem(size, size); PETScWrappers::SparseMatrix A(dim, dim, 5); testproblem.five_point(A); + A.compress (VectorOperation::insert); PETScWrappers::Vector f(dim); PETScWrappers::Vector u(dim); f = 1.; - A.compress (VectorOperation::add); - f.compress (VectorOperation::add); - u.compress (VectorOperation::add); GrowingVectorMemory mem; SolverCG solver(control,mem); diff --git a/tests/petsc/deal_solver_02.cc b/tests/petsc/deal_solver_02.cc index 0ef008f3e7..07ca880f34 100644 --- a/tests/petsc/deal_solver_02.cc +++ b/tests/petsc/deal_solver_02.cc @@ -84,13 +84,11 @@ int main(int argc, char **argv) FDMatrix testproblem(size, size); PETScWrappers::SparseMatrix A(dim, dim, 5); testproblem.five_point(A); + A.compress (VectorOperation::insert); PETScWrappers::Vector f(dim); PETScWrappers::Vector u(dim); f = 1.; - A.compress (VectorOperation::add); - f.compress (VectorOperation::add); - u.compress (VectorOperation::add); GrowingVectorMemory mem; SolverBicgstab solver(control,mem); diff --git a/tests/petsc/deal_solver_03.cc b/tests/petsc/deal_solver_03.cc index 3edb73d612..27daaebc5f 100644 --- a/tests/petsc/deal_solver_03.cc +++ b/tests/petsc/deal_solver_03.cc @@ -89,9 +89,7 @@ int main(int argc, char **argv) PETScWrappers::Vector f(dim); PETScWrappers::Vector u(dim); f = 1.; - A.compress (VectorOperation::add); - f.compress (VectorOperation::add); - u.compress (VectorOperation::add); + A.compress (VectorOperation::insert); GrowingVectorMemory mem; SolverGMRES solver(control,mem); diff --git a/tests/petsc/deal_solver_04.cc b/tests/petsc/deal_solver_04.cc index d3f932664b..99c19b0b6e 100644 --- a/tests/petsc/deal_solver_04.cc +++ b/tests/petsc/deal_solver_04.cc @@ -88,9 +88,7 @@ int main(int argc, char **argv) PETScWrappers::Vector f(dim); PETScWrappers::Vector u(dim); f = 1.; - A.compress (VectorOperation::add); - f.compress (VectorOperation::add); - u.compress (VectorOperation::add); + A.compress (VectorOperation::insert); GrowingVectorMemory mem; SolverMinRes solver(control,mem); diff --git a/tests/petsc/deal_solver_05.cc b/tests/petsc/deal_solver_05.cc index ce225df08d..72bd9bdade 100644 --- a/tests/petsc/deal_solver_05.cc +++ b/tests/petsc/deal_solver_05.cc @@ -87,9 +87,7 @@ int main(int argc, char **argv) PETScWrappers::Vector f(dim); PETScWrappers::Vector u(dim); f = 1.; - A.compress (VectorOperation::add); - f.compress (VectorOperation::add); - u.compress (VectorOperation::add); + A.compress (VectorOperation::insert); GrowingVectorMemory mem; SolverQMRS solver(control,mem); diff --git a/tests/petsc/full_matrix_00.cc b/tests/petsc/full_matrix_00.cc index 824d1fbe6a..c9914e2127 100644 --- a/tests/petsc/full_matrix_00.cc +++ b/tests/petsc/full_matrix_00.cc @@ -34,7 +34,7 @@ void test (PETScWrappers::FullMatrix &m) for (unsigned int j=0; jrow() << ' ' << i->column() << ' ' << i->value() << std::endl; ++i; diff --git a/tests/petsc/full_matrix_vector_01.cc b/tests/petsc/full_matrix_vector_01.cc index 9685ee4382..ef9a9a8304 100644 --- a/tests/petsc/full_matrix_vector_01.cc +++ b/tests/petsc/full_matrix_vector_01.cc @@ -36,9 +36,8 @@ void test (PETScWrappers::Vector &v, for (unsigned int i=0; i const PetscScalar s = m.matrix_scalar_product (w,v); diff --git a/tests/petsc/full_matrix_vector_06.cc b/tests/petsc/full_matrix_vector_06.cc index a93f05b9d0..5a70894fcc 100644 --- a/tests/petsc/full_matrix_vector_06.cc +++ b/tests/petsc/full_matrix_vector_06.cc @@ -35,8 +35,8 @@ void test (PETScWrappers::Vector &v) for (unsigned int i=0; i const PetscScalar s = m.matrix_norm_square (v); diff --git a/tests/petsc/full_matrix_vector_07.cc b/tests/petsc/full_matrix_vector_07.cc index a8226aa8b0..001829635e 100644 --- a/tests/petsc/full_matrix_vector_07.cc +++ b/tests/petsc/full_matrix_vector_07.cc @@ -40,9 +40,9 @@ void test (PETScWrappers::Vector &v, w(i) = i+1; } - m.compress (VectorOperation::add); - v.compress (VectorOperation::add); - w.compress (VectorOperation::add); + m.compress (VectorOperation::insert); + v.compress (VectorOperation::insert); + w.compress (VectorOperation::insert); // x=w-Mv const double s = m.residual (x, v, w); diff --git a/tests/petsc/solver_01.cc b/tests/petsc/solver_01.cc index 0294903e55..0a48809690 100644 --- a/tests/petsc/solver_01.cc +++ b/tests/petsc/solver_01.cc @@ -81,9 +81,7 @@ int main(int argc, char **argv) PETScWrappers::Vector f(dim); PETScWrappers::Vector u(dim); f = 1.; - A.compress (VectorOperation::add); - f.compress (VectorOperation::add); - u.compress (VectorOperation::add); + A.compress (VectorOperation::insert); PETScWrappers::SolverRichardson solver(control); PETScWrappers::PreconditionJacobi preconditioner(A); diff --git a/tests/petsc/solver_02.cc b/tests/petsc/solver_02.cc index 372fe4acc7..58de09df2e 100644 --- a/tests/petsc/solver_02.cc +++ b/tests/petsc/solver_02.cc @@ -84,9 +84,7 @@ int main(int argc, char **argv) PETScWrappers::Vector f(dim); PETScWrappers::Vector u(dim); f = 1.; - A.compress (VectorOperation::add); - f.compress (VectorOperation::add); - u.compress (VectorOperation::add); + A.compress (VectorOperation::insert); PETScWrappers::SolverChebychev solver(control); PETScWrappers::PreconditionJacobi preconditioner(A); diff --git a/tests/petsc/solver_03.cc b/tests/petsc/solver_03.cc index c8ba190a51..4c839e3c80 100644 --- a/tests/petsc/solver_03.cc +++ b/tests/petsc/solver_03.cc @@ -82,9 +82,7 @@ int main(int argc, char **argv) PETScWrappers::Vector f(dim); PETScWrappers::Vector u(dim); f = 1.; - A.compress (VectorOperation::add); - f.compress (VectorOperation::add); - u.compress (VectorOperation::add); + A.compress (VectorOperation::insert); PETScWrappers::SolverCG solver(control); PETScWrappers::PreconditionJacobi preconditioner(A); diff --git a/tests/petsc/solver_03_mf.cc b/tests/petsc/solver_03_mf.cc index ad3b8eae4c..f651d2bc45 100644 --- a/tests/petsc/solver_03_mf.cc +++ b/tests/petsc/solver_03_mf.cc @@ -80,9 +80,7 @@ int main(int argc, char **argv) PETScWrappers::Vector f(dim); PETScWrappers::Vector u(dim); f = 1.; - A.compress (VectorOperation::add); - f.compress (VectorOperation::add); - u.compress (VectorOperation::add); + A.compress (VectorOperation::insert); PETScWrappers::SolverCG solver(control); PETScWrappers::PreconditionNone preconditioner(A); diff --git a/tests/petsc/solver_03_precondition_boomeramg.cc b/tests/petsc/solver_03_precondition_boomeramg.cc index 3952dd18c1..404b096793 100644 --- a/tests/petsc/solver_03_precondition_boomeramg.cc +++ b/tests/petsc/solver_03_precondition_boomeramg.cc @@ -83,9 +83,7 @@ int main(int argc, char **argv) PETScWrappers::Vector f(dim); PETScWrappers::Vector u(dim); f = 1.; - A.compress (VectorOperation::add); - f.compress (VectorOperation::add); - u.compress (VectorOperation::add); + A.compress (VectorOperation::insert); PETScWrappers::SolverCG solver(control); PETScWrappers::PreconditionBoomerAMG preconditioner(A); diff --git a/tests/petsc/solver_03_precondition_boomeramg_symmetric.cc b/tests/petsc/solver_03_precondition_boomeramg_symmetric.cc index c301083b4a..ce04b203bd 100644 --- a/tests/petsc/solver_03_precondition_boomeramg_symmetric.cc +++ b/tests/petsc/solver_03_precondition_boomeramg_symmetric.cc @@ -84,9 +84,7 @@ int main(int argc, char **argv) PETScWrappers::Vector f(dim); PETScWrappers::Vector u(dim); f = 1.; - A.compress (VectorOperation::add); - f.compress (VectorOperation::add); - u.compress (VectorOperation::add); + A.compress (VectorOperation::insert); PETScWrappers::SolverCG solver(control); PETScWrappers::PreconditionBoomerAMG preconditioner(A, true); diff --git a/tests/petsc/solver_03_precondition_eisenstat.cc b/tests/petsc/solver_03_precondition_eisenstat.cc index 8528015206..5747cf0e35 100644 --- a/tests/petsc/solver_03_precondition_eisenstat.cc +++ b/tests/petsc/solver_03_precondition_eisenstat.cc @@ -82,9 +82,7 @@ int main(int argc, char **argv) PETScWrappers::Vector f(dim); PETScWrappers::Vector u(dim); f = 1.; - A.compress (VectorOperation::add); - f.compress (VectorOperation::add); - u.compress (VectorOperation::add); + A.compress (VectorOperation::insert); PETScWrappers::SolverCG solver(control); PETScWrappers::PreconditionEisenstat preconditioner(A); diff --git a/tests/petsc/solver_03_precondition_icc.cc b/tests/petsc/solver_03_precondition_icc.cc index 6f3fa7708a..7a04bc7770 100644 --- a/tests/petsc/solver_03_precondition_icc.cc +++ b/tests/petsc/solver_03_precondition_icc.cc @@ -82,9 +82,7 @@ int main(int argc, char **argv) PETScWrappers::Vector f(dim); PETScWrappers::Vector u(dim); f = 1.; - A.compress (VectorOperation::add); - f.compress (VectorOperation::add); - u.compress (VectorOperation::add); + A.compress (VectorOperation::insert); PETScWrappers::SolverCG solver(control); PETScWrappers::PreconditionICC preconditioner(A); diff --git a/tests/petsc/solver_03_precondition_lu.cc b/tests/petsc/solver_03_precondition_lu.cc index 3bb0a590b4..b7b88a0f37 100644 --- a/tests/petsc/solver_03_precondition_lu.cc +++ b/tests/petsc/solver_03_precondition_lu.cc @@ -89,9 +89,7 @@ int main(int argc, char **argv) PETScWrappers::Vector f(dim); PETScWrappers::Vector u(dim); f = 1.; - A.compress (VectorOperation::add); - f.compress (VectorOperation::add); - u.compress (VectorOperation::add); + A.compress (VectorOperation::insert); PETScWrappers::SolverCG solver(control); PETScWrappers::PreconditionLU preconditioner(A); diff --git a/tests/petsc/solver_03_precondition_parasails.cc b/tests/petsc/solver_03_precondition_parasails.cc index def46b1520..269fdaae8f 100644 --- a/tests/petsc/solver_03_precondition_parasails.cc +++ b/tests/petsc/solver_03_precondition_parasails.cc @@ -82,9 +82,7 @@ int main(int argc, char **argv) PETScWrappers::Vector f(dim); PETScWrappers::Vector u(dim); f = 1.; - A.compress (VectorOperation::add); - f.compress (VectorOperation::add); - u.compress (VectorOperation::add); + A.compress (VectorOperation::insert); PETScWrappers::SolverCG solver(control); PETScWrappers::PreconditionParaSails preconditioner(A); diff --git a/tests/petsc/solver_03_precondition_sor.cc b/tests/petsc/solver_03_precondition_sor.cc index ceab998ba0..91edc6de6d 100644 --- a/tests/petsc/solver_03_precondition_sor.cc +++ b/tests/petsc/solver_03_precondition_sor.cc @@ -82,9 +82,7 @@ int main(int argc, char **argv) PETScWrappers::Vector f(dim); PETScWrappers::Vector u(dim); f = 1.; - A.compress (VectorOperation::add); - f.compress (VectorOperation::add); - u.compress (VectorOperation::add); + A.compress (VectorOperation::insert); PETScWrappers::SolverCG solver(control); PETScWrappers::PreconditionSOR preconditioner(A); diff --git a/tests/petsc/solver_03_precondition_ssor.cc b/tests/petsc/solver_03_precondition_ssor.cc index 5f47ab3d90..9856f14bb7 100644 --- a/tests/petsc/solver_03_precondition_ssor.cc +++ b/tests/petsc/solver_03_precondition_ssor.cc @@ -82,9 +82,7 @@ int main(int argc, char **argv) PETScWrappers::Vector f(dim); PETScWrappers::Vector u(dim); f = 1.; - A.compress (VectorOperation::add); - f.compress (VectorOperation::add); - u.compress (VectorOperation::add); + A.compress (VectorOperation::insert); PETScWrappers::SolverCG solver(control); PETScWrappers::PreconditionSSOR preconditioner(A); diff --git a/tests/petsc/solver_04.cc b/tests/petsc/solver_04.cc index 895845c74e..0f57a698b6 100644 --- a/tests/petsc/solver_04.cc +++ b/tests/petsc/solver_04.cc @@ -82,9 +82,7 @@ int main(int argc, char **argv) PETScWrappers::Vector f(dim); PETScWrappers::Vector u(dim); f = 1.; - A.compress (VectorOperation::add); - f.compress (VectorOperation::add); - u.compress (VectorOperation::add); + A.compress (VectorOperation::insert); PETScWrappers::SolverBiCG solver(control); PETScWrappers::PreconditionJacobi preconditioner(A); diff --git a/tests/petsc/solver_05.cc b/tests/petsc/solver_05.cc index c88c9e4786..d3bcd3d20a 100644 --- a/tests/petsc/solver_05.cc +++ b/tests/petsc/solver_05.cc @@ -82,9 +82,7 @@ int main(int argc, char **argv) PETScWrappers::Vector f(dim); PETScWrappers::Vector u(dim); f = 1.; - A.compress (VectorOperation::add); - f.compress (VectorOperation::add); - u.compress (VectorOperation::add); + A.compress (VectorOperation::insert); PETScWrappers::SolverGMRES solver(control); PETScWrappers::PreconditionJacobi preconditioner(A); diff --git a/tests/petsc/solver_06.cc b/tests/petsc/solver_06.cc index 1a81d8e151..95c65ac3af 100644 --- a/tests/petsc/solver_06.cc +++ b/tests/petsc/solver_06.cc @@ -85,9 +85,7 @@ int main(int argc, char **argv) PETScWrappers::Vector f(dim); PETScWrappers::Vector u(dim); f = 1.; - A.compress (VectorOperation::add); - f.compress (VectorOperation::add); - u.compress (VectorOperation::add); + A.compress (VectorOperation::insert); PETScWrappers::SolverBicgstab solver(control); PETScWrappers::PreconditionJacobi preconditioner(A); diff --git a/tests/petsc/solver_07.cc b/tests/petsc/solver_07.cc index 6d677ade05..0a568fc940 100644 --- a/tests/petsc/solver_07.cc +++ b/tests/petsc/solver_07.cc @@ -82,9 +82,7 @@ int main(int argc, char **argv) PETScWrappers::Vector f(dim); PETScWrappers::Vector u(dim); f = 1.; - A.compress (VectorOperation::add); - f.compress (VectorOperation::add); - u.compress (VectorOperation::add); + A.compress (VectorOperation::insert); PETScWrappers::SolverCGS solver(control); PETScWrappers::PreconditionJacobi preconditioner(A); diff --git a/tests/petsc/solver_08.cc b/tests/petsc/solver_08.cc index 4b749fd338..87286242f8 100644 --- a/tests/petsc/solver_08.cc +++ b/tests/petsc/solver_08.cc @@ -82,9 +82,7 @@ int main(int argc, char **argv) PETScWrappers::Vector f(dim); PETScWrappers::Vector u(dim); f = 1.; - A.compress (VectorOperation::add); - f.compress (VectorOperation::add); - u.compress (VectorOperation::add); + A.compress (VectorOperation::insert); PETScWrappers::SolverTFQMR solver(control); PETScWrappers::PreconditionJacobi preconditioner(A); diff --git a/tests/petsc/solver_09.cc b/tests/petsc/solver_09.cc index 08520c11ba..01e44da878 100644 --- a/tests/petsc/solver_09.cc +++ b/tests/petsc/solver_09.cc @@ -86,9 +86,7 @@ int main(int argc, char **argv) PETScWrappers::Vector f(dim); PETScWrappers::Vector u(dim); f = 1.; - A.compress (VectorOperation::add); - f.compress (VectorOperation::add); - u.compress (VectorOperation::add); + A.compress (VectorOperation::insert); PETScWrappers::SolverTCQMR solver(control); PETScWrappers::PreconditionJacobi preconditioner(A); diff --git a/tests/petsc/solver_10.cc b/tests/petsc/solver_10.cc index 5fc7cd7efc..3197a839fe 100644 --- a/tests/petsc/solver_10.cc +++ b/tests/petsc/solver_10.cc @@ -82,9 +82,7 @@ int main(int argc, char **argv) PETScWrappers::Vector f(dim); PETScWrappers::Vector u(dim); f = 1.; - A.compress (VectorOperation::add); - f.compress (VectorOperation::add); - u.compress (VectorOperation::add); + A.compress (VectorOperation::insert); PETScWrappers::SolverCR solver(control); PETScWrappers::PreconditionJacobi preconditioner(A); diff --git a/tests/petsc/solver_11.cc b/tests/petsc/solver_11.cc index c22613b528..5f8a6c81d9 100644 --- a/tests/petsc/solver_11.cc +++ b/tests/petsc/solver_11.cc @@ -86,9 +86,7 @@ int main(int argc, char **argv) PETScWrappers::Vector f(dim); PETScWrappers::Vector u(dim); f = 1.; - A.compress (VectorOperation::add); - f.compress (VectorOperation::add); - u.compress (VectorOperation::add); + A.compress (VectorOperation::insert); PETScWrappers::SolverLSQR solver(control); PETScWrappers::PreconditionJacobi preconditioner(A); diff --git a/tests/petsc/solver_12.cc b/tests/petsc/solver_12.cc index b0c4032d39..79a6e9d43e 100644 --- a/tests/petsc/solver_12.cc +++ b/tests/petsc/solver_12.cc @@ -75,9 +75,7 @@ int main(int argc, char **argv) PETScWrappers::Vector f(dim); PETScWrappers::Vector u(dim); f = 1.; - A.compress (VectorOperation::add); - f.compress (VectorOperation::add); - u.compress (VectorOperation::add); + A.compress (VectorOperation::insert); PETScWrappers::SolverPreOnly solver(control); diff --git a/tests/petsc/solver_13.cc b/tests/petsc/solver_13.cc index 50909db7cd..5deb2efdd8 100644 --- a/tests/petsc/solver_13.cc +++ b/tests/petsc/solver_13.cc @@ -73,9 +73,7 @@ int main(int argc, char **argv) PETScWrappers::Vector u(dim); u = 0.; f = 1.; - A.compress (VectorOperation::add); - f.compress (VectorOperation::add); - u.compress (VectorOperation::add); + A.compress (VectorOperation::insert); PETScWrappers::Vector t=u; PETScWrappers::SolverPreOnly solver(control); diff --git a/tests/petsc/sparse_direct_mumps.cc b/tests/petsc/sparse_direct_mumps.cc index 4670fb127e..3432a94fc6 100644 --- a/tests/petsc/sparse_direct_mumps.cc +++ b/tests/petsc/sparse_direct_mumps.cc @@ -57,9 +57,7 @@ int main(int argc, char **argv) PETScWrappers::Vector u(dim); u = 0.; f = 1.; - A.compress (VectorOperation::add); - f.compress (VectorOperation::add); - u.compress (VectorOperation::add); + A.compress (VectorOperation::insert); SolverControl cn; PETScWrappers::SparseDirectMUMPS solver(cn); diff --git a/tests/petsc/sparse_matrix_01.cc b/tests/petsc/sparse_matrix_01.cc index 3d39fb34b2..41b4d0d97a 100644 --- a/tests/petsc/sparse_matrix_01.cc +++ b/tests/petsc/sparse_matrix_01.cc @@ -33,13 +33,13 @@ void test () for (unsigned int j=0; j<=i; ++j) m.set (i,j, i+2*j); - m.compress (VectorOperation::add); + m.compress (VectorOperation::insert); PETScWrappers::SparseMatrix m2(s,s,s); m2.set(0,1,5.0); for (unsigned int i=0; irow() << ' ' << i->column() << ' ' << i->value() << std::endl; ++i; diff --git a/tests/petsc/sparse_matrix_vector_01.cc b/tests/petsc/sparse_matrix_vector_01.cc index e510513ac2..d54aa90c13 100644 --- a/tests/petsc/sparse_matrix_vector_01.cc +++ b/tests/petsc/sparse_matrix_vector_01.cc @@ -36,9 +36,8 @@ void test (PETScWrappers::Vector &v, for (unsigned int i=0; i const PetscScalar s = m.matrix_scalar_product (w,v); diff --git a/tests/petsc/sparse_matrix_vector_06.cc b/tests/petsc/sparse_matrix_vector_06.cc index d589fe11fd..a84f749f09 100644 --- a/tests/petsc/sparse_matrix_vector_06.cc +++ b/tests/petsc/sparse_matrix_vector_06.cc @@ -35,8 +35,8 @@ void test (PETScWrappers::Vector &v) for (unsigned int i=0; i const PetscScalar s = m.matrix_norm_square (v); diff --git a/tests/petsc/sparse_matrix_vector_07.cc b/tests/petsc/sparse_matrix_vector_07.cc index 26041ff6bc..35fc56c870 100644 --- a/tests/petsc/sparse_matrix_vector_07.cc +++ b/tests/petsc/sparse_matrix_vector_07.cc @@ -40,9 +40,9 @@ void test (PETScWrappers::Vector &v, w(i) = i+1; } - m.compress (VectorOperation::add); - v.compress (VectorOperation::add); - w.compress (VectorOperation::add); + m.compress (VectorOperation::insert); + v.compress (VectorOperation::insert); + w.compress (VectorOperation::insert); // x=w-Mv const double s = m.residual (x, v, w); -- 2.39.5