diff --git a/src/spicelib/analysis/dctrcurv.c b/src/spicelib/analysis/dctrcurv.c index 66311b8a2..dec1e4475 100644 --- a/src/spicelib/analysis/dctrcurv.c +++ b/src/spicelib/analysis/dctrcurv.c @@ -281,7 +281,7 @@ DCtrCurv(CKTcircuit *ckt, int restart) } else if (job->TRCVvType[i] == rcode) { ((RESinstance *)(job->TRCVvElt[i]))->RESresist = job->TRCVvStart[i]; - RESupdate_conduct((RESinstance *)(job->TRCVvElt[i])); + RESupdate_conduct((RESinstance *)(job->TRCVvElt[i]), FALSE); DEVices[rcode]->DEVload(job->TRCVvElt[i]->GENmodPtr, ckt); } @@ -461,7 +461,7 @@ DCtrCurv(CKTcircuit *ckt, int restart) } else if (job->TRCVvType[i] == rcode) { /* resistance */ ((RESinstance*)(job->TRCVvElt[i]))->RESresist += job->TRCVvStep[i]; - RESupdate_conduct((RESinstance *)(job->TRCVvElt[i])); + RESupdate_conduct((RESinstance *)(job->TRCVvElt[i]), FALSE); DEVices[rcode]->DEVload(job->TRCVvElt[i]->GENmodPtr, ckt); } else if (job->TRCVvType[i] == TEMP_CODE) { /* temperature */ ckt->CKTtemp += job->TRCVvStep[i]; @@ -496,7 +496,7 @@ DCtrCurv(CKTcircuit *ckt, int restart) } else if (job->TRCVvType[i] == rcode) { /* Resistance */ ((RESinstance*)(job->TRCVvElt[i]))->RESresist = job->TRCVvSave[i]; ((RESinstance*)(job->TRCVvElt[i]))->RESresGiven = (job->TRCVgSave[i] != 0); - RESupdate_conduct((RESinstance *)(job->TRCVvElt[i])); + RESupdate_conduct((RESinstance *)(job->TRCVvElt[i]), TRUE); DEVices[rcode]->DEVload(job->TRCVvElt[i]->GENmodPtr, ckt); } else if (job->TRCVvType[i] == TEMP_CODE) { ckt->CKTtemp = job->TRCVvSave[i]; diff --git a/src/spicelib/devices/res/resdefs.h b/src/spicelib/devices/res/resdefs.h index b9b0c7d3f..b92922bde 100644 --- a/src/spicelib/devices/res/resdefs.h +++ b/src/spicelib/devices/res/resdefs.h @@ -187,6 +187,6 @@ typedef struct sRESmodel { /* model structure for a resistor */ #include "resext.h" -extern void RESupdate_conduct(RESinstance *); +extern void RESupdate_conduct(RESinstance *, bool spill_warnings); #endif /*RES*/ diff --git a/src/spicelib/devices/res/resparam.c b/src/spicelib/devices/res/resparam.c index 0f8ed9ec5..1385a71b9 100644 --- a/src/spicelib/devices/res/resparam.c +++ b/src/spicelib/devices/res/resparam.c @@ -85,6 +85,6 @@ RESparam(int param, IFvalue *value, GENinstance *inst, IFvalue *select) default: return(E_BADPARM); } - RESupdate_conduct(here); + RESupdate_conduct(here, FALSE); return(OK); } diff --git a/src/spicelib/devices/res/restemp.c b/src/spicelib/devices/res/restemp.c index 6fa3f36c5..fbaf28205 100644 --- a/src/spicelib/devices/res/restemp.c +++ b/src/spicelib/devices/res/restemp.c @@ -42,7 +42,7 @@ REStemp(GENmodel *inModel, CKTcircuit *ckt) printf("%s: Instance temperature specified, dtemp ignored\n", here->RESname); } - RESupdate_conduct(here); + RESupdate_conduct(here, TRUE); } } @@ -51,7 +51,7 @@ REStemp(GENmodel *inModel, CKTcircuit *ckt) void -RESupdate_conduct(RESinstance *here) +RESupdate_conduct(RESinstance *here, bool spill_warnings) { RESmodel *model = here->RESmodPtr; double factor; @@ -67,8 +67,9 @@ RESupdate_conduct(RESinstance *here) } else if (model->RESresGiven) { here->RESresist = model->RESres; } else { - SPfrontEnd->IFerrorf (ERR_WARNING, - "%s: resistance to low, set to 1 mOhm", here->RESname); + if (spill_warnings) + SPfrontEnd->IFerrorf (ERR_WARNING, + "%s: resistance to low, set to 1 mOhm", here->RESname); here->RESresist = 1e-03; } }