Reverted the previous commit "Corrected a possible bug..."

This commit is contained in:
Francesco Lannutti 2012-11-02 16:59:31 +01:00 committed by Francesco Lannutti
parent 005f86a00a
commit de5e2accea
2 changed files with 17 additions and 15 deletions

View File

@ -232,14 +232,16 @@ SMPluFac (SMPmatrix *Matrix, double PivTol, double Gmin)
LoadGmin_CSC (Matrix->CKTdiag_CSC, Matrix->CKTkluN, Gmin) ;
ret = klu_refactor (Matrix->CKTkluAp, Matrix->CKTkluAi, Matrix->CKTkluAx,
Matrix->CKTkluSymbolic, Matrix->CKTkluNumeric, Matrix->CKTkluCommon) ;
if (ret == 1)
return 0 ;
else if (ret == 0)
return (E_SINGULAR) ;
else {
fprintf (stderr, "KLU Error in re-factor!") ;
return 1 ;
}
return (!ret) ;
// if (ret == 1)
// return 0 ;
// else if (ret == 0)
// return (E_SINGULAR) ;
// else {
// fprintf (stderr, "KLU Error in re-factor!") ;
// return 1 ;
// }
} else {
spSetReal (Matrix->SPmatrix) ;
LoadGmin (Matrix, Gmin) ;

View File

@ -26,8 +26,8 @@ int
NIiter(CKTcircuit *ckt, int maxIter)
{
/* Francesco Lannutti - NEED TO PIVOT Fix */
int SMPreorderFromSMPluFac ;
SMPreorderFromSMPluFac = 0 ;
// int SMPreorderFromSMPluFac ;
// SMPreorderFromSMPluFac = 0 ;
int iterno;
int ipass;
@ -84,12 +84,12 @@ NIiter(CKTcircuit *ckt, int maxIter)
#endif /* NEWPRED */
/* Francesco Lannutti - NEED TO PIVOT Fix */
error = 0 ;
if (!SMPreorderFromSMPluFac)
{
// error = 0 ;
// if (!SMPreorderFromSMPluFac)
// {
error = CKTload (ckt) ;
iterno++ ;
}
// }
/*printf("loaded, noncon is %d\n",ckt->CKTnoncon);*/
/*fflush(stdout);*/
@ -156,7 +156,7 @@ NIiter(CKTcircuit *ckt, int maxIter)
if( error == E_SINGULAR ) {
/* Francesco Lannutti - NEED TO PIVOT Fix */
SMPreorderFromSMPluFac = 1 ;
// SMPreorderFromSMPluFac = 1 ;
ckt->CKTniState |= NISHOULDREORDER;
DEBUGMSG(" forced reordering....\n");