I think you would follow this order:<div><br></div><div>1*) create a DMPlex (depth, chart, etc) on rank 0. Other ranks have an empty DM</div><div><br></div><div>2) DMPlexDistribute()</div><div><br></div><div>3*) Create the PetscSection</div><div><br></div><div>4) DMCreateGlobalVector() </div><div><br></div><div>5) DMCreateLocalVector()</div><div><br></div><div>Now you have a global vector and a local vector for your distributed DMPlex. The mapping/ghosting/etc of dofs is already taken care of.</div><div><br></div><div>* if you're using standard Galerkin FE then in SNES examples 12 and 62 (and maybe others?) the first step is handled through the mesh generation functions and step 3 is handled through step 4</div><div><br></div><div>Thanks,</div><div>Justin</div><div><br>On Wednesday, December 16, 2015, Alejandro D Otero <<a href="mailto:aotero@fi.uba.ar">aotero@fi.uba.ar</a>> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Hi, I need some help understanding how to distribute data together with a dmplex representing a FE mesh. <div>At the beginning I define the structure of the dmplex assigning certain number of DoF to cells, edges and vertexes, in one process (the dmplex in the rest is empty) </div><div>I create a petscsecton and I create an associated global vector with the quantities I want to store.</div><div>Then I distribute the dmplex over all the processes.</div><div>* Although this does not perform well it is just a starting point. I know it has to be improved. </div><div><br></div><div>I would like to have the global vector distributed accordingly so that each process has access to the corresponding local part with its DoF (possibly adding some ghost values corresponding to the shared DoF not taken care by it).</div><div><br></div><div>Is there any 'correct' way to do that in PETSc? </div><div><br></div><div>Thanks in advance,</div><div><br></div><div>Alejandro</div></div>
</blockquote></div>