Skip to content

Commit

Permalink
- bugfix mercurial mingw error for static arrays
Browse files Browse the repository at this point in the history
git-svn-id: https://openmodelica.org/svn/OpenModelica/trunk@10477 f25d12d1-65f4-0310-ae8a-bbce733d8d8e
  • Loading branch information
Jens Frenkel committed Nov 12, 2011
1 parent 8a02249 commit 19fc8ee
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 15 deletions.
2 changes: 1 addition & 1 deletion SimulationRuntime/c/CMakeLists.txt
Expand Up @@ -150,7 +150,7 @@ MACRO(BUILDMODELMOS model mos dir Flags CSRC)
WORKING_DIRECTORY ${dir}
COMMENT "copy file ${expat_CODE} to ${expat_OUTPUT}")
# target fuer OM_OUTPUT
ADD_CUSTOM_TARGET(expat ALL DEPENDS ${expat_OUTPUT})
ADD_CUSTOM_TARGET(expat${model} ALL DEPENDS ${expat_OUTPUT})

SET(OMC_MODELNAME ${model})
# generate model.mos
Expand Down
4 changes: 2 additions & 2 deletions SimulationRuntime/c/simulation/solver/CMakeLists.txt
Expand Up @@ -2,9 +2,9 @@
# CMakefile for compilation of OMC

# Quellen und Header
SET(solver_sources daux.c ddasrt.c ddassl.c dlamch.c dlinpk.c solver_main.cpp )
SET(solver_sources daux.c ddasrt.c ddassl.c dlamch.c dlinpk.c solver_main.c dopri45.c )

SET(solver_headers simulation_inline_solver.h solver_main.h)
SET(solver_headers simulation_inline_solver.h solver_main.h dopri45.h)

# Library util
ADD_LIBRARY(solver ${solver_sources} ${solver_headers})
Expand Down
1 change: 1 addition & 0 deletions SimulationRuntime/c/simulation/solver/dopri45.c
Expand Up @@ -103,6 +103,7 @@ euklidnorm(double* a) {
return sqrt(erg);
}


/*************************************** STEPSIZE ***********************************/
int
init_stepsize(int(*f)(), double tolerence) {
Expand Down
18 changes: 6 additions & 12 deletions SimulationRuntime/c/simulation/solver/solver_main.c
Expand Up @@ -619,26 +619,21 @@ dasrt_step(double step, double start, double stop, int trigger1,
rwork = (double*) calloc(lrw,sizeof(double));
ASSERT(rwork,"out of memory");
iwork = (fortran_integer*) calloc(liw,sizeof(fortran_integer));
ASSERT(rwork,"out of memory");
ASSERT(iwork,"out of memory");
jroot = (fortran_integer*) calloc(globalData->nZeroCrossing,sizeof(fortran_integer));
ASSERT(rwork,"out of memory");
ASSERT(jroot,"out of memory");
/* Used when calculating residual for its side effects. (alg. var calc) */
dummy_delta = (double*) calloc(globalData->nStates,sizeof(double));
ASSERT(rwork,"out of memory");
ASSERT(dummy_delta,"out of memory");
rpar = (double*) calloc(1,sizeof(double));
ASSERT(rwork,"out of memory");
ASSERT(rpar,"out of memory");
ipar = (fortran_integer*) calloc(3,sizeof(fortran_integer));
ASSERT(rwork,"out of memory");
ASSERT(ipar,"out of memory");
ipar[0] = sim_verbose;
ipar[1] = LOG_JAC;
ipar[2] = LOG_ENDJAC;

for (i = 0; i < INFOLEN; i++)
info[i] = 0;
for (i = 0; i < liw; i++)
iwork[i] = 0;
for (i = 0; i < lrw; i++)
rwork[i] = 0.0;
memset(info,0,INFOLEN);
/*********************************************************************
*info[2] = 1; //intermediate-output mode
*********************************************************************
Expand All @@ -652,7 +647,6 @@ dasrt_step(double step, double start, double stop, int trigger1,
if (jac_flag || num_jac_flag)
info[4] = 1; /* use sub-routine JAC */
}

/* If an event is triggered and processed restart dassl. */
if (trigger1) {
if (sim_verbose >= LOG_EVENTS) {
Expand Down

0 comments on commit 19fc8ee

Please sign in to comment.