From: Daniel Arndt Date: Mon, 8 May 2017 21:30:11 +0000 (+0200) Subject: Remove deprecated serial Trilinos vectors from test suite X-Git-Tag: v9.0.0-rc1~1543^2~5 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ea859446cae0d4d8b21dc24d74627aed052161c9;p=dealii.git Remove deprecated serial Trilinos vectors from test suite --- diff --git a/tests/gla/extract_subvector_to.cc b/tests/gla/extract_subvector_to.cc index 6e00ea0569..590175601c 100644 --- a/tests/gla/extract_subvector_to.cc +++ b/tests/gla/extract_subvector_to.cc @@ -85,8 +85,8 @@ int main (int argc, char **argv) { deallog.push("Trilinos"); - TrilinosWrappers::Vector v; - v.reinit(17); + TrilinosWrappers::MPI::Vector v; + v.reinit(complete_index_set(17), MPI_COMM_WORLD); test (v); deallog.pop(); } @@ -116,11 +116,10 @@ int main (int argc, char **argv) { deallog.push("Trilinos"); - TrilinosWrappers::BlockVector v; - v.reinit(3); - v.block(0).reinit(7); - v.block(1).reinit(5); - v.block(2).reinit(3); + TrilinosWrappers::MPI::BlockVector v(3); + v.block(0).reinit(complete_index_set(7)); + v.block(1).reinit(complete_index_set(5)); + v.block(2).reinit(complete_index_set(3)); v.collect_sizes(); test (v); deallog.pop(); diff --git a/tests/lac/block_linear_operator_05.cc b/tests/lac/block_linear_operator_05.cc index dceab47d96..8e3e6dc082 100644 --- a/tests/lac/block_linear_operator_05.cc +++ b/tests/lac/block_linear_operator_05.cc @@ -23,7 +23,7 @@ #include #include #include -#include +#include using namespace dealii; @@ -37,18 +37,14 @@ int main(int argc, char *argv[]) TrilinosWrappers::SparseMatrix a; auto op_a = linear_operator(a); - auto op_a2 = linear_operator(a); TrilinosWrappers::BlockSparseMatrix b; auto op_b = linear_operator(b); - auto op_b3 = linear_operator(b); typedef LinearOperator Op_MPI; - typedef LinearOperator Op; auto op_c = block_diagonal_operator<2, TrilinosWrappers::MPI::BlockVector >(std::array ({{ op_a, op_a}})); - auto op_c2 = block_diagonal_operator<2, TrilinosWrappers::BlockVector >(std::array ({{ op_a2, op_a2}})); deallog << "OK" << std::endl; diff --git a/tests/lac/linear_operator_04.cc b/tests/lac/linear_operator_04.cc index eedca10cba..5696ce55ee 100644 --- a/tests/lac/linear_operator_04.cc +++ b/tests/lac/linear_operator_04.cc @@ -36,12 +36,12 @@ int main(int argc, char *argv[]) TrilinosWrappers::SparseMatrix a; auto op_a = linear_operator(a); - auto op_a2 = linear_operator(a); + auto op_a2 = linear_operator(a); TrilinosWrappers::BlockSparseMatrix b; auto op_b = linear_operator(b); - auto op_b3 = linear_operator(b); + auto op_b3 = linear_operator(b); deallog << "OK" << std::endl; diff --git a/tests/lac/linear_operator_10.cc b/tests/lac/linear_operator_10.cc index 0f2998be40..813a9c088f 100644 --- a/tests/lac/linear_operator_10.cc +++ b/tests/lac/linear_operator_10.cc @@ -21,7 +21,7 @@ #include #include -#include +#include #include #include #include @@ -224,7 +224,7 @@ int main(int argc, char *argv[]) sparsity_pattern.compress(); TrilinosWrappers::SparseMatrix A (sparsity_pattern); - TrilinosWrappers::Vector b; + TrilinosWrappers::MPI::Vector b; b.reinit(A.locally_owned_domain_indices()); TrilinosWrappers::MPI::Vector c; c.reinit(A.locally_owned_domain_indices()); @@ -365,7 +365,7 @@ int main(int argc, char *argv[]) // typedef TrilinosWrappers::SolverDirect SLVR; // // test_solver (A, b); // - // typedef dealii::TrilinosWrappers::Vector VectorType; + // typedef dealii::TrilinosWrappers::MPI::Vector VectorType; // typedef dealii::TrilinosWrappers::internal::LinearOperator::TrilinosPayload PayloadType; // // TODO: Full template expansion required for composite operator. Can one prevent this? // // i.e. is 'const auto lo_A = linear_operator(A);' possible? @@ -382,7 +382,7 @@ int main(int argc, char *argv[]) // // Singular operation // { // deallog.push("S_Op"); - // const TrilinosWrappers::Vector x_approx = lo_A_inv*b; + // const TrilinosWrappers::MPI::Vector x_approx = lo_A_inv*b; // print(x_approx); // deallog.pop(); // } @@ -390,7 +390,7 @@ int main(int argc, char *argv[]) // // Composite operation // { // deallog.push("C_Op"); - // const TrilinosWrappers::Vector x_approx = (lo_A_inv*lo_A*lo_A_inv)*b; + // const TrilinosWrappers::MPI::Vector x_approx = (lo_A_inv*lo_A*lo_A_inv)*b; // print(x_approx); // deallog.pop(); // } diff --git a/tests/lac/linear_operator_10a.cc b/tests/lac/linear_operator_10a.cc index 1325502379..9f5a403bf7 100644 --- a/tests/lac/linear_operator_10a.cc +++ b/tests/lac/linear_operator_10a.cc @@ -28,7 +28,7 @@ #include #include -#include +#include #include #include #include @@ -230,8 +230,8 @@ int main(int argc, char *argv[]) sparsity_pattern.compress(); TrilinosWrappers::SparseMatrix A (sparsity_pattern); - TrilinosWrappers::Vector b; - b.reinit(A.domain_partitioner()); + TrilinosWrappers::MPI::Vector b; + b.reinit(A.locally_owned_domain_indices()); TrilinosWrappers::MPI::Vector c; c.reinit(A.locally_owned_domain_indices()); for (unsigned int i=0; i < rc; ++i) @@ -333,49 +333,49 @@ int main(int argc, char *argv[]) { deallog.push("SolverBicgstab"); - typedef SolverBicgstab SLVR; + typedef SolverBicgstab SLVR; test_solver (A, b); deallog.pop(); } { deallog.push("SolverCG"); - typedef SolverCG SLVR; + typedef SolverCG SLVR; test_solver (A, b); deallog.pop(); } { deallog.push("SolverGMRES"); - typedef SolverGMRES SLVR; + typedef SolverGMRES SLVR; test_solver (A, b); deallog.pop(); } { deallog.push("SolverFGMRES"); - typedef SolverFGMRES SLVR; + typedef SolverFGMRES SLVR; test_solver (A, b); deallog.pop(); } { deallog.push("SolverMinRes"); - typedef SolverMinRes SLVR; + typedef SolverMinRes SLVR; test_solver (A, b); deallog.pop(); } { deallog.push("SolverQMRS"); - typedef SolverQMRS SLVR; + typedef SolverQMRS SLVR; test_solver (A, b); deallog.pop(); } { deallog.push("SolverRichardson"); - typedef SolverRichardson SLVR; + typedef SolverRichardson SLVR; test_solver (A, b); deallog.pop(); } diff --git a/tests/lac/linear_operator_11.cc b/tests/lac/linear_operator_11.cc index ac3803c764..2d92f4444e 100644 --- a/tests/lac/linear_operator_11.cc +++ b/tests/lac/linear_operator_11.cc @@ -62,8 +62,8 @@ private: ConstraintMatrix constraints; TrilinosWrappers::SparseMatrix system_matrix; - TrilinosWrappers::Vector solution; - TrilinosWrappers::Vector system_rhs; + TrilinosWrappers::MPI::Vector solution; + TrilinosWrappers::MPI::Vector system_rhs; }; @@ -148,8 +148,8 @@ void Step4::setup_system () DoFTools::make_sparsity_pattern (dof_handler, c_sparsity, constraints, false); system_matrix.reinit (c_sparsity); - solution.reinit (dof_handler.n_dofs()); - system_rhs.reinit (dof_handler.n_dofs()); + solution.reinit (complete_index_set(dof_handler.n_dofs())); + system_rhs.reinit (complete_index_set(dof_handler.n_dofs())); } @@ -220,7 +220,7 @@ void Step4::solve () deallog.pop(); } - typedef TrilinosWrappers::Vector VectorType; + typedef TrilinosWrappers::MPI::Vector VectorType; VectorType output(solution); { deallog.push("Trilinos_CG_SSOR"); diff --git a/tests/lac/linear_operator_13.cc b/tests/lac/linear_operator_13.cc index 51a7dade0e..e034b0e77e 100644 --- a/tests/lac/linear_operator_13.cc +++ b/tests/lac/linear_operator_13.cc @@ -39,7 +39,7 @@ #include #include -#include +#include #include #include #include @@ -50,14 +50,14 @@ using namespace dealii; template void build_matrix_vector(TrilinosWrappers::BlockSparseMatrix &matrix, - TrilinosWrappers::BlockVector &vector, + TrilinosWrappers::MPI::BlockVector &vector, const FE_Q &fe_test, const FE_Q &fe_trial) { deallog.push("build_matrix_vector"); // Configure block system - std::vector dofs_per_block(2); + std::vector dofs_per_block (2); std::vector block_component (2); block_component[0] = 0; block_component[1] = 1; @@ -80,16 +80,19 @@ void build_matrix_vector(TrilinosWrappers::BlockSparseMatrix &matrix, DoFRenumbering::component_wise(dof_handler, block_component); DoFTools::count_dofs_per_block(dof_handler, dofs_per_block, block_component); + std::vector partitioning(2); + partitioning[0] = complete_index_set(dofs_per_block[0]); + partitioning[1] = complete_index_set(dofs_per_block[1]); constraints.clear(); constraints.close(); - BlockDynamicSparsityPattern dsp (dofs_per_block,dofs_per_block); + BlockDynamicSparsityPattern dsp (partitioning); DoFTools::make_sparsity_pattern (dof_handler, dsp, constraints, false); matrix.clear(); // vector.clear(); matrix.reinit (dsp); - vector.reinit (dofs_per_block); + vector.reinit (partitioning); // Assemble system: Mass matrix and constrant RHS vector FEValues fe_values (fe, quadrature_formula, @@ -136,11 +139,11 @@ void build_matrix_vector(TrilinosWrappers::BlockSparseMatrix &matrix, } void evaluate_ops (const TrilinosWrappers::BlockSparseMatrix &matrix, - const TrilinosWrappers::BlockVector &vector) + const TrilinosWrappers::MPI::BlockVector &vector) { const double tol = 1e-12; typedef dealii::TrilinosWrappers::SparseMatrix MatrixType; - typedef dealii::TrilinosWrappers::Vector VectorType; + typedef dealii::TrilinosWrappers::MPI::Vector VectorType; typedef dealii::TrilinosWrappers::internal::LinearOperator::TrilinosPayload PayloadType; typedef typename PayloadType::VectorType PayloadVectorType; typedef dealii::types::global_dof_index size_type; @@ -440,7 +443,7 @@ int main(int argc, char *argv[]) FE_Q fe_trial (1); TrilinosWrappers::BlockSparseMatrix A; - TrilinosWrappers::BlockVector b; + TrilinosWrappers::MPI::BlockVector b; deallog.push("Square"); build_matrix_vector(A,b,fe_test_1,fe_trial); diff --git a/tests/lac/linear_operator_14.cc b/tests/lac/linear_operator_14.cc index faa3bc15a5..4b9c3394e9 100644 --- a/tests/lac/linear_operator_14.cc +++ b/tests/lac/linear_operator_14.cc @@ -41,7 +41,7 @@ #include #include -#include +#include #include #include #include diff --git a/tests/lac/linear_operator_15.cc b/tests/lac/linear_operator_15.cc index 3ce60dcfda..600012a8cd 100644 --- a/tests/lac/linear_operator_15.cc +++ b/tests/lac/linear_operator_15.cc @@ -69,18 +69,18 @@ int main (int argc, char *argv[]) A.reinit(csp); testproblem.five_point(A); - TrilinosWrappers::Vector f; - f.reinit(dim); - TrilinosWrappers::Vector u; - u.reinit(dim); + TrilinosWrappers::MPI::Vector f; + f.reinit(complete_index_set(dim)); + TrilinosWrappers::MPI::Vector u; + u.reinit(complete_index_set(dim)); A.compress (VectorOperation::insert); f.compress (VectorOperation::insert); u.compress (VectorOperation::insert); - const auto lo_A = linear_operator(A); - const auto lo_id_1 = identity_operator(lo_A.reinit_range_vector); - const auto lo_id_2 = identity_operator(lo_A); + const auto lo_A = linear_operator(A); + const auto lo_id_1 = identity_operator(lo_A.reinit_range_vector); + const auto lo_id_2 = identity_operator(lo_A); const auto lo_A_plus_id_1 = lo_A + lo_id_1; // Not a good idea. See below. const auto lo_A_plus_id_2 = lo_A + lo_id_2; diff --git a/tests/lac/linear_operator_16.cc b/tests/lac/linear_operator_16.cc index ad39b238b8..9aea734861 100644 --- a/tests/lac/linear_operator_16.cc +++ b/tests/lac/linear_operator_16.cc @@ -69,16 +69,16 @@ int main (int argc, char *argv[]) A.reinit(csp); testproblem.five_point(A); - TrilinosWrappers::Vector f; - f.reinit(dim); - TrilinosWrappers::Vector u; - u.reinit(dim); + TrilinosWrappers::MPI::Vector f; + f.reinit(complete_index_set(dim)); + TrilinosWrappers::MPI::Vector u; + u.reinit(complete_index_set(dim)); A.compress (VectorOperation::insert); f.compress (VectorOperation::insert); u.compress (VectorOperation::insert); - const auto lo_A = linear_operator(A); + const auto lo_A = linear_operator(A); const auto lo_null = null_operator(lo_A); const auto lo_A_plus_null = lo_A + lo_null; diff --git a/tests/lac/schur_complement_04.cc b/tests/lac/schur_complement_04.cc index 099c8729ec..bcf964c4d1 100644 --- a/tests/lac/schur_complement_04.cc +++ b/tests/lac/schur_complement_04.cc @@ -20,7 +20,7 @@ #include #include -#include +#include #include #include #include @@ -95,7 +95,7 @@ int main(int argc,char **argv) */ const unsigned int rc=1; - typedef TrilinosWrappers::Vector VectorType; + typedef TrilinosWrappers::MPI::Vector VectorType; TrilinosWrappers::SparseMatrix A (rc,rc,rc); TrilinosWrappers::SparseMatrix B (rc,rc,rc); @@ -103,9 +103,9 @@ int main(int argc,char **argv) TrilinosWrappers::SparseMatrix D (rc,rc,rc); VectorType y; - y.reinit(rc); + y.reinit(complete_index_set(rc)); VectorType g; - g.reinit(rc); + g.reinit(complete_index_set(rc)); for (unsigned int i=0; i < rc; ++i) { A.set(i,i, 1.0*(i+1)); diff --git a/tests/lac/vector_reinit_02.cc b/tests/lac/vector_reinit_02.cc index fcb8aabaea..6a2adaea33 100644 --- a/tests/lac/vector_reinit_02.cc +++ b/tests/lac/vector_reinit_02.cc @@ -103,6 +103,6 @@ int main (int argc, char **argv) initlog(); - do_test(); + do_test(); do_test(); } diff --git a/tests/lac/vector_type_traits_is_serial_02.cc b/tests/lac/vector_type_traits_is_serial_02.cc index e263ef94d4..ab3bcfede8 100644 --- a/tests/lac/vector_type_traits_is_serial_02.cc +++ b/tests/lac/vector_type_traits_is_serial_02.cc @@ -19,35 +19,25 @@ #include "../tests.h" #include -#include +#include #include #include void test () { - // make sure that is_serial_vector< dealii::TrilinosWrappers::Vector > is working - Assert (is_serial_vector< dealii::TrilinosWrappers::Vector >::value == true, - ExcInternalError()); - + // make sure that is_serial_vector< dealii::TrilinosWrappers::MPI::Vector > is working Assert (is_serial_vector< dealii::TrilinosWrappers::MPI::Vector >::value == false, ExcInternalError()); - deallog << is_serial_vector< dealii::TrilinosWrappers::Vector >::value << std::endl; - deallog << is_serial_vector< dealii::TrilinosWrappers::MPI::Vector >::value << std::endl; deallog << "OK" << std::endl << std::endl; - // make sure that dealii::TrilinosWrappers::BlockVector > is working - Assert (is_serial_vector< dealii::TrilinosWrappers::BlockVector >::value == true, - ExcInternalError()); - + // make sure that dealii::TrilinosWrappers::MPI::BlockVector > is working Assert (is_serial_vector< dealii::TrilinosWrappers::MPI::BlockVector >::value == false, ExcInternalError()); - deallog << is_serial_vector< dealii::TrilinosWrappers::BlockVector >::value << std::endl; - deallog << is_serial_vector< dealii::TrilinosWrappers::MPI::BlockVector >::value << std::endl; deallog << "OK" << std::endl; diff --git a/tests/lac/vector_type_traits_is_serial_02.with_trilinos=true.with_mpi=true.output b/tests/lac/vector_type_traits_is_serial_02.with_trilinos=true.with_mpi=true.output index 9536f3b0eb..fcf7cc7bea 100644 --- a/tests/lac/vector_type_traits_is_serial_02.with_trilinos=true.with_mpi=true.output +++ b/tests/lac/vector_type_traits_is_serial_02.with_trilinos=true.with_mpi=true.output @@ -1,8 +1,6 @@ -DEAL::1 DEAL::0 DEAL::OK DEAL:: -DEAL::1 DEAL::0 DEAL::OK diff --git a/tests/mpi/p4est_2d_constraintmatrix_03.cc b/tests/mpi/p4est_2d_constraintmatrix_03.cc index c9f7c72771..5745300b08 100644 --- a/tests/mpi/p4est_2d_constraintmatrix_03.cc +++ b/tests/mpi/p4est_2d_constraintmatrix_03.cc @@ -198,9 +198,9 @@ void test() std::ofstream output (filename.c_str()); data_out.write_deal_II_intermediate (output); - TrilinosWrappers::Vector x_dub; - x_dub.reinit(dof_set.size()); - x_dub = x_rel; + TrilinosWrappers::MPI::Vector x_dub; + x_dub.reinit(complete_index_set(dof_set.size())); + x_dub.reinit(x_rel, false, true); if (myid==0) { diff --git a/tests/mpi/p4est_3d_constraintmatrix_02.cc b/tests/mpi/p4est_3d_constraintmatrix_02.cc index 8115593388..5bfb950925 100644 --- a/tests/mpi/p4est_3d_constraintmatrix_02.cc +++ b/tests/mpi/p4est_3d_constraintmatrix_02.cc @@ -91,14 +91,9 @@ void test() cm.distribute(x); x_rel = x; - //x.print(std::cout); - -// x_rel.print(std::cout); - - TrilinosWrappers::Vector x_dub; - x_dub.reinit(dof_set.size()); - - x_dub = x_rel; + TrilinosWrappers::MPI::Vector x_dub; + x_dub.reinit(complete_index_set(dof_set.size())); + x_dub.reinit(x_rel, false, true); { std::stringstream out; diff --git a/tests/mpi/p4est_3d_constraintmatrix_03.cc b/tests/mpi/p4est_3d_constraintmatrix_03.cc index 0392005f1d..f04d5ab5fa 100644 --- a/tests/mpi/p4est_3d_constraintmatrix_03.cc +++ b/tests/mpi/p4est_3d_constraintmatrix_03.cc @@ -38,7 +38,7 @@ #include #include #include -#include +#include #include #include diff --git a/tests/quick_tests/step-trilinos.cc b/tests/quick_tests/step-trilinos.cc index cfa32a42d9..aba3202584 100644 --- a/tests/quick_tests/step-trilinos.cc +++ b/tests/quick_tests/step-trilinos.cc @@ -61,7 +61,7 @@ private: DoFHandler<2> dof_handler; TrilinosWrappers::SparseMatrix A; - TrilinosWrappers::Vector b, x; + TrilinosWrappers::MPI::Vector b, x; ConstraintMatrix constraints; TableHandler output_table; @@ -159,7 +159,7 @@ void LaplaceProblem::solve () preconditioner.initialize (A); cg_solver.solve (A, x, b, preconditioner); - TrilinosWrappers::Vector res(x); + TrilinosWrappers::MPI::Vector res(x); A.residual(res,x,b); AssertThrow(res.l2_norm()<1e-3, ExcInternalError()); diff --git a/tests/trilinos/11.cc b/tests/trilinos/11.cc index 2b6fc244a4..e78a9926d3 100644 --- a/tests/trilinos/11.cc +++ b/tests/trilinos/11.cc @@ -24,7 +24,7 @@ #include -void test (TrilinosWrappers::Vector &v) +void test (TrilinosWrappers::MPI::Vector &v) { // set only certain elements of the vector for (unsigned int i=0; i -void test (TrilinosWrappers::Vector &v) +void test (TrilinosWrappers::MPI::Vector &v) { // set only certain elements of the // vector. have a bit pattern of where we @@ -64,8 +64,8 @@ int main (int argc,char **argv) try { { - TrilinosWrappers::Vector v; - v.reinit(100); + TrilinosWrappers::MPI::Vector v; + v.reinit(complete_index_set(100), MPI_COMM_WORLD); test (v); } } diff --git a/tests/trilinos/13.cc b/tests/trilinos/13.cc index 6bf65b5ee6..71c462b179 100644 --- a/tests/trilinos/13.cc +++ b/tests/trilinos/13.cc @@ -25,7 +25,7 @@ #include -void test (TrilinosWrappers::Vector &v) +void test (TrilinosWrappers::MPI::Vector &v) { // set only certain elements of the // vector. have a bit pattern of where we @@ -64,8 +64,8 @@ int main (int argc,char **argv) try { { - TrilinosWrappers::Vector v; - v.reinit(100); + TrilinosWrappers::MPI::Vector v; + v.reinit(complete_index_set(100), MPI_COMM_WORLD); test (v); } } diff --git a/tests/trilinos/14.cc b/tests/trilinos/14.cc index a29e3e93be..8a75934279 100644 --- a/tests/trilinos/14.cc +++ b/tests/trilinos/14.cc @@ -40,7 +40,7 @@ #include -void test (TrilinosWrappers::Vector &v) +void test (TrilinosWrappers::MPI::Vector &v) { // set only certain elements of the // vector. have a bit pattern of where we @@ -83,8 +83,8 @@ int main (int argc,char **argv) try { { - TrilinosWrappers::Vector v; - v.reinit(100); + TrilinosWrappers::MPI::Vector v; + v.reinit(complete_index_set(100), MPI_COMM_WORLD); test (v); } } diff --git a/tests/trilinos/15.cc b/tests/trilinos/15.cc index 940f492eca..43b5b20685 100644 --- a/tests/trilinos/15.cc +++ b/tests/trilinos/15.cc @@ -42,7 +42,7 @@ #include -void test (TrilinosWrappers::Vector &v) +void test (TrilinosWrappers::MPI::Vector &v) { // set only certain elements of the // vector. have a bit pattern of where we @@ -82,8 +82,8 @@ int main (int argc,char **argv) try { { - TrilinosWrappers::Vector v; - v.reinit(100); + TrilinosWrappers::MPI::Vector v; + v.reinit(complete_index_set(100), MPI_COMM_WORLD); test (v); } } diff --git a/tests/trilinos/16.cc b/tests/trilinos/16.cc index 238aa92e9e..8e3c5cd436 100644 --- a/tests/trilinos/16.cc +++ b/tests/trilinos/16.cc @@ -42,7 +42,7 @@ #include -void test (TrilinosWrappers::Vector &v) +void test (TrilinosWrappers::MPI::Vector &v) { // set only certain elements of the // vector. have a bit pattern of where we @@ -83,8 +83,8 @@ int main (int argc,char **argv) try { { - TrilinosWrappers::Vector v; - v.reinit(100); + TrilinosWrappers::MPI::Vector v; + v.reinit(complete_index_set(100), MPI_COMM_WORLD); test (v); } } diff --git a/tests/trilinos/17.cc b/tests/trilinos/17.cc index 03007ee4c4..c2793945a4 100644 --- a/tests/trilinos/17.cc +++ b/tests/trilinos/17.cc @@ -25,7 +25,7 @@ #include -void test (TrilinosWrappers::Vector &v) +void test (TrilinosWrappers::MPI::Vector &v) { // set some elements of the vector double norm = 0; @@ -56,8 +56,8 @@ int main (int argc,char **argv) try { { - TrilinosWrappers::Vector v; - v.reinit(100); + TrilinosWrappers::MPI::Vector v; + v.reinit(complete_index_set(100), MPI_COMM_WORLD); test (v); } } diff --git a/tests/trilinos/18.cc b/tests/trilinos/18.cc index eddf0c3229..3f100275a2 100644 --- a/tests/trilinos/18.cc +++ b/tests/trilinos/18.cc @@ -25,7 +25,7 @@ #include -void test (TrilinosWrappers::Vector &v) +void test (TrilinosWrappers::MPI::Vector &v) { // set some elements of the vector TrilinosScalar norm = 0; @@ -57,8 +57,8 @@ int main (int argc,char **argv) try { { - TrilinosWrappers::Vector v; - v.reinit(100); + TrilinosWrappers::MPI::Vector v; + v.reinit(complete_index_set(100), MPI_COMM_WORLD); test (v); } } diff --git a/tests/trilinos/19.cc b/tests/trilinos/19.cc index 620adf865d..102a4d7bf9 100644 --- a/tests/trilinos/19.cc +++ b/tests/trilinos/19.cc @@ -25,7 +25,7 @@ #include -void test (TrilinosWrappers::Vector &v) +void test (TrilinosWrappers::MPI::Vector &v) { // set some elements of the vector double norm = 0; @@ -56,8 +56,8 @@ int main (int argc,char **argv) try { { - TrilinosWrappers::Vector v; - v.reinit(100); + TrilinosWrappers::MPI::Vector v; + v.reinit(complete_index_set(100), MPI_COMM_WORLD); test (v); } } diff --git a/tests/trilinos/20.cc b/tests/trilinos/20.cc index 70dd6c6456..d59c74e3fb 100644 --- a/tests/trilinos/20.cc +++ b/tests/trilinos/20.cc @@ -25,7 +25,7 @@ #include -void test (TrilinosWrappers::Vector &v) +void test (TrilinosWrappers::MPI::Vector &v) { // set only certain elements of the // vector. have a bit pattern of where we @@ -65,8 +65,8 @@ int main (int argc,char **argv) try { { - TrilinosWrappers::Vector v; - v.reinit(100); + TrilinosWrappers::MPI::Vector v; + v.reinit(complete_index_set(100), MPI_COMM_WORLD); test (v); } } diff --git a/tests/trilinos/21.cc b/tests/trilinos/21.cc index e3e1d69250..f136077837 100644 --- a/tests/trilinos/21.cc +++ b/tests/trilinos/21.cc @@ -25,7 +25,7 @@ #include -void test (TrilinosWrappers::Vector &v) +void test (TrilinosWrappers::MPI::Vector &v) { // set only certain elements of the // vector. have a bit pattern of where we @@ -65,8 +65,8 @@ int main (int argc,char **argv) try { { - TrilinosWrappers::Vector v; - v.reinit(100); + TrilinosWrappers::MPI::Vector v; + v.reinit(complete_index_set(100), MPI_COMM_WORLD); test (v); } } diff --git a/tests/trilinos/22.cc b/tests/trilinos/22.cc index c2602f4111..df94b6c83d 100644 --- a/tests/trilinos/22.cc +++ b/tests/trilinos/22.cc @@ -26,8 +26,8 @@ #include -void test (TrilinosWrappers::Vector &v, - TrilinosWrappers::Vector &w) +void test (TrilinosWrappers::MPI::Vector &v, + TrilinosWrappers::MPI::Vector &w) { // set only certain elements of each // vector, but disjoint sets of elements @@ -59,10 +59,10 @@ int main (int argc,char **argv) try { { - TrilinosWrappers::Vector v; - v.reinit(100); - TrilinosWrappers::Vector w; - w.reinit(100); + TrilinosWrappers::MPI::Vector v; + v.reinit(complete_index_set(100), MPI_COMM_WORLD); + TrilinosWrappers::MPI::Vector w; + w.reinit(complete_index_set(100), MPI_COMM_WORLD); test (v,w); } } diff --git a/tests/trilinos/23.cc b/tests/trilinos/23.cc index 8bbfcaf943..113cf16d15 100644 --- a/tests/trilinos/23.cc +++ b/tests/trilinos/23.cc @@ -26,8 +26,8 @@ #include -void test (TrilinosWrappers::Vector &v, - TrilinosWrappers::Vector &w) +void test (TrilinosWrappers::MPI::Vector &v, + TrilinosWrappers::MPI::Vector &w) { // set only certain elements of each // vector, and record the expected scalar @@ -66,10 +66,10 @@ int main (int argc,char **argv) try { { - TrilinosWrappers::Vector v; - v.reinit(100); - TrilinosWrappers::Vector w; - w.reinit(100); + TrilinosWrappers::MPI::Vector v; + v.reinit(complete_index_set(100), MPI_COMM_WORLD); + TrilinosWrappers::MPI::Vector w; + w.reinit(complete_index_set(100), MPI_COMM_WORLD); test (v,w); } } diff --git a/tests/trilinos/24.cc b/tests/trilinos/24.cc index 4a1fc3659b..d8876a3e56 100644 --- a/tests/trilinos/24.cc +++ b/tests/trilinos/24.cc @@ -27,7 +27,7 @@ #include -void test (TrilinosWrappers::Vector &v) +void test (TrilinosWrappers::MPI::Vector &v) { // set some entries of the vector for (unsigned int i=0; i -void test (TrilinosWrappers::Vector &v) +void test (TrilinosWrappers::MPI::Vector &v) { // set some entries of the vector for (unsigned int i=0; i -void test (TrilinosWrappers::Vector &v) +void test (TrilinosWrappers::MPI::Vector &v) { // set some entries of the vector for (unsigned int i=0; i -void test (TrilinosWrappers::Vector &v) +void test (TrilinosWrappers::MPI::Vector &v) { // set some entries of the vector for (unsigned int i=0; i -void test (TrilinosWrappers::Vector &v) +void test (TrilinosWrappers::MPI::Vector &v) { - v.reinit (13); + v.reinit (complete_index_set(13), MPI_COMM_WORLD); AssertThrow (v.size() == 13, ExcInternalError()); @@ -48,8 +48,8 @@ int main (int argc,char **argv) try { { - TrilinosWrappers::Vector v; - v.reinit(100); + TrilinosWrappers::MPI::Vector v; + v.reinit(complete_index_set(100), MPI_COMM_WORLD); test (v); } } diff --git a/tests/trilinos/30.cc b/tests/trilinos/30.cc index bc11b46186..5561ff8f38 100644 --- a/tests/trilinos/30.cc +++ b/tests/trilinos/30.cc @@ -25,7 +25,7 @@ #include -void test (TrilinosWrappers::Vector &v) +void test (TrilinosWrappers::MPI::Vector &v) { // set some entries of the vector for (unsigned int i=0; i -void test (TrilinosWrappers::Vector &v) +void test (TrilinosWrappers::MPI::Vector &v) { // set some elements of the vector TrilinosScalar norm = 0; @@ -58,8 +58,8 @@ int main (int argc,char **argv) try { { - TrilinosWrappers::Vector v; - v.reinit(100); + TrilinosWrappers::MPI::Vector v; + v.reinit(complete_index_set(100), MPI_COMM_WORLD); test (v); } } diff --git a/tests/trilinos/32.cc b/tests/trilinos/32.cc index dd720c444b..78f045b32d 100644 --- a/tests/trilinos/32.cc +++ b/tests/trilinos/32.cc @@ -25,7 +25,7 @@ #include -void test (TrilinosWrappers::Vector &v) +void test (TrilinosWrappers::MPI::Vector &v) { // set some elements of the vector TrilinosScalar sum = 0; @@ -58,8 +58,8 @@ int main (int argc,char **argv) try { { - TrilinosWrappers::Vector v; - v.reinit(100); + TrilinosWrappers::MPI::Vector v; + v.reinit(complete_index_set(100), MPI_COMM_WORLD); test (v); } } diff --git a/tests/trilinos/33.cc b/tests/trilinos/33.cc index 971b32a9be..d931e452d3 100644 --- a/tests/trilinos/33.cc +++ b/tests/trilinos/33.cc @@ -25,7 +25,7 @@ #include -void test (TrilinosWrappers::Vector &v) +void test (TrilinosWrappers::MPI::Vector &v) { // set some elements of the vector TrilinosScalar sum = 0; @@ -59,8 +59,8 @@ int main (int argc,char **argv) try { { - TrilinosWrappers::Vector v; - v.reinit(100); + TrilinosWrappers::MPI::Vector v; + v.reinit(complete_index_set(100), MPI_COMM_WORLD); test (v); } } diff --git a/tests/trilinos/34.cc b/tests/trilinos/34.cc index 46e0e1f152..636aa93c79 100644 --- a/tests/trilinos/34.cc +++ b/tests/trilinos/34.cc @@ -25,7 +25,7 @@ #include -void test (TrilinosWrappers::Vector &v) +void test (TrilinosWrappers::MPI::Vector &v) { // set some elements of the vector double sum = 0; @@ -59,8 +59,8 @@ int main (int argc,char **argv) try { { - TrilinosWrappers::Vector v; - v.reinit(100); + TrilinosWrappers::MPI::Vector v; + v.reinit(complete_index_set(100), MPI_COMM_WORLD); test (v); } } diff --git a/tests/trilinos/35.cc b/tests/trilinos/35.cc index ebfa518a15..b077dcfdb6 100644 --- a/tests/trilinos/35.cc +++ b/tests/trilinos/35.cc @@ -25,8 +25,8 @@ #include -void test (TrilinosWrappers::Vector &v, - TrilinosWrappers::Vector &w) +void test (TrilinosWrappers::MPI::Vector &v, + TrilinosWrappers::MPI::Vector &w) { // set only certain elements of each // vector @@ -75,10 +75,10 @@ int main (int argc,char **argv) try { { - TrilinosWrappers::Vector v; - v.reinit(100); - TrilinosWrappers::Vector w; - w.reinit(100); + TrilinosWrappers::MPI::Vector v; + v.reinit(complete_index_set(100), MPI_COMM_WORLD); + TrilinosWrappers::MPI::Vector w; + w.reinit(complete_index_set(100), MPI_COMM_WORLD); test (v,w); } } diff --git a/tests/trilinos/36.cc b/tests/trilinos/36.cc index 3ca2e2f634..2dd9959c6d 100644 --- a/tests/trilinos/36.cc +++ b/tests/trilinos/36.cc @@ -25,8 +25,8 @@ #include -void test (TrilinosWrappers::Vector &v, - TrilinosWrappers::Vector &w) +void test (TrilinosWrappers::MPI::Vector &v, + TrilinosWrappers::MPI::Vector &w) { // set only certain elements of each // vector @@ -75,10 +75,10 @@ int main (int argc,char **argv) try { { - TrilinosWrappers::Vector v; - v.reinit(100); - TrilinosWrappers::Vector w; - w.reinit(100); + TrilinosWrappers::MPI::Vector v; + v.reinit(complete_index_set(100), MPI_COMM_WORLD); + TrilinosWrappers::MPI::Vector w; + w.reinit(complete_index_set(100), MPI_COMM_WORLD); test (v,w); } } diff --git a/tests/trilinos/37.cc b/tests/trilinos/37.cc index 1e0d1ed9e1..dbcf99846b 100644 --- a/tests/trilinos/37.cc +++ b/tests/trilinos/37.cc @@ -25,7 +25,7 @@ #include -void test (TrilinosWrappers::Vector &v) +void test (TrilinosWrappers::MPI::Vector &v) { for (unsigned int i=0; i -void test (TrilinosWrappers::Vector &v, - TrilinosWrappers::Vector &w) +void test (TrilinosWrappers::MPI::Vector &v, + TrilinosWrappers::MPI::Vector &w) { for (unsigned int i=0; i -void test (TrilinosWrappers::Vector &v, - TrilinosWrappers::Vector &w) +void test (TrilinosWrappers::MPI::Vector &v, + TrilinosWrappers::MPI::Vector &w) { for (unsigned int i=0; i -void test (TrilinosWrappers::Vector &v, - TrilinosWrappers::Vector &w, - TrilinosWrappers::Vector &x) +void test (TrilinosWrappers::MPI::Vector &v, + TrilinosWrappers::MPI::Vector &w, + TrilinosWrappers::MPI::Vector &x) { for (unsigned int i=0; i -void test (TrilinosWrappers::Vector &v, - TrilinosWrappers::Vector &w) +void test (TrilinosWrappers::MPI::Vector &v, + TrilinosWrappers::MPI::Vector &w) { for (unsigned int i=0; i -void test (TrilinosWrappers::Vector &v, - TrilinosWrappers::Vector &w) +void test (TrilinosWrappers::MPI::Vector &v, + TrilinosWrappers::MPI::Vector &w) { for (unsigned int i=0; i -void test (TrilinosWrappers::Vector &v, - TrilinosWrappers::Vector &w) +void test (TrilinosWrappers::MPI::Vector &v, + TrilinosWrappers::MPI::Vector &w) { for (unsigned int i=0; i -void test (TrilinosWrappers::Vector &v, - TrilinosWrappers::Vector &w) +void test (TrilinosWrappers::MPI::Vector &v, + TrilinosWrappers::MPI::Vector &w) { for (unsigned int i=0; i -void test (TrilinosWrappers::Vector &v) +void test (TrilinosWrappers::MPI::Vector &v) { dealii::Vector w (v.size()); @@ -60,8 +60,8 @@ int main (int argc,char **argv) try { { - TrilinosWrappers::Vector v; - v.reinit(100); + TrilinosWrappers::MPI::Vector v; + v.reinit(complete_index_set(100), MPI_COMM_WORLD); test (v); } } diff --git a/tests/trilinos/49a.cc b/tests/trilinos/49a.cc index 433417dfe9..2b87c77296 100644 --- a/tests/trilinos/49a.cc +++ b/tests/trilinos/49a.cc @@ -16,20 +16,20 @@ // like 49, but do the test for -// TrilinosWrappers::BlockVector +// TrilinosWrappers::MPI::BlockVector // ::operator = (dealii::BlockVector) // with block vectors instead of plain vectors #include "../tests.h" #include -#include +#include #include #include #include #include -void test (TrilinosWrappers::BlockVector &v) +void test (TrilinosWrappers::MPI::BlockVector &v) { std::vector sizes (2, 3); dealii::BlockVector w; @@ -75,8 +75,8 @@ int main (int argc,char **argv) try { { - std::vector sizes (2, 3); - TrilinosWrappers::BlockVector v; + std::vector sizes (2, complete_index_set(3)); + TrilinosWrappers::MPI::BlockVector v; v.reinit(sizes); test (v); } diff --git a/tests/trilinos/49b.cc b/tests/trilinos/49b.cc index a88abebc33..df691cdcdf 100644 --- a/tests/trilinos/49b.cc +++ b/tests/trilinos/49b.cc @@ -22,7 +22,7 @@ #include "../tests.h" #include -#include +#include #include #include #include @@ -48,10 +48,7 @@ void test (TrilinosWrappers::MPI::BlockVector &v) } // now also check the reverse assignment - w = 0; - TrilinosWrappers::BlockVector v_serial; - v_serial.reinit(v); - w = v_serial; + w = v; for (unsigned int i=0; i -void test (TrilinosWrappers::Vector &v) +void test (TrilinosWrappers::MPI::Vector &v) { Vector w (v.size()); Vector x (v.size()); @@ -76,8 +76,8 @@ int main (int argc,char **argv) try { { - TrilinosWrappers::Vector v; - v.reinit(100); + TrilinosWrappers::MPI::Vector v; + v.reinit(complete_index_set(100), MPI_COMM_WORLD); test (v); } } diff --git a/tests/trilinos/51.cc b/tests/trilinos/51.cc index e2f8fcfc61..9ffb719de8 100644 --- a/tests/trilinos/51.cc +++ b/tests/trilinos/51.cc @@ -25,7 +25,7 @@ #include -void test (TrilinosWrappers::Vector &v) +void test (TrilinosWrappers::MPI::Vector &v) { // set some entries of the vector for (unsigned int i=0; i -void test (TrilinosWrappers::Vector &v) +void test (TrilinosWrappers::MPI::Vector &v) { // set only certain elements of the // vector. have a bit pattern of where we @@ -67,8 +67,8 @@ int main (int argc,char **argv) try { { - TrilinosWrappers::Vector v; - v.reinit(100); + TrilinosWrappers::MPI::Vector v; + v.reinit(complete_index_set(100), MPI_COMM_WORLD); test (v); } } diff --git a/tests/trilinos/54.cc b/tests/trilinos/54.cc index 47d01b3d62..56bfb53c48 100644 --- a/tests/trilinos/54.cc +++ b/tests/trilinos/54.cc @@ -25,7 +25,7 @@ #include -void test (TrilinosWrappers::Vector &v) +void test (TrilinosWrappers::MPI::Vector &v) { // set only certain elements of the // vector. have a bit pattern of where we @@ -67,8 +67,8 @@ int main (int argc,char **argv) try { { - TrilinosWrappers::Vector v; - v.reinit(100); + TrilinosWrappers::MPI::Vector v; + v.reinit(complete_index_set(100), MPI_COMM_WORLD); test (v); } } diff --git a/tests/trilinos/55.cc b/tests/trilinos/55.cc index 2f4ce06a7c..891be8b31f 100644 --- a/tests/trilinos/55.cc +++ b/tests/trilinos/55.cc @@ -25,7 +25,7 @@ #include -void test (TrilinosWrappers::Vector &v) +void test (TrilinosWrappers::MPI::Vector &v) { // set only certain elements of the // vector. have a bit pattern of where we @@ -66,8 +66,8 @@ int main (int argc,char **argv) try { { - TrilinosWrappers::Vector v; - v.reinit(100); + TrilinosWrappers::MPI::Vector v; + v.reinit(complete_index_set(100), MPI_COMM_WORLD); test (v); } } diff --git a/tests/trilinos/56.cc b/tests/trilinos/56.cc index da2adbcdb3..0ec031edb0 100644 --- a/tests/trilinos/56.cc +++ b/tests/trilinos/56.cc @@ -25,7 +25,7 @@ #include -void test (TrilinosWrappers::Vector &v) +void test (TrilinosWrappers::MPI::Vector &v) { // set only certain elements of the // vector. have a bit pattern of where we @@ -66,8 +66,8 @@ int main (int argc,char **argv) try { { - TrilinosWrappers::Vector v; - v.reinit(100); + TrilinosWrappers::MPI::Vector v; + v.reinit(complete_index_set(100), MPI_COMM_WORLD); test (v); } } diff --git a/tests/trilinos/57.cc b/tests/trilinos/57.cc index bbcc85f01c..058036557f 100644 --- a/tests/trilinos/57.cc +++ b/tests/trilinos/57.cc @@ -25,7 +25,7 @@ #include -void test (TrilinosWrappers::Vector &v) +void test (TrilinosWrappers::MPI::Vector &v) { // set only certain elements of the // vector. they are all positive @@ -64,8 +64,8 @@ int main (int argc,char **argv) try { { - TrilinosWrappers::Vector v; - v.reinit(100); + TrilinosWrappers::MPI::Vector v; + v.reinit(complete_index_set(100), MPI_COMM_WORLD); test (v); } } diff --git a/tests/trilinos/58.cc b/tests/trilinos/58.cc index cd1f84c369..79021fd706 100644 --- a/tests/trilinos/58.cc +++ b/tests/trilinos/58.cc @@ -15,7 +15,7 @@ -// check ::Vector (const TrilinosWrappers::Vector &) copy constructor +// check ::Vector (const TrilinosWrappers::MPI::Vector &) copy constructor #include "../tests.h" #include @@ -27,7 +27,7 @@ #include -void test (TrilinosWrappers::Vector &v) +void test (TrilinosWrappers::MPI::Vector &v) { // set only certain elements of the // vector. @@ -66,8 +66,8 @@ int main (int argc,char **argv) try { { - TrilinosWrappers::Vector v; - v.reinit(100); + TrilinosWrappers::MPI::Vector v; + v.reinit(complete_index_set(100), MPI_COMM_WORLD); test (v); } } diff --git a/tests/trilinos/60.cc b/tests/trilinos/60.cc index 100efa7c12..65171f4b65 100644 --- a/tests/trilinos/60.cc +++ b/tests/trilinos/60.cc @@ -15,7 +15,7 @@ -// check ::Vector::operator = (const TrilinosWrappers::Vector &) +// check ::Vector::operator = (const TrilinosWrappers::MPI::Vector &) #include "../tests.h" #include @@ -27,7 +27,7 @@ #include -void test (TrilinosWrappers::Vector &v) +void test (TrilinosWrappers::MPI::Vector &v) { // set only certain elements of the // vector. @@ -68,8 +68,8 @@ int main (int argc,char **argv) try { { - TrilinosWrappers::Vector v; - v.reinit(100); + TrilinosWrappers::MPI::Vector v; + v.reinit(complete_index_set(100), MPI_COMM_WORLD); test (v); } } diff --git a/tests/trilinos/61.cc b/tests/trilinos/61.cc index a3fc39bd2a..c714db808a 100644 --- a/tests/trilinos/61.cc +++ b/tests/trilinos/61.cc @@ -27,7 +27,7 @@ #include -void test (TrilinosWrappers::Vector &v) +void test (TrilinosWrappers::MPI::Vector &v) { // set only certain elements of the // vector. @@ -45,11 +45,11 @@ void test (TrilinosWrappers::Vector &v) Vector x(v.size()); x=v; - TrilinosWrappers::Vector w1; - w1.reinit(v.size()); + TrilinosWrappers::MPI::Vector w1; + w1.reinit(complete_index_set(v.size()), MPI_COMM_WORLD); w1=w; - TrilinosWrappers::Vector x1; - x1.reinit(v.size()); + TrilinosWrappers::MPI::Vector x1; + x1.reinit(complete_index_set(v.size()), MPI_COMM_WORLD); x1=x; for (unsigned int i=0; i -#include +#include #include #include void test () { - TrilinosWrappers::BlockVector v; + TrilinosWrappers::MPI::BlockVector v; v.reinit(2); for (unsigned int i=0; i(v).begin(); + TrilinosWrappers::MPI::BlockVector::const_iterator + i=const_cast(v).begin(); AssertThrow (*i == 1, ExcInternalError()); ++i; AssertThrow (*i == 2, ExcInternalError()); @@ -56,7 +56,7 @@ void test () // read through a read-write iterator { - TrilinosWrappers::BlockVector::iterator i = v.begin(); + TrilinosWrappers::MPI::BlockVector::iterator i = v.begin(); AssertThrow (*i == 1, ExcInternalError()); ++i; AssertThrow (*i == 2, ExcInternalError()); @@ -64,7 +64,7 @@ void test () // write through a read-write iterator { - TrilinosWrappers::BlockVector::iterator i = v.begin(); + TrilinosWrappers::MPI::BlockVector::iterator i = v.begin(); *i = 2; ++i; @@ -73,7 +73,7 @@ void test () // and read again { - TrilinosWrappers::BlockVector::iterator i = v.begin(); + TrilinosWrappers::MPI::BlockVector::iterator i = v.begin(); AssertThrow (*i == 2, ExcInternalError()); ++i; AssertThrow (*i == 3, ExcInternalError()); diff --git a/tests/trilinos/block_vector_iterator_02.cc b/tests/trilinos/block_vector_iterator_02.cc index 1ff7545eac..ae88f481f4 100644 --- a/tests/trilinos/block_vector_iterator_02.cc +++ b/tests/trilinos/block_vector_iterator_02.cc @@ -19,17 +19,17 @@ #include "../tests.h" #include -#include +#include #include #include void test () { - TrilinosWrappers::BlockVector v; + TrilinosWrappers::MPI::BlockVector v; v.reinit(2); for (unsigned int i=0; i(v).begin(); + TrilinosWrappers::MPI::BlockVector::const_iterator + i=const_cast(v).begin(); AssertThrow (i[0] == 1, ExcInternalError()); AssertThrow (i[1] == 2, ExcInternalError()); } // read through a read-write iterator { - TrilinosWrappers::BlockVector::iterator i = v.begin(); + TrilinosWrappers::MPI::BlockVector::iterator i = v.begin(); AssertThrow (i[0] == 1, ExcInternalError()); AssertThrow (i[1] == 2, ExcInternalError()); } // write through a read-write iterator { - TrilinosWrappers::BlockVector::iterator i = v.begin(); + TrilinosWrappers::MPI::BlockVector::iterator i = v.begin(); i[0] = 2; i[1] = 3; } // and read again { - TrilinosWrappers::BlockVector::iterator i = v.begin(); + TrilinosWrappers::MPI::BlockVector::iterator i = v.begin(); AssertThrow (i[0] == 2, ExcInternalError()); AssertThrow (i[1] == 3, ExcInternalError()); } diff --git a/tests/trilinos/block_vector_iterator_03.cc b/tests/trilinos/block_vector_iterator_03.cc index 29e80db4e1..635855301a 100644 --- a/tests/trilinos/block_vector_iterator_03.cc +++ b/tests/trilinos/block_vector_iterator_03.cc @@ -20,7 +20,7 @@ #include "../tests.h" #include #include -#include +#include #include #include #include @@ -30,8 +30,8 @@ #include template -bool operator == (const TrilinosWrappers::BlockVector &v1, - const TrilinosWrappers::BlockVector &v2) +bool operator == (const TrilinosWrappers::MPI::BlockVector &v1, + const TrilinosWrappers::MPI::BlockVector &v2) { if (v1.size() != v2.size()) return false; @@ -44,19 +44,19 @@ bool operator == (const TrilinosWrappers::BlockVector &v1, void test () { - std::vector ivector(4); - ivector[0] = 2; - ivector[1] = 4; - ivector[2] = 3; - ivector[3] = 5; + std::vector ivector(4); + ivector[0] = complete_index_set(2); + ivector[1] = complete_index_set(4); + ivector[2] = complete_index_set(3); + ivector[3] = complete_index_set(5); // Check 1: initialization via // iterators if (true) { - TrilinosWrappers::BlockVector v1; + TrilinosWrappers::MPI::BlockVector v1; v1.reinit(ivector); - TrilinosWrappers::BlockVector v2; + TrilinosWrappers::MPI::BlockVector v2; v2.reinit(ivector); // initialize first vector with @@ -65,7 +65,7 @@ void test () v1(i) = i; // initialize other vector // through iterators - TrilinosWrappers::BlockVector::iterator p2 = v2.begin(); + TrilinosWrappers::MPI::BlockVector::iterator p2 = v2.begin(); for (unsigned int i=0; i mem; - SolverCG solver(control, mem); + GrowingVectorMemory mem; + SolverCG solver(control, mem); PreconditionIdentity preconditioner; check_solve (solver, control, A,u,f, preconditioner); } diff --git a/tests/trilinos/deal_solver_01.output b/tests/trilinos/deal_solver_01.output index 2e7eaf8b3b..7e616e1e2f 100644 --- a/tests/trilinos/deal_solver_01.output +++ b/tests/trilinos/deal_solver_01.output @@ -1,6 +1,6 @@ DEAL::Size 32 Unknowns 961 -DEAL::Solver type: N6dealii8SolverCGINS_16TrilinosWrappers6VectorEEE +DEAL::Solver type: N6dealii8SolverCGINS_16TrilinosWrappers3MPI6VectorEEE DEAL:cg::Starting value 31.0000 DEAL:cg::Convergence step 43 value 0.000818932 DEAL::Solver stopped after 43 iterations diff --git a/tests/trilinos/deal_solver_02.cc b/tests/trilinos/deal_solver_02.cc index 5c563aafcf..7580bc1f58 100644 --- a/tests/trilinos/deal_solver_02.cc +++ b/tests/trilinos/deal_solver_02.cc @@ -92,17 +92,17 @@ int main(int argc, char **argv) A.reinit(csp); testproblem.five_point(A); - TrilinosWrappers::Vector f; - f.reinit(dim); - TrilinosWrappers::Vector u; - u.reinit(dim); + TrilinosWrappers::MPI::Vector f; + f.reinit(complete_index_set(dim),MPI_COMM_WORLD); + TrilinosWrappers::MPI::Vector u; + u.reinit(complete_index_set(dim),MPI_COMM_WORLD); f = 1.; A.compress (VectorOperation::insert); f.compress (VectorOperation::insert); u.compress (VectorOperation::insert); - GrowingVectorMemory mem; - SolverBicgstab solver(control,mem); + GrowingVectorMemory mem; + SolverBicgstab solver(control,mem); PreconditionIdentity preconditioner; check_solve (solver, control, A,u,f, preconditioner); } diff --git a/tests/trilinos/deal_solver_02.output b/tests/trilinos/deal_solver_02.output index adcf9c27a2..02f985c150 100644 --- a/tests/trilinos/deal_solver_02.output +++ b/tests/trilinos/deal_solver_02.output @@ -1,4 +1,4 @@ DEAL::Size 32 Unknowns 961 -DEAL::Solver type: N6dealii14SolverBicgstabINS_16TrilinosWrappers6VectorEEE +DEAL::Solver type: N6dealii14SolverBicgstabINS_16TrilinosWrappers3MPI6VectorEEE DEAL::Solver stopped within 49 - 51 iterations diff --git a/tests/trilinos/deal_solver_03.cc b/tests/trilinos/deal_solver_03.cc index 9095743b49..d45ae717e1 100644 --- a/tests/trilinos/deal_solver_03.cc +++ b/tests/trilinos/deal_solver_03.cc @@ -93,17 +93,17 @@ int main(int argc, char **argv) A.reinit(csp); testproblem.five_point(A); - TrilinosWrappers::Vector f; - f.reinit(dim); - TrilinosWrappers::Vector u; - u.reinit(dim); + TrilinosWrappers::MPI::Vector f; + f.reinit(complete_index_set(dim),MPI_COMM_WORLD); + TrilinosWrappers::MPI::Vector u; + u.reinit(complete_index_set(dim),MPI_COMM_WORLD); f = 1.; A.compress (VectorOperation::insert); f.compress (VectorOperation::insert); u.compress (VectorOperation::insert); - GrowingVectorMemory mem; - SolverGMRES solver(control,mem); + GrowingVectorMemory mem; + SolverGMRES solver(control,mem); PreconditionIdentity preconditioner; check_solve (solver, control, A,u,f, preconditioner); } diff --git a/tests/trilinos/deal_solver_03.output b/tests/trilinos/deal_solver_03.output index 8dd71b155b..91ead34128 100644 --- a/tests/trilinos/deal_solver_03.output +++ b/tests/trilinos/deal_solver_03.output @@ -1,6 +1,6 @@ DEAL::Size 32 Unknowns 961 -DEAL::Solver type: N6dealii11SolverGMRESINS_16TrilinosWrappers6VectorEEE +DEAL::Solver type: N6dealii11SolverGMRESINS_16TrilinosWrappers3MPI6VectorEEE DEAL:GMRES::Starting value 31.0000 DEAL:GMRES::Convergence step 75 value 0.000809583 DEAL::Solver stopped after 75 iterations diff --git a/tests/trilinos/deal_solver_04.cc b/tests/trilinos/deal_solver_04.cc index e8e11ec79b..f2d2de8ce2 100644 --- a/tests/trilinos/deal_solver_04.cc +++ b/tests/trilinos/deal_solver_04.cc @@ -92,17 +92,17 @@ int main(int argc, char **argv) A.reinit(csp); testproblem.five_point(A); - TrilinosWrappers::Vector f; - f.reinit(dim); - TrilinosWrappers::Vector u; - u.reinit(dim); + TrilinosWrappers::MPI::Vector f; + f.reinit(complete_index_set(dim),MPI_COMM_WORLD); + TrilinosWrappers::MPI::Vector u; + u.reinit(complete_index_set(dim),MPI_COMM_WORLD); f = 1.; A.compress (VectorOperation::insert); f.compress (VectorOperation::insert); u.compress (VectorOperation::insert); - GrowingVectorMemory mem; - SolverMinRes solver(control,mem); + GrowingVectorMemory mem; + SolverMinRes solver(control,mem); PreconditionIdentity preconditioner; check_solve (solver, control, A,u,f, preconditioner); } diff --git a/tests/trilinos/deal_solver_04.output b/tests/trilinos/deal_solver_04.output index 3981b6c474..8b6c8b7ce6 100644 --- a/tests/trilinos/deal_solver_04.output +++ b/tests/trilinos/deal_solver_04.output @@ -1,6 +1,6 @@ DEAL::Size 32 Unknowns 961 -DEAL::Solver type: N6dealii12SolverMinResINS_16TrilinosWrappers6VectorEEE +DEAL::Solver type: N6dealii12SolverMinResINS_16TrilinosWrappers3MPI6VectorEEE DEAL:minres::Starting value 31.0000 DEAL:minres::Convergence step 43 value 0.000691560 DEAL::Solver stopped after 43 iterations diff --git a/tests/trilinos/deal_solver_05.cc b/tests/trilinos/deal_solver_05.cc index f31d3cbb74..fd7665f412 100644 --- a/tests/trilinos/deal_solver_05.cc +++ b/tests/trilinos/deal_solver_05.cc @@ -91,17 +91,17 @@ int main(int argc, char **argv) A.reinit(csp); testproblem.five_point(A); - TrilinosWrappers::Vector f; - f.reinit(dim); - TrilinosWrappers::Vector u; - u.reinit(dim); + TrilinosWrappers::MPI::Vector f; + f.reinit(complete_index_set(dim),MPI_COMM_WORLD); + TrilinosWrappers::MPI::Vector u; + u.reinit(complete_index_set(dim),MPI_COMM_WORLD); f = 1.; A.compress (VectorOperation::insert); f.compress (VectorOperation::insert); u.compress (VectorOperation::insert); - GrowingVectorMemory mem; - SolverQMRS solver(control,mem); + GrowingVectorMemory mem; + SolverQMRS solver(control,mem); PreconditionIdentity preconditioner; check_solve (solver, control, A,u,f, preconditioner); } diff --git a/tests/trilinos/deal_solver_05.output b/tests/trilinos/deal_solver_05.output index 426f6ca330..f79f420b32 100644 --- a/tests/trilinos/deal_solver_05.output +++ b/tests/trilinos/deal_solver_05.output @@ -1,6 +1,6 @@ DEAL::Size 32 Unknowns 961 -DEAL::Solver type: N6dealii10SolverQMRSINS_16TrilinosWrappers6VectorEEE +DEAL::Solver type: N6dealii10SolverQMRSINS_16TrilinosWrappers3MPI6VectorEEE DEAL:QMRS::Starting value 31.0000 DEAL:QMRS::Convergence step 46 value 0.000906349 DEAL::Solver stopped after 46 iterations diff --git a/tests/trilinos/deal_solver_06.cc b/tests/trilinos/deal_solver_06.cc index 6d6a959825..bcc6c7caa2 100644 --- a/tests/trilinos/deal_solver_06.cc +++ b/tests/trilinos/deal_solver_06.cc @@ -89,18 +89,18 @@ int main(int argc, char **argv) A.reinit(csp); testproblem.five_point(A); - TrilinosWrappers::Vector f; - f.reinit(dim); - TrilinosWrappers::Vector u; - u.reinit(dim); + TrilinosWrappers::MPI::Vector f; + f.reinit(complete_index_set(dim),MPI_COMM_WORLD); + TrilinosWrappers::MPI::Vector u; + u.reinit(complete_index_set(dim),MPI_COMM_WORLD); f = 1.; A.compress (VectorOperation::insert); f.compress (VectorOperation::insert); u.compress (VectorOperation::insert); - GrowingVectorMemory mem; - SolverRichardson::AdditionalData data (/*omega=*/0.1); - SolverRichardson solver(control, mem, data); + GrowingVectorMemory mem; + SolverRichardson::AdditionalData data (/*omega=*/0.1); + SolverRichardson solver(control, mem, data); PreconditionIdentity preconditioner; check_solve (solver, control, A,u,f, preconditioner); } diff --git a/tests/trilinos/deal_solver_06.output b/tests/trilinos/deal_solver_06.output index f7b0bc1e0e..ca294f124f 100644 --- a/tests/trilinos/deal_solver_06.output +++ b/tests/trilinos/deal_solver_06.output @@ -1,6 +1,6 @@ DEAL::Size 32 Unknowns 961 -DEAL::Solver type: N6dealii16SolverRichardsonINS_16TrilinosWrappers6VectorEEE +DEAL::Solver type: N6dealii16SolverRichardsonINS_16TrilinosWrappers3MPI6VectorEEE DEAL:Richardson::Starting value 31.00 DEAL:Richardson::Convergence step 5271 value 0.0009996 DEAL::Solver stopped after 5271 iterations diff --git a/tests/trilinos/slowness_02.cc b/tests/trilinos/slowness_02.cc index b07475608e..fc25d72f23 100644 --- a/tests/trilinos/slowness_02.cc +++ b/tests/trilinos/slowness_02.cc @@ -69,10 +69,10 @@ void test () // then do a single matrix-vector // multiplication with subsequent formation // of the matrix norm - TrilinosWrappers::Vector v1; - v1.reinit(N*N); - TrilinosWrappers::Vector v2; - v2.reinit(N*N); + TrilinosWrappers::MPI::Vector v1; + v1.reinit(complete_index_set(N*N), MPI_COMM_WORLD); + TrilinosWrappers::MPI::Vector v2; + v2.reinit(complete_index_set(N*N), MPI_COMM_WORLD); for (unsigned int i=0; i(A); + const auto lo_A = linear_operator(A); const auto lo_A_inv = inverse_operator(lo_A, solver, preconditioner); diff --git a/tests/trilinos/solver_control_05.cc b/tests/trilinos/solver_control_05.cc index 310ebba605..dd5b242bdf 100644 --- a/tests/trilinos/solver_control_05.cc +++ b/tests/trilinos/solver_control_05.cc @@ -60,12 +60,12 @@ int main(int argc, char **argv) for (unsigned int row=0; row(A); + const auto lo_A = linear_operator(A); const auto lo_A_inv = inverse_operator(lo_A, solver, preconditioner); diff --git a/tests/trilinos/sparse_matrix_vector_01.cc b/tests/trilinos/sparse_matrix_vector_01.cc index cb222d0874..186e6b592a 100644 --- a/tests/trilinos/sparse_matrix_vector_01.cc +++ b/tests/trilinos/sparse_matrix_vector_01.cc @@ -26,8 +26,8 @@ #include -void test (TrilinosWrappers::Vector &v, - TrilinosWrappers::Vector &w) +void test (TrilinosWrappers::MPI::Vector &v, + TrilinosWrappers::MPI::Vector &w) { TrilinosWrappers::SparseMatrix m(v.size(),v.size(),v.size()); for (unsigned int i=0; i -void test (TrilinosWrappers::Vector &v, - TrilinosWrappers::Vector &w) +void test (TrilinosWrappers::MPI::Vector &v, + TrilinosWrappers::MPI::Vector &w) { TrilinosWrappers::SparseMatrix m(v.size(),v.size(),v.size()); for (unsigned int i=0; i -void test (TrilinosWrappers::Vector &v, - TrilinosWrappers::Vector &w) +void test (TrilinosWrappers::MPI::Vector &v, + TrilinosWrappers::MPI::Vector &w) { TrilinosWrappers::SparseMatrix m(v.size(),v.size(),v.size()); for (unsigned int i=0; i -void test (TrilinosWrappers::Vector &v, - TrilinosWrappers::Vector &w) +void test (TrilinosWrappers::MPI::Vector &v, + TrilinosWrappers::MPI::Vector &w) { TrilinosWrappers::SparseMatrix m(v.size(),v.size(),v.size()); for (unsigned int i=0; i -void test (TrilinosWrappers::Vector &v, - TrilinosWrappers::Vector &w) +void test (TrilinosWrappers::MPI::Vector &v, + TrilinosWrappers::MPI::Vector &w) { TrilinosWrappers::SparseMatrix m(v.size(),v.size(),v.size()); for (unsigned int i=0; i -void test (TrilinosWrappers::Vector &v) +void test (TrilinosWrappers::MPI::Vector &v) { TrilinosWrappers::SparseMatrix m(v.size(),v.size(),v.size()); for (unsigned int i=0; i -void test (TrilinosWrappers::Vector &v, - TrilinosWrappers::Vector &w, - TrilinosWrappers::Vector &x) +void test (TrilinosWrappers::MPI::Vector &v, + TrilinosWrappers::MPI::Vector &w, + TrilinosWrappers::MPI::Vector &x) { TrilinosWrappers::SparseMatrix m(v.size(),v.size(),v.size()); for (unsigned int i=0; i -void test (TrilinosWrappers::Vector &v, - TrilinosWrappers::Vector &w) +void test (TrilinosWrappers::MPI::Vector &v, + TrilinosWrappers::MPI::Vector &w) { // set the first vector for (unsigned int i=0; i -void test (TrilinosWrappers::Vector &v, - TrilinosWrappers::Vector &w) +void test (TrilinosWrappers::MPI::Vector &v, + TrilinosWrappers::MPI::Vector &w) { // set the first vector for (unsigned int i=0; i -void test (TrilinosWrappers::Vector &v, - TrilinosWrappers::Vector &w) +void test (TrilinosWrappers::MPI::Vector &v, + TrilinosWrappers::MPI::Vector &w) { // set only certain elements of each // vector @@ -57,10 +57,10 @@ int main (int argc, char **argv) try { { - TrilinosWrappers::Vector v; - v.reinit(100); - TrilinosWrappers::Vector w; - w.reinit(100); + TrilinosWrappers::MPI::Vector v; + v.reinit(complete_index_set(100), MPI_COMM_WORLD); + TrilinosWrappers::MPI::Vector w; + w.reinit(complete_index_set(100), MPI_COMM_WORLD); test (v,w); } } diff --git a/tests/trilinos/vector_equality_2.cc b/tests/trilinos/vector_equality_2.cc index 230e723d64..22eeb5e62d 100644 --- a/tests/trilinos/vector_equality_2.cc +++ b/tests/trilinos/vector_equality_2.cc @@ -26,8 +26,8 @@ #include -void test (TrilinosWrappers::Vector &v, - TrilinosWrappers::Vector &w) +void test (TrilinosWrappers::MPI::Vector &v, + TrilinosWrappers::MPI::Vector &w) { // set only certain elements of each // vector @@ -59,10 +59,10 @@ int main (int argc, char **argv) try { { - TrilinosWrappers::Vector v; - v.reinit(100); - TrilinosWrappers::Vector w; - w.reinit(100); + TrilinosWrappers::MPI::Vector v; + v.reinit(complete_index_set(100), MPI_COMM_WORLD); + TrilinosWrappers::MPI::Vector w; + w.reinit(complete_index_set(100), MPI_COMM_WORLD); test (v,w); } } diff --git a/tests/trilinos/vector_equality_3.cc b/tests/trilinos/vector_equality_3.cc index 2449fb7995..b171380be0 100644 --- a/tests/trilinos/vector_equality_3.cc +++ b/tests/trilinos/vector_equality_3.cc @@ -26,8 +26,8 @@ #include -void test (TrilinosWrappers::Vector &v, - TrilinosWrappers::Vector &w) +void test (TrilinosWrappers::MPI::Vector &v, + TrilinosWrappers::MPI::Vector &w) { // set only certain elements of each // vector @@ -57,10 +57,10 @@ int main (int argc, char **argv) try { { - TrilinosWrappers::Vector v; - v.reinit(100); - TrilinosWrappers::Vector w; - w.reinit(100); + TrilinosWrappers::MPI::Vector v; + v.reinit(complete_index_set(100), MPI_COMM_WORLD); + TrilinosWrappers::MPI::Vector w; + w.reinit(complete_index_set(100), MPI_COMM_WORLD); test (v,w); } } diff --git a/tests/trilinos/vector_equality_4.cc b/tests/trilinos/vector_equality_4.cc index 65cbb17ffe..b69301036a 100644 --- a/tests/trilinos/vector_equality_4.cc +++ b/tests/trilinos/vector_equality_4.cc @@ -26,8 +26,8 @@ #include -void test (TrilinosWrappers::Vector &v, - TrilinosWrappers::Vector &w) +void test (TrilinosWrappers::MPI::Vector &v, + TrilinosWrappers::MPI::Vector &w) { // set only certain elements of each // vector @@ -59,10 +59,10 @@ int main (int argc, char **argv) try { { - TrilinosWrappers::Vector v; - v.reinit(100); - TrilinosWrappers::Vector w; - w.reinit(100); + TrilinosWrappers::MPI::Vector v; + v.reinit(complete_index_set(100), MPI_COMM_WORLD); + TrilinosWrappers::MPI::Vector w; + w.reinit(complete_index_set(100), MPI_COMM_WORLD); test (v,w); } } diff --git a/tests/trilinos/vector_reference_01.cc b/tests/trilinos/vector_reference_01.cc index 21c5ef463b..196e518dc4 100644 --- a/tests/trilinos/vector_reference_01.cc +++ b/tests/trilinos/vector_reference_01.cc @@ -29,8 +29,8 @@ void test () { - TrilinosWrappers::Vector v; - v.reinit(3); + TrilinosWrappers::MPI::Vector v; + v.reinit(complete_index_set(3), MPI_COMM_WORLD); v(0) = 0; v(1) = 1; v(2) = 2; diff --git a/tests/trilinos/vector_swap_01.cc b/tests/trilinos/vector_swap_01.cc index 1b4f1e512c..1c175f1532 100644 --- a/tests/trilinos/vector_swap_01.cc +++ b/tests/trilinos/vector_swap_01.cc @@ -26,7 +26,7 @@ #include #include -void print(TrilinosWrappers::Vector &v) +void print(TrilinosWrappers::MPI::Vector &v) { deallog << "size= " << v.size() << " el(0)= " << v(0) @@ -36,12 +36,12 @@ void print(TrilinosWrappers::Vector &v) void test () { - TrilinosWrappers::Vector v; - v.reinit(5); + TrilinosWrappers::MPI::Vector v; + v.reinit(complete_index_set(5), MPI_COMM_WORLD); for (unsigned int i=0; i