Skip to content

Commit

Permalink
Test amici #2491
Browse files Browse the repository at this point in the history
  • Loading branch information
dweindl committed Sep 24, 2024
1 parent 77df243 commit b053270
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions deps/AMICI/include/amici/forwardproblem.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@

#include <sundials/sundials_direct.h>
#include <vector>
#include <iostream>

namespace amici {

Expand Down Expand Up @@ -197,6 +198,15 @@ class ForwardProblem {
if (model->getTimepoint(it) == initial_state_.t)
return getInitialSimulationState();
auto map_iter = timepoint_states_.find(model->getTimepoint(it));
if (map_iter == timepoint_states_.end()) {
std::cerr << "Simulation state not found for timepoint #"
<< it << " " << model->getTimepoint(it) << std::endl;
std::cerr << "Available timepoints: ";
for (auto const& [t, state] : timepoint_states_)
std::cerr << t << " ";
std::cerr << std::endl;
}

assert(map_iter != timepoint_states_.end());
return map_iter->second;
};
Expand Down

0 comments on commit b053270

Please sign in to comment.