Skip to content

Commit

Permalink
StimPlanModel: Fix bug in pressure interpolation.
Browse files Browse the repository at this point in the history
  • Loading branch information
kriben committed Sep 18, 2023
1 parent cc59eba commit 98fc6ff
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -298,9 +298,10 @@ std::tuple<std::vector<double>, std::vector<double>, std::vector<double>>
}
else
{
if ( !sourceValues.empty() )
// The last point is added without interpolation. But MD can be smaller than the source range which
// leads to startIndex equal to endIndex: leave these cases as inf.
if ( !sourceValues.empty() && md >= sourceMds[0] )
{
// The last point is added without interpolation
value = sourceValues.back();
}
}
Expand Down

0 comments on commit 98fc6ff

Please sign in to comment.