fixed when the residual force vector is calculated for the arc-length method, and the initial run using the linear matrices
renamed obsolete variables
vectorized many functions, fixed  nonlinear formulation with imperfections