From 7f1fdd3934454dd860471850b9d8324ddae26108 Mon Sep 17 00:00:00 2001 From: Holger Vogt Date: Fri, 20 Aug 2021 17:09:20 +0200 Subject: [PATCH] Don't do optran, if command optran is not given. --- src/spicelib/analysis/optran.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/spicelib/analysis/optran.c b/src/spicelib/analysis/optran.c index 27360fcfb..418bde123 100644 --- a/src/spicelib/analysis/optran.c +++ b/src/spicelib/analysis/optran.c @@ -45,6 +45,7 @@ static int OPbreakSize; static double opfinaltime = 1e-6; static double opstepsize = 1e-8; static double opramptime = 0.; +static bool nooptran = TRUE; /* command to set the 6 optran flags CKTnoOpIter (default 0, set by 'option noopiter') @@ -68,6 +69,7 @@ void com_optran(wordlist* wl) { fprintf(cp_err, "Error: no circuit loaded\n"); return; } + nooptran = FALSE; /* wordlist with 6 parameters */ optrancom = strtol(wltmp->wl_word, &stpstr, 10); if ((errno == ERANGE) || (*stpstr != '\0')) @@ -240,6 +242,11 @@ OPtran(CKTcircuit *ckt) #if defined SHARED_MODULE int redostep; #endif + + /* if optran command has not been given (in .spiceinit or in .control section, + we don' use optran */ + if (nooptran) + return 1; /* ACAN *acjob = (ACAN *) ckt->CKTcurJob; TRANan *trjob = (TRANan *) ckt->CKTcurJob;