From: Wolfgang Bangerth Date: Fri, 27 Feb 2015 19:55:27 +0000 (-0600) Subject: Avoid calls to naked compress() without a VectorOperation argument. X-Git-Tag: v8.3.0-rc1~380^2~11 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=1e6b820e03a94b848b23469d08ea83d0d8fc6648;p=dealii.git Avoid calls to naked compress() without a VectorOperation argument. --- diff --git a/tests/trilinos/01.cc b/tests/trilinos/01.cc index bc4ac477e1..f2692c7c95 100644 --- a/tests/trilinos/01.cc +++ b/tests/trilinos/01.cc @@ -33,7 +33,7 @@ void test (TrilinosWrappers::SparseMatrix &m) if ((i+2*j+1) % 3 == 0) m.set (i,j, i*j*.5+.5); - m.compress (); + m.compress (VectorOperation::insert); // then make sure we retrieve the same ones for (unsigned int i=0; i void test (MatrixType &m) { m.set(0,0,1.); - m.compress(); + m.compress(VectorOperation::insert); m = 0; - m.compress(); + m.compress(VectorOperation::insert); Assert(fabs(m.frobenius_norm())<1e-15, ExcInternalError()); diff --git a/tests/trilinos/add_matrices_06.cc b/tests/trilinos/add_matrices_06.cc index 93ed824bd3..7e16b9bc79 100644 --- a/tests/trilinos/add_matrices_06.cc +++ b/tests/trilinos/add_matrices_06.cc @@ -42,9 +42,9 @@ void test (TrilinosWrappers::SparseMatrix &m) m3.set (i,j, -0.1); } - m.compress (); - m2.compress(); - m3.compress(); + m.compress (VectorOperation::insert); + m2.compress(VectorOperation::insert); + m3.compress(VectorOperation::insert); deallog << "Matrix nonzeros: " << m.n_nonzero_elements() << " " << m2.n_nonzero_elements() << " " diff --git a/tests/trilinos/block_sparse_matrix_add_01.cc b/tests/trilinos/block_sparse_matrix_add_01.cc index 8bd7aac4dc..5f3a33422c 100644 --- a/tests/trilinos/block_sparse_matrix_add_01.cc +++ b/tests/trilinos/block_sparse_matrix_add_01.cc @@ -50,7 +50,7 @@ void test () m_small.set (i,j, value); } - m_small.compress(); + m_small.compress(VectorOperation::insert); // Then build two matrices consisting of // several copies of the small @@ -105,7 +105,7 @@ void test () } } - m2.compress(); + m2.compress(VectorOperation::add); // subtract the matrix m from this one, // we should get a zero matrix diff --git a/tests/trilinos/block_sparse_matrix_set_01.cc b/tests/trilinos/block_sparse_matrix_set_01.cc index 68097c2f32..ea13559af1 100644 --- a/tests/trilinos/block_sparse_matrix_set_01.cc +++ b/tests/trilinos/block_sparse_matrix_set_01.cc @@ -51,7 +51,7 @@ void test () m_small.set (i,j, value); } - m_small.compress(); + m_small.compress(VectorOperation::insert); // Then build two matrices consisting of // several copies of the small @@ -106,7 +106,7 @@ void test () } } - m2.compress(); + m2.compress(VectorOperation::insert); // subtract the matrix m from this one, // we should get a zero matrix diff --git a/tests/trilinos/deal_solver_01.cc b/tests/trilinos/deal_solver_01.cc index 14c36b4b7c..495b362bdc 100644 --- a/tests/trilinos/deal_solver_01.cc +++ b/tests/trilinos/deal_solver_01.cc @@ -93,7 +93,7 @@ int main(int argc, char **argv) TrilinosWrappers::Vector f(dim); TrilinosWrappers::Vector u(dim); f = 1.; - A.compress (); + A.compress (VectorOperation::insert); f.compress (VectorOperation::insert); u.compress (VectorOperation::insert); diff --git a/tests/trilinos/deal_solver_02.cc b/tests/trilinos/deal_solver_02.cc index 21b3c5d5ea..c9ce657557 100644 --- a/tests/trilinos/deal_solver_02.cc +++ b/tests/trilinos/deal_solver_02.cc @@ -94,7 +94,7 @@ int main(int argc, char **argv) TrilinosWrappers::Vector f(dim); TrilinosWrappers::Vector u(dim); f = 1.; - A.compress (); + A.compress (VectorOperation::insert); f.compress (VectorOperation::insert); u.compress (VectorOperation::insert); diff --git a/tests/trilinos/deal_solver_03.cc b/tests/trilinos/deal_solver_03.cc index 394a9489f2..031d63da45 100644 --- a/tests/trilinos/deal_solver_03.cc +++ b/tests/trilinos/deal_solver_03.cc @@ -95,7 +95,7 @@ int main(int argc, char **argv) TrilinosWrappers::Vector f(dim); TrilinosWrappers::Vector u(dim); f = 1.; - A.compress (); + A.compress (VectorOperation::insert); f.compress (VectorOperation::insert); u.compress (VectorOperation::insert); diff --git a/tests/trilinos/deal_solver_04.cc b/tests/trilinos/deal_solver_04.cc index 87ee004693..acb9625aa0 100644 --- a/tests/trilinos/deal_solver_04.cc +++ b/tests/trilinos/deal_solver_04.cc @@ -94,7 +94,7 @@ int main(int argc, char **argv) TrilinosWrappers::Vector f(dim); TrilinosWrappers::Vector u(dim); f = 1.; - A.compress (); + A.compress (VectorOperation::insert); f.compress (VectorOperation::insert); u.compress (VectorOperation::insert); diff --git a/tests/trilinos/deal_solver_05.cc b/tests/trilinos/deal_solver_05.cc index a34b93bf98..902311ecc0 100644 --- a/tests/trilinos/deal_solver_05.cc +++ b/tests/trilinos/deal_solver_05.cc @@ -93,7 +93,7 @@ int main(int argc, char **argv) TrilinosWrappers::Vector f(dim); TrilinosWrappers::Vector u(dim); f = 1.; - A.compress (); + A.compress (VectorOperation::insert); f.compress (VectorOperation::insert); u.compress (VectorOperation::insert); diff --git a/tests/trilinos/deal_solver_06.cc b/tests/trilinos/deal_solver_06.cc index 312b6bc111..502361e1ba 100644 --- a/tests/trilinos/deal_solver_06.cc +++ b/tests/trilinos/deal_solver_06.cc @@ -91,7 +91,7 @@ int main(int argc, char **argv) TrilinosWrappers::Vector f(dim); TrilinosWrappers::Vector u(dim); f = 1.; - A.compress (); + A.compress (VectorOperation::insert); f.compress (VectorOperation::insert); u.compress (VectorOperation::insert); diff --git a/tests/trilinos/parallel_sparse_matrix_01.cc b/tests/trilinos/parallel_sparse_matrix_01.cc index 5937d8c726..d7b03b6bd5 100644 --- a/tests/trilinos/parallel_sparse_matrix_01.cc +++ b/tests/trilinos/parallel_sparse_matrix_01.cc @@ -97,7 +97,7 @@ void test () for (unsigned int j=0; jrow() << ' ' << i->column() << ' ' << i->value() << std::endl; ++i; diff --git a/tests/trilinos/sparse_matrix_set_01.cc b/tests/trilinos/sparse_matrix_set_01.cc index 039e302908..8824c12333 100644 --- a/tests/trilinos/sparse_matrix_set_01.cc +++ b/tests/trilinos/sparse_matrix_set_01.cc @@ -33,7 +33,7 @@ void test (TrilinosWrappers::SparseMatrix &m) if ((i+2*j+1) % 3 == 0) m.set (i,j, i*j*.5+.5); - m.compress (); + m.compress (VectorOperation::insert); TrilinosWrappers::SparseMatrix m2(m.m(), m.n(), m.n()/3+1); @@ -67,7 +67,7 @@ void test (TrilinosWrappers::SparseMatrix &m) } } - m2.compress(); + m2.compress(VectorOperation::insert); // subtract the matrix m from this one, // we should get a zero matrix. diff --git a/tests/trilinos/sparse_matrix_set_02.cc b/tests/trilinos/sparse_matrix_set_02.cc index 49254ee693..c0146fa529 100644 --- a/tests/trilinos/sparse_matrix_set_02.cc +++ b/tests/trilinos/sparse_matrix_set_02.cc @@ -49,7 +49,7 @@ void test (TrilinosWrappers::SparseMatrix &m) m.set (i,j, value); } - m.compress (); + m.compress (VectorOperation::insert); // now add the same elements from a full // matrix (if the same element is set // more than once, Trilinos adds them) @@ -68,7 +68,7 @@ void test (TrilinosWrappers::SparseMatrix &m) } } - m2.compress(); + m2.compress(VectorOperation::insert); // subtract the matrix m from this one, // we should get a zero matrix