Skip to content

Commit

Permalink
Fixed initialization of matrix in the linear solver routine
Browse files Browse the repository at this point in the history
git-svn-id: https://openmodelica.org/svn/OpenModelica/trunk@13931 f25d12d1-65f4-0310-ae8a-bbce733d8d8e
  • Loading branch information
smiz committed Nov 16, 2012
1 parent 68b26b7 commit 9913f67
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions Compiler/Template/CodegenAdevs.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -1025,6 +1025,15 @@ case SES_LINEAR(__) then
double** <%aname%> = newDenseMat(<%size%>,<%size%>);
double* <%bname%> = newRealArray(<%size%>);
long int* <%pname%> = newLintArray(<%size%>);
for (int i = 0; i < <%size%>; i++)
{
for (int j = 0; j <%size%>; j++)
{
<%aname%>[i][j] = 0.0;
}
<%pname%>[i] = i;
<%bname%>[i] = 0.0;
}
<%simJac |> (row, col, eq as SES_RESIDUAL(__)) =>
let &preExp = buffer "" /*BUFD*/
let expPart = daeExp(eq.exp, context, &preExp /*BUFC*/, &varDecls /*BUFD*/)
Expand Down

0 comments on commit 9913f67

Please sign in to comment.