Skip to content

Commit

Permalink
Merge branch 'main' into feat/wheelImprovements
Browse files Browse the repository at this point in the history
  • Loading branch information
kratman authored Nov 7, 2024
2 parents db5f0ee + c1ea747 commit 9e62961
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/pybammsolvers/idaklu_source/observe.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,11 @@ class TimeSeriesInterpolator {
) {
for (size_t i = 0; i < ts_data_np.size(); i++) {
const auto& t_data = ts_data_np[i].unchecked<1>();
// Continue if there is no data
if (t_data.size() == 0) {
continue;
}

const realtype t_data_final = t_data(t_data.size() - 1);
realtype t_interp_next = t_interp(i_interp);
// Continue if the next interpolation point is beyond the final data point
Expand Down Expand Up @@ -229,6 +234,10 @@ class TimeSeriesProcessor {
int i_entries = 0;
for (size_t i = 0; i < ts.size(); i++) {
const auto& t = ts[i].unchecked<1>();
// Continue if there is no data
if (t.size() == 0) {
continue;
}
const auto& y = ys[i].unchecked<2>();
const auto input = inputs[i].data();
const auto func = *funcs[i];
Expand Down

0 comments on commit 9e62961

Please sign in to comment.