From e755b45281c4efe101c6f8aa7de03f5e97c24c6c Mon Sep 17 00:00:00 2001 From: rlar Date: Sun, 22 Mar 2015 20:22:01 +0100 Subject: [PATCH] fix commit "noise analysis, bug fix, override ac magnitude of all vsrc/isrc devices" --- src/spicelib/devices/isrc/isrcacld.c | 11 ++++++++--- src/spicelib/devices/vsrc/vsrcacld.c | 11 ++++++++--- 2 files changed, 16 insertions(+), 6 deletions(-) diff --git a/src/spicelib/devices/isrc/isrcacld.c b/src/spicelib/devices/isrc/isrcacld.c index e7e8a5611..48fa57402 100644 --- a/src/spicelib/devices/isrc/isrcacld.c +++ b/src/spicelib/devices/isrc/isrcacld.c @@ -25,9 +25,14 @@ ISRCacLoad(GENmodel *inModel, CKTcircuit *ckt) double acReal, acImag; - if ((ckt->CKTmode & MODEACNOISE) && ((GENinstance *) here == ckt->noise_input)) { - acReal = 1.0; - acImag = 0.0; + if (ckt->CKTmode & MODEACNOISE) { + if ((GENinstance *) here == ckt->noise_input) { + acReal = 1.0; + acImag = 0.0; + } else { + acReal = 0.0; + acImag = 0.0; + } } else { acReal = here->ISRCacReal; acImag = here->ISRCacImag; diff --git a/src/spicelib/devices/vsrc/vsrcacld.c b/src/spicelib/devices/vsrc/vsrcacld.c index 0ff2ee8f6..fdd45cf3e 100644 --- a/src/spicelib/devices/vsrc/vsrcacld.c +++ b/src/spicelib/devices/vsrc/vsrcacld.c @@ -24,9 +24,14 @@ VSRCacLoad(GENmodel *inModel, CKTcircuit *ckt) double acReal, acImag; - if ((ckt->CKTmode & MODEACNOISE) && ((GENinstance *) here == ckt->noise_input)) { - acReal = 1.0; - acImag = 0.0; + if (ckt->CKTmode & MODEACNOISE) { + if ((GENinstance *) here == ckt->noise_input) { + acReal = 1.0; + acImag = 0.0; + } else { + acReal = 0.0; + acImag = 0.0; + } } else { acReal = here->VSRCacReal; acImag = here->VSRCacImag;