Skip to content

Allow users to set max iterations of GMRES at any time

BOYANG XIA requested to merge xby2233/nektar:fix/GMRESmaxiter into master

Issue/feature addressed

Users can call SetNekLinSysMaxIterations() to set m_maxiter, but now it cannot affect the m_maxrestart. Because m_maxrestart is only set once in the NekLinSysIterGMRES constructor using default m_maxiter. There is no LoadParameter() to set m_maxiter, either.

Proposed solution

  • Move the calculation of m_maxrestart to DoGMRES, so that user-defined m_maxiter can always take effect.
  • The GlobalLinSysIterative contains unused parameter m_maxiter (obtained from AssemblyMap). Add SetNekLinSysMaxIterations()inGlobalLinSysIterativeFull()andGlobalLinSysIterativeStaticCond()to passm_maxiter` to GMRES object.

Implementation

A more detailed description of the changes. Please include any details necessary for reviewers to understand your work, and point out particular points would like them to pay particular attention to.

Tests

Suggested reviewers

Please suggest any people who would be appropriate to review your code.

Notes

NekLinSysIter base class constructor load NekLinSysMaxIterations parameter to m_maxiter, which can be regarded as a global setting to all GMRES object. Additionally users can change m_maxiter via SetNekLinSysMaxIterations later, so that different GMRES objects can take different m_maxiter.

Checklist

  • Functions and classes, or changes to them, are documented.
  • User guide/documentation is updated.
  • Changelog is updated.
  • Suitable tests added for new functionality.
  • Contributed code is correctly formatted. (See the contributing guidelines).
  • [] License added to any new files.
  • No extraneous files have been added (e.g. compiler output or test data files).
Edited by BOYANG XIA

Merge request reports