<div dir="ltr"><div><div><div>Matt,<br><br></div>Creating structured meshes on rank 0 is no problem. The issue I am having is the amount of time it takes to distribute the mesh across multiple processes. If I know the grid has a structured format, then wouldn't it be much faster to have each process create its local portion of the DMPlex chart instead of calling a graph partitioner? As long as we know the global number of cells/points in each spatial direction, the desired local organization of cells/points for each rank, and where the ghost nodes reside, I imagine this should be (almost) entirely local and scalable. I would think the only real work that goes into this is to determine a prior an algorithm that evenly distributes the mesh points and to create the SF associate with each local portion of the DM?<br><br></div>Thanks,<br></div>Justin<br></div><div class="gmail_extra"><br><div class="gmail_quote">On Fri, May 8, 2015 at 7:40 AM, Matthew Knepley <span dir="ltr"><<a href="mailto:knepley@gmail.com" target="_blank">knepley@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><span class="">On Thu, May 7, 2015 at 10:31 PM, Justin Chang <span dir="ltr"><<a href="mailto:jychang48@gmail.com" target="_blank">jychang48@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div><div><div><div><div><div>Hello everyone,<br><br></div>If I know for a fact that I will be using structured grids AND still want the DMPlex data structure, what's the best/fastest way of achieving this? Should I:<br><br>a) Invoke DMDACreate2d(PETSC_COMM_WORLD, DM_BOUNDARY_NONE, DM_BOUNDARY_NONE,DMDA_STENCIL_BOX,-3,-3,PETSC_DECIDE,PETSC_DECIDE,1,1,NULL,NULL,&da); to get the parallel cell-vertex layout and (somehow) translate this into a DMPlex?<br><br></div>b) Manually set the local DMPlex chart/DAG and assign the SF along the appropriate processors?<br><br></div>c) Invoke some DMDA/DMPlex function or set of functions that already exist for this purpose?<br></div></div></div></div></blockquote><div><br></div></span><div>It was supposed to work the same way as DMPlex in that you create the DM and a DS, and then</div><div>the Section is created automatically. However, there is so much DA specific stuff coded and no</div><div>one really wanted to use it, so its not maintained or consistent.</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div><div><div></div>d) Something else?<br></div></div></div></blockquote><div><br></div><div>RIght now, I think the best thing to do is use DMPlexCreateHexBoxMesh(), which gives you a structured mesh. Get</div><div>everything in your code working. Then, if you really feel limited by the mesh structure, we can make the DMDA code</div><div>work.</div><div><br></div><div>  Thanks,</div><div><br></div><div>     Matt</div><span class=""><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div><div></div><div>I know I could just input or create a coarse DAG and invoke -dm_refine, but I was wondering if there is an alternative to this method.<br></div><div><br></div>Thanks,<br></div>Justin<br></div>
</blockquote></span></div><span class="HOEnZb"><font color="#888888"><br><br clear="all"><div><br></div>-- <br><div>What most experimenters take for granted before they begin their experiments is infinitely more interesting than any results to which their experiments lead.<br>-- Norbert Wiener</div>
</font></span></div></div>
</blockquote></div><br></div>