When we sre ready, reset CKTmaxstep to its previous value
This commit is contained in:
parent
3956095484
commit
a20afc54a5
|
|
@ -209,7 +209,7 @@ OPtran(CKTcircuit *ckt)
|
||||||
int error;
|
int error;
|
||||||
int save_order;
|
int save_order;
|
||||||
long save_mode;
|
long save_mode;
|
||||||
double maxstepsize = 0.0;
|
double maxstepsize = 0.0, prevmaxstepsize = 0.0;
|
||||||
|
|
||||||
int ltra_num;
|
int ltra_num;
|
||||||
|
|
||||||
|
|
@ -242,6 +242,7 @@ OPtran(CKTcircuit *ckt)
|
||||||
ckt->CKTstep = opfinaltime / 1000.;
|
ckt->CKTstep = opfinaltime / 1000.;
|
||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
|
prevmaxstepsize = ckt->CKTmaxStep;
|
||||||
ckt->CKTmaxStep = ckt->CKTstep = opstepsize;
|
ckt->CKTmaxStep = ckt->CKTstep = opstepsize;
|
||||||
#endif
|
#endif
|
||||||
delta=MIN(opfinaltime/100,ckt->CKTstep)/10;
|
delta=MIN(opfinaltime/100,ckt->CKTstep)/10;
|
||||||
|
|
@ -367,6 +368,7 @@ OPtran(CKTcircuit *ckt)
|
||||||
if(AlmostEqualUlps( optime, opfinaltime, 100 ) ) {
|
if(AlmostEqualUlps( optime, opfinaltime, 100 ) ) {
|
||||||
tfree(opbreaks);
|
tfree(opbreaks);
|
||||||
SPfrontEnd->IFerrorf(ERR_INFO, "Transient op finished successfully");
|
SPfrontEnd->IFerrorf(ERR_INFO, "Transient op finished successfully");
|
||||||
|
ckt->CKTmaxStep = prevmaxstepsize;
|
||||||
return(OK);
|
return(OK);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue