[1D] Fix transient mask after Jacobian update

The transient mask should only be zeroed when doing a full evaluation of the
residual function, since the partial evaluations done while evaluating the
Jacobian will not fill in all elements of the mask. This error was causing
Jacobian update in MultiNewton::solve to always effectively generate the
steady-state Jacobian, even when in time-stepping mode.
This commit is contained in:
Ray Speth 2016-02-13 16:31:11 -05:00
parent 73246130fa
commit d76704912b

View file

@ -239,7 +239,9 @@ void OneDim::eval(size_t j, double* x, double* r, doublereal rdt, int count)
m_interrupt->eval(m_nevals);
}
fill(r, r + m_size, 0.0);
fill(m_mask.begin(), m_mask.end(), 0);
if (j == npos) {
fill(m_mask.begin(), m_mask.end(), 0);
}
if (rdt < 0.0) {
rdt = m_rdt;
}