// will hold the constraints from the
// periodic boundary condition. We will
// initialize it in the
- // <code>setup_system()</code> function.
+ // <code>make_periodicity_constraints()</code>
+ // function which we call from
+ // <code>make_grid_and_dofs()</code>.
class LaplaceProblem
{
public:
void assemble_system ();
void output_results ();
void make_grid_and_dofs ();
+ void make_periodicity_constraints ();
void solve ();
};
{}
+ // @sect4{LaplaceProblem::make_grid_and_dofs}
+
void LaplaceProblem::make_grid_and_dofs ()
{
GridGenerator::hyper_cube (triangulation);
// Assembling the system matrix and the
// right-hand side vector is done as in other
// tutorials before.
+ //
+ // The only difference here is that we don't
+ // copy elements from local contributions
+ // into the global matrix and later fix up
+ // constrained degrees of freedom, but that
+ // we let the ConstraintMatrix do this job in
+ // one swoop for us using the
+ // ConstraintMatrix::distribute_local_to_global
+ // function(). This was previously already
+ // demonstrated in step-16, step-22, for
+ // example, along with a discussion in the
+ // introduction of step-27.
void LaplaceProblem::assemble_system ()
{
QGauss<2> quadrature_formula(2);