From ee38134f637c0a165fa98cb22338dfe80ffb6085 Mon Sep 17 00:00:00 2001 From: Holger Vogt Date: Fri, 31 Jul 2026 14:11:47 +0200 Subject: [PATCH] Revert "enable removal of dangling nodes also when MODETRANOP is set." This reverts commit 4fb403a590666695b23767769519fd2a69976a4d. --- src/spicelib/devices/cap/capload.c | 31 +++++++++++++----------------- 1 file changed, 13 insertions(+), 18 deletions(-) diff --git a/src/spicelib/devices/cap/capload.c b/src/spicelib/devices/cap/capload.c index 0079d3ecc..e0dcecb7a 100644 --- a/src/spicelib/devices/cap/capload.c +++ b/src/spicelib/devices/cap/capload.c @@ -49,25 +49,20 @@ CAPload(GENmodel *inModel, CKTcircuit *ckt) vcap = *(ckt->CKTrhsOld+here->CAPposNode) - *(ckt->CKTrhsOld+here->CAPnegNode) ; } - - if (here->CAPdangling) { - /* Topology reduction: this cap hangs on a - * floating (degree-1) node. Remove it from the system: - * pin the floating node(s) with a unit diagonal so the - * matrix stays nonsingular, and contribute no charge or - * current. This eliminates the spurious LTE pressure - * that otherwise drives "Timestep too small" at the - * dangling node (set in CKTtopologyReduce()). */ - if (here->CAPdangling & 1) - *(here->CAPposPosPtr) += 1.0; - if (here->CAPdangling & 2) - *(here->CAPnegNegPtr) += 1.0; - *(ckt->CKTstate0+here->CAPqcap) = 0.0; - continue; - } - if(ckt->CKTmode & (MODETRAN | MODEAC)) { - + if (here->CAPdangling) { + /* Topology reduction: this cap hangs on a + * floating (degree-1) node. Remove it from the system: + * pin the floating node(s) with a unit diagonal so the + * matrix stays nonsingular, and contribute no charge or + * current. This eliminates the spurious LTE pressure + * that otherwise drives "Timestep too small" at the + * dangling node (set in CKTtopologyReduce()). */ + if (here->CAPdangling & 1) *(here->CAPposPosPtr) += 1.0; + if (here->CAPdangling & 2) *(here->CAPnegNegPtr) += 1.0; + *(ckt->CKTstate0+here->CAPqcap) = 0.0; + continue; + } #ifndef PREDICTOR if(ckt->CKTmode & MODEINITPRED) { *(ckt->CKTstate0+here->CAPqcap) =