Mesh redistribution support (split from #5215)#5270
Conversation
Reintroduce firedrake/redist.py and the RedistributedMeshTransfer-based support for redistributing refined/adaptively-refined meshes to avoid empty MPI ranks, threaded through MeshHierarchy, AdaptiveMeshHierarchy, and refine_marked_elements. Split out of pbrubeck/mg-redist (#5215) into its own branch/PR, based on top of that branch with the redistribution support removed. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
| distribution_parameters=None, callbacks=None, | ||
| mesh_builder=firedrake.Mesh): | ||
| mesh_builder=firedrake.Mesh, | ||
| redistribute=True): |
There was a problem hiding this comment.
Do we want this to be a kwarg or should we just read it from distribution_parameters?
There was a problem hiding this comment.
I think distribution_parameters is a different thing that is associated with one mesh in particular. I don't think it should go in there.
|
|
||
| u_coarse = Function(V_coarse).interpolate(expr_coarse) |
There was a problem hiding this comment.
| u_coarse = Function(V_coarse).interpolate(expr_coarse) | |
| # test prolong CG1 | |
| u_coarse = Function(V_coarse).interpolate(expr_coarse) |
|
|
||
| r_fine = assemble(conj(TestFunction(V_fine)) * dx) |
There was a problem hiding this comment.
| r_fine = assemble(conj(TestFunction(V_fine)) * dx) | |
| # test restrict CG1 | |
| r_fine = assemble(conj(TestFunction(V_fine)) * dx) |
|
|
||
| u_coarse_injected = Function(V_coarse) |
There was a problem hiding this comment.
| u_coarse_injected = Function(V_coarse) | |
| # test inject CG1 | |
| u_coarse_injected = Function(V_coarse) |
|
Is this ready for review? You seem to still be working on it. |
It is ready you can review it, but ideally we should merge #5213 and #5215 first. I'm adding the review suggestions from the meeting, and I have a genuine question: should we introduce a new |
Summary
Introduces
firedrake/redist.pyand theredistribute=/RedistributedMeshTransfersupport inMeshHierarchy,AdaptiveMeshHierarchy, andrefine_marked_elements.RedistributedMeshTransferwas borrowed from @wence-'s unmerged branch main...wence/feature/redist-mg🤖 Generated with Claude Code