From: bangerth Date: Fri, 23 Sep 2011 00:16:15 +0000 (+0000) Subject: Scale the pressure variable into physical units right after X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=562eaf99717fd236bdf1a0e953cfc3aca44ff2ba;p=dealii-svn.git Scale the pressure variable into physical units right after solving. Scale the initial guess right before solving. git-svn-id: https://svn.dealii.org/trunk@24380 0785d39b-7218-0410-832d-ea1e28bc413d --- diff --git a/deal.II/examples/step-32/step-32.cc b/deal.II/examples/step-32/step-32.cc index 8f7c094490..6e967ad516 100644 --- a/deal.II/examples/step-32/step-32.cc +++ b/deal.II/examples/step-32/step-32.cc @@ -3166,6 +3166,11 @@ namespace Step32 distributed_stokes_solution.block(0).reinit(stokes_solution.block(0),false,true); distributed_stokes_solution.block(1).reinit(stokes_solution.block(1),false,true); + // before solving we scale the + // initial solution to the right + // dimensions + distributed_stokes_solution.block(1) /= EquationData::MaterialModel::pressure_scaling; + const unsigned int start = (distributed_stokes_solution.block(0).size() + @@ -3232,6 +3237,11 @@ namespace Step32 stokes_constraints.distribute (distributed_stokes_solution); + + // now rescale the pressure + // back to real physical units + distributed_stokes_solution.block(1) *= EquationData::MaterialModel::pressure_scaling; + stokes_solution.block(0).reinit(distributed_stokes_solution.block(0), false, true); stokes_solution.block(1).reinit(distributed_stokes_solution.block(1), @@ -3455,7 +3465,7 @@ namespace Step32 = (uh[q](d) * EquationData::year_in_seconds * 100); // pressure - const double pressure = (uh[q](dim)-minimal_pressure) * EquationData::pressure_scaling; + const double pressure = (uh[q](dim)-minimal_pressure); computed_quantities[q](dim) = pressure; // temperature