Manual quad mesh generation no longer working?

Hello,

I just noticed that on my newer version of ngsolve (6.2.2304-203-g3b0dfc1ff) manual quad mesh generation no longer works as before and Element2D seems to ignore the last entry if the given point list contains 4 entries. Has someone else experienced the same problem and is this a bug or is there a new way for the manual generation of quad meshes? I am grateful for any help.
Best regards,
Florian

Hi Florian,

it’s hard to tell, do you have a minimal code example of the non-working mesh?
Which NGSolve version have you used before? Does the latest NGSolve (nightly) version work?

In e.g. https://github.com/NGSolve/ngsolve/blob/master/python/meshes.py you can find the implementation of the function MakeStructured2DMesh generating quad meshes “by hand”, which works for me, in case you are interested in.
Points are added around line 140 and 2D Elements at lines 166-186.

Best,
Michael

1 Like

Hi Michael,

thank you for your reply! To my surprise the code you linked works for me and produces a nice mesh while this simpler version given in the tutorials here 4.3 Working with meshes — NGS-Py 6.2.2304 documentation does not.
To answer the other questions: I just recently switched from pip to source installation so it worked on the latest version available there (6.2.2304) and I also tried the latest NGSolve build and nothing changed.
Because the code you linked and the one from the tutorial seem extremely similar I don’t have any idea where the problem could be. Does the code from the tutorial work for you?

Edit: I just found the problem. When viewing a Netgen mesh using the Ngsolve webgui the quads are not drawn correctly. Converting the mesh to an Ngsolve mesh before drawing fixes the problem. So the meshes where generated correctly and just drawn wrong. Thank you for your help!

Best,
Florian