]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
add a compress() call for system_rhs_system
authorfrohne <frohne@0785d39b-7218-0410-832d-ea1e28bc413d>
Tue, 12 Feb 2013 22:04:18 +0000 (22:04 +0000)
committerfrohne <frohne@0785d39b-7218-0410-832d-ea1e28bc413d>
Tue, 12 Feb 2013 22:04:18 +0000 (22:04 +0000)
git-svn-id: https://svn.dealii.org/trunk@28347 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/examples/step-42/step-42.cc

index 02da110ff749f34f25a47b69be1160da78e19b8f..71af1b8ced379ab3c06e1d4abc14d64776f8b955 100644 (file)
@@ -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<resid_old)

In the beginning the Universe was created. This has made a lot of people very angry and has been widely regarded as a bad move.

Douglas Adams


Typeset in Trocchi and Trocchi Bold Sans Serif.