Skip to content

Commit

Permalink
Detect JAC_CONSTANT() as linear component
Browse files Browse the repository at this point in the history
Fix ticket:3927
  • Loading branch information
ptaeuber authored and OpenModelica-Hudson committed May 25, 2016
1 parent 59c64ac commit 5a28893
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Compiler/BackEnd/Tearing.mo
Expand Up @@ -287,7 +287,7 @@ algorithm
Boolean mixedSystem;

case ((BackendDAE.EQUATIONSYSTEM(eqns=eindex, vars=vindx, jac=BackendDAE.FULL_JACOBIAN(ojac), jacType=jacType, mixedSystem=mixedSystem)), _, _, _) equation
equality(jacType = BackendDAE.JAC_LINEAR());
true = getLinearfromJacType(jacType);
maxSize = Flags.getConfigInt(Flags.MAX_SIZE_LINEAR_TEARING);
if intGt(listLength(vindx),maxSize) then
Error.addMessage(Error.MAX_TEARING_SIZE, {intString(strongComponentIndexOut), intString(listLength(vindx)),"linear",intString(maxSize)});
Expand Down Expand Up @@ -318,7 +318,7 @@ algorithm

// tearing of non-linear systems
case ((BackendDAE.EQUATIONSYSTEM(eqns=eindex, vars=vindx, jac=BackendDAE.FULL_JACOBIAN(ojac), jacType=jacType, mixedSystem=mixedSystem)), _, _, _) equation
failure(equality(jacType = BackendDAE.JAC_LINEAR()));
false = getLinearfromJacType(jacType);
maxSize = Flags.getConfigInt(Flags.MAX_SIZE_NONLINEAR_TEARING);
if intGt(listLength(vindx),maxSize) then
Error.addMessage(Error.MAX_TEARING_SIZE, {intString(strongComponentIndexOut), intString(listLength(vindx)),"nonlinear",intString(maxSize)});
Expand Down

0 comments on commit 5a28893

Please sign in to comment.