From f0a2bbc31b220bada470b90ff8b426a2d49d8ecb Mon Sep 17 00:00:00 2001 From: wolf Date: Wed, 12 Jan 2000 10:35:59 +0000 Subject: [PATCH] Wrong order of elimination of hanging nodes and boundary values. git-svn-id: https://svn.dealii.org/trunk@2209 0785d39b-7218-0410-832d-ea1e28bc413d --- .../examples/step-by-step/step-6/step-6.cc | 36 +++++++++++-------- deal.II/examples/step-6/step-6.cc | 36 +++++++++++-------- 2 files changed, 42 insertions(+), 30 deletions(-) diff --git a/deal.II/deal.II/Attic/examples/step-by-step/step-6/step-6.cc b/deal.II/deal.II/Attic/examples/step-by-step/step-6/step-6.cc index d24f349852..fe4ed33a89 100644 --- a/deal.II/deal.II/Attic/examples/step-by-step/step-6/step-6.cc +++ b/deal.II/deal.II/Attic/examples/step-by-step/step-6/step-6.cc @@ -519,21 +519,6 @@ void LaplaceProblem::assemble_system () }; }; - // As almost all the stuff before, - // the interpolation of boundary - // values works also for higher - // order elements, but you need not - // change your code for that: - map boundary_values; - VectorTools::interpolate_boundary_values (dof_handler, - 0, - ZeroFunction(), - boundary_values); - MatrixTools::apply_boundary_values (boundary_values, - system_matrix, - solution, - system_rhs); - // After the system of equations // has been assembled just as for // the previous examples, we still @@ -557,6 +542,27 @@ void LaplaceProblem::assemble_system () // are invalid. They are set to // reasonable values in the // ``solve'' function. + + // As almost all the stuff before, + // the interpolation of boundary + // values works also for higher + // order elements, but you need not + // change your code for that. We + // note that for proper results, it + // is important that the + // elimination of boundary nodes + // from the system of equations + // happens *after* the elimination + // of hanging nodes. + map boundary_values; + VectorTools::interpolate_boundary_values (dof_handler, + 0, + ZeroFunction(), + boundary_values); + MatrixTools::apply_boundary_values (boundary_values, + system_matrix, + solution, + system_rhs); }; diff --git a/deal.II/examples/step-6/step-6.cc b/deal.II/examples/step-6/step-6.cc index d24f349852..fe4ed33a89 100644 --- a/deal.II/examples/step-6/step-6.cc +++ b/deal.II/examples/step-6/step-6.cc @@ -519,21 +519,6 @@ void LaplaceProblem::assemble_system () }; }; - // As almost all the stuff before, - // the interpolation of boundary - // values works also for higher - // order elements, but you need not - // change your code for that: - map boundary_values; - VectorTools::interpolate_boundary_values (dof_handler, - 0, - ZeroFunction(), - boundary_values); - MatrixTools::apply_boundary_values (boundary_values, - system_matrix, - solution, - system_rhs); - // After the system of equations // has been assembled just as for // the previous examples, we still @@ -557,6 +542,27 @@ void LaplaceProblem::assemble_system () // are invalid. They are set to // reasonable values in the // ``solve'' function. + + // As almost all the stuff before, + // the interpolation of boundary + // values works also for higher + // order elements, but you need not + // change your code for that. We + // note that for proper results, it + // is important that the + // elimination of boundary nodes + // from the system of equations + // happens *after* the elimination + // of hanging nodes. + map boundary_values; + VectorTools::interpolate_boundary_values (dof_handler, + 0, + ZeroFunction(), + boundary_values); + MatrixTools::apply_boundary_values (boundary_values, + system_matrix, + solution, + system_rhs); }; -- 2.39.5