diff --git a/src/spicelib/devices/hicum2/hicum2acld.c b/src/spicelib/devices/hicum2/hicum2acld.c index 59aa27679..aaa631ed4 100644 --- a/src/spicelib/devices/hicum2/hicum2acld.c +++ b/src/spicelib/devices/hicum2/hicum2acld.c @@ -121,8 +121,8 @@ HICUMacLoad(GENmodel *inModel, CKTcircuit *ckt) /* loop through all the models */ for( ; model != NULL; model = HICUMnextModel(model)) { - int selfheat = ( (model->HICUMflsh > 0) && (model->HICUMrthGiven) && (model->HICUMrth > 0.0)); - int nqs = ( (model->HICUMflnqs != 0 || model->HICUMflcomp < 2.3) && (model->HICUMalit > 0 || model->HICUMalqf > 0)); + int selfheat = ((model->HICUMflsh > 0) && (model->HICUMrthGiven) && (model->HICUMrth > 0.0)); + int nqs = ((model->HICUMflnqs != 0 || model->HICUMflcomp < 2.3) && (model->HICUMt0Given) && (model->HICUMt0 > 0.0) && (model->HICUMalit > 0 || model->HICUMalqf > 0)); /* loop through all the instances of the model */ for( here = HICUMinstances(model); here!= NULL; diff --git a/src/spicelib/devices/hicum2/hicum2pzld.c b/src/spicelib/devices/hicum2/hicum2pzld.c index c447b6662..5c9d08dea 100644 --- a/src/spicelib/devices/hicum2/hicum2pzld.c +++ b/src/spicelib/devices/hicum2/hicum2pzld.c @@ -122,8 +122,8 @@ HICUMpzLoad(GENmodel *inModel, CKTcircuit *ckt, SPcomplex *s) /* loop through all the models */ for( ; model != NULL; model = HICUMnextModel(model)) { - int selfheat = ( (model->HICUMflsh > 0) && (model->HICUMrthGiven) && (model->HICUMrth > 0.0)); - int nqs = ( (model->HICUMflnqs != 0 || model->HICUMflcomp < 2.3) && (model->HICUMalit > 0 || model->HICUMalqf > 0)); + int selfheat = ((model->HICUMflsh > 0) && (model->HICUMrthGiven) && (model->HICUMrth > 0.0)); + int nqs = ((model->HICUMflnqs != 0 || model->HICUMflcomp < 2.3) && (model->HICUMt0Given) && (model->HICUMt0 > 0.0) && (model->HICUMalit > 0 || model->HICUMalqf > 0)); /* loop through all the instances of the model */ for( here = HICUMinstances(model); here!= NULL; diff --git a/src/spicelib/devices/hicum2/hicum2setup.c b/src/spicelib/devices/hicum2/hicum2setup.c index d9920e9ae..107d6641d 100644 --- a/src/spicelib/devices/hicum2/hicum2setup.c +++ b/src/spicelib/devices/hicum2/hicum2setup.c @@ -474,7 +474,7 @@ HICUMsetup(SMPmatrix *matrix, GENmodel *inModel, CKTcircuit *ckt, int *states) model->HICUMvceMax = 1e99; int selfheat = (((model->HICUMflsh == 1) || (model->HICUMflsh == 2)) && (model->HICUMrthGiven) && (model->HICUMrth > 0.0)); - int nqs = ( (model->HICUMflnqs != 0 || model->HICUMflcomp < 2.3) && (model->HICUMalit > 0 || model->HICUMalqf > 0)); + int nqs = ((model->HICUMflnqs != 0 || model->HICUMflcomp < 2.3) && (model->HICUMt0Given) && (model->HICUMt0 > 0.0) && (model->HICUMalit > 0 || model->HICUMalqf > 0)); /* loop through all the instances of the model */ for (here = HICUMinstances(model); here != NULL ; diff --git a/src/spicelib/devices/hicum2/hicumL2.cpp b/src/spicelib/devices/hicum2/hicumL2.cpp index 52f697bc5..1df0264ac 100644 --- a/src/spicelib/devices/hicum2/hicumL2.cpp +++ b/src/spicelib/devices/hicum2/hicumL2.cpp @@ -1108,7 +1108,7 @@ HICUMload(GENmodel *inModel, CKTcircuit *ckt) // Model_initialization int selfheat = ((model->HICUMflsh > 0) && (model->HICUMrthGiven) && (model->HICUMrth > 0.0)); - int nqs = ((model->HICUMflnqs != 0 || model->HICUMflcomp < 2.3) && (model->HICUMalit > 0 || model->HICUMalqf > 0)); + int nqs = ((model->HICUMflnqs != 0 || model->HICUMflcomp < 2.3) && (model->HICUMt0Given) && (model->HICUMt0 > 0.0) && (model->HICUMalit > 0 || model->HICUMalqf > 0)); // Avoid divide-by-zero and define infinity other way // High current correction for 2D and 3D effects