From b760418ca6931cb5f97048bd65eae857dec683cc Mon Sep 17 00:00:00 2001 From: bangerth Date: Tue, 2 Aug 2011 20:20:02 +0000 Subject: [PATCH] Make more to standard. git-svn-id: https://svn.dealii.org/trunk@23999 0785d39b-7218-0410-832d-ea1e28bc413d --- deal.II/examples/step-47/step-47.cc | 28 ++++++++++------------------ 1 file changed, 10 insertions(+), 18 deletions(-) diff --git a/deal.II/examples/step-47/step-47.cc b/deal.II/examples/step-47/step-47.cc index 05f5d9f531..3ca5026288 100644 --- a/deal.II/examples/step-47/step-47.cc +++ b/deal.II/examples/step-47/step-47.cc @@ -225,7 +225,7 @@ void LaplaceProblem::setup_system () constraints.clear (); - DoFTools::make_constraints (dof_handler, + DoFTools::make_hanging_node_constraints (dof_handler, constraints); constraints.close (); @@ -376,14 +376,19 @@ void LaplaceProblem::output_results (const unsigned int cycle) const { Assert (cycle < 10, ExcNotImplemented()); - std::string filename = "grid-"; + std::string filename = "solution-"; filename += ('0' + cycle); - filename += ".eps"; + filename += ".vtk"; std::ofstream output (filename.c_str()); - GridOut grid_out; - grid_out.write_eps (triangulation, output); + DataOut > data_out; + + data_out.attach_dof_handler (dof_handler); + data_out.add_data_vector (solution, "solution"); + data_out.build_patches (); + + data_out.write_vtk (output); } @@ -423,19 +428,6 @@ void LaplaceProblem::run () solve (); output_results (cycle); } - - DataOutBase::EpsFlags eps_flags; - eps_flags.z_scaling = 4; - - DataOut > data_out; - data_out.set_flags (eps_flags); - - data_out.attach_dof_handler (dof_handler); - data_out.add_data_vector (solution, "solution"); - data_out.build_patches (); - - std::ofstream output ("final-solution.eps"); - data_out.write_eps (output); } -- 2.39.5