Sketcher: Solver improvements and bug fixes

===========================================

- Improvement Debug added to redundant solving in Iteration Mode, to show when just one iteration solved the system
- Fix wrong QR information on empty sketch
This commit is contained in:
Abdullah Tahiri
2015-06-20 07:20:53 +02:00
committed by wmayer
parent bae32f74bb
commit 6030da1182

View File

@@ -1776,18 +1776,27 @@ int System::diagnose(Algorithm alg)
if(debugMode==IterationLevel) {
std::stringstream stream;
stream << (qrAlgorithm==EigenSparseQR?"EigenSparseQR":(qrAlgorithm==EigenDenseQR?"DenseQR":""));
if (J.rows() > 0) {
stream << ", Threads: " << Eigen::nbThreads()
#ifdef EIGEN_VECTORIZE
<< ", Vectorization: On"
#endif
<< ", Params: " << paramsNum
<< ", Constr: " << constrNum
<< ", Rank: " << rank << "\n";
}
else {
stream << ", Threads: " << Eigen::nbThreads()
#ifdef EIGEN_VECTORIZE
<< ", Vectorization: On"
#endif
<< ", Empty Sketch, nothing to solve" << "\n";
}
stream << (qrAlgorithm==EigenSparseQR?"EigenSparseQR":(qrAlgorithm==EigenDenseQR?"DenseQR":""));
stream << ", Threads: " << Eigen::nbThreads()
#ifdef EIGEN_VECTORIZE
<< ", Vectorization: On"
#endif
<< ", Params: " << paramsNum
<< ", Constr: " << constrNum
<< ", Rank: " << rank << "\n";
const std::string tmp = stream.str();
Base::Console().Log(tmp.c_str());
Base::Console().Log(tmp.c_str());
}
if (J.rows() > 0) {
@@ -1890,7 +1899,7 @@ int System::diagnose(Algorithm alg)
SubSystem *subSysTmp = new SubSystem(clistTmp, plist);
int res = solve(subSysTmp,true,alg,true);
if(debugMode==Minimal) {
if(debugMode==Minimal || debugMode==IterationLevel) {
std::string solvername;
switch (alg) {
case 0: