From: wolf Date: Thu, 15 Apr 2004 22:34:56 +0000 (+0000) Subject: . X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=72b40b8b79f730677e902d55c571be5c70855e06;p=dealii-svn.git . git-svn-id: https://svn.dealii.org/trunk@9023 0785d39b-7218-0410-832d-ea1e28bc413d --- 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 () {