Forum Message

 

 

We have moved the forum to https://forum.ngsolve.org . This is an archived version of the topics until 05/05/23. All the topics were moved to the new forum and conversations can be continued there. This forum is just kept as legacy to not invalidate old links. If you want to continue a conversation just look for the topic in the new forum.

Notice

The forum is in read only mode.

Move a node

More
3 years 4 months 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
3 years 4 months 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.148 seconds