Before moving to the new building

This commit is contained in:
Desire NUENTSA 2012-06-29 17:45:10 +02:00
parent f0c34c6822
commit 15f1563533
5 changed files with 6 additions and 2 deletions

View File

@ -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;

View File

@ -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();

View File

@ -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);

View File

@ -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

View File

@ -52,6 +52,7 @@ int main(int argc, char **args)
}
/* Compute the factorization */
solver.isSymmetric(true);
solver.compute(A);
solver._solve(b, x);