fix superLU when the salver is called multiple times

This commit is contained in:
Gael Guennebaud
2011-09-27 18:30:53 +02:00
parent ac3ad9c1e7
commit 683ea3c93f
2 changed files with 27 additions and 11 deletions

View File

@@ -81,6 +81,10 @@ template<typename LUSolver> void sparse_lu(LUSolver& lu)
DenseVector refX(size), x(size);
initSparse<Scalar>(density, refMat2, m2, ForceNonZeroDiag, &zeroCoords, &nonzeroCoords);
check_slu(lu, m2, b, refMat2, b);
refMat2.setZero();
m2.setZero();
initSparse<Scalar>(density, refMat2, m2, ForceNonZeroDiag, &zeroCoords, &nonzeroCoords);
check_slu(lu, m2, b, refMat2, b);
}