From fbb18d03158ebddafbf7f20ab1ed2a3e6f60e720 Mon Sep 17 00:00:00 2001 From: Wolfgang Bangerth Date: Mon, 30 Mar 2020 11:00:42 -0600 Subject: [PATCH] Output time and time step in step-26. --- examples/step-26/step-26.cc | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/examples/step-26/step-26.cc b/examples/step-26/step-26.cc index cc09e8e835..8c2f7ef4a3 100644 --- a/examples/step-26/step-26.cc +++ b/examples/step-26/step-26.cc @@ -291,7 +291,9 @@ namespace Step26 // @sect4{HeatEquation::output_results} // - // Neither is there anything new in generating graphical output: + // Neither is there anything new in generating graphical output other than the + // fact that we tell the DataOut object what the current time and time step + // number is, so that this can be written into the output file: template void HeatEquation::output_results() const { @@ -302,6 +304,8 @@ namespace Step26 data_out.build_patches(); + data_out.set_flags(DataOutBase::VtkFlags(time, timestep_number)); + const std::string filename = "solution-" + Utilities::int_to_string(timestep_number, 3) + ".vtk"; std::ofstream output(filename); -- 2.39.5