enable removal of dangling nodes also when MODETRANOP is set.
Removes singular nodes when op before tran is run.
This commit is contained in:
parent
6272cbaf1b
commit
a86356980a
|
|
@ -49,20 +49,25 @@ 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) =
|
||||
|
|
|
|||
Loading…
Reference in New Issue