BOUT-dev
BOUT-dev copied to clipboard
CVODE rhs counters incomplete
Looking at rhs counters with Qian Xia, we realised that the cvode_nfevals output is not the total number of rhs calls (which I thought it was). It is the output of the CVODE function CVodeGetNumRhsEvals, whose documentation notes that "The nfevals value returned by CVodeGetNumRhsEvals does not account for calls made to f by a linear solver or preconditioner module." To get the counts from the linear solver, I think we would have to also call CVodeGetNumLinRhsEvals, which we don't at the moment. I don't know if that would give a different count to CVodeGetNumLinIters, which we do call and output as cvode_nliters. If this is important to anyone, you might want to add another diagnostic output that captures the result of CVodeGetNumLinRhsEvals.
If you just want the number of rhs calls (which was what we were actually after), use the ncalls output variable.