From c237600b4e10b457f14fde8fb6bc7c93c606fe30 Mon Sep 17 00:00:00 2001 From: kanschat Date: Thu, 12 Oct 2006 03:13:09 +0000 Subject: [PATCH] allow for more iterations in VectorTools::project and eliminate output of iterative method git-svn-id: https://svn.dealii.org/trunk@13990 0785d39b-7218-0410-832d-ea1e28bc413d --- .../include/numerics/vectors.templates.h | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/deal.II/deal.II/include/numerics/vectors.templates.h b/deal.II/deal.II/include/numerics/vectors.templates.h index 1ffa647248..473f24f7a1 100644 --- a/deal.II/deal.II/include/numerics/vectors.templates.h +++ b/deal.II/deal.II/include/numerics/vectors.templates.h @@ -449,8 +449,13 @@ void VectorTools::project (const Mapping &mapping, MatrixTools::apply_boundary_values (boundary_values, mass_matrix, vec, tmp, true); - - SolverControl control(tmp.size(), 1e-12*tmp.l2_norm()); + // Allow for a maximum of 5*n + // steps to reduce the residual by + // 10^-12. n steps may not be + // sufficient, since roundoff + // errors may accumulate for badly + // conditioned matrices + ReductionControl control(5*tmp.size(), 0., 1e-12, false, false); PrimitiveVectorMemory<> memory; SolverCG<> cg(control,memory); @@ -1371,7 +1376,13 @@ VectorTools::project_boundary_values (const Mapping &mapping, Vector boundary_projection (rhs.size()); - SolverControl control(rhs.size(), 1e-12*rhs.l2_norm()); + // Allow for a maximum of 5*n + // steps to reduce the residual by + // 10^-12. n steps may not be + // sufficient, since roundoff + // errors may accumulate for badly + // conditioned matrices + ReductionControl control(5*rhs.size(), 0., 1.e-12, false, false); PrimitiveVectorMemory<> memory; SolverCG<> cg(control,memory); -- 2.39.5