Merge branch 'pre-master' into bt_dev
This commit is contained in:
commit
947eeb1d62
|
|
@ -105,19 +105,23 @@ ivars(char *argv0)
|
|||
AsciiRawFile = atoi(temp);
|
||||
|
||||
/* path of the ngspice executable */
|
||||
Spice_Exec_Path = copy(argv0);
|
||||
/* find the last occurence of "ngspice" in Spice_Exec_Path */
|
||||
char* path_end = strstr(Spice_Exec_Path, "ngspice");
|
||||
if (path_end) {
|
||||
char* exec_only = strstr(path_end + 7, "ngspice");
|
||||
while (exec_only) {
|
||||
path_end = strstr(exec_only, "ngspice");
|
||||
if (argv0) {
|
||||
Spice_Exec_Path = copy(argv0);
|
||||
/* find the last occurence of "ngspice" in Spice_Exec_Path */
|
||||
char* path_end = strstr(Spice_Exec_Path, "ngspice");
|
||||
if (path_end) {
|
||||
char* exec_only = strstr(path_end + 7, "ngspice");
|
||||
while (exec_only) {
|
||||
path_end = strstr(exec_only, "ngspice");
|
||||
if (path_end)
|
||||
exec_only = strstr(path_end + 7, "ngspice");
|
||||
}
|
||||
if (path_end)
|
||||
exec_only = strstr(path_end + 7, "ngspice");
|
||||
*path_end = '\0';
|
||||
}
|
||||
if (path_end)
|
||||
*path_end = '\0';
|
||||
}
|
||||
else
|
||||
Spice_Exec_Path = NULL;
|
||||
}
|
||||
|
||||
void
|
||||
|
|
|
|||
|
|
@ -465,6 +465,17 @@ DCtrCurv(CKTcircuit *ckt, int restart)
|
|||
DEVices[rcode]->DEVload(job->TRCVvElt[i]->GENmodPtr, ckt);
|
||||
} else if (job->TRCVvType[i] == TEMP_CODE) { /* temperature */
|
||||
ckt->CKTtemp += job->TRCVvStep[i];
|
||||
|
||||
/* FIXME: Do the Temp check already here for the first time.
|
||||
If the stop criterion is fulfilled, discard Temp evaluation, because
|
||||
CKTtemp may report errors if a large extra Temp step is exercized. */
|
||||
if (SGN(job->TRCVvStep[i]) *
|
||||
((ckt->CKTtemp - CONSTCtoK) - job->TRCVvStop[i]) > DBL_EPSILON * 1e+03) {
|
||||
// ckt->CKTtemp -= job->TRCVvStep[i]; // Undo the large step
|
||||
// ckt->CKTtemp += SGN(job->TRCVvStep[i]) * DBL_EPSILON * 2e+03; // Add just a small step
|
||||
continue; // Skip model evaluation
|
||||
}
|
||||
|
||||
inp_evaluate_temper(ft_curckt);
|
||||
CKTtemp(ckt);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue