[petsc-users] DMPlex: Mapping cells before and after partitioning

Bisht, Gautam gautam.bisht at pnnl.gov
Thu Jan 9 16:51:10 CST 2020


> On Jan 9, 2020, at 2:38 PM, Jed Brown <jed at jedbrown.org> wrote:
> 
> "'Bisht, Gautam' via tdycores-dev" <tdycores-dev at googlegroups.com> writes:
> 
>> Hi Matt,
>> 
>> Here is the situation that I’m running into and hoping you could provide some guidance. I create a mesh using DMPlexCreateBoxMesh() in which cells are ordered such that cells with increasing x coordinates are first, followed by cells with increasing y-corodinate and so forth. Next, I call DMPlexDistribute() that rearranges the cells after partitioning. How can I map the cell order after partitioning to cell order before partitioning? (In PFLOTRAN, we call this type of mapping as Ghosted—to—Application or Ghosted—to—Natural).
> 
> Do you need to rely on the element number, or would coordinates (of a
> centroid?) be sufficient for your purposes?  

I do need to rely on the element number.  In my case, I have a mapping file that remaps data from one grid onto another grid. Though I’m currently creating a hexahedron mesh, in the future I would be reading in an unstructured grid from a file for which I cannot rely on coordinates.


> I think DMLabel can be used
> to track that numbering, but I also think it's brittle and probably best
> avoided.

I will look into DMLabel.

> 
> Note that you should be able to get columns to appear on the same
> process after partitioning by setting large weights for the vertical
> coupling.  Alternatively, we could partition a 2D mesh and extrude it
> (see DMPlexExtrude).
> 

Thanks,
-Gautam

PS: I also asked the same question on petsc-users mailing list, so I’m including it in this email thread.


> -- 
> You received this message because you are subscribed to the Google Groups "tdycores-dev" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to tdycores-dev+unsubscribe at googlegroups.com.
> To view this discussion on the web visit https://protect2.fireeye.com/v1/url?k=7fbfa880-230a9739-7fbf8295-0cc47adc5fce-47455a25d1827a20&q=1&e=0edcbe39-9671-477e-b05b-0d3bf6a363e4&u=https%3A%2F%2Fgroups.google.com%2Fd%2Fmsgid%2Ftdycores-dev%2F875zhkmf0z.fsf%2540jedbrown.org.



More information about the petsc-users mailing list