<div dir="ltr">On Fri, Mar 1, 2013 at 12:14 PM, 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:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi Matt,<br>
<br>
For this very example, (DMPlexCreateFromCellList webpage)<br>
how can I construct the Sieve object corresponding to<br>
something similar as shown in the Sieve paper Figure 1. The plex object<br>
currently does not hold edge information and I would like to loop<br>
through the edges.</blockquote><div><br></div><div style>You have two options:</div><div style><br></div><div style> 1) Hard: Put in those edges yourself, so expand the input to DMPlexCreateFromCellList()</div><div style>
<br></div><div style>or</div><div style><br></div><div style> 2) Easy: DMPlexInterpolate(dmOriginal, &dmWithFacesAndEdges)</div><div style><br></div><div style> Thanks,</div><div style><br></div><div style> Matt</div>
<div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="im">
Thank You.<br>
<br>
On Thu, Feb 28, 2013 at 6:53 AM, Matthew Knepley <<a href="mailto:knepley@gmail.com">knepley@gmail.com</a>> wrote:<br>
</div><div><div class="h5">> On Thu, Feb 28, 2013 at 8:24 AM, Garnet Vaz <<a href="mailto:garnet.vaz@gmail.com">garnet.vaz@gmail.com</a>> wrote:<br>
>><br>
>> 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<br>
>> 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>
><br>
><br>
> I have created a proper webpage for this function which will be on the web<br>
> at midnight. Here it is<br>
><br>
> /*@C<br>
> DMPlexCreateFromCellList - This takes as input common mesh generator<br>
> output, a list of the vertices for each cell, and produces a DM<br>
><br>
> Input Parameters:<br>
> + comm - The communicator<br>
> . dim - The topological dimension of the mesh<br>
> . numCells - The number of cells<br>
> . numVertices - The number of vertices<br>
> . numCorners - The number of vertices for each cell<br>
> . interpolate - Flag indicating that intermediate mesh entities (faces,<br>
> edges) should be created automatically<br>
> . cells - An array of numCells*numCorners numbers, the vertices for each<br>
> cell<br>
> . spaceDim - The spatial dimension used for coordinates<br>
> - vertexCoords - An array of numVertices*spaceDim numbers, the coordinates<br>
> of each vertex<br>
><br>
> Output Parameter:<br>
> . dm - The DM<br>
><br>
> Note: Two triangles sharing a face<br>
> $<br>
> $ 2<br>
> $ / | \<br>
> $ / | \<br>
> $ / | \<br>
> $ 0 0 | 1 3<br>
> $ \ | /<br>
> $ \ | /<br>
> $ \ | /<br>
> $ 1<br>
> would have input<br>
> $ numCells = 2, numVertices = 4<br>
> $ cells = [0 1 2 1 3 2]<br>
> $<br>
> which would result in the DMPlex<br>
> $<br>
> $ 4<br>
> $ / | \<br>
> $ / | \<br>
> $ / | \<br>
> $ 2 0 | 1 5<br>
> $ \ | /<br>
> $ \ | /<br>
> $ \ | /<br>
> $ 3<br>
><br>
> Level: beginner<br>
><br>
> .seealso: DMPlexCreate()<br>
> @*/<br>
><br>
> Does this help?<br>
><br>
> Thanks,<br>
><br>
> Matt<br>
><br>
>><br>
>><br>
>> Thank You.<br>
>><br>
>> --<br>
>> Regards,<br>
>> Garnet<br>
><br>
><br>
><br>
><br>
> --<br>
> What most experimenters take for granted before they begin their experiments<br>
> is infinitely more interesting than any results to which their experiments<br>
> lead.<br>
> -- Norbert Wiener<br>
<br>
<br>
<br>
</div></div>--<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>