From 1565695df0838c48cca88aece41a7c7d8d9c9573 Mon Sep 17 00:00:00 2001 From: Holger Vogt Date: Sat, 16 Dec 2023 16:42:51 +0100 Subject: [PATCH] Move 'op' annaouncement to after the the first iteration, as this iteration is also called during dc simulation. --- src/spicelib/analysis/cktop.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/src/spicelib/analysis/cktop.c b/src/spicelib/analysis/cktop.c index 1b52c296b..e6beed177 100644 --- a/src/spicelib/analysis/cktop.c +++ b/src/spicelib/analysis/cktop.c @@ -29,11 +29,6 @@ CKTop (CKTcircuit *ckt, long int firstmode, long int continuemode, { int converged; -#ifdef HAS_PROGREP - if (!ckt->CKTnoOpIter || ckt->CKTnumGminSteps >= 1 || ckt->CKTnumSrcSteps >= 1) - SetAnalyse("op", 0); -#endif - ckt->CKTmode = firstmode; if (!ckt->CKTnoOpIter) { @@ -49,6 +44,10 @@ CKTop (CKTcircuit *ckt, long int firstmode, long int continuemode, converged = 1; /* the 'go directly to gmin stepping' option */ } +#ifdef HAS_PROGREP + if (!ckt->CKTnoOpIter || ckt->CKTnumGminSteps >= 1 || ckt->CKTnumSrcSteps >= 1) + SetAnalyse("op", 0); +#endif /* no convergence on the first try, so we do something else */ /* first, check if we should try gmin stepping */