]> https://gitweb.dealii.org/ - dealii.git/commitdiff
fix step-41 warning 4124/head
authorTimo Heister <timo.heister@gmail.com>
Mon, 27 Mar 2017 19:32:56 +0000 (15:32 -0400)
committerTimo Heister <timo.heister@gmail.com>
Mon, 27 Mar 2017 21:43:19 +0000 (17:43 -0400)
examples/step-41/step-41.cc

index b14511c069fd218e179f034699634d85b44cacc4..948caed7afbb8dcbc6c0f790f5aa2eaad594cd90 100644 (file)
@@ -439,7 +439,10 @@ namespace Step41
     TrilinosWrappers::MPI::Vector lambda (complete_index_set(dof_handler.n_dofs()));
     complete_system_matrix.residual (lambda,
                                      solution, complete_system_rhs);
-    contact_force.ratio (lambda, diagonal_of_mass_matrix);
+
+    // compute contact_force[i] = - lambda[i] * diagonal_of_mass_matrix[i]
+    contact_force = lambda;
+    contact_force.scale (diagonal_of_mass_matrix);
     contact_force *= -1;
 
     // The next step is to reset the active set and constraints objects and to

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.