If compatmode hs is set, don't run an extra iteration with
differing mode settings, but go directly to CKTop(). If other or none compat modes, keep existing behavior, as for example CIDER example may otherwise slow down significantly. This is to keep dc sim in accordance with other simulators.
This commit is contained in:
parent
37944bd7c4
commit
03905433bb
|
|
@ -14,6 +14,7 @@ Modified: 1999 Paolo Nenzi
|
|||
#include "ngspice/const.h"
|
||||
#include "ngspice/sperror.h"
|
||||
#include "ngspice/fteext.h"
|
||||
#include "ngspice/compatmode.h"
|
||||
|
||||
#ifdef XSPICE
|
||||
#include "ngspice/evt.h"
|
||||
|
|
@ -297,8 +298,8 @@ DCtrCurv(CKTcircuit *ckt, int restart)
|
|||
if (ckt->evt->counts.num_insts == 0) {
|
||||
/* If no event-driven instances, do what SPICE normally does */
|
||||
#endif
|
||||
converged = NIiter(ckt, ckt->CKTdcTrcvMaxIter);
|
||||
if (converged != 0) {
|
||||
|
||||
if (newcompat.hs) {
|
||||
converged = CKTop(ckt,
|
||||
(ckt->CKTmode & MODEUIC) | MODEDCTRANCURVE | MODEINITJCT,
|
||||
(ckt->CKTmode & MODEUIC) | MODEDCTRANCURVE | MODEINITFLOAT,
|
||||
|
|
@ -306,6 +307,17 @@ DCtrCurv(CKTcircuit *ckt, int restart)
|
|||
if (converged != 0)
|
||||
return(converged);
|
||||
}
|
||||
else {
|
||||
converged = NIiter(ckt, ckt->CKTdcTrcvMaxIter);
|
||||
if (converged != 0) {
|
||||
converged = CKTop(ckt,
|
||||
(ckt->CKTmode & MODEUIC) | MODEDCTRANCURVE | MODEINITJCT,
|
||||
(ckt->CKTmode & MODEUIC) | MODEDCTRANCURVE | MODEINITFLOAT,
|
||||
ckt->CKTdcMaxIter);
|
||||
if (converged != 0)
|
||||
return(converged);
|
||||
}
|
||||
}
|
||||
#ifdef XSPICE
|
||||
}
|
||||
else {
|
||||
|
|
|
|||
Loading…
Reference in New Issue