Skip to content

Commit

Permalink
improved symEuler
Browse files Browse the repository at this point in the history
  • Loading branch information
vruge committed May 8, 2015
1 parent 8ad90c5 commit ce23826
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions Compiler/BackEnd/BackendVariable.mo
Expand Up @@ -1398,6 +1398,17 @@ algorithm
end matchcontinue;
end isExtObj;

public function isAlgState
"Return true if variable is alg state"
input BackendDAE.Var inVar;
output Boolean outBoolean;
algorithm
outBoolean := match (inVar)
case BackendDAE.VAR(varKind=BackendDAE.ALG_STATE()) then true;
else false;
end match;
end isAlgState;

public function isRealParam
"Return true if variable is a parameter of real-type"
input BackendDAE.Var inVar;
Expand Down Expand Up @@ -1968,6 +1979,16 @@ algorithm
end match;
end getVarNominalValue;

public function getVarKind "
Get the DAE.VarKind of a variable"
input BackendDAE.Var inVar;
output BackendDAE.VarKind varKind;
algorithm
varKind := match (inVar)
case (BackendDAE.VAR(varKind = varKind)) then varKind;
end match;
end getVarKind;

public function isVarOnTopLevelAndOutput "and has the DAE.VarDirection = OUTPUT
The check for top-model is done by spliting the name at \'.\' and
check if the list-length is 1"
Expand Down

0 comments on commit ce23826

Please sign in to comment.