<div dir="ltr">On Thu, Feb 28, 2013 at 8:24 AM, Garnet Vaz <span dir="ltr"><<a href="mailto:garnet.vaz@gmail.com" target="_blank">garnet.vaz@gmail.com</a>></span> wrote:<br><div class="gmail_extra"><div class="gmail_quote">
<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">Hi,<br>
<br>
I would like to know what some of the arguments for<br>
DMPlexCreateFromCellList are supposed to be for a triangular mesh.<br>
<br>
The function is:<br>
DMPlexCreateFromCellList(MPI_Comm comm, PetscInt dim, PetscInt<br>
numCells, PetscInt numVertices, PetscInt numCorners, PetscBool<br>
interpolate, const int cells[], PetscInt spaceDim, const double<br>
vertexCoords[], DM *dm)<br>
<br>
dim = 2<br>
numCells = nCells (not the entire length of the cells array; instead length/3)<br>
numVertices = nVert (length of vertexCoords/2)<br>
numCorners = 3<br>
spaceDim = 2<br>
<br>
What is wrong with my understanding about the following variables?<br>
The error I get is the following:<br>
<br>
[0]PETSC ERROR: Argument out of range!<br>
[0]PETSC ERROR: Cone point 43 is not in the valid range [0, 43)!<br></blockquote><div><br></div><div style>I have created a proper webpage for this function which will be on the web at midnight. Here it is</div><div style>
<br></div><div style><div>/*@C</div><div> DMPlexCreateFromCellList - This takes as input common mesh generator output, a list of the vertices for each cell, and produces a DM</div><div><br></div><div> Input Parameters:</div>
<div>+ comm - The communicator</div><div>. dim - The topological dimension of the mesh</div><div>. numCells - The number of cells</div><div>. numVertices - The number of vertices</div><div>. numCorners - The number of vertices for each cell</div>
<div>. interpolate - Flag indicating that intermediate mesh entities (faces, edges) should be created automatically</div><div>. cells - An array of numCells*numCorners numbers, the vertices for each cell</div><div>. spaceDim - The spatial dimension used for coordinates</div>
<div>- vertexCoords - An array of numVertices*spaceDim numbers, the coordinates of each vertex</div><div><br></div><div> Output Parameter:</div><div>. dm - The DM</div><div><br></div><div> Note: Two triangles sharing a face</div>
<div>$</div><div>$ 2</div><div>$ / | \</div><div>$ / | \</div><div>$ / | \</div><div>$ 0 0 | 1 3</div><div>$ \ | /</div><div>$ \ | /</div><div>$ \ | /</div><div>$ 1</div>
<div>would have input</div><div>$ numCells = 2, numVertices = 4</div><div>$ cells = [0 1 2 1 3 2]</div><div>$</div><div>which would result in the DMPlex</div><div>$</div><div>$ 4</div><div>$ / | \</div><div>
$ / | \</div><div>$ / | \</div><div>$ 2 0 | 1 5</div><div>$ \ | /</div><div>$ \ | /</div><div>$ \ | /</div><div>$ 3</div><div><br></div><div> Level: beginner</div><div><br></div>
<div>.seealso: DMPlexCreate()</div><div>@*/</div><div><br></div><div style>Does this help?</div><div style><br></div><div style> Thanks,</div><div style><br></div><div style> 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">
<br>
Thank You.<br>
<br>
--<br>
Regards,<br>
Garnet<br>
</blockquote></div><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>