From 6e773ed41fe9c0ca2470f1eaaec1f7241011b475 Mon Sep 17 00:00:00 2001 From: Joerg Frohne Date: Tue, 19 Feb 2013 18:36:34 +0000 Subject: [PATCH] add a second example for an obstacle (a ball); break the damping loop for j=1 in solve_newton() git-svn-id: https://svn.dealii.org/trunk@28477 0785d39b-7218-0410-832d-ea1e28bc413d --- deal.II/examples/step-42/step-42.cc | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/deal.II/examples/step-42/step-42.cc b/deal.II/examples/step-42/step-42.cc index 03c726b5dd..f2506e2b5d 100644 --- a/deal.II/examples/step-42/step-42.cc +++ b/deal.II/examples/step-42/step-42.cc @@ -580,7 +580,8 @@ namespace Step42 return_value = p(1); if (component == 2) { - return_value = 1.999 - input_obstacle_copy->obstacle_function (p(0), p(1)); + return_value = -std::sqrt (0.36 - (p(0)-0.5)*(p(0)-0.5) - (p(1)-0.5)*(p(1)-0.5)) + 1.59; +// return_value = 1.999 - input_obstacle_copy->obstacle_function (p(0), p(1)); } return return_value; } @@ -1353,6 +1354,12 @@ namespace Step42 << std::endl << " with a damping parameter alpha = " << a << std::endl; + + // The previous iteration of step 0 is the solution of an elastic problem. + // So a linear combination of a plastic and an elastic solution makes no sense + // since the elastic solution is not in the konvex set of the plastic solution. + if (j == 1) + break; } if (resid<1e-8) -- 2.39.5