From: Timo Heister Date: Sun, 6 Feb 2011 16:16:11 +0000 (+0000) Subject: step-32: smaller step size in 3d. X-Git-Tag: v8.0.0~4401 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=cec821d360dc00a1bb39281045f41b1b33e63f5d;p=dealii.git step-32: smaller step size in 3d. git-svn-id: https://svn.dealii.org/trunk@23296 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 ff8e498d9e..62888712a2 100644 --- a/deal.II/examples/step-32/step-32.cc +++ b/deal.II/examples/step-32/step-32.cc @@ -2752,7 +2752,11 @@ void BoussinesqFlowProblem::solve () { old_time_step = time_step; const double maximal_velocity = get_maximal_velocity(); - double local_time_step = 1./(1.6*dim*std::sqrt(1.*dim)) / + // we found out that we need + // approximately a quarter the time step + // size in 3d + double scaling = (dim==3)?0.25:1.0; + double local_time_step = scaling/(1.6*dim*std::sqrt(1.*dim)) / temperature_degree * GridTools::minimal_cell_diameter(triangulation) / std::max(1e-10,maximal_velocity);