From: bangerth Date: Thu, 22 Sep 2011 23:54:52 +0000 (+0000) Subject: Do something that may not be strictly necessary but helpful in X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=47ecf66fce2ed7c03018c0f8e0f1ae41dc3f7329;p=dealii-svn.git Do something that may not be strictly necessary but helpful in avoiding future errors. git-svn-id: https://svn.dealii.org/trunk@24376 0785d39b-7218-0410-832d-ea1e28bc413d --- diff --git a/deal.II/examples/step-32/step-32.cc b/deal.II/examples/step-32/step-32.cc index 6dec1fb27b..f1087f528a 100644 --- a/deal.II/examples/step-32/step-32.cc +++ b/deal.II/examples/step-32/step-32.cc @@ -1852,14 +1852,34 @@ void BoussinesqFlowProblem::project_temperature_field () cg.solve (temperature_mass_matrix, solution, rhs, preconditioner_mass); temperature_constraints.distribute (solution); - -// old_temperature_solution = solution; + // Having so computed the current + // temperature field, let us set + // the member variable that holds + // the temperature nodes. Strictly + // speaking, we really only need to + // set + // old_temperature_solution + // since the first thing we will do + // is to compute the Stokes + // solution that only requires the + // previous time step's temperature + // field. That said, nothing good + // can come from not initializing + // the other vectors as well + // (especially since it's a + // relatively cheap operation and + // we only have to do it once at + // the beginning of the program) if + // we ever want to extend our + // numerical method or physical + // model, and so we initialize + // temperature_solution + // and + // old_old_temperature_solution + // as well: + temperature_solution.reinit(solution, false, true); old_temperature_solution.reinit(solution, false, true); - // this is good enough: no need to set - // current temperature since we need this - // field only for computing the next stokes - // system, which depends on the temperature - // of the *previous* time step + old_old_temperature_solution.reinit(solution, false, true); }