Skip to content
This repository was archived by the owner on May 18, 2019. It is now read-only.

Commit 02e5c4a

Browse files
Jan ŠilarOpenModelica-Hudson
authored andcommitted
PDEModelica bug fix
- Fixed bug #3835, an unset variable was returned from function - Avoid calling addGhostCells when PDEModelica grammar is not enabled.
1 parent 3e1d796 commit 02e5c4a

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

Compiler/FrontEnd/Inst.mo

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2071,8 +2071,9 @@ algorithm
20712071

20722072
(compelts_1, eqs_1, initeqs_1, alg_1, initalg_1) =
20732073
InstUtil.extractConstantPlusDepsTpl(compelts_1, instSingleCref, {}, className, eqs_1, initeqs_1, alg_1, initalg_1);
2074-
2075-
compelts_1 = InstUtil.addGhostCells(compelts_1, eqs_1);
2074+
if intEq(Flags.getConfigEnum(Flags.GRAMMAR), Flags.PDEMODELICA) then
2075+
compelts_1 = InstUtil.addGhostCells(compelts_1, eqs_1);
2076+
end if;
20762077

20772078
//(csets, env2, ih) = InstUtil.addConnectionCrefsFromEqs(csets, eqs_1, pre, env2, ih);
20782079

@@ -3115,7 +3116,7 @@ public function instElement2
31153116
output ClassInf.State outState = inState;
31163117
output list<DAE.Var> outVars = {};
31173118
output ConnectionGraph.ConnectionGraph outGraph = inGraph;
3118-
output InstUtil.DomainFieldOpt outFieldDomOpt;
3119+
output InstUtil.DomainFieldOpt outFieldDomOpt = NONE();
31193120
protected
31203121
tuple<SCode.Element, DAE.Mod> elt;
31213122
Boolean is_deleted;

0 commit comments

Comments
 (0)