use SP_VOLTAGE instead of literal value `3'

(grep "git --no-pager grep -nH -e '->[ \t]*type.*[0-9]'")
This commit is contained in:
rlar 2013-02-03 15:52:49 +01:00
parent b3847817a1
commit 8a154a7a9a
7 changed files with 9 additions and 9 deletions

View File

@ -38,7 +38,7 @@ NIconvTest(CKTcircuit *ckt)
node = node->next;
new = ckt->CKTrhs [i] ;
old = ckt->CKTrhsOld [i] ;
if(node->type == 3) {
if(node->type == SP_VOLTAGE) {
tol = ckt->CKTreltol * (MAX(fabs(old),fabs(new))) +
ckt->CKTvoltTol;
if (fabs(new-old) >tol ) {

View File

@ -25,7 +25,7 @@ CKTncDump(
new = ckt->CKTrhsOld [i] ;
old = ckt->CKTrhs [i] ;
fprintf(stdout,"%-30s %20g %20g", node->name, new, old);
if(node->type == 3) {
if(node->type == SP_VOLTAGE) {
tol = ckt->CKTreltol * (MAX(fabs(old),fabs(new))) +
ckt->CKTvoltTol;
} else {

View File

@ -81,7 +81,7 @@ CKTtrunc(CKTcircuit *ckt, double *timeStep)
tol = MAX( fabs(ckt->CKTrhs[i]),fabs(ckt->CKTpred[i]))*
ckt->CKTlteReltol+ckt->CKTlteAbstol;
node = node->next;
if(node->type!= 3) continue;
if(node->type!= SP_VOLTAGE) continue;
diff = ckt->CKTrhs[i]-ckt->CKTpred[i];
#ifdef STEPDEBUG
printf("%s: cor=%g, pred=%g ",node->name,
@ -106,7 +106,7 @@ CKTtrunc(CKTcircuit *ckt, double *timeStep)
tol = MAX( fabs(ckt->CKTrhs[i]),fabs(ckt->CKTpred[i]))*
ckt->CKTlteReltol+ckt->CKTlteAbstol;
node = node->next;
if(node->type!= 3) continue;
if(node->type!= SP_VOLTAGE) continue;
diff = ckt->CKTrhs[i]-ckt->CKTpred[i];
#ifdef STEPDEBUG
printf("%s: cor=%g, pred=%g ",node->name,ckt->CKTrhs[i],
@ -141,7 +141,7 @@ CKTtrunc(CKTcircuit *ckt, double *timeStep)
}
for(i=1;i<size;i++) {
node = node->next;
if(node->type!= 3) continue;
if(node->type!= SP_VOLTAGE) continue;
tol = MAX( fabs(ckt->CKTrhs[i]),fabs(ckt->CKTpred[i]))*
ckt->CKTlteReltol+ckt->CKTlteAbstol;
diff = (ckt->CKTrhs[i]-ckt->CKTpred[i]);

View File

@ -95,7 +95,7 @@ DCop(CKTcircuit *ckt, int notused)
new = ckt->CKTrhsOld [i] ;
old = ckt->CKTrhs [i] ;
fprintf(stdout,"%-30s %20g %20g", node->name, new, old);
if(node->type == 3) {
if(node->type == SP_VOLTAGE) {
tol = ckt->CKTreltol * (MAX(fabs(old),fabs(new))) +
ckt->CKTvoltTol;
} else {

View File

@ -308,7 +308,7 @@ DCpss(CKTcircuit *ckt,
new = ckt->CKTrhsOld [i] ;
old = ckt->CKTrhs [i] ;
fprintf(stdout,"%-30s %20g %20g", node->name, new, old);
if(node->type == 3) {
if(node->type == SP_VOLTAGE) {
tol = ckt->CKTreltol * (MAX(fabs(old),fabs(new))) +
ckt->CKTvoltTol;
} else {

View File

@ -237,7 +237,7 @@ DCtran(CKTcircuit *ckt,
new = ckt->CKTrhsOld [i] ;
old = ckt->CKTrhs [i] ;
fprintf(stdout,"%-30s %20g %20g", node->name, new, old);
if(node->type == 3) {
if(node->type == SP_VOLTAGE) {
tol = ckt->CKTreltol * (MAX(fabs(old),fabs(new))) +
ckt->CKTvoltTol;
} else {

View File

@ -75,7 +75,7 @@ INPpas3(CKTcircuit *ckt, card *data, INPtables *tab, TSKtask *task,
if ( cieq(name, "all")) {
ptemp.rValue = INPevaluate(&line,&error,1);
for (node1 = ckt->CKTnodes; node1 != NULL; node1 = node1->next) {
if ((node1->type == 3) && (node1->number > 0))
if ((node1->type == SP_VOLTAGE) && (node1->number > 0))
IFC(setNodeParm, (ckt, node1, which, &ptemp, NULL));
}
break;