From 9456e0464c23742726d170c512f0dc3ca2ad8328 Mon Sep 17 00:00:00 2001 From: wolf Date: Mon, 20 Dec 1999 09:45:37 +0000 Subject: [PATCH] Fix bugs. git-svn-id: https://svn.dealii.org/trunk@2084 0785d39b-7218-0410-832d-ea1e28bc413d --- .../examples/step-by-step/step-3/step-3.cc | 27 +++++++++++++++---- deal.II/examples/step-3/step-3.cc | 27 +++++++++++++++---- 2 files changed, 44 insertions(+), 10 deletions(-) diff --git a/deal.II/deal.II/Attic/examples/step-by-step/step-3/step-3.cc b/deal.II/deal.II/Attic/examples/step-by-step/step-3/step-3.cc index c68fdf332c..e9e5732286 100644 --- a/deal.II/deal.II/Attic/examples/step-by-step/step-3/step-3.cc +++ b/deal.II/deal.II/Attic/examples/step-by-step/step-3/step-3.cc @@ -1,3 +1,4 @@ +#include #include #include #include @@ -9,6 +10,8 @@ #include #include #include +#include +#include #include #include @@ -72,6 +75,7 @@ void LaplaceProblem::make_grid_and_dofs () }; + void LaplaceProblem::assemble_system () { QGauss3<2> quadrature_formula; @@ -112,10 +116,23 @@ void LaplaceProblem::assemble_system () cell->get_dof_indices (local_dof_indices); for (unsigned int i=0; i boundary_values; + VectorTools::interpolate_boundary_values (dof_handler, + 0, + ZeroFunction<2>(), + boundary_values); + MatrixTools<2>::apply_boundary_values (boundary_values, + system_matrix, + solution, + system_rhs); }; @@ -138,8 +155,8 @@ void LaplaceProblem::output_results () data_out.add_data_vector (solution, "solution"); data_out.build_patches (); - ofstream output ("solution.eps"); - data_out.write_eps (output); + ofstream output ("solution.gpl"); + data_out.write_gnuplot (output); }; diff --git a/deal.II/examples/step-3/step-3.cc b/deal.II/examples/step-3/step-3.cc index c68fdf332c..e9e5732286 100644 --- a/deal.II/examples/step-3/step-3.cc +++ b/deal.II/examples/step-3/step-3.cc @@ -1,3 +1,4 @@ +#include #include #include #include @@ -9,6 +10,8 @@ #include #include #include +#include +#include #include #include @@ -72,6 +75,7 @@ void LaplaceProblem::make_grid_and_dofs () }; + void LaplaceProblem::assemble_system () { QGauss3<2> quadrature_formula; @@ -112,10 +116,23 @@ void LaplaceProblem::assemble_system () cell->get_dof_indices (local_dof_indices); for (unsigned int i=0; i boundary_values; + VectorTools::interpolate_boundary_values (dof_handler, + 0, + ZeroFunction<2>(), + boundary_values); + MatrixTools<2>::apply_boundary_values (boundary_values, + system_matrix, + solution, + system_rhs); }; @@ -138,8 +155,8 @@ void LaplaceProblem::output_results () data_out.add_data_vector (solution, "solution"); data_out.build_patches (); - ofstream output ("solution.eps"); - data_out.write_eps (output); + ofstream output ("solution.gpl"); + data_out.write_gnuplot (output); }; -- 2.39.5