From 29357eac29966d2284f3469ef8eb568200d7cdcb Mon Sep 17 00:00:00 2001 From: Timo Heister Date: Tue, 29 Oct 2019 07:53:59 +0100 Subject: [PATCH] pass cycle not name to function --- examples/step-42/step-42.cc | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/examples/step-42/step-42.cc b/examples/step-42/step-42.cc index 3b4c8bda5a..5a8f1e08e9 100644 --- a/examples/step-42/step-42.cc +++ b/examples/step-42/step-42.cc @@ -623,7 +623,8 @@ namespace Step42 void solve_newton(); void refine_grid(); void move_mesh(const TrilinosWrappers::MPI::Vector &displacement) const; - void output_results(const std::string &filename_base); + void output_results(const unsigned int current_refinement_cycle); + void output_contact_force() const; // As far as member variables are concerned, we start with ones that we use @@ -1972,7 +1973,7 @@ namespace Step42 // ghost entries for all locally relevant degrees of freedom. template void PlasticityContactProblem::output_results( - const std::string &filename_base) + const unsigned int current_refinement_cycle) { TimerOutput::Scope t(computing_timer, "Graphical output"); @@ -2046,9 +2047,9 @@ namespace Step42 // output files. We then do the same again for the competitor of // Paraview, the Visit visualization program, by creating a matching // .visit file. - data_out.write_vtu_with_pvtu_record( - output_dir, filename_base, 0, 1, mpi_communicator); - pcout << output_dir + filename_base << ".pvtu" << std::endl; + const std::string master_name = data_out.write_vtu_with_pvtu_record( + output_dir, "solution", current_refinement_cycle, 2, mpi_communicator); + pcout << master_name << std::endl; TrilinosWrappers::MPI::Vector tmp(solution); tmp *= -1; @@ -2162,8 +2163,7 @@ namespace Step42 solve_newton(); - output_results(std::string("solution-") + - Utilities::int_to_string(current_refinement_cycle, 2)); + output_results(current_refinement_cycle); computing_timer.print_summary(); computing_timer.reset(); -- 2.39.5