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

Commit

Permalink
PDEModelica -- left boundary x value
Browse files Browse the repository at this point in the history
Enabled x coordinate value of the left boundary to be any nuber, not only 0.
  • Loading branch information
Jan Šilar authored and OpenModelica-Hudson committed Mar 10, 2017
1 parent f8b2633 commit e7ae049
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion Compiler/FrontEnd/PDEModelicaBuiltin.mo
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,11 @@
record DomainLineSegment1D "Record representing 1-dimensional domain where a partial differential equation hold."
record Region
end Region;
parameter Real x0(unit="m")=0 "x value at left boundary";
parameter Real L(unit="m")=1 "length of the domain";
constant Integer N(unit="")=10 "number of grid nodes";
parameter Real dx = L / (N-1) "grid space step";
parameter Real[N] x(each unit="m") = array(i*dx for i in 0:N-1) "space coordinate";
parameter Real[N] x(each unit="m") = array(x0 + i*dx for i in 0:N-1) "space coordinate";
Region left, right, interior "regions representing boundaries and the interior";
end DomainLineSegment1D;

Expand Down

0 comments on commit e7ae049

Please sign in to comment.