diff --git a/src/spicelib/devices/hicum2/hicumL2.cpp b/src/spicelib/devices/hicum2/hicumL2.cpp index d60a7aaa8..e6f9445a3 100644 --- a/src/spicelib/devices/hicum2/hicumL2.cpp +++ b/src/spicelib/devices/hicum2/hicumL2.cpp @@ -1777,7 +1777,7 @@ HICUMload(GENmodel *inModel, CKTcircuit *ckt) Vbpbi = DEVpnjlim(Vbpbi,*(ckt->CKTstate0 + here->HICUMvbpbi),here->HICUMvt.rpart, here->HICUMtVcrit,&ichk5); if (selfheat) { - Vrth = HICUMlimitlog(Vrth, + Vrth = DEVlimitlog(Vrth, *(ckt->CKTstate0 + here->HICUMvrth),1,&ichk6); } if ((ichk1 == 1) || (ichk2 == 1) || (ichk3 == 1) || (ichk4 == 1) || (ichk5 == 1) || (ichk6 == 1)) icheck=1; @@ -3318,33 +3318,3 @@ load: } return(OK); } - -/* HICUMlimitlog(deltemp, deltemp_old, LIM_TOL, check) - * Logarithmic damping the per-iteration change of deltemp beyond LIM_TOL. - */ -static double -HICUMlimitlog( - double deltemp, - double deltemp_old, - double LIM_TOL, - int *check) -{ - *check = 0; - if (isnan (deltemp) || isnan (deltemp_old)) - { - fprintf(stderr, "Alberto says: YOU TURKEY! The limiting function received NaN.\n"); - fprintf(stderr, "New prediction returns to 0.0!\n"); - deltemp = 0.0; - *check = 1; - } - /* Logarithmic damping of deltemp beyond LIM_TOL */ - if (deltemp > deltemp_old + LIM_TOL) { - deltemp = deltemp_old + LIM_TOL + log10((deltemp-deltemp_old)/LIM_TOL); - *check = 1; - } - else if (deltemp < deltemp_old - LIM_TOL) { - deltemp = deltemp_old - LIM_TOL - log10((deltemp_old-deltemp)/LIM_TOL); - *check = 1; - } - return deltemp; -} \ No newline at end of file