Layout for jacobian/hessian