Skip to content

Fix IterativeMultiLevelStaticCond tolerance

Douglas Serson requested to merge fix/IterML-tolerance into master

Related to issue #15 (closed). This makes the default definition of m_rhs_magnitude in the iterative solver use the function Set_Rhs_Magnitude.

This way IterativeMultiLevelStaticCond works a lot better, at least for a 2D test I used. It would be nice if someone could test it in a larger 3D case.

The problem I noticed with MultiLevel is that GlobalLinSysIterativeStaticCond::v_PreSolve is treating level 0 as the last level (this is not true), and calling Set_Rhs_Magnitude there. I tried fixing this, but then there is a communication issue, since the last level is not the same in all processes.

A couple of other things that could be changed, but I did not to prevent affecting the current implementation of IterativeStaticCond:

  • For consistency, remove the call to Set_Rhs_Magnitude from v_PreSolve and always call it in DoConjugateGradient. The difference would be between normalizing the residual by the rhs on the original system (as we do now for single-level) vs always normalizing by the rhs of the (condensed) system we are solving.
  • Maybe we should use Vmath::Dot2 instead of Vmath::Dot in Set_Rhs_Magnitude?

Merge request reports