Skip to content
This repository has been archived by the owner on Jul 17, 2024. It is now read-only.

Commit

Permalink
Modify handle_evid3 so that neq arg is no longer needed
Browse files Browse the repository at this point in the history
  • Loading branch information
mattfidler committed Jan 24, 2024
1 parent c43bab8 commit 1b0b1af
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions inst/include/rxode2parseHandleSs.h
Original file line number Diff line number Diff line change
Expand Up @@ -1047,23 +1047,23 @@ extern "C" {
}
}

static inline void handle_evid3(rx_solving_options_ind *ind, int *neq, double *xp, double *xout,
static inline void handle_evid3(rx_solving_options_ind *ind, double *xp, double *xout,
double *yp, t_update_inis u_inis, int *idid) {
rx_solve *rx = &rx_global;
rx_solving_options *op = &op_global;
ind->curShift -= rx->maxShift;
for (int j = neq[0]; j--;) {
for (int j = op->neq; j--;) {
ind->InfusionRate[j] = 0;
ind->on[j] = 1;
ind->cacheME=0;
}
cancelInfusionsThatHaveStarted(ind, neq[1], *xout);
cancelPendingDoses(ind, neq[1]);
memcpy(yp, op->inits, neq[0]*sizeof(double));
u_inis(neq[1], yp); // Update initial conditions @ current time
cancelInfusionsThatHaveStarted(ind, ind->id, *xout);
cancelPendingDoses(ind, ind->id);
memcpy(yp, op->inits, op->neq*sizeof(double));
u_inis(ind->id, yp); // Update initial conditions @ current time
if (op->extraCmt) {
double *ypLin = yp + neq[0];
double *iLin = ind->InfusionRate + neq[0];
double *ypLin = yp + op->neq;
double *iLin = ind->InfusionRate + op->neq;
switch(op->extraCmt) {
case 2:
ypLin[0] =ypLin[1] = iLin[0] = iLin[1] = 0.0;
Expand Down

0 comments on commit 1b0b1af

Please sign in to comment.