]> https://gitweb.dealii.org/ - dealii.git/commitdiff
step-32: smaller step size in 3d.
authorTimo Heister <timo.heister@gmail.com>
Sun, 6 Feb 2011 16:16:11 +0000 (16:16 +0000)
committerTimo Heister <timo.heister@gmail.com>
Sun, 6 Feb 2011 16:16:11 +0000 (16:16 +0000)
git-svn-id: https://svn.dealii.org/trunk@23296 0785d39b-7218-0410-832d-ea1e28bc413d

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

index ff8e498d9e8646934c3639eb17c0d824b6f2e41e..62888712a205c89a903f18f725d7f538fc6adeb9 100644 (file)
@@ -2752,7 +2752,11 @@ void BoussinesqFlowProblem<dim>::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);

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.