From 0ecd6333340c0e6235c63d18236046ed0f5de543 Mon Sep 17 00:00:00 2001 From: h_vogt Date: Fri, 28 Dec 2012 21:19:20 +0100 Subject: [PATCH] dcpss.c : compatibility to MS Visual Studio C vngspice.vcproj, config.h: add PSS to Vc project --- src/spicelib/analysis/dcpss.c | 10 +++++++--- visualc/include/ngspice/config.h | 3 +++ visualc/vngspice.vcproj | 16 ++++++++++++++++ 3 files changed, 26 insertions(+), 3 deletions(-) diff --git a/src/spicelib/analysis/dcpss.c b/src/spicelib/analysis/dcpss.c index b3882d92a..1e8f7a5f9 100644 --- a/src/spicelib/analysis/dcpss.c +++ b/src/spicelib/analysis/dcpss.c @@ -628,6 +628,8 @@ DCpss(CKTcircuit *ckt, case SHOOTING: { + double offset, interval, nextBreak ; + int i ; /* Calculation of error norms of RHS solution of every accepted nextTime */ err = 0 ; for (i = 0 ; i < msize ; i++) @@ -685,9 +687,9 @@ DCpss(CKTcircuit *ckt, /* Force the tran analysis to evaluate requested breakpoints. Breakpoints are even more closer as the next occurence of guessed period is approaching. La lunga notte dei robot viventi... */ - double offset, interval, nextBreak ; +/* double offset, interval, nextBreak ; int i ; - +*/ if ((ckt->CKTtime > time_temp + (1 / ckt->CKTguessedFreq) * 0.995) && (ckt->CKTtime <= time_temp + (1 / ckt->CKTguessedFreq))) { offset = time_temp + (1 / ckt->CKTguessedFreq) * 0.995 ; @@ -740,6 +742,8 @@ DCpss(CKTcircuit *ckt, /* If evolution is near shooting... */ if ((AlmostEqualUlps (ckt->CKTtime, time_temp + 1 / ckt->CKTguessedFreq, 10)) || (ckt->CKTtime > time_temp + 1 / ckt->CKTguessedFreq)) { + int excessive_err_nodes = 0 ; + /* Calculation of error norms of RHS solution of every accepted nextTime */ predsum = 0 ; for (i = 0 ; i < msize ; i++) @@ -769,7 +773,7 @@ DCpss(CKTcircuit *ckt, } - int excessive_err_nodes = 0 ; +// int excessive_err_nodes = 0 ; if (shooting_cycle_counter == 0) { diff --git a/visualc/include/ngspice/config.h b/visualc/include/ngspice/config.h index 516c891c6..17c910db9 100644 --- a/visualc/include/ngspice/config.h +++ b/visualc/include/ngspice/config.h @@ -538,6 +538,9 @@ /* Define if we want spice2 sensitivity analysis */ /* #undef WANT_SENSE2 */ +/* Define if you want PSS analysis */ +#define WITH_PSS /**/ + /* The xspice enhancements */ #define XSPICE 1 diff --git a/visualc/vngspice.vcproj b/visualc/vngspice.vcproj index 9ae466145..92e1638e6 100644 --- a/visualc/vngspice.vcproj +++ b/visualc/vngspice.vcproj @@ -5248,6 +5248,10 @@ RelativePath="..\src\spicelib\analysis\dcosetp.c" > + + @@ -7856,6 +7860,18 @@ RelativePath="..\src\spicelib\devices\jfet2\psmodel.c" > + + + + + +