Skip to content

Commit

Permalink
Restore derivatives
Browse files Browse the repository at this point in the history
  • Loading branch information
tbeu committed Jun 5, 2024
1 parent 0d72498 commit 0481d4a
Showing 1 changed file with 5 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,11 @@
ModelicaTableAdditions.Blocks.Tables.CombiTable2Dv
Changelog:
Jun. 04, 2024: by Thomas Beutlich
Restored derivatives for one-sided extrapolation by constant
continuation of 2D tables that actually degrade to 1D tables as
regression of ticket #3894 (ticket #4343)
Apr. 01, 2024: by Thomas Beutlich
Added natural cubic spline interpolation
Expand Down Expand Up @@ -4452,9 +4457,6 @@ double ModelicaTableAdditions_CombiTable2D_getDerValue(void* _tableID, double u1
break;

case HOLD_LAST_POINT:
der_y = (TABLE(1, last2 + 2) - TABLE(1, last2 + 1))/
(TABLE_ROW0(last2 + 2) - TABLE_ROW0(last2 + 1));
der_y *= der_u2;
break;

case NO_EXTRAPOLATION:
Expand Down Expand Up @@ -4599,9 +4601,6 @@ double ModelicaTableAdditions_CombiTable2D_getDerValue(void* _tableID, double u1
break;

case HOLD_LAST_POINT:
der_y = (TABLE(last1 + 2, 1) - TABLE(last1 + 1, 1))/
(TABLE_COL0(last1 + 2) - TABLE_COL0(last1 + 1));
der_y *= der_u1;
break;

case NO_EXTRAPOLATION:
Expand Down Expand Up @@ -5387,9 +5386,6 @@ double ModelicaTableAdditions_CombiTable2D_getDer2Value(void* _tableID, double u
break;

case HOLD_LAST_POINT:
der2_y = (TABLE(1, last2 + 2) - TABLE(1, last2 + 1))/
(TABLE_ROW0(last2 + 2) - TABLE_ROW0(last2 + 1));
der2_y *= der2_u2;
break;

case NO_EXTRAPOLATION:
Expand Down Expand Up @@ -5535,9 +5531,6 @@ double ModelicaTableAdditions_CombiTable2D_getDer2Value(void* _tableID, double u
break;

case HOLD_LAST_POINT:
der2_y = (TABLE(last1 + 2, 1) - TABLE(last1 + 1, 1))/
(TABLE_COL0(last1 + 2) - TABLE_COL0(last1 + 1));
der2_y *= der2_u1;
break;

case NO_EXTRAPOLATION:
Expand Down

0 comments on commit 0481d4a

Please sign in to comment.