a new variant of a fix, don't accept solution if previous one was marked CKTnoncon

this is only a "sketch" for the test-poly-3.cir debugging session.
there are more CKTnoncon in niiter, and all need to be studied/ponderd
  with respect to this "fix"
This commit is contained in:
rlar 2018-01-31 19:17:18 +01:00
parent cf6625a5a8
commit acb7a6dffe
1 changed files with 3 additions and 1 deletions

View File

@ -26,6 +26,7 @@ int
NIiter(CKTcircuit *ckt, int maxIter)
{
double startTime, *OldCKTstate0 = NULL;
int old_noncon;
int error, i, j;
int iterno = 0;
@ -66,6 +67,7 @@ NIiter(CKTcircuit *ckt, int maxIter)
for (;;) {
old_noncon = ckt->CKTnoncon;
ckt->CKTnoncon = 0;
#ifdef NEWPRED
@ -240,7 +242,7 @@ NIiter(CKTcircuit *ckt, int maxIter)
ckt->CKTnoncon = ipass;
ipass = 0;
}
if (ckt->CKTnoncon == 0) {
if (ckt->CKTnoncon == 0 && old_noncon == 0) {
ckt->CKTstat->STATnumIter += iterno;
FREE(OldCKTstate0);
printf("niiter[%d], accepted and return\n", iterno);