Swapped the solvers to use sparse matrices to save memory