From 25a1a35c4470a67038adfb5466196cd57256e6e5 Mon Sep 17 00:00:00 2001 From: Jonathan Robey Date: Sat, 17 Sep 2016 10:36:23 -0700 Subject: [PATCH] Adjust commentary --- examples/step-31/step-31.cc | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/examples/step-31/step-31.cc b/examples/step-31/step-31.cc index 7970152db5..6a097b9a64 100644 --- a/examples/step-31/step-31.cc +++ b/examples/step-31/step-31.cc @@ -2065,11 +2065,10 @@ namespace Step31 // another copy of temporary vectors for temperature (now corresponding to // the new grid), and let the interpolate function do the job. Then, the // resulting array of vectors is written into the respective vector member - // variables. For the Stokes vector, everything is just the same – - // except that we do not need another temporary vector since we just - // interpolate a single vector. In the end, we have to tell the program - // that the matrices and preconditioners need to be regenerated, since the - // mesh has changed. + // variables. + // + // Remember that the set of constraints will be updated for the new + // triangulation in the setup_dofs() call. triangulation.execute_coarsening_and_refinement (); setup_dofs (); @@ -2081,9 +2080,15 @@ namespace Step31 temperature_solution = tmp[0]; old_temperature_solution = tmp[1]; + // After the solution has been transfered we then enforce the constraints + // on the transfered solution. temperature_constraints.distribute(temperature_solution); temperature_constraints.distribute(old_temperature_solution); + // For the Stokes vector, everything is just the same – except that + // we do not need another temporary vector since we just interpolate a + // single vector. In the end, we have to tell the program that the matrices + // and preconditioners need to be regenerated, since the mesh has changed. stokes_trans.interpolate (x_stokes, stokes_solution); stokes_constraints.distribute(stokes_solution); -- 2.39.5