Skip to content

Commit

Permalink
- Temporarily use omcTearing for strong components bigger than 200 va…
Browse files Browse the repository at this point in the history
…riables until problem with Cellier Tearing is fixed

git-svn-id: https://openmodelica.org/svn/OpenModelica/trunk@24116 f25d12d1-65f4-0310-ae8a-bbce733d8d8e
  • Loading branch information
ptaeuber committed Jan 20, 2015
1 parent cf31ae1 commit 77598f1
Showing 1 changed file with 13 additions and 2 deletions.
15 changes: 13 additions & 2 deletions Compiler/BackEnd/Tearing.mo
Expand Up @@ -241,6 +241,7 @@ algorithm
Option<list<tuple<Integer, Integer, BackendDAE.Equation>>> ojac;
BackendDAE.JacobianType jacType;
Boolean mixedSystem;
TearingMethod inMethod2;

case ((BackendDAE.EQUATIONSYSTEM(eqns=eindex, vars=vindx, jac=BackendDAE.FULL_JACOBIAN(ojac), jacType=jacType, mixedSystem=mixedSystem)), _, _, _) equation
equality(jacType = BackendDAE.JAC_LINEAR());
Expand All @@ -256,7 +257,12 @@ algorithm
if Flags.isSet(Flags.TEARING_DUMPVERBOSE) then
print("Jacobian:\n" + BackendDump.dumpJacobianStr(ojac) + "\n\n");
end if;
(comp1, true) = callTearingMethod(inMethod, isyst, ishared, eindex, vindx, ojac, jacType, mixedSystem);
if listLength(vindx) > 200 then
inMethod2 = OMC_TEARING();
else
inMethod2 = inMethod;
end if;
(comp1, true) = callTearingMethod(inMethod2, isyst, ishared, eindex, vindx, ojac, jacType, mixedSystem);
then (comp1, true);

// tearing of non-linear systems
Expand All @@ -268,7 +274,12 @@ algorithm
if Flags.isSet(Flags.TEARING_DUMPVERBOSE) then
print("Jacobian:\n" + BackendDump.dumpJacobianStr(ojac) + "\n\n");
end if;
(comp1, true) = callTearingMethod(inMethod, isyst, ishared, eindex, vindx, ojac, jacType, mixedSystem);
if listLength(vindx) > 200 then
inMethod2 = OMC_TEARING();
else
inMethod2 = inMethod;
end if;
(comp1, true) = callTearingMethod(inMethod2, isyst, ishared, eindex, vindx, ojac, jacType, mixedSystem);
then (comp1, true);

// no component for tearing
Expand Down

0 comments on commit 77598f1

Please sign in to comment.