<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Wed, Aug 13, 2014 at 2:48 AM, aymeric aymeric <span dir="ltr"><<a href="mailto:sickofcowboys@hotmail.com" target="_blank">sickofcowboys@hotmail.com</a>></span> wrote:<br>
<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">
<div><div dir="ltr">- I create a dmplex with DMPlexCreateHexBoxMesh<div>- Distribute it with DMPlexDistribute</div></div></div></blockquote><div><br></div><div>Here you are missing a crucial step. You have to define a data layout over the mesh. The most</div>
<div>basic way to do this is to create a PetscSection object, and then use DMSetDefaulSection().</div><div>There is a helper function for this:</div><div><br></div><div> <a href="http://www.mcs.anl.gov/petsc/petsc-current/docs/manualpages/DM/DMPlexCreateSection.html">http://www.mcs.anl.gov/petsc/petsc-current/docs/manualpages/DM/DMPlexCreateSection.html</a></div>
<div><br></div><div>The DMDA has a default layout in which every vertex gets dof degrees of freedom.</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-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
<div><div dir="ltr"><div>- Create a Vec based on the distributed dmplex with DMCreateGlobalVector</div><div>- But when I check the size of this Vec with VecGetOwnershipRange or VecGetSize, it is empty.</div><div><br></div>
<div>What am I missing? </div><div><br></div><div>I know this is possible, because in SNES ex12.c a vector is created using this sequence of commands. Unfortunately, it some other commands are also used, but they are not all documented.</div>
<div><br></div><div>Thanks.</div> </div></div>
</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>