]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
allow for more iterations in VectorTools::project and eliminate output of iterative...
authorkanschat <kanschat@0785d39b-7218-0410-832d-ea1e28bc413d>
Thu, 12 Oct 2006 03:13:09 +0000 (03:13 +0000)
committerkanschat <kanschat@0785d39b-7218-0410-832d-ea1e28bc413d>
Thu, 12 Oct 2006 03:13:09 +0000 (03:13 +0000)
git-svn-id: https://svn.dealii.org/trunk@13990 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/deal.II/include/numerics/vectors.templates.h

index 1ffa6472481234454f5668718ac1da93df1a252d..473f24f7a13a6094304b21aadbf721e229c7cf95 100644 (file)
@@ -449,8 +449,13 @@ void VectorTools::project (const Mapping<dim>       &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<dim>       &mapping,
 
   Vector<double> 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);
 

In the beginning the Universe was created. This has made a lot of people very angry and has been widely regarded as a bad move.

Douglas Adams


Typeset in Trocchi and Trocchi Bold Sans Serif.