<div dir="ltr">Hello Matt, <div><br></div><div>Thanks for your kind replay. Using DMplex and changing the data structure is not a straightforward task as you can imagine. Up to now I am in the preliminaries and I am trying to understand how to reuse most of all my subroutines (I am using fortran) such as fluxes and coeffs assembly, numerical schemes and so o in order to avoid to rewrite all the code :p I will start with your first two suggestions and see if it is an affordable task :) </div><div><br></div><div>For the face value, I am not interested in Reimann solvers. Being incompressible I am using Central difference, QUICK, SOU, Upwind or TVD-family schemes, but maybe I can use my stuff to get it.</div><div><br></div><div>I think I can be happy enough having the ghost cell centers available and some way to deal with the BC (I guess this will be the most tricky part). Basically I would like to use DMplex at low level just to have a support for the parallel mesh management. </div><div>Have you got some example for P0 finite elements and overlap=1?</div><div><br></div><div>Thank you! :) </div><div> <br><div><div dir="ltr" class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div><br></div></div></div></div></div></div><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">Il giorno mar 27 ago 2019 alle ore 09:33 Matthew Knepley <<a href="mailto:knepley@gmail.com">knepley@gmail.com</a>> ha scritto:<br></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 dir="ltr">On Tue, Aug 27, 2019 at 4:07 AM Edoardo alinovi via petsc-users <<a href="mailto:petsc-users@mcs.anl.gov" target="_blank">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-m_-4856282592389270037gmail_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>
</blockquote></div>