Move a node

More
4 years 3 weeks ago #3408 by rgs
Move a node was created by rgs
Hello,

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!

Cheers,

Rohit
More
4 years 3 weeks ago #3410 by mneunteufel
Replied by mneunteufel on topic Move a node
Hi Rohit,

yes it is possible to move nodes. In two dimensions the essential code is
Code:
for p in mesh.ngmesh.Points(): px, py = p[0], p[1] p[0] += ... mesh.ngmesh.Update()

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.

Best
Michael
The following user(s) said Thank You: rgs
Time to create page: 0.109 seconds