Skip to content

Commit

Permalink
- Use correct extrapolation for CombiTable1D
Browse files Browse the repository at this point in the history
git-svn-id: https://openmodelica.org/svn/OpenModelica/trunk@8845 f25d12d1-65f4-0310-ae8a-bbce733d8d8e
  • Loading branch information
sjoelund committed May 6, 2011
1 parent 5e47e9b commit 1c0eb55
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 2 deletions.
1 change: 1 addition & 0 deletions c_runtime/Makefile.common
Expand Up @@ -60,6 +60,7 @@ meta_modelica.h \
modelica.h \
modelica_string.h \
ModelicaUtilities.h \
omc_msvc.h \
read_matlab4.h \
read_csv.h \
read_write.h \
Expand Down
2 changes: 1 addition & 1 deletion c_runtime/ModelicaExternalC/Makefile.in
@@ -1,6 +1,6 @@
CC = @CC@
CFLAGS := @CFLAGS@
CPPFLAGS := @CPPFLAGS@ -I.. -D_POSIX_ -Dstatic=
CPPFLAGS := @CPPFLAGS@ -I.. -Dlinux -Dstatic=
OBJS = ModelicaInternal.o ModelicaStrings.o ModelicaTablesImpl.o
AR = ar -ru

Expand Down
4 changes: 3 additions & 1 deletion c_runtime/ModelicaExternalC/ModelicaTablesImpl.c
Expand Up @@ -8,6 +8,8 @@

#include "ModelicaTables.h"
#include "tables.h"
#include <math.h>
#include <omc_msvc.h>

#ifdef __cplusplus
extern "C" {
Expand Down Expand Up @@ -52,7 +54,7 @@ int ModelicaTables_CombiTable1D_init(const char* tableName, const char* fileName
double const *table, int nRow, int nColumn,
int smoothness)
{
return omcTableTimeIni(0.0, 0.0, smoothness, 0, tableName, fileName, table, nRow, nColumn, 0);
return omcTableTimeIni(0.0, 0.0, smoothness, 2 /* extrapolate based on two first/last values */, tableName, fileName, table, nRow, nColumn, 0);
}

void ModelicaTables_CombiTable1D_close(int tableID)
Expand Down
File renamed without changes.

0 comments on commit 1c0eb55

Please sign in to comment.