Dear Juan,
I am a little confused about the relative error in your source code. The default value x_{ref} is set to 1e-10.
In your source code is minError https://github.com/devsim/devsim/blob/3d979d6a98685b2e51c15eebd20afdc1e643fc3a/src/Equation/Equation.cc#L40)
https://github.com/devsim/devsim/blob/3d979d6a98685b2e51c15eebd20afdc1e643fc3a/src/Equation/Equation.cc#L295
In my knowledges, the regular relative error is
relerr = \frac{ \Delta x }{x + x_{ref}}
Due to 1e-10 is very small, so I guess the solution x in your code has been scaled, such as
relerr = \frac{ \frac{\Delta x}{x} }{1 + \frac{x_{ref}}{x}}, where minError =\frac{x_{ref}}{x}
Is it right?
By the way, do you have plan to add this parameter to devsim.solve() that could be set by user in future release?
Best,
Tao