<div dir="ltr">DMView() the mesh before and after distribution, so we can see what we have.<div><br></div><div> Thanks,</div><div><br></div><div> Matt</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed, Aug 14, 2019 at 5:30 PM Swarnava Ghosh via petsc-users <<a href="mailto:petsc-users@mcs.anl.gov">petsc-users@mcs.anl.gov</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr">Hi PETSc team and users,<div><br></div><div>I am trying to create a 3D dmplex mesh using DMPlexCreateFromCellList, then distribute it, and find out the coordinates of the vertices owned by each process.</div><div>My cell list is as follows:</div><div>numCells: 6 <br>numVertices: 7 <br>numCorners: 4 <br>cells: <br>0 <br>3 <br>2 <br>1 <br>4 <br>0 <br>2 <br>1 <br>6 <br>4 <br>2 <br>1 <br>3 <br>6 <br>2 <br>1 <br>5 <br>4 <br>6 <br>1 <br>3 <br>5 <br>6 <br>1 <br>vertexCoords: <br>-6.043000 <br>-5.233392 <br>-4.924000 <br>-3.021500 <br>0.000000 <br>-4.924000 <br>-3.021500 <br>-3.488928 <br>0.000000 <br>-6.043000 <br>1.744464 <br>0.000000 <br>0.000000 <br>-5.233392 <br>-4.924000 <br>3.021500 <br>0.000000 <br>-4.924000 <br>3.021500 <br>-3.488928 <br>0.000000 <br></div><div><br></div><div>After reading this information, I do</div><div> ierr= DMPlexCreateFromCellList(PETSC_COMM_WORLD,3,pCgdft->numCellsESP,pCgdft->NESP,pCgdft->numCornersESP,interpolate,pCgdft->cellsESP,3,pCgdft->vertexCoordsESP,&pCgdft->dmplex);<br></div><div><br></div><div>ierr = DMPlexDistribute(pCgdft->dmplex,0,&pCgdft->dmplexSF, &distributedMesh);CHKERRQ(ierr);<br><br> if (distributedMesh) {<br> printf("mesh is distributed \n");<br> ierr = DMDestroy(&pCgdft->dmplex);CHKERRQ(ierr);<br> pCgdft->dmplex = distributedMesh;<br> }<br></div><div><br></div><div> DMGetCoordinates(pCgdft->dmplex,&VC);<br> VecView(VC,PETSC_VIEWER_STDOUT_WORLD);<br></div><div><br></div><div>On running this with 3 mpi processes, From VecView, I see that all the processes own all the vertices. Why is the dmplex not being distributed?</div><div><br></div><div>The VecView is :</div><div>Process [0]<br>-6.043<br>-5.23339<br>-4.924<br>-3.0215<br>0.<br>-4.924<br>-3.0215<br>-3.48893<br>0.<br>-6.043<br>1.74446<br>0.<br>0.<br>-5.23339<br>-4.924<br>3.0215<br>0.<br>-4.924<br>3.0215<br>-3.48893<br>0.<br>Process [1]<br>-6.043<br>-5.23339<br>-4.924<br>-3.0215<br>0.<br>-4.924<br>-3.0215<br>-3.48893<br>0.<br>-6.043<br>1.74446<br>0.<br>0.<br>-5.23339<br>-4.924<br>3.0215<br>0.<br>-4.924<br>3.0215<br>-3.48893<br>0.<br>Process [2]<br>-6.043<br>-5.23339<br>-4.924<br>-3.0215<br>0.<br>-4.924<br>-3.0215<br>-3.48893<br>0.<br>-6.043<br>1.74446<br>0.<br>0.<br>-5.23339<br>-4.924<br>3.0215<br>0.<br>-4.924<br>3.0215<br>-3.48893<br>0.<br></div><div><br></div><div>Thanks,</div><div>SG</div><div><br></div></div>
</blockquote></div><br clear="all"><div><br></div>-- <br><div dir="ltr" class="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><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><div><br></div><div><a href="http://www.cse.buffalo.edu/~knepley/" target="_blank">https://www.cse.buffalo.edu/~knepley/</a><br></div></div></div></div></div></div></div>