Skip to content

Commit

Permalink
- KINLapackDense is unknown (windows only)
Browse files Browse the repository at this point in the history
  - using KINDense instead

git-svn-id: https://openmodelica.org/svn/OpenModelica/trunk@16270 f25d12d1-65f4-0310-ae8a-bbce733d8d8e
  • Loading branch information
lochel committed Jun 10, 2013
1 parent 3d83829 commit 579c691
Showing 1 changed file with 20 additions and 20 deletions.
40 changes: 20 additions & 20 deletions SimulationRuntime/c/simulation/solver/radau.c
Original file line number Diff line number Diff line change
Expand Up @@ -645,29 +645,29 @@ int kinsolOde(void* ode)
for(i = 0;i <3; ++i)
{

kData->error_code = KINSol( kData->kmem, /* KINSol memory block */
kData->x, /* initial guess on input; solution vector */
kData->glstr, /* global stragegy choice */
kData->sVars, /* scaling vector, for the variable cc */
kData->sEqns );
if(kData->error_code>=0) return 0;
if(i == 0)
kData->error_code = KINSol(kData->kmem, /* KINSol memory block */
kData->x, /* initial guess on input; solution vector */
kData->glstr, /* global stragegy choice */
kData->sVars, /* scaling vector, for the variable cc */
kData->sEqns );
if(kData->error_code>=0)
return 0;

if(i == 0)
{
KINLapackDense(kinOde->kData->kmem, kinOde->N*kinOde->nlp->nStates);
KINDense(kinOde->kData->kmem, kinOde->N*kinOde->nlp->nStates);
INFO(LOG_SOLVER,"Restart Kinsol: change linear solver to KINLapackDense.");
}
else if(i == 1)
{
KINSptfqmr(kinOde->kData->kmem, kinOde->N*kinOde->nlp->nStates);
INFO(LOG_SOLVER,"Restart Kinsol: change linear solver to KINSptfqmr.");
}
else if(i == 2)
{
KINSpbcg(kinOde->kData->kmem, kinOde->N*kinOde->nlp->nStates);
INFO(LOG_SOLVER,"Restart Kinsol: change linear solver to KINSpbcg.");
}


else if(i == 1)
{
KINSptfqmr(kinOde->kData->kmem, kinOde->N*kinOde->nlp->nStates);
INFO(LOG_SOLVER,"Restart Kinsol: change linear solver to KINSptfqmr.");
}
else if(i == 2)
{
KINSpbcg(kinOde->kData->kmem, kinOde->N*kinOde->nlp->nStates);
INFO(LOG_SOLVER,"Restart Kinsol: change linear solver to KINSpbcg.");
}
}
return (kData->error_code<0) ? -1 : 0;
}
Expand Down

0 comments on commit 579c691

Please sign in to comment.