From ecdb3b9eb459fef456e8c3245b58b22fb1aea721 Mon Sep 17 00:00:00 2001 From: Holger Vogt Date: Sun, 24 May 2020 16:26:03 +0200 Subject: [PATCH] set the task values, not the ckt values, because task is called only afterwards when the simulation command is given. --- src/spicelib/analysis/optran.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/src/spicelib/analysis/optran.c b/src/spicelib/analysis/optran.c index 540350338..448776d1b 100644 --- a/src/spicelib/analysis/optran.c +++ b/src/spicelib/analysis/optran.c @@ -51,15 +51,18 @@ void com_optran(wordlist* wl) { /* current circuit */ CKTcircuit* cckt = ft_curckt->ci_ckt; /* wordlist with 6 parameters */ - cckt->CKTnoOpIter = strtol(wltmp->wl_word, &stpstr, 10); + ft_curckt->ci_defTask->TSKnoOpIter = strtol(wltmp->wl_word, &stpstr, 10); +// cckt->CKTnoOpIter = strtol(wltmp->wl_word, &stpstr, 10); if ((errno == ERANGE) || (*stpstr != '\0')) goto bugquit; wltmp = wltmp->wl_next; - cckt->CKTnumGminSteps = strtol(wltmp->wl_word, &stpstr, 10); + ft_curckt->ci_defTask->TSKnumGminSteps = strtol(wltmp->wl_word, &stpstr, 10); +// cckt->CKTnumGminSteps = strtol(wltmp->wl_word, &stpstr, 10); if ((errno == ERANGE) || (*stpstr != '\0')) goto bugquit; wltmp = wltmp->wl_next; - cckt->CKTnumSrcSteps = strtol(wltmp->wl_word, &stpstr, 10); + ft_curckt->ci_defTask->TSKnumSrcSteps = strtol(wltmp->wl_word, &stpstr, 10); +// cckt->CKTnumSrcSteps = strtol(wltmp->wl_word, &stpstr, 10); if ((errno == ERANGE) || (*stpstr != '\0')) goto bugquit; wltmp = wltmp->wl_next; @@ -78,7 +81,7 @@ void com_optran(wordlist* wl) { fprintf(stderr, "Error: Step size larger than final time.\n"); goto bugquit; } - if (opstepsize < opfinaltime/50.) { + if (opstepsize > opfinaltime/50.) { fprintf(stderr, "Warning: Step size potentially too small.\n"); } if (opramptime > opfinaltime) {