-
Notifications
You must be signed in to change notification settings - Fork 8
Mesh sizing without physical groups #112
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
base: main
Are you sure you want to change the base?
Conversation
caaaf12 to
c94306b
Compare
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
7bd031e to
36ee168
Compare
gpeairs
left a comment
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.
This looks very nice, just a couple documentation comments. Was there more testing you wanted to do before merging?
src/solidmodels/render.jl
Outdated
| Get or set the global mesh scaling factor. | ||
| The mesh scale applies multiplicatively to all mesh size fields: `h_effective = mesh_scale * h`. |
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.
I think I would phrase this differently. If I understand right, isn't mesh_scale is more like "where does the mesh size bottom out near each meshsized boundary"? Or in other words the grading everywhere still looks as though you used h (and in particular the size field remains identical beyond the original h), it's just that the size starts at mesh_scale * h rather than h.
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.
That's exactly correct. It makes the size field smaller right next to the entity, but does nothing further away. We had the discussion about introducing another parameter to do a "uniform refinement" style operation, which does more refinement next to the entity, but also refines further away. I'm all ears for better names for these too.
| end | ||
|
|
||
| """ | ||
| add_mesh_size_point(; h, α=-1, p) |
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.
I'm not sure where, but I think all these mesh size related functions should link to a canonical docstring with the mesh size field formula. I think only MeshSized and meshsized_entity have the formula in their docstrings right now.
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.
That's a good idea, I can add a link to MeshSized very easily and then put everything there. The links can then be both ways, with all the control functions linked from there too. Ought to help with usability a good bit.
I'm attempting to test this (and the follow up restrict removal PR) on some more designs coming from @ybrightye amongst others. Not seen any real issues so far, and generally the improved performance stands. However, given this is effectively gutting the mechanism by which meshing is controlled, I think more testing would be good, if I can find anyone to volunteer as tribute. |
6377159 to
4f02a37
Compare
|
Rebased on |
…ow adjusting without re rendering
…ar section to compute the sampling rate
…ify deprecation pathway, and add test that deprecation warning is shown
58315d5 to
1c6589e
Compare
1c6589e to
dff13bb
Compare
This PR removes the need for PhysicalGroups specifying the mesh size field, which is a prerequisite for fragmentless construction. This is achieved by interrogating the occ kernel directly for line segment coordinates, and collecting the resulting points for use in a KD tree later. This has a few upsides:
This also deprecated
MeshingParametersas the specification of the meshing parameters is now decoupled from the call torender!. Additionally this adds in theGeometry.OCCParallelparameter, which in theory speeds up boolean operations by utilizing threads available, I haven't seen much of an impact from this however.One possible extension would be the ability to generate a set of control points from a schematic graph, without requiring a re-render. This would mean hoisting the control point calculation out of open cascade entirely however, so is not done for now, as that entails a meaningful increase in complexity to interrogate any given line segment or entity.