From 72b40b8b79f730677e902d55c571be5c70855e06 Mon Sep 17 00:00:00 2001 From: wolf Date: Thu, 15 Apr 2004 22:34:56 +0000 Subject: [PATCH] . git-svn-id: https://svn.dealii.org/trunk@9023 0785d39b-7218-0410-832d-ea1e28bc413d --- deal.II/examples/step-15/step-15.cc | 58 ++++++++++++++--------------- 1 file changed, 29 insertions(+), 29 deletions(-) diff --git a/deal.II/examples/step-15/step-15.cc b/deal.II/examples/step-15/step-15.cc index 496b6dd7de..c63a5a387b 100644 --- a/deal.II/examples/step-15/step-15.cc +++ b/deal.II/examples/step-15/step-15.cc @@ -804,6 +804,35 @@ void MinimizationProblem::do_step () +template +void +MinimizationProblem::output_results () const +{ + DataOut data_out; + data_out.attach_dof_handler (dof_handler); + data_out.add_data_vector (present_solution, "solution"); + data_out.build_patches (); + +#ifdef HAVE_STD_STRINGSTREAM + std::ostringstream filename; +#else + std::ostrstream filename; +#endif + filename << "solution-" + << run_number + << ".gnuplot" + << std::ends; +#ifdef HAVE_STD_STRINGSTREAM + std::ofstream out (filename.str().c_str()); +#else + std::ofstream out (filename.str()); +#endif + + data_out.write_gnuplot (out); +} + + + template <> void MinimizationProblem<1>::refine_grid () { @@ -975,35 +1004,6 @@ MinimizationProblem::energy (const DoFHandler &dof_handler, -template -void -MinimizationProblem::output_results () const -{ - DataOut data_out; - data_out.attach_dof_handler (dof_handler); - data_out.add_data_vector (present_solution, "solution"); - data_out.build_patches (); - -#ifdef HAVE_STD_STRINGSTREAM - std::ostringstream filename; -#else - std::ostrstream filename; -#endif - filename << "solution-" - << run_number - << ".gnuplot" - << std::ends; -#ifdef HAVE_STD_STRINGSTREAM - std::ofstream out (filename.str().c_str()); -#else - std::ofstream out (filename.str()); -#endif - - data_out.write_gnuplot (out); -} - - - template void MinimizationProblem::run () { -- 2.39.5