It would be helpful to know whether or not the GSI surface balance solver converged in the specified number of iterations. This should be possible by returning a bool from solveSurfaceBalance, which currently is void.
As part of this, I would return a bool from the Newton solver's solve routine; it currently returns x, which is also an input and is already passed by non-const reference, so something like mv_X = solve(mv_X); here is redundant and a little wasteful.
It would be helpful to know whether or not the GSI surface balance solver converged in the specified number of iterations. This should be possible by returning a
boolfromsolveSurfaceBalance, which currently isvoid.As part of this, I would return a
boolfrom the Newton solver'ssolveroutine; it currently returnsx, which is also an input and is already passed by non-const reference, so something likemv_X = solve(mv_X);here is redundant and a little wasteful.