complete borja implementation
allowing for pre and post residual evaluate for second order dynamic problems