From c5d1b511ea87c07e8fda4ab8030a08fe2d036203 Mon Sep 17 00:00:00 2001 From: kronbichler Date: Mon, 27 Oct 2008 13:32:22 +0000 Subject: [PATCH] Slight changes in comments. git-svn-id: https://svn.dealii.org/trunk@17349 0785d39b-7218-0410-832d-ea1e28bc413d --- deal.II/examples/step-27/doc/intro.dox | 17 ++++++----- deal.II/examples/step-27/step-27.cc | 39 ++++++++++++-------------- 2 files changed, 26 insertions(+), 30 deletions(-) diff --git a/deal.II/examples/step-27/doc/intro.dox b/deal.II/examples/step-27/doc/intro.dox index e019caef32..54996363bb 100644 --- a/deal.II/examples/step-27/doc/intro.dox +++ b/deal.II/examples/step-27/doc/intro.dox @@ -715,15 +715,14 @@ we now use the following: hanging_node_constraints, false); @endcode -Note also the last argument false for the creation of the -sparsity pattern. It tells the sparsity pattern that constrained -entries should not be inserted into the sparsity pattern. This makes -sense for the way we're going to do assembly, which does the -elimination of constraints already locally. Hence, we will never write -touch the constrained entries. This gives some additional performance -gain, since the system matrix will use have less entries — this -saves both memory and computing time when doing matrix-vector -multiplications or using a preconditioner. +Note the last false argument we pass when creating the sparsity +pattern. It tells the sparsity pattern that constrained entries should not +be inserted into the sparsity pattern. This makes sense for the way we're +going to do assembly, which does the elimination of constraints already +locally. Hence, we will never write touch the constrained entries. This is +the second key to increase this program's performance, since the system +matrix will have less entries — this saves both memory and computing +time when doing matrix-vector multiplications or applying a preconditioner. In a similar vein, we have to slightly modify the way we copy local contributions into global matrices and vectors. In previous tutorial programs, diff --git a/deal.II/examples/step-27/step-27.cc b/deal.II/examples/step-27/step-27.cc index ea13fc6048..7fdbc93bf0 100644 --- a/deal.II/examples/step-27/step-27.cc +++ b/deal.II/examples/step-27/step-27.cc @@ -211,27 +211,24 @@ LaplaceProblem::~LaplaceProblem () // @sect4{LaplaceProblem::setup_system} // // This function is again an almost - // verbatim copy of what we already - // did in step-6, with the main - // difference that we don't directly - // build the sparsity pattern, but - // first create an intermediate - // object that we later copy into the - // right data structure. In another - // slight deviation, we do not first - // build the sparsity pattern then - // condense away constrained degrees - // of freedom, but pass the - // constraint matrix object directly - // to the function that builds the - // sparsity pattern. We disable the - // insertion of constrained entries - // with false as fourth - // argument in the - // DoFTools::make_sparsity_pattern - // function. Both of these steps are - // explained in the introduction of - // this program. + // verbatim copy of what we already did in + // step-6, with the main difference that we + // don't directly build the sparsity + // pattern, but first create an + // intermediate object that we later copy + // into the right data structure. In + // another slight deviation, we do not + // first build the sparsity pattern then + // condense away constrained degrees of + // freedom, but pass the constraint matrix + // object directly to the function that + // builds the sparsity pattern. We disable + // the insertion of constrained entries + // with false as fourth argument + // in the DoFTools::make_sparsity_pattern + // function. Both of these changes are + // explained in the introduction of this + // program. // // The second change, maybe hidden in plain // sight, is that the dof_handler variable -- 2.39.5