Move a node


is it possible to change the coordinates of a node? I looked in the Mesh and MeshPoint classes in Netgen, but I couldn’t find a function that could move a node.

I also tried to use the Elements0D() function in the Netgen Mesh class hoping to get a list of nodes in the mesh, but I got an empty list. I did however get a list of all points using the Points() function in the Netgen Mesh class. What is the difference between a point and a 0D-element? I expected both to be the same (nodes).

Thanks in advance!



Hi Rohit,

yes it is possible to move nodes. In two dimensions the essential code is

for p in mesh.ngmesh.Points():
    px, py = p[0], p[1]
    p[0] += ...

With Elements0D() you only get special points, similar as with Elements1D() you get only boundary edges (where you can prescribe boundary conditions and which can be named) and not all edges of the mesh.