<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Fri, Jun 9, 2017 at 9:41 AM, Xavier Garnaud <span dir="ltr"><<a href="mailto:xgarnaud@gmail.com" target="_blank">xgarnaud@gmail.com</a>></span> wrote:<br><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">Dear all,<div><br></div><div>I am working on a vertex-centered Finite Volume <span id="gmail-m_-4734689899345112525:4j7.1">CFD</span> solver (with only tetrahedral or triangular cells). I'd like to be able to use <span id="gmail-m_-4734689899345112525:4j7.2">DMPlex</span>, but I have a couple of questions:</div><div><br></div><div>For me, the most convenient way to store the mesh is to have, in addition to the standard <span id="gmail-m_-4734689899345112525:4j7.3">DMPlex</span> built from a cell to node connectivity is to also have 2 types of fictitious edges:</div><div>   1- for periodic surfaces, I build ghost cells and ghost nodes prior to building the <span id="gmail-m_-4734689899345112525:4j7.5">DMPlex</span>, and I'd like to add "edges" that will give the matching between the ghost nodes and the corresponding nodes. These edges will not belong to any face or cell --> what would be the most convenient way to add such edges ?</div></div></blockquote><div><br></div><div>I do not understand doing it that way, although I think you could do it. You can build any kind of adjacency just by adding a point and its cone.</div><div><br></div><div>I manage periodic surfaces just by discretizing the periodic topology directly, since topology and geometry are decoupled. For example, on</div><div>the circle, we just directly have the edges of the circle.</div><div> </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"><div>    2- for each node on each boundary surface, I'd like to add a fictitious edge to easily compute the Finite Volume operators. --> can I have edges that link a node to itself (possible several times if the node belongs to several surfaces)? alternatively, should I add a fictitious node for each surface, and link all the nodes in the surface to this fictitious node?</div></div></blockquote><div><br></div><div>I think I understand this one. This would be the analogue of my "ghost cells". Then you put the boundary concentration in the ghost cell and compute</div><div>the relevant boundary flux along the boundary face. You are talking about the topology as the dual to what I am used to, so you have ghost nodes</div><div>instead of cells and ghost edges instead of faces.</div><div> </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"><div>For the mesh partition, which option should I use in <br></div><div><br></div><div>    <span id="gmail-m_-4734689899345112525:4j7.8">ierr</span> = <span id="gmail-m_-4734689899345112525:4j7.9">DMPlexSetAdjacencyUseCone</span>(_<span id="gmail-m_-4734689899345112525:4j7.10">dm</span>,<span id="gmail-m_-4734689899345112525:4j7.11"><wbr>PETSC</span>_TRUE);</div><div>    <span id="gmail-m_-4734689899345112525:4j7.12">ierr</span> = <span id="gmail-m_-4734689899345112525:4j7.13">DMPlexSetAdjacencyUseClosure</span>(_<span id="gmail-m_-4734689899345112525:4j7.14"><wbr>dm</span>,<span id="gmail-m_-4734689899345112525:4j7.15">PETSC</span>_TRUE);</div><div><br></div><div>knowing that the unknowns are stores at the <span id="gmail-m_-4734689899345112525:4j7.16">vertices</span> and that two <span id="gmail-m_-4734689899345112525:4j7.17">vertices</span> are connected if there is an edge between them?</div></div></blockquote><div><br></div><div>For the topology I use, I believe you want PETSC_TRUE and PETSC_FALSE, as I show on this page</div><div><br></div><div>  <a href="http://www.mcs.anl.gov/petsc/petsc-current/docs/manualpages/DM/DMPlexGetAdjacencyUseClosure.html">http://www.mcs.anl.gov/petsc/petsc-current/docs/manualpages/DM/DMPlexGetAdjacencyUseClosure.html</a></div><div><br></div><div>but if you are using the dual, as you do above, then it would be</div><div><br></div><div>  PETSC_FALSE and PETSC_FALSE</div><div><br></div><div>I realize that the FV support is not as developed as the FEM support, so feel free to mail when you have problems.</div><div><br></div><div>  Thanks,</div><div><br></div><div>    Matt</div><div> </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"><div>Thank you very much for your library, and for your help.</div><div><br></div><div>Best regards,</div><div><br></div><div>Xavier</div></div>
</blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature"><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.caam.rice.edu/~mk51/" target="_blank">http://www.caam.rice.edu/~mk51/</a><br></div></div></div>
</div></div>