mirror of
https://github.com/Cantera/cantera.git
synced 2025-02-25 18:55:29 -06:00
[1D] Fix accumulation of Jacobian stats
This commit is contained in:
parent
2928a4e66d
commit
5a8cd8597f
@ -183,6 +183,12 @@ public:
|
||||
m_age = age;
|
||||
}
|
||||
|
||||
void clearStats() {
|
||||
m_elapsed = 0.0;
|
||||
m_nevals = 0;
|
||||
m_age = 100000;
|
||||
}
|
||||
|
||||
protected:
|
||||
//! Factorize the system matrix. This method should be called at the end of
|
||||
//! implementations of updatePreconditioner() and updateTransient().
|
||||
|
@ -107,6 +107,7 @@ void OneDim::setLinearSolver(shared_ptr<SystemJacobian> solver)
|
||||
m_jac = solver;
|
||||
m_jac->initialize(size());
|
||||
m_jac->setBandwidth(bandwidth());
|
||||
m_jac->clearStats();
|
||||
m_jac_ok = false;
|
||||
}
|
||||
|
||||
@ -217,12 +218,12 @@ void OneDim::resize()
|
||||
m_newt->resize(size());
|
||||
m_mask.resize(size());
|
||||
|
||||
// delete the current Jacobian evaluator and create a new one
|
||||
if (!m_jac) {
|
||||
m_jac = newSystemJacobian("banded-direct");
|
||||
}
|
||||
m_jac->initialize(size());
|
||||
m_jac->setBandwidth(bandwidth());
|
||||
m_jac->clearStats();
|
||||
m_jac_ok = false;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user