added direct sparse linear solver and guard for eigen