<div dir="ltr">Thanks a lot Matt. That helped.<div><br></div><div>Regards,</div><div>Anthony</div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On 13 November 2013 00:10, 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"><div class="im">On Tue, Nov 12, 2013 at 5:32 PM, Anthony Vergottis <span dir="ltr"><<a href="mailto:a.vergottis@ucl.ac.uk" target="_blank">a.vergottis@ucl.ac.uk</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div dir="ltr"><div>I would like to calculate the area of all the elements in my unstructured mesh. This is the process that I have envisaged:</div>
<div><br></div><div>1) Partition the mesh with <span style="color:rgb(80,0,80);font-family:arial,sans-serif;font-size:12.800000190734863px">DMPlexDistribute.</span></div>
<div><span style="color:rgb(80,0,80);font-family:arial,sans-serif;font-size:12.800000190734863px"><br></span></div><div><span style="color:rgb(80,0,80);font-family:arial,sans-serif;font-size:12.800000190734863px">2) Obtain which cell/vertices are owned by each process.</span></div>
<div><span style="color:rgb(80,0,80);font-family:arial,sans-serif;font-size:12.800000190734863px"><br></span></div><div><span style="color:rgb(80,0,80);font-family:arial,sans-serif;font-size:12.800000190734863px">3) Have each process calculate the area of the cells it own, as I would like to do this in parallel.</span></div>
<div><span style="color:rgb(80,0,80);font-family:arial,sans-serif;font-size:12.800000190734863px"><br></span></div><div><span style="color:rgb(80,0,80);font-family:arial,sans-serif;font-size:12.800000190734863px">I hope this explains things a bit better.</span></div>
</div></blockquote><div><br></div></div><div>ierr = DMPlexGetHeightStratum(dm, 0, &cStart, &cEnd);CHKERRQ(ierr);</div><div>for (c = cStart; c < cEnd; ++c) {</div><div> PetscReal vol;</div><div> ierr = DMPlexComputeCellGeometryFVM(dm, c, &vol, NULL, NULL);CHKERRQ(ierr);</div>
<div> <do crap with the cell volume></div><div>}</div><div><br></div><div> Matt</div><div class="im"><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
<div dir="ltr"><div><font color="#500050" face="arial, sans-serif">Thanks.</font></div><div><font color="#500050" face="arial, sans-serif"><br>
</font></div><div><font color="#500050" face="arial, sans-serif">Regards,</font></div><div><font color="#500050" face="arial, sans-serif">Anthony</font></div><div><br></div></div><div class="gmail_extra"><br><br><div class="gmail_quote">
On 12 November 2013 23:25, 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:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><div>On Tue, Nov 12, 2013 at 4:10 PM, Anthony Vergottis <span dir="ltr"><<a href="mailto:a.vergottis@ucl.ac.uk" target="_blank">a.vergottis@ucl.ac.uk</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div dir="ltr">Dear All,<div><br></div><div>How does one get the local and global numbers of nodes/elements on each process after the DMPlexDistribute function has been used to partition the mesh (DM object)?</div>
</div></blockquote><div><br></div></div><div>Can you be more explicit? Vertices and cells are renumbered after distribution to be contiguous on</div><div>each process:</div><div><br></div><div> cell: [0, numCells)</div>
<div> vertices: [numCells, numCells+numVertices)</div>
<div><br></div><div> Matt</div><div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div dir="ltr">
<div>Are there any built in PETSc functions that offer such functionality?</div>
<div><br></div><div>Thanks in advance.</div><div><br></div><div>Regards,</div><div>Anthony</div>
</div>
</blockquote></div></div><span><font color="#888888"><br><br clear="all"><span><font color="#888888"><div><br></div>-- <br>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
</font></span></font></span></div></div>
</blockquote></div><br></div>
</blockquote></div></div><div class="im"><br><br clear="all"><div><br></div>-- <br>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></div>
</blockquote></div><br></div>