From: Roy S. <ro...@st...> - 2008-09-04 14:16:01
|
On Thu, 4 Sep 2008, David Knezevic wrote: > I'm using (a subclass) of FEMSystem, with NewtonSolver, and I'd like to > detect whether or not a quasi-Newton solve converged, i.e. I'd like to > detect whether NewtonSolver::solve returns the enum > DiffSolver::DIVERGED_MAX_NONLINEAR_ITERATIONS. Maybe I'm missing > something, but I didn't see any easy way to access this return value? > Also, the _solve_result member in DiffSolver is protected, so I just > wanted to ask what the easiest way to access that value would be? Maybe > a getter method in DiffSolver for that member would be useful? So far IIRC we've only been using that value internally to let the transient solvers and continuation solvers which call DiffSolver::solve back off their time step or continuation step size on failure. My thinking was that whether such reduction succeeded in making the problem well-behaved enough to succeed on the retry or not, the original solver divergence would have become moot. Satisfy my curiosity: What's the usage case where you have a function which isn't responsible for calling DiffSolver::solve() but wants to check it's result? Whatever the reason, though, a getter method would be great, if you want to send a patch or commit one. --- Roy |