From: Martin Kronbichler Date: Thu, 7 May 2009 13:44:56 +0000 (+0000) Subject: Reset only constrained nodes to zero when starting the solve. X-Git-Tag: v8.0.0~7709 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=077eee656ebfef0e7ae3382b55c1c267b722e9c6;p=dealii.git Reset only constrained nodes to zero when starting the solve. git-svn-id: https://svn.dealii.org/trunk@18820 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 77b9dc9a65..4d50744277 100644 --- a/deal.II/examples/step-32/step-32.cc +++ b/deal.II/examples/step-32/step-32.cc @@ -250,7 +250,6 @@ namespace LinearSolvers PreconditionerMp > > m_inverse; const PreconditionerA &a_preconditioner; mutable TrilinosWrappers::MPI::Vector tmp; - }; @@ -1383,11 +1382,15 @@ void BoussinesqFlowProblem::solve () gmres (solver_control, SolverGMRES::AdditionalData(100)); - // currently, have a problem with - // constrained dofs that are nonzero when - // entering the solver (see step-31). set - // the vector to zero for the moment. - stokes_solution = 0; + // now treat the hanging nodes correctly. + const unsigned int start = stokes_solution.block(1).local_range().first + + stokes_solution.block(0).size(); + const unsigned int end = stokes_solution.block(1).local_range().second + + stokes_solution.block(0).size(); + for (unsigned int i=start; i