-
Notifications
You must be signed in to change notification settings - Fork 33
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Improve meshing #173
Improve meshing #173
Conversation
Looks great! I looked over the last days also in this kind of refinement :) We wanna migrate longterm to using meshwell for the meshing instead of the meshing in femwell. But as it'll take quite a bit of work to switch, it makes sense to keep maintaining the meshing within femwell until then :) @simbilod could you have a look? To me it seems as if we can just merge it (whereas I don't know if the last three lines might be redundant (?)) |
I agree. I tried to use meshwell, but found it easier to work with the |
Looks good! |
maybe we should just think of a implementation of mesh_from_OrderedDict which uses meshwell? 🤔 then noone would notice the transition? :D |
gmsh.option.setNumber("Mesh.MeshSizeExtendFromBoundary", 0) | ||
gmsh.option.setNumber("Mesh.MeshSizeFromPoints", 0) | ||
gmsh.option.setNumber("Mesh.MeshSizeFromCurvature", 0) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@simbilod didn't you put those options already somewhere? Or is that only in meshwell?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@duarte-jfs is there a reason why you add the last three lines again?
it's already done in (and the two following lines)
Line 409 in 9ce5de4
gmsh.model.mesh.MeshSizeFromPoints = 0 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi, sorry for getting back to you so late. I just looked at this again. To be honest, I don't understand it either. But the behaviour is different if you incliude the lines as I did. No clue why
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
But it is also seems that gmsh.model.mesh.MeshSizeFromPoints = 0
is not equivalent to gmsh.option.setNumber("Mesh.MeshSizeFromPoints", 0) (and likewise for the other two lines). I tried to use them interchangeably and the behaviour is different
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok, then I'm totally fine with just merging it :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes this will also add the mesh constraint on the curves and not just the surface (interior)
Meshwell has much more advanced resolution settings now, we should finish the migration #52
gmsh.option.setNumber("Mesh.MeshSizeExtendFromBoundary", 0) | ||
gmsh.option.setNumber("Mesh.MeshSizeFromPoints", 0) | ||
gmsh.option.setNumber("Mesh.MeshSizeFromCurvature", 0) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes this will also add the mesh constraint on the curves and not just the surface (interior)
Meshwell has much more advanced resolution settings now, we should finish the migration #52
The present changes are meant to correct the meshing along lines, and prevent overrefinement, giving users more control on the mesh sizes.
The addition of the
Allows us to see a significant change on the mesh due to changes in the resolution definitions of LineStrings, and the second part follows from the gmsh manual, in chapter 1:
This will allow us to go from this kind of meshing when
distance=0
:To this:
Which can be desirable.
Disclaimer: I'm not sure how much of a mess the commit history of my fork is. If it's too much trouble I'd be happy to close this PR and you guys can just make the necessary changes, if you see this would benefit the package as a whole.