aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--Eigen/src/SparseLU/SparseLU.h3
-rw-r--r--Eigen/src/SparseLU/SparseLU_Matrix.h1
-rw-r--r--Eigen/src/SparseLU/SparseLU_column_bmod.h1
-rw-r--r--Eigen/src/SparseLU/SparseLU_pruneL.h2
-rw-r--r--bench/spbench/test_sparseLU.cpp1
5 files changed, 6 insertions, 2 deletions
diff --git a/Eigen/src/SparseLU/SparseLU.h b/Eigen/src/SparseLU/SparseLU.h
index a07b5a9f3..e4a4c3a7b 100644
--- a/Eigen/src/SparseLU/SparseLU.h
+++ b/Eigen/src/SparseLU/SparseLU.h
@@ -186,7 +186,6 @@ class SparseLU
// Triangular solve
Map<const Matrix<Scalar,Dynamic,Dynamic>, 0, OuterStride<> > A( &(Lval[luptr]), nsupc, nsupc, OuterStride<>(nsupr) );
Map< Matrix<Scalar,Dynamic,Dynamic>, 0, OuterStride<> > U (&(X.data()[fsupc]), nsupc, nrhs, OuterStride<>(X.rows()) );
-// Block<MatrixBase<Dest> > U(X, fsupc, 0, nsupc, nrhs); //FIXME TODO Consider more RHS
U = A.template triangularView<Lower>().solve(U);
// Matrix-vector product
@@ -536,6 +535,7 @@ void SparseLU<MatrixType, OrderingType>::factorize(const MatrixType& matrix)
// Eliminate the current column
info = LU_pivotL(icol, m_diagpivotthresh, m_perm_r.indices(), iperm_c.indices(), pivrow, m_glu);
+ eigen_assert(info==0 && " SINGULAR MATRIX");
if ( info )
{
m_info = NumericalIssue;
@@ -609,6 +609,7 @@ void SparseLU<MatrixType, OrderingType>::factorize(const MatrixType& matrix)
// Form the L-segment
info = LU_pivotL(jj, m_diagpivotthresh, m_perm_r.indices(), iperm_c.indices(), pivrow, m_glu);
+ eigen_assert(info==0 && " SINGULAR MATRIX");
if ( info )
{
std::cerr<< "THE MATRIX IS STRUCTURALLY SINGULAR ... ZERO COLUMN AT " << info <<std::endl;
diff --git a/Eigen/src/SparseLU/SparseLU_Matrix.h b/Eigen/src/SparseLU/SparseLU_Matrix.h
index 5b2c64154..90a0f2740 100644
--- a/Eigen/src/SparseLU/SparseLU_Matrix.h
+++ b/Eigen/src/SparseLU/SparseLU_Matrix.h
@@ -79,6 +79,7 @@ class SuperNodalMatrix
m_nzval_colptr = nzval_colptr.data();
m_rowind = rowind.data();
m_rowind_colptr = rowind_colptr.data();
+ m_nsuper = col_to_sup(n);
m_col_to_sup = col_to_sup.data();
m_sup_to_col = sup_to_col.data();
diff --git a/Eigen/src/SparseLU/SparseLU_column_bmod.h b/Eigen/src/SparseLU/SparseLU_column_bmod.h
index 8dadeaa93..02ea7c360 100644
--- a/Eigen/src/SparseLU/SparseLU_column_bmod.h
+++ b/Eigen/src/SparseLU/SparseLU_column_bmod.h
@@ -133,6 +133,7 @@ int LU_column_bmod(const int jcol, const int nseg, BlockScalarVector& dense, Sca
// Dense triangular solve -- start effective triangle
luptr += nsupr * no_zeros + no_zeros;
// Form Eigen matrix and vector
+// std::cout<< "jcol " << jcol << " rows " << segsize << std::endl;
Map<Matrix<Scalar,Dynamic,Dynamic>, 0, OuterStride<> > A( &(lusup.data()[luptr]), segsize, segsize, OuterStride<>(nsupr) );
VectorBlock<ScalarVector> u(tempv, 0, segsize);
diff --git a/Eigen/src/SparseLU/SparseLU_pruneL.h b/Eigen/src/SparseLU/SparseLU_pruneL.h
index 42218ba4a..91c795fac 100644
--- a/Eigen/src/SparseLU/SparseLU_pruneL.h
+++ b/Eigen/src/SparseLU/SparseLU_pruneL.h
@@ -123,7 +123,7 @@ void LU_pruneL(const int jcol, const IndexVector& perm_r, const int pivrow, cons
if (perm_r(lsub(kmax)) == IND_EMPTY)
kmax--;
else if ( perm_r(lsub(kmin)) != IND_EMPTY)
- kmin--;
+ kmin++;
else
{
// kmin below pivrow (not yet pivoted), and kmax
diff --git a/bench/spbench/test_sparseLU.cpp b/bench/spbench/test_sparseLU.cpp
index 0bbbb0627..4727cc12b 100644
--- a/bench/spbench/test_sparseLU.cpp
+++ b/bench/spbench/test_sparseLU.cpp
@@ -52,6 +52,7 @@ int main(int argc, char **args)
}
/* Compute the factorization */
+ solver.isSymmetric(true);
solver.compute(A);
solver._solve(b, x);