Allow users to set max iterations of GMRES at any time
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
toDoGMRES
, so that user-definedm_maxiter
can always take effect. - The
GlobalLinSysIterative
contains unused parameterm_maxiter
(obtained fromAssemblyMap). Add
SetNekLinSysMaxIterations()in
GlobalLinSysIterativeFull()and
GlobalLinSysIterativeStaticCond()to pass
m_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).