Skip to content

Commit

Permalink
- Be able to link without sundials/kinsol
Browse files Browse the repository at this point in the history
git-svn-id: https://openmodelica.org/svn/OpenModelica/trunk@15183 f25d12d1-65f4-0310-ae8a-bbce733d8d8e
  • Loading branch information
sjoelund committed Feb 15, 2013
1 parent 55ffa29 commit bf38a0b
Showing 1 changed file with 10 additions and 5 deletions.
15 changes: 10 additions & 5 deletions SimulationRuntime/c/simulation/solver/solver_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,6 @@
#include "events.h"
#include "varinfo.h"
#include "stateset.h"
#include "radau.h"

/*
* #include "dopri45.h"
Expand All @@ -67,13 +66,17 @@ typedef struct RK4
}RK4;

#ifdef WITH_SUNDIALS
RADAUIIA rData;
KINSOLRADAU kData;

#include "radau.h"

RADAUIIA rData;
KINSOLRADAU kData;
static int radauIIA_step(DATA* data, SOLVER_INFO* solverInfo);

#endif

static int euler_ex_step(DATA* data, SOLVER_INFO* solverInfo);
static int rungekutta_step(DATA* data, SOLVER_INFO* solverInfo);
static int radauIIA_step(DATA* data, SOLVER_INFO* solverInfo);
static void checkTermination(DATA* data);
static void writeOutputVars(char* names, DATA* data);

Expand All @@ -92,8 +95,10 @@ int solver_main_step(DATA* data, SOLVER_INFO* solverInfo)
solverInfo->currentTime = data->localData[0]->timeValue;
return 0;

#ifdef WITH_SUNDIALS
case 6:
return radauIIA_step(data, solverInfo);
#endif

default:
case 1:
Expand Down Expand Up @@ -748,7 +753,7 @@ static int rungekutta_step(DATA* data, SOLVER_INFO* solverInfo)

#ifdef WITH_SUNDIALS
/*************************************** Radau IIA ***********************************/
int radauIIA_step(DATA* data, SOLVER_INFO* solverInfo)
static int radauIIA_step(DATA* data, SOLVER_INFO* solverInfo)
{
kinsolRadauIIA(&rData);
solverInfo->currentTime += solverInfo->currentStepSize;
Expand Down

0 comments on commit bf38a0b

Please sign in to comment.