Add storage of maximum residuals in newton solve