From dc181dea2e2922c5d1b8f0d30030b1d796fdda00 Mon Sep 17 00:00:00 2001 From: Kevin Zheng Date: Tue, 12 May 2020 12:52:33 -0700 Subject: [PATCH] Remove commented-out code Debug information about non-convergence was moved to CKTncDump(). Remove the duplicate, commented-out code. --- src/spicelib/analysis/dcop.c | 34 ---------------------------------- src/spicelib/analysis/dcpss.c | 30 ------------------------------ src/spicelib/analysis/dctran.c | 30 ------------------------------ 3 files changed, 94 deletions(-) diff --git a/src/spicelib/analysis/dcop.c b/src/spicelib/analysis/dcop.c index 385f740d8..b7781c02a 100644 --- a/src/spicelib/analysis/dcop.c +++ b/src/spicelib/analysis/dcop.c @@ -86,40 +86,6 @@ DCop(CKTcircuit *ckt, int notused) if(converged != 0) { fprintf(stdout,"\nDC solution failed -\n"); CKTncDump(ckt); -/* - CKTnode *node; - double new, old, tol; - int i=1; - - fprintf(stdout,"\nDC solution failed -\n\n"); - fprintf(stdout,"Last Node Voltages\n"); - fprintf(stdout,"------------------\n\n"); - fprintf(stdout,"%-30s %20s %20s\n", "Node", "Last Voltage", - "Previous Iter"); - fprintf(stdout,"%-30s %20s %20s\n", "----", "------------", - "-------------"); - for(node=ckt->CKTnodes->next;node;node=node->next) { - if (strstr(node->name, "#branch") || !strchr(node->name, '#')) { - new = ckt->CKTrhsOld [i] ; - old = ckt->CKTrhs [i] ; - fprintf(stdout,"%-30s %20g %20g", node->name, new, old); - if(node->type == SP_VOLTAGE) { - tol = ckt->CKTreltol * (MAX(fabs(old),fabs(new))) + - ckt->CKTvoltTol; - } else { - tol = ckt->CKTreltol * (MAX(fabs(old),fabs(new))) + - ckt->CKTabstol; - } - if (fabs(new-old) >tol ) { - fprintf(stdout," *"); - } - fprintf(stdout,"\n"); - } - i++; - } - fprintf(stdout,"\n"); - SPfrontEnd->OUTendPlot (plot); */ - return(converged); } diff --git a/src/spicelib/analysis/dcpss.c b/src/spicelib/analysis/dcpss.c index adde7f581..ecc82dbd8 100644 --- a/src/spicelib/analysis/dcpss.c +++ b/src/spicelib/analysis/dcpss.c @@ -288,36 +288,6 @@ DCpss(CKTcircuit *ckt, if(converged != 0) { fprintf(stdout,"\nTransient solution failed -\n"); CKTncDump(ckt); -/* CKTnode *node; - double new, old, tol; - int i=1; - - fprintf(stdout,"\nTransient solution failed -\n\n"); - fprintf(stdout,"Last Node Voltages\n"); - fprintf(stdout,"------------------\n\n"); - fprintf(stdout,"%-30s %20s %20s\n", "Node", "Last Voltage", - "Previous Iter"); - fprintf(stdout,"%-30s %20s %20s\n", "----", "------------", - "-------------"); - for(node=ckt->CKTnodes->next;node;node=node->next) { - if (strstr(node->name, "#branch") || !strchr(node->name, '#')) { - new = ckt->CKTrhsOld [i] ; - old = ckt->CKTrhs [i] ; - fprintf(stdout,"%-30s %20g %20g", node->name, new, old); - if(node->type == SP_VOLTAGE) { - tol = ckt->CKTreltol * (MAX(fabs(old),fabs(new))) + - ckt->CKTvoltTol; - } else { - tol = ckt->CKTreltol * (MAX(fabs(old),fabs(new))) + - ckt->CKTabstol; - } - if (fabs(new-old) >tol ) { - fprintf(stdout," *"); - } - fprintf(stdout,"\n"); - } - i++; - } */ fprintf(stdout,"\n"); fflush(stdout); } else if (!ft_noacctprint && !ft_noinitprint) { diff --git a/src/spicelib/analysis/dctran.c b/src/spicelib/analysis/dctran.c index 6e6a03f77..4170a9a60 100644 --- a/src/spicelib/analysis/dctran.c +++ b/src/spicelib/analysis/dctran.c @@ -229,36 +229,6 @@ DCtran(CKTcircuit *ckt, if(converged != 0) { fprintf(stdout,"\nTransient solution failed -\n"); CKTncDump(ckt); -/* CKTnode *node; - double new, old, tol; - int i=1; - - fprintf(stdout,"\nTransient solution failed -\n\n"); - fprintf(stdout,"Last Node Voltages\n"); - fprintf(stdout,"------------------\n\n"); - fprintf(stdout,"%-30s %20s %20s\n", "Node", "Last Voltage", - "Previous Iter"); - fprintf(stdout,"%-30s %20s %20s\n", "----", "------------", - "-------------"); - for(node=ckt->CKTnodes->next;node;node=node->next) { - if (strstr(node->name, "#branch") || !strchr(node->name, '#')) { - new = ckt->CKTrhsOld [i] ; - old = ckt->CKTrhs [i] ; - fprintf(stdout,"%-30s %20g %20g", node->name, new, old); - if(node->type == SP_VOLTAGE) { - tol = ckt->CKTreltol * (MAX(fabs(old),fabs(new))) + - ckt->CKTvoltTol; - } else { - tol = ckt->CKTreltol * (MAX(fabs(old),fabs(new))) + - ckt->CKTabstol; - } - if (fabs(new-old) >tol ) { - fprintf(stdout," *"); - } - fprintf(stdout,"\n"); - } - i++; - } */ fprintf(stdout,"\n"); fflush(stdout); } else if (!ft_noacctprint && !ft_noinitprint) {