From: Timo Heister Date: Thu, 24 Oct 2019 09:27:44 +0000 (+0200) Subject: move constraints X-Git-Tag: v9.2.0-rc1~836^2~3 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=805b870d9a88ff7d6b3f8c3dad4ce6136136b3ad;p=dealii.git move constraints --- diff --git a/examples/step-12/step-12.cc b/examples/step-12/step-12.cc index badf5073eb..1a4ff62df8 100644 --- a/examples/step-12/step-12.cc +++ b/examples/step-12/step-12.cc @@ -210,13 +210,10 @@ namespace Step12 // @sect3{The AdvectionProblem class} // // After this preparations, we proceed with the main class of this program, - // called AdvectionProblem. While we would not need an AffineConstraints - // object, because there are no hanging node constraints in DG - // discretizations, we use an empty object here as this allows us to use its - // `copy_local_to_global` functionality. + // called AdvectionProblem. // - // Major differences will only come up in the implementation of the assemble - // function. + // This should all be pretty familiar to you. Interesting details will only + // come up in the implementation of the assemble function. template class AdvectionProblem { @@ -415,8 +412,15 @@ namespace Step12 } }; - // This lambda function will handle copying the data from the cell and - // face assembly into the global matrix and right-hand side: + // The following lambda function will handle copying the data from the + // cell and face assembly into the global matrix and right-hand side. + // + // While we would not need an AffineConstraints object, because there are + // no hanging node constraints in DG discretizations, we use an empty + // object here as this allows us to use its `copy_local_to_global` + // functionality. + AffineConstraints constraints; + auto copier = [&](const CopyData &c) { constraints.distribute_local_to_global(c.cell_matrix, c.cell_rhs,