|
|
|
@ -525,6 +525,7 @@ resume: |
|
|
|
} |
|
|
|
|
|
|
|
#ifndef XSPICE |
|
|
|
/* Force the breakpoint if appropriate */ |
|
|
|
else if(ckt->CKTtime + ckt->CKTdelta >= ckt->CKTbreaks[0]) { |
|
|
|
ckt->CKTsaveDelta = ckt->CKTdelta; |
|
|
|
ckt->CKTdelta = ckt->CKTbreaks[0] - ckt->CKTtime; |
|
|
|
@ -534,6 +535,15 @@ resume: |
|
|
|
#endif |
|
|
|
ckt->CKTbreak = 1; /* why? the current pt. is not a bkpt. */ |
|
|
|
} |
|
|
|
/* Try to equalise the last two time steps before the breakpoint, |
|
|
|
if the second step would be smaller than CKTdelta otherwise.*/ |
|
|
|
else if (ckt->CKTtime + 1.9 * ckt->CKTdelta > ckt->CKTbreaks[0]) { |
|
|
|
ckt->CKTsaveDelta = ckt->CKTdelta; |
|
|
|
ckt->CKTdelta = (ckt->CKTbreaks[0] - ckt->CKTtime) / 2.; |
|
|
|
#ifdef STEPDEBUG |
|
|
|
fprintf(stdout, "Delta equalising step at time %e with delta %e\n", ckt->CKTtime, ckt->CKTdelta); |
|
|
|
#endif |
|
|
|
} |
|
|
|
#endif /* !XSPICE */ |
|
|
|
|
|
|
|
|
|
|
|
@ -574,6 +584,15 @@ resume: |
|
|
|
ckt->CKTsaveDelta = ckt->CKTdelta; |
|
|
|
ckt->CKTdelta = ckt->CKTbreaks[0] - ckt->CKTtime; |
|
|
|
} |
|
|
|
/* Try to equalise the last two time steps before the breakpoint, |
|
|
|
if the second step would be smaller than CKTdelta otherwise.*/ |
|
|
|
else if (ckt->CKTtime + 1.9 * ckt->CKTdelta > ckt->CKTbreaks[0]) { |
|
|
|
ckt->CKTsaveDelta = ckt->CKTdelta; |
|
|
|
ckt->CKTdelta = (ckt->CKTbreaks[0] - ckt->CKTtime) / 2.; |
|
|
|
#ifdef STEPDEBUG |
|
|
|
fprintf(stdout, "Delta equalising step at time %e with delta %e\n", ckt->CKTtime, ckt->CKTdelta); |
|
|
|
#endif |
|
|
|
} |
|
|
|
|
|
|
|
#ifdef SHARED_MODULE |
|
|
|
/* Either directly go to next time step, or modify ckt->CKTdelta depending on |
|
|
|
|