Hi Justin,
On 11 Jan 2017, at 21:48, Justin Chang <jychang48@gmail.com> wrote:
Hi all,
Is there a way to pass -dm_refine <number> into Firedrake? That or what's the best way to do a parallel mesh refinement after the initial mesh is created and distributed (I think I recall seeing another mail about this last month).
If you just want the refined distributed mesh, you can use this bit of code: from firedrake.mg.impl import filter_exterior_facet_labels coarse = Mesh(...) dm = coarse._plex # uniform refinement dm.setRefinementUniform(True) fdm = dm.refine() fdm.removeLabel("interior_facets") fdm.removeLabel("op2_core") fdm.removeLabel("op2_non_core") fdm.removeLabel("op2_exec_halo") fdm.removeLabel("op2_non_exec_halo") filter_exterior_facet_labels(fdm) fine = Mesh(fdm, dim=coarse.ufl_cell().geometric_dimension(), distribute=False) We could certainly wrap this up nicely. Cheers, Lawrence