]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
.
authorwolf <wolf@0785d39b-7218-0410-832d-ea1e28bc413d>
Thu, 15 Apr 2004 22:34:56 +0000 (22:34 +0000)
committerwolf <wolf@0785d39b-7218-0410-832d-ea1e28bc413d>
Thu, 15 Apr 2004 22:34:56 +0000 (22:34 +0000)
git-svn-id: https://svn.dealii.org/trunk@9023 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/examples/step-15/step-15.cc

index 496b6dd7def1fd830685930e2b5ea3fd27a627ef..c63a5a387bcaa8257e795e3382d8c4d31443a7eb 100644 (file)
@@ -804,6 +804,35 @@ void MinimizationProblem<dim>::do_step ()
 
 
 
+template <int dim>
+void
+MinimizationProblem<dim>::output_results () const
+{
+  DataOut<dim> 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<dim>::energy (const DoFHandler<dim> &dof_handler,
 
 
 
-template <int dim>
-void
-MinimizationProblem<dim>::output_results () const
-{
-  DataOut<dim> 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 <int dim>
 void MinimizationProblem<dim>::run () 
 {

In the beginning the Universe was created. This has made a lot of people very angry and has been widely regarded as a bad move.

Douglas Adams


Typeset in Trocchi and Trocchi Bold Sans Serif.