From d632cb40585e7bb546711eda55012155fcfc4641 Mon Sep 17 00:00:00 2001 From: Joerg Frohne Date: Tue, 12 Feb 2013 22:04:18 +0000 Subject: [PATCH] add a compress() call for system_rhs_system git-svn-id: https://svn.dealii.org/trunk@28347 0785d39b-7218-0410-832d-ea1e28bc413d --- deal.II/examples/step-42/step-42.cc | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/deal.II/examples/step-42/step-42.cc b/deal.II/examples/step-42/step-42.cc index 02da110ff7..71af1b8ced 100644 --- a/deal.II/examples/step-42/step-42.cc +++ b/deal.II/examples/step-42/step-42.cc @@ -940,6 +940,7 @@ namespace Step42 unsigned int plast_points = 0; double yield = 0; unsigned int cell_number = 0; + for (; cell!=endc; ++cell) if (cell->is_locally_owned()) { @@ -1317,6 +1318,7 @@ namespace Step42 t.restart(); system_matrix_newton = 0; system_rhs_newton = 0; + system_rhs_newton.compress(); assemble_nl_system (solution); //compute Newton-Matrix MPI_Barrier (mpi_communicator); t.stop(); @@ -1349,6 +1351,9 @@ namespace Step42 MPI_Barrier (mpi_communicator); t.restart(); system_rhs_newton = 0; + system_rhs_newton.compress(); + + solution = old_solution; residual_nl_system (solution); res = system_rhs_newton; @@ -1360,6 +1365,8 @@ namespace Step42 if (constraints.is_inhomogeneously_constrained (n)) res(n) = 0; + res.compress(VectorOperation::insert); + resid = res.l2_norm (); if (resid