<div dir="ltr"><div dir="ltr">On Tue, Aug 27, 2019 at 4:07 AM Edoardo alinovi via petsc-users <<a href="mailto:petsc-users@mcs.anl.gov">petsc-users@mcs.anl.gov</a>> wrote:<br></div><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="auto">Hello PETSc users and developers,<div dir="auto">I hope you are doing well! Today I have a general question about DMplex to see if it can be usefull to me or not.</div><div dir="auto"><br></div><div dir="auto">I have my fancy finite volume solver (cell centered, incompressible NS) which uses petsc as linear solver engine. Thanks to your suggestions so far it is now running well :)</div><div dir="auto"><br></div><div dir="auto">I would like to see if I can do another step incapsulatng in petsc also the mesh managment part. I think that Dmplex is the way to go since my code is fully unstructured.</div><div dir="auto"><br></div><div dir="auto">I have red some papers and lectures by Matt around the web, but still I have not found an answer to this question:</div><div dir="auto">Can dmplex dial with cell centered data arrangement and provide some support for basic operation (e. g. interpolation between partitions, face value calculation etc)?</div></div></blockquote><div><br></div><div>1) Cell centered data</div><div><br></div><div>Definitely yes. This is the same data layout as P0 finite elements. You just assign the PetscSection k dofs per cell.</div><div><br></div><div>2) Interpolation between partitions</div><div><br></div><div>I assume you mean ghost values from other parallel partitions. You can do this by using overlap=1 in DMPlexDisrtibute().</div><div><br></div><div>3) Face value calculation</div><div><br></div><div>You can do Riemann solves by looping over faces, grabbing values from the neighboring cells, doing the calculation, and</div><div>updating cell values. We carry out this kind of computation in TS ex11. That example attempts to do everything, so it is</div><div>messy, but we can help you understand what it is doing in any part that is unclear.</div><div><br></div><div>4) FV boundary conditions</div><div><br></div><div>You can use DMPlexConstructGhostCells() to put artificial cells around the boundary that you use to prescribe fluxes.</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="auto"><div dir="auto">Thank you very much!</div><div dir="auto"><br></div><div dir="auto">Edo</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></div>