From: Wolfgang Bangerth Date: Thu, 9 Mar 2023 03:30:32 +0000 (-0700) Subject: step-69: Use commonly used name for time step number. X-Git-Tag: v9.5.0-rc1~494^2 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5f32e0cf587d95e812f7022f273346accac211f2;p=dealii.git step-69: Use commonly used name for time step number. --- diff --git a/examples/step-69/step-69.cc b/examples/step-69/step-69.cc index c013a95546..12b474bdcf 100644 --- a/examples/step-69/step-69.cc +++ b/examples/step-69/step-69.cc @@ -2567,15 +2567,17 @@ namespace Step69 print_head(pcout, "enter main loop"); - for (unsigned int cycle = 1; t < t_final; ++cycle) + unsigned int timestep_number = 1; + while (t < t_final) { // We first print an informative status message std::ostringstream head; std::ostringstream secondary; - head << "Cycle " << Utilities::int_to_string(cycle, 6) << " (" // - << std::fixed << std::setprecision(1) << t / t_final * 100 // + head << "Cycle " << Utilities::int_to_string(timestep_number, 6) + << " (" // + << std::fixed << std::setprecision(1) << t / t_final * 100 // << "%)"; secondary << "at time t = " << std::setprecision(8) << std::fixed << t; @@ -2601,6 +2603,8 @@ namespace Step69 output(U, base_name, t, output_cycle); ++output_cycle; } + + ++timestep_number; } // We wait for any remaining background output thread to finish before