]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Introduce a variable that explicitly names the end time in step-26. 15593/head
authorWolfgang Bangerth <bangerth@colostate.edu>
Sun, 2 Jul 2023 17:16:09 +0000 (11:16 -0600)
committerWolfgang Bangerth <bangerth@colostate.edu>
Sun, 2 Jul 2023 17:16:09 +0000 (11:16 -0600)
examples/step-26/step-26.cc

index 6d2d9afddb6a2c709bbbfddb98e506a6fbd5a2d4..238bcdb360efaec389c19d195c7f93184305d914 100644 (file)
@@ -472,7 +472,8 @@ namespace Step26
     // Recall that it contains the term $MU^{n-1}-(1-\theta)k_n AU^{n-1}$.
     // We put these terms into the variable system_rhs, with the
     // help of a temporary vector:
-    while (time <= 0.5)
+    const double end_time = 0.5;
+    while (time <= end_time)
       {
         time += time_step;
         ++timestep_number;

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.