Skip to content

Commit

Permalink
skip t0
Browse files Browse the repository at this point in the history
  • Loading branch information
dweindl committed Dec 4, 2023
1 parent 7a8d351 commit ff5e2f9
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
7 changes: 5 additions & 2 deletions include/amici/model_dae.h
Original file line number Diff line number Diff line change
Expand Up @@ -40,19 +40,22 @@ class Model_DAE : public Model {
* @param ndxdotdp_explicit number of nonzero elements dxdotdp_explicit
* @param ndxdotdx_explicit number of nonzero elements dxdotdx_explicit
* @param w_recursion_depth Recursion depth of fw
* @param state_independent_events Map of events with state-independent
* triggers functions, mapping trigger timepoints to event indices.
*/
Model_DAE(
ModelDimensions const& model_dimensions,
SimulationParameters simulation_parameters,
const SecondOrderMode o2mode, std::vector<realtype> const& idlist,
std::vector<int> const& z2event, bool const pythonGenerated = false,
int const ndxdotdp_explicit = 0, int const ndxdotdx_explicit = 0,
int const w_recursion_depth = 0
int const w_recursion_depth = 0,
std::map<realtype, std::vector<int>> state_independent_events = {}
)
: Model(
model_dimensions, simulation_parameters, o2mode, idlist, z2event,
pythonGenerated, ndxdotdp_explicit, ndxdotdx_explicit,
w_recursion_depth
w_recursion_depth, state_independent_events
) {
derived_state_.M_ = SUNMatrixWrapper(nx_solver, nx_solver);
auto M_nnz = static_cast<sunindextype>(
Expand Down
5 changes: 4 additions & 1 deletion src/forwardproblem.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,10 @@ void ForwardProblem::workForwardProblem() {

// get list of trigger timepoints for fixed-time triggered events
auto trigger_timepoints = model->get_trigger_timepoints();
auto it_trigger_timepoints = trigger_timepoints.begin();
auto it_trigger_timepoints = std::find_if(
trigger_timepoints.begin(), trigger_timepoints.end(),
[this](auto t) { return t > this->t_; }
);

/* loop over timepoints */
for (it_ = 0; it_ < model->nt(); it_++) {
Expand Down

0 comments on commit ff5e2f9

Please sign in to comment.