Mesh Adaptivity via DMPlexTransform - #5215
Conversation
404f925 to
381f544
Compare
381f544 to
885a7eb
Compare
| :arg mark: the marking function, a Firedrake DG0 function on | ||
| this mesh; cells with a positive value are refined. |
There was a problem hiding this comment.
numpydoc + return type
| ref_points_a = np.matmul(points_a - bs[:, None, :], Ainvs) | ||
| ref_points_b = np.matmul(points_b - bs[:, None, :], Ainvs) | ||
|
|
||
| p = [np.argmin(cdist(a, b), axis=0) for a, b in zip(ref_points_a, ref_points_b)] |
There was a problem hiding this comment.
I'd appreciate a worked example in a comment or similar. This isn't obvious upon reading.
There was a problem hiding this comment.
Here I merged #5034 just so that some tests passed. However, I really want to get rid of this python-based lookup in favour of a cleaner cython/PETSc.Section approach from #5277.
This netgen-specific code is going to be replaced with more generic cython code, so I would focus the review on the non-netgen specifc aspects of this PR.
There was a problem hiding this comment.
I find it really confusing to review multiple dependent PRs. Could you do them one at a time? At least make them merge into one another so the diffs are always the relevant code changes.
There was a problem hiding this comment.
But there is still code in this PR that you want me to ignore? That's what I'm asking to not have happen.
There was a problem hiding this comment.
I assumed that this code would now be removed?
There was a problem hiding this comment.
I cannot remove it without breaking the tests. It will be removed in #5277
There was a problem hiding this comment.
Alternatively we can merge #5034 to main first
There was a problem hiding this comment.
I'll remove this fix from here, it seems that the tests are fine with the default tolerance
| return permutation | ||
|
|
||
|
|
||
| def _recurve_netgen_mesh(coarse_mesh, fine_mesh, order): |
There was a problem hiding this comment.
Can this have a clearer name and docstring? It does something obscure.
There was a problem hiding this comment.
| def _recurve_netgen_mesh(coarse_mesh, fine_mesh, order): | |
| def _transfer_high_order_coordinates(coarse_mesh, fine_mesh, order): |
…drake into pbrubeck/mg-redist
Co-authored-by: Connor Ward <c.ward20@imperial.ac.uk> Co-authored-by: Pablo Brubeck <brubeck@protonmail.com>
Description
AI-assisted
Enables adaptivity on any simplicial mesh via
DMPlex.adaptLabel()/DMPlex.transform()Depends on https://gitlab.com/petsc/petsc/-/merge_requests/9412 (merged) which introduces 3D adaptivity
Enables
prolong/restrict/injectto natively support adaptively-refined/redistributed hierarchiesDeprecate hierarchy-agnostic
AdaptiveTransferManagerin favour ofTransferManager, now with adaptivity and parallel redistribution support.