From de2544cc9bb9955d1ca9da50ed7c83a8a0856adf Mon Sep 17 00:00:00 2001 From: Desire NUENTSA Date: Tue, 10 Jul 2012 19:16:57 +0200 Subject: [PATCH] working version of sparse LU without fill-reducing permutation --- Eigen/src/SparseLU/SparseLU.h | 6 +++--- Eigen/src/SparseLU/SparseLU_panel_bmod.h | 2 -- Eigen/src/SparseLU/SparseLU_panel_dfs.h | 2 +- 3 files changed, 4 insertions(+), 6 deletions(-) diff --git a/Eigen/src/SparseLU/SparseLU.h b/Eigen/src/SparseLU/SparseLU.h index 8fbb794ff8..3bd85930cb 100644 --- a/Eigen/src/SparseLU/SparseLU.h +++ b/Eigen/src/SparseLU/SparseLU.h @@ -234,7 +234,7 @@ class SparseLU { for (jcol = fsupc; jcol < fsupc + nsupc; jcol++) { - for (i = m_Ustore.outerIndexPtr()[jcol]; i < m_Ustore.outerIndexPtr()[jcol]; i++) + for (i = m_Ustore.outerIndexPtr()[jcol]; i < m_Ustore.outerIndexPtr()[jcol+1]; i++) { irow = m_Ustore.innerIndexPtr()[i]; X(irow, j) -= X(jcol, j) * m_Ustore.valuePtr()[i]; @@ -454,7 +454,7 @@ void SparseLU::factorize(const MatrixType& matrix) IndexVector xplore(m); IndexVector repfnz(maxpanel); IndexVector panel_lsub(maxpanel); - IndexVector xprune(n); + IndexVector xprune(n); xprune.setZero(); IndexVector marker(m*LU_NO_MARKER); repfnz.setConstant(-1); @@ -642,7 +642,7 @@ void SparseLU::factorize(const MatrixType& matrix) for (i = 0; i < nseg; i++) { irep = segrep(i); - repfnz(irep) = IND_EMPTY; + repfnz_k(irep) = IND_EMPTY; } } // end SparseLU within the panel jcol += panel_size; // Move to the next panel diff --git a/Eigen/src/SparseLU/SparseLU_panel_bmod.h b/Eigen/src/SparseLU/SparseLU_panel_bmod.h index 9861efa2c8..59ec69ec86 100644 --- a/Eigen/src/SparseLU/SparseLU_panel_bmod.h +++ b/Eigen/src/SparseLU/SparseLU_panel_bmod.h @@ -132,7 +132,6 @@ void LU_panel_bmod(const int m, const int w, const int jcol, const int nseg, Sca luptr += nsupr * no_zeros + no_zeros; // triangular solve with Eigen Map, 0, OuterStride<> > A( &(lusup.data()[luptr]), segsize, segsize, OuterStride<>(nsupr) ); - std::cout<< " Matrix \n" << A << std::endl; VectorBlock u(tempv, 0, segsize); u = A.template triangularView().solve(u); @@ -165,7 +164,6 @@ void LU_panel_bmod(const int m, const int w, const int jcol, const int nseg, Sca l(i) = Scalar(0); ++isub; } - std::cout<< jj << " : " << dense_col.transpose() << std::endl; } // End for each column in the panel } // End for each updating supernode diff --git a/Eigen/src/SparseLU/SparseLU_panel_dfs.h b/Eigen/src/SparseLU/SparseLU_panel_dfs.h index f7a93ab488..908ee67acb 100644 --- a/Eigen/src/SparseLU/SparseLU_panel_dfs.h +++ b/Eigen/src/SparseLU/SparseLU_panel_dfs.h @@ -126,7 +126,7 @@ void LU_panel_dfs(const int m, const int w, const int jcol, MatrixType& A, Index } else { - // krow is in U : if its supĀ²ernode-representative krep + // krow is in U : if its supernode-representative krep // has been explored, update repfnz(*) krep = xsup(supno(kperm)+1) - 1; myfnz = repfnz_col(krep);