mirror of
https://gitlab.com/libeigen/eigen.git
synced 2025-01-30 17:40:05 +08:00
Propagate precondition info to the iterative solver.
This commit is contained in:
parent
db0f5c9d90
commit
506964fc29
@ -95,6 +95,8 @@ class DiagonalPreconditioner
|
||||
&& "DiagonalPreconditioner::solve(): invalid number of rows of the right hand side matrix b");
|
||||
return Solve<DiagonalPreconditioner, Rhs>(*this, b.derived());
|
||||
}
|
||||
|
||||
ComputationInfo info() { return Success; }
|
||||
|
||||
protected:
|
||||
Vector m_invdiag;
|
||||
@ -161,6 +163,8 @@ class LeastSquareDiagonalPreconditioner : public DiagonalPreconditioner<_Scalar>
|
||||
{
|
||||
return factorize(mat);
|
||||
}
|
||||
|
||||
ComputationInfo info() { return Success; }
|
||||
|
||||
protected:
|
||||
};
|
||||
@ -190,6 +194,8 @@ class IdentityPreconditioner
|
||||
|
||||
template<typename Rhs>
|
||||
inline const Rhs& solve(const Rhs& b) const { return b; }
|
||||
|
||||
ComputationInfo info() { return Success; }
|
||||
};
|
||||
|
||||
} // end namespace Eigen
|
||||
|
@ -232,7 +232,7 @@ void IncompleteLUT<Scalar,StorageIndex>::analyzePattern(const _MatrixType& amat)
|
||||
|
||||
m_analysisIsOk = true;
|
||||
m_factorizationIsOk = false;
|
||||
m_isInitialized = false;
|
||||
m_isInitialized = true;
|
||||
}
|
||||
|
||||
template <typename Scalar, typename StorageIndex>
|
||||
@ -441,7 +441,6 @@ void IncompleteLUT<Scalar,StorageIndex>::factorize(const _MatrixType& amat)
|
||||
m_lu.makeCompressed();
|
||||
|
||||
m_factorizationIsOk = true;
|
||||
m_isInitialized = m_factorizationIsOk;
|
||||
m_info = Success;
|
||||
}
|
||||
|
||||
|
@ -74,7 +74,7 @@ public:
|
||||
m_preconditioner.analyzePattern(mp_matrix);
|
||||
m_isInitialized = true;
|
||||
m_analysisIsOk = true;
|
||||
m_info = Success;
|
||||
m_info = m_preconditioner.info();
|
||||
return derived();
|
||||
}
|
||||
|
||||
@ -94,7 +94,7 @@ public:
|
||||
grab(A.derived());
|
||||
m_preconditioner.factorize(mp_matrix);
|
||||
m_factorizationIsOk = true;
|
||||
m_info = Success;
|
||||
m_info = m_preconditioner.info();
|
||||
return derived();
|
||||
}
|
||||
|
||||
@ -116,7 +116,7 @@ public:
|
||||
m_isInitialized = true;
|
||||
m_analysisIsOk = true;
|
||||
m_factorizationIsOk = true;
|
||||
m_info = Success;
|
||||
m_info = m_preconditioner.info();
|
||||
return derived();
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user