add this #include <algorithm>, so that error msg on VS2013 can be eliminated.
There is no reason to run GROUNDWATER_FLOW with Newton method. Therefore remove this block.
set the tolerance a bit stricter.