]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
add a second example for an obstacle (a ball); break the damping loop for j=1 in...
authorfrohne <frohne@0785d39b-7218-0410-832d-ea1e28bc413d>
Tue, 19 Feb 2013 18:36:34 +0000 (18:36 +0000)
committerfrohne <frohne@0785d39b-7218-0410-832d-ea1e28bc413d>
Tue, 19 Feb 2013 18:36:34 +0000 (18:36 +0000)
git-svn-id: https://svn.dealii.org/trunk@28477 0785d39b-7218-0410-832d-ea1e28bc413d

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

index 03c726b5dd2d101c058b729321a01cc3b9e3d264..f2506e2b5d985767d520e117cb9a2af4040c200c 100644 (file)
@@ -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)

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.