Skip to content

Commit

Permalink
..
Browse files Browse the repository at this point in the history
  • Loading branch information
dweindl committed Feb 24, 2024
1 parent 10940c6 commit 71a6f2b
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions src/model.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -324,13 +324,16 @@ void Model::initialize(
if (ne)
initEvents(x, dx, roots_found);

fw(t0(), x.data(), true);
// evaluate static expressions once
// (w and dwdw will be evaluated from within dwdp/dwdx)
fdwdx(t0(), x.data(), true);
fdwdp(t0(), x.data(), true);
}

void Model::reinitialize(AmiVector& x, realtype t) {
fx0_fixedParameters(x);
// evaluate static expressions
// (w will be evaluated from within dwdp/dwdx)
// re-evaluate static expressions once
// (w and dwdw will be evaluated from within dwdp/dwdx)
fdwdx(t, x.data(), true);
fdwdp(t, x.data(), true);
}
Expand Down

0 comments on commit 71a6f2b

Please sign in to comment.