prepare for nonlinear solver