Skip to content

Commit f440455

Browse files
Johanna SchneiderJohanna Schneider
authored andcommitted
- bugfix tearing
git-svn-id: https://openmodelica.org/svn/OpenModelica/trunk@11344 f25d12d1-65f4-0310-ae8a-bbce733d8d8e
1 parent e01ca04 commit f440455

File tree

1 file changed

+10
-5
lines changed

1 file changed

+10
-5
lines changed

Compiler/BackEnd/BackendDAEOptimize.mo

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3619,7 +3619,7 @@ algorithm
36193619
(outResEqn,outTearVar,outDlow,outDlow1,outM,outMT,outV1,outV2,outComps):=
36203620
matchcontinue (inDlow,inDlow1,inM,inMT,inV1,inV2,inComps)
36213621
local
3622-
BackendDAE.BackendDAE dlow,dlow_1,dlow_2,dlow1,dlow1_1,dlow1_2;
3622+
BackendDAE.BackendDAE dlow,dlow_1,dlow_2,dlow1,dlow1_1,dlow1_2,dlow1_3;
36233623
BackendDAE.IncidenceMatrix m,m_1,m_3,m_4;
36243624
BackendDAE.IncidenceMatrixT mT,mT_1,mT_3,mT_4;
36253625
array<Integer> v1,v2,v1_1,v2_1,v1_2,v2_2,v1_3,v2_3;
@@ -3648,13 +3648,13 @@ algorithm
36483648
v1_2 = arrayCreate(ll, 0);
36493649
v1_2 = Util.arrayNCopy(v1_1, v1_2,ll);
36503650
BackendDAE.DAE({syst},shared) = dlow1_1;
3651-
(m_3,mT_3) = BackendDAEUtil.incidenceMatrix(syst, shared, BackendDAE.NORMAL());
3652-
//mT_3 = BackendDAEUtil.transposeMatrix(m_3);
3651+
(syst,m_3,mT_3) = BackendDAEUtil.getIncidenceMatrix(syst,shared,BackendDAE.NORMAL());
3652+
dlow1_2 = BackendDAE.DAE({syst},shared);
36533653
(v1_3,v2_3) = correctAssignments(v1_2,v2_2,residualeqns,tearingvars);
36543654
// next Block
3655-
(r,t,dlow_2,dlow1_2,m_4,mT_4,v1_3,v2_3,comps_1) = tearingSystem1(dlow_1,dlow1_1,m_3,mT_3,v1_2,v2_2,comps);
3655+
(r,t,dlow_2,dlow1_3,m_4,mT_4,v1_3,v2_3,comps_1) = tearingSystem1(dlow_1,dlow1_2,m_3,mT_3,v1_2,v2_2,comps);
36563656
then
3657-
(residualeqns::r,tearingvars::t,dlow_2,dlow1_2,m_4,mT_4,v1_3,v2_3,comp_1::comps_1);
3657+
(residualeqns::r,tearingvars::t,dlow_2,dlow1_3,m_4,mT_4,v1_3,v2_3,comp_1::comps_1);
36583658
case (dlow,dlow1,m,mT,v1,v2,comp::comps)
36593659
equation
36603660
// block ?
@@ -3803,6 +3803,11 @@ algorithm
38033803
Debug.fcall(Flags.TEARING_DUMP, print, "Select Residual BackendDAE.Equation failed\n");
38043804
then
38053805
fail();
3806+
case (dlow,dlow1,m,mT,v1,v2,comp,tvars,exclude,residualeqns,tearingvars,tearingeqns,_)
3807+
equation
3808+
Debug.fcall(Flags.TEARING_DUMP, print, "Select Residual BackendDAE.Equation failed!\n");
3809+
then
3810+
fail();
38063811
end matchcontinue;
38073812
end tearingSystem2;
38083813

0 commit comments

Comments
 (0)