From: frohne Date: Tue, 12 Feb 2013 22:04:18 +0000 (+0000) Subject: add a compress() call for system_rhs_system X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=68177078f318808b37f0f4c3cf150b62e85bb868;p=dealii-svn.git add a compress() call for system_rhs_system git-svn-id: https://svn.dealii.org/trunk@28347 0785d39b-7218-0410-832d-ea1e28bc413d --- 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