Dear Floriane, The thing to understand is that there is no guaranteed relationship between vertex number and the location of that vertex. Vertex numbers are (as far as the user is concerned), completely arbitrary. This is fine because none of the correct ways to access vertices depend on what the order is. When you say that you are applying a change of coordinates, what do you mean? Do you mean that you are changing the coordinate values before you compute? If so, please tell us mathematically what you are attempting to do and we can tell you the right way to do it. Regards, David On Thu, 23 Feb 2017 at 14:08 Floriane Gidel [RPG] <mmfg@leeds.ac.uk> wrote:
Dear all,
I have a question concerning the mesh definition with RectangleMesh:
I define my mesh as a Rectangle mesh, with quadrilaterals as:
hor_mesh = RectangleMesh(Nx, Ny, 10.0, 1.0, quadrilateral=True).
As my functions are only (x,t) dependent, I'd like to get only one element in y, i.e. Ny=1.
However I noticed that if I set Ny=1, then the x-coordinates are swapped from 10.0 to 0.0 . Basically, I obtain
hor_mesh.coordinates.dat.data[:,0] = [10.0 10.0 9.9 9.9 ...... 0.0]
instead of
hor_mesh.coordinates.dat.data[:,0] = [0.0 0.0 0.1 0.1 ........ 10.0] (that I obtain for Ny>1)
Can someone explain me what happens there ? Is there a way to avoid that ?
And if I use the integral on ds(1), will it be at x=0 of x=10 in that case?
The reason why I want to understand this is because I apply a change of coordinate in some part of the domain (let's say for x<L<Lx) and the coordinate transform does not give the right result for Ny=1 (while it does for Ny>1).
Thanks in advance for your help,
Floriane
-- Dr David Ham Department of Mathematics Imperial College London