Commit a0ceee70 authored by Chris Cantwell's avatar Chris Cantwell
Browse files

Merge branch 'fix/ModifiedArnoldi' into 'master'

Fix bug in DriverModifiedArnoldi

This fixes a bug in ModifiedArnoldi, which may cause the solver to exit with
```
Fatal   : Level 0 assertion violation
Unrecognised value.
```
as recently reported in nektar-users.

The problem happens because the iteration could be marked as converged when the number of vectors available is lower than `nvec`.

See merge request !608
parents e8d55fde c367509c
......@@ -7,6 +7,8 @@ v4.3.1
- Add `THIRDPARTY_USE_SSL` option to disable use of SSL on systems where CMake
is not compiled with SSL support. (!602)
- Fix Homogeneous transform when unshuffling is not used. (!599)
- Fix bug in modified Arnoldi algorithm causing convergence to be reported when
number of vectors is less than `nvec` (!608)
**NekMesh**:
- Fix incorrect link directory on CCMIO library.
......
......@@ -100,6 +100,8 @@ void DriverArnoldi::v_InitObject(ostream &out)
m_session->LoadParameter("nits", m_nits, 500);
m_session->LoadParameter("evtol", m_evtol, 1e-06);
ASSERTL0( m_kdim >= m_nvec, "nvec cannot be larger than kdim.");
m_session->LoadParameter("realShift", m_realShift, 0.0);
m_equ[0]->SetLambda(m_realShift);
......
......@@ -191,7 +191,14 @@ void DriverModifiedArnoldi::v_Execute(ostream &out)
// Test for convergence.
converged = EV_test(i, i, zvec, wr, wi, resnorm,
std::min(i, m_nvec), evlout, resid0);
converged = max (converged, 0);
if ( i >= m_nvec)
{
converged = max (converged, 0);
}
else
{
converged = 0;
}
if (m_comm->GetRank() == 0)
{
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment