From 3b6bae45c916c638612cb15ec1e982c43eac0ae7 Mon Sep 17 00:00:00 2001 From: heister Date: Sun, 17 Feb 2013 00:28:20 +0000 Subject: [PATCH] update tests git-svn-id: https://svn.dealii.org/trunk@28430 0785d39b-7218-0410-832d-ea1e28bc413d --- tests/mpi/constraint_matrix_condense_01.cc | 6 +++--- tests/mpi/p4est_save_02.cc | 9 +++++---- tests/mpi/p4est_save_03.cc | 15 +++++++++------ tests/mpi/solution_transfer_01.cc | 3 --- tests/mpi/step-40.cc | 2 -- tests/mpi/step-40_direct_solver.cc | 2 -- 6 files changed, 17 insertions(+), 20 deletions(-) diff --git a/tests/mpi/constraint_matrix_condense_01.cc b/tests/mpi/constraint_matrix_condense_01.cc index 7a5b921913..eb97ba64ed 100644 --- a/tests/mpi/constraint_matrix_condense_01.cc +++ b/tests/mpi/constraint_matrix_condense_01.cc @@ -45,7 +45,9 @@ void test () DoFTools::extract_locally_relevant_dofs (dof_handler,locally_relevant_dofs); PETScWrappers::MPI::Vector force; - force.reinit (mpi_communicator, locally_owned_dofs, locally_relevant_dofs); + force.reinit (mpi_communicator, locally_owned_dofs); + std::cout << force.has_ghost_elements() << std::endl; + ConstraintMatrix constraints (locally_relevant_dofs); constraints.clear(); @@ -68,8 +70,6 @@ void test () } constraints.close(); - force=0.; - force.compress(); constraints.condense(force); } diff --git a/tests/mpi/p4est_save_02.cc b/tests/mpi/p4est_save_02.cc index 937eddad20..f540228254 100644 --- a/tests/mpi/p4est_save_02.cc +++ b/tests/mpi/p4est_save_02.cc @@ -76,20 +76,21 @@ void test() DoFTools::extract_locally_relevant_dofs (dh,locally_relevant_dofs); - PETScWrappers::MPI::Vector solution(MPI_COMM_WORLD,locally_owned_dofs,locally_relevant_dofs); + PETScWrappers::MPI::Vector x(MPI_COMM_WORLD,locally_owned_dofs); + PETScWrappers::MPI::Vector solution(MPI_COMM_WORLD,locally_owned_dofs, locally_relevant_dofs); parallel::distributed::SolutionTransfer soltrans(dh); for (unsigned int i=0;i soltrans(dh); @@ -89,7 +87,6 @@ void test() solution.reinit(MPI_COMM_WORLD,locally_owned_dofs,locally_relevant_dofs); solution = tmp; - solution.update_ghost_values(); // make sure no processor is // hanging diff --git a/tests/mpi/step-40.cc b/tests/mpi/step-40.cc index 5a2a2b6715..5bbf71aaaa 100644 --- a/tests/mpi/step-40.cc +++ b/tests/mpi/step-40.cc @@ -134,7 +134,6 @@ namespace Step40 locally_relevant_solution.reinit (mpi_communicator, locally_owned_dofs, locally_relevant_dofs); - locally_relevant_solution = 0; system_rhs.reinit (mpi_communicator, dof_handler.n_dofs(), dof_handler.n_locally_owned_dofs()); @@ -261,7 +260,6 @@ namespace Step40 constraints.distribute (completely_distributed_solution); locally_relevant_solution = completely_distributed_solution; - locally_relevant_solution.update_ghost_values(); } diff --git a/tests/mpi/step-40_direct_solver.cc b/tests/mpi/step-40_direct_solver.cc index f9d0d46c68..1fd90be09e 100644 --- a/tests/mpi/step-40_direct_solver.cc +++ b/tests/mpi/step-40_direct_solver.cc @@ -134,7 +134,6 @@ namespace Step40 locally_relevant_solution.reinit (mpi_communicator, locally_owned_dofs, locally_relevant_dofs); - locally_relevant_solution = 0; system_rhs.reinit (mpi_communicator, dof_handler.n_dofs(), dof_handler.n_locally_owned_dofs()); @@ -255,7 +254,6 @@ namespace Step40 constraints.distribute (completely_distributed_solution); locally_relevant_solution = completely_distributed_solution; - locally_relevant_solution.update_ghost_values(); } -- 2.39.5