From 3cf6857cfc5857d8262105589be2f712997b662e Mon Sep 17 00:00:00 2001 From: Holger Vogt Date: Fri, 17 Sep 2021 12:10:35 +0200 Subject: [PATCH] Fix bug #557 Revise memory allocation for different analysis types --- src/frontend/outitf.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/frontend/outitf.c b/src/frontend/outitf.c index 970926bfc..94a6f7e78 100644 --- a/src/frontend/outitf.c +++ b/src/frontend/outitf.c @@ -1134,12 +1134,12 @@ vlength2delta(int len) /* TSTOP / TSTEP */ int points = ft_curckt->ci_ckt->CKTtimeListSize; /* transient and pss analysis (points > 0) upon start */ - if (len == 0 && points > 0) { + if ((ft_curckt->ci_ckt->CKTmode & MODETRAN) && len == 0 && points > 0) { /* number of timesteps plus some overhead */ return points + 100; } /* transient and pss if original estimate is exceeded */ - else if (points > 0) { + else if ((ft_curckt->ci_ckt->CKTmode & MODETRAN) && points > 0) { /* check where we are */ double timerel = ft_curckt->ci_ckt->CKTtime / ft_curckt->ci_ckt->CKTfinalTime; /* return an estimate of the appropriate number of time points, if more than 20% of @@ -1150,6 +1150,11 @@ vlength2delta(int len) else return len; } + /* op */ + else if (ft_curckt->ci_ckt->CKTmode & MODEDCOP) { + /* op with length 1 */ + return 1; + } /* other analysis types that do not set CKTtimeListSize */ else return 1024;