From: Joerg Frohne Date: Thu, 26 Sep 2013 21:39:35 +0000 (+0000) Subject: small change in update_solution_and_constraints X-Git-Tag: v8.1.0~713 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=8374cc938a1ae061626fd95149404a15b42bdf69;p=dealii.git small change in update_solution_and_constraints git-svn-id: https://svn.dealii.org/trunk@30971 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 23550886df..3ee445d4e7 100644 --- a/deal.II/examples/step-42/step-42.cc +++ b/deal.II/examples/step-42/step-42.cc @@ -1276,7 +1276,12 @@ namespace Step42 void PlasticityContactProblem::update_solution_and_constraints () { - const EquationData::SphereObstacle obstacle((base_mesh == "box" ? 1.0 : 0.5)); + Function *obstacle; + + if (obstacle_filename != "") + obstacle = new EquationData::ChineseObstacle(input_obstacle, (base_mesh == "box" ? 1.0 : 0.5)); + else + obstacle = new EquationData::SphereObstacle((base_mesh == "box" ? 1.0 : 0.5)); // const EquationData::ChineseObstacle obstacle(input_obstacle, (base_mesh == "box" ? 1.0 : 0.5)); @@ -1339,7 +1344,7 @@ namespace Step42 Point point( fe_values_face.quadrature_point(q_point)); - double obstacle_value = obstacle.value(point, 2); + double obstacle_value = obstacle->value(point, 2); double solution_index_z = solution(index_z); double gap = obstacle_value - point(2); @@ -1402,6 +1407,7 @@ namespace Step42 constraints.merge(constraints_dirichlet_hanging_nodes); + delete obstacle; //constraints.print (std::cout); }