17 changed files with 205 additions and 62 deletions
-
2configure.in
-
2src/Makefile.am
-
46src/maths/ni/niiter.c
-
1src/spicelib/analysis/Makefile.am
-
7src/spicelib/analysis/acan.c
-
4src/spicelib/analysis/cktload.c
-
46src/spicelib/analysis/cktncdump.c
-
6src/spicelib/analysis/cktop.c
-
7src/spicelib/analysis/dcop.c
-
9src/spicelib/analysis/dctran.c
-
4src/spicelib/analysis/noisean.c
-
2src/spicelib/analysis/traninit.c
-
2src/spicelib/devices/Makefile.am
-
72src/spicelib/devices/dev.c
-
1src/spicelib/parser/inp2m.c
-
13src/spicelib/parser/inp2q.c
-
43src/spicelib/parser/inpdomod.c
@ -0,0 +1,46 @@ |
|||||
|
/********** |
||||
|
Copyright 1999 AG inc. All rights reserved. |
||||
|
Author: 1999 Alan Gillespie |
||||
|
**********/ |
||||
|
|
||||
|
#include "spice.h" |
||||
|
#include <stdio.h> |
||||
|
#include "cktdefs.h" |
||||
|
#include "util.h" |
||||
|
#include "misc.h" |
||||
|
#include "suffix.h" |
||||
|
|
||||
|
void |
||||
|
CKTncDump(ckt) |
||||
|
CKTcircuit *ckt; |
||||
|
{ |
||||
|
CKTnode *node; |
||||
|
double new, old, tol; |
||||
|
int i=1; |
||||
|
|
||||
|
fprintf(stdout,"\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") || !strstr(node->name, "#")) { |
||||
|
new = *((ckt->CKTrhsOld) + i ) ; |
||||
|
old = *((ckt->CKTrhs) + i ) ; |
||||
|
fprintf(stdout,"%-30s %20g %20g", node->name, new, old); |
||||
|
if(node->type == 3) { |
||||
|
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"); |
||||
|
} |
||||
Write
Preview
Loading…
Cancel
Save
Reference in new issue