Improve efficiency and irreversible CM support in EVTcall_hybrids() by

halting calls to code models as soon as the timestep is chenged.
This should have been included in 508fad0f55.
This commit is contained in:
Giles Atkinson 2023-12-18 11:37:39 +00:00 committed by Holger Vogt
parent c46866d688
commit ffcf3b24d9
1 changed files with 8 additions and 1 deletions

View File

@ -45,6 +45,7 @@ NON-STANDARD FEATURES
#include "ngspice/ngspice.h"
#include "ngspice/cktdefs.h"
#include "ngspice/mif.h"
#include "ngspice/evt.h"
#include "ngspice/evtproto.h"
@ -74,6 +75,12 @@ void EVTcall_hybrids(
/* Call EVTload for all hybrids */
for(i = 0; i < num_hybrids; i++)
for(i = 0; i < num_hybrids; i++) {
EVTload_with_event(ckt, hybrids[i], MIF_STEP_PENDING);
if (g_mif_info.breakpoint.current < ckt->CKTtime) {
/* An XSPICE instance rejected the time-step. */
break;
}
}
}