This functions gives the position of the vertices that form segments. The position is computed to insure an equal distance between all the vertices. The distance between vertices derives:
Where :
A mesh divided into N segments contains N+1 vertices. That is why the size of x is N+1.
function uniformGrid input Modelica.SIunits.Length L "Length of the domain to mesh"; input Integer N "number of segments"; output Modelica.SIunits.Position x[N + 1] "Vector of vertice position"; end uniformGrid;