Skip to content

Commit

Permalink
- fixed small bug in calculate analytical jacobian
Browse files Browse the repository at this point in the history
git-svn-id: https://openmodelica.org/svn/OpenModelica/trunk@10183 f25d12d1-65f4-0310-ae8a-bbce733d8d8e
  • Loading branch information
Willi Braun committed Oct 20, 2011
1 parent 1a3f852 commit e6403a6
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions c_runtime/solver_main.cpp
Expand Up @@ -110,10 +110,9 @@ dummy_Jacobian(double *t, double *y, double *yprime, double *pd,
int
Jacobian(double *t, double *y, double *yprime, double *pd, double *cj,
double *rpar, fortran_integer* ipar) {
int size_A = globalData->nStates;
double* matrixA = new double[size_A * size_A];
double* backupStates;
double backupTime;
backupStates = globalData->states;
backupTime = globalData->timeValue;

globalData->states = y;
Expand All @@ -127,7 +126,6 @@ Jacobian(double *t, double *y, double *yprime, double *pd, double *cj,
}
globalData->states = backupStates;
globalData->timeValue = backupTime;
delete[] matrixA;

return 0;
}
Expand Down

0 comments on commit e6403a6

Please sign in to comment.