<div dir="ltr"><div dir="ltr">On Tue, Sep 14, 2021 at 5:15 AM Berend van Wachem <<a href="mailto:berend.vanwachem@ovgu.de">berend.vanwachem@ovgu.de</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">Dear PETSc-team,<br>
<br>
We are trying to save and load distributed DMPlex and its associated <br>
physical fields (created with DMCreateGlobalVector) (Uvelocity, <br>
VVelocity, ...) in HDF5_XDMF format. To achieve this, we do the following:<br>
<br>
1) save in the same xdmf.h5 file:<br>
DMView( DM , H5_XDMF_Viewer );<br>
VecView( UVelocity, H5_XDMF_Viewer );<br>
<br>
2) load the dm:<br>
DMPlexCreateFromfile(PETSC_COMM_WORLD, Filename, PETSC_TRUE, DM);<br>
<br>
3) load the physical field:<br>
VecLoad( UVelocity, H5_XDMF_Viewer );<br>
<br>
There are no errors in the execution, but the loaded DM is distributed <br>
differently to the original one, which results in the incorrect <br>
placement of the values of the physical fields (UVelocity etc.) in the <br>
domain.<br>
<br>
This approach is used to restart the simulation with the last saved DM. <br>
Is there something we are missing, or there exists alternative routes to <br>
this goal? Can we somehow get the IS of the redistribution, so we can <br>
re-distribute the vector data as well?<br>
<br>
Many thanks, best regards,<br></blockquote><div><br></div><div>Hi Berend,</div><div><br></div><div>We are in the midst of rewriting this. We want to support saving multiple meshes, with fields attached to each,</div><div>and preserving the discretization (section) information, and allowing us to load up on a different number of</div><div>processes. We plan to be done by October. Vaclav and I are doing this in collaboration with Koki Sagiyama,</div><div>David Ham, and Lawrence Mitchell from the Firedrake team.</div><div><br></div><div>For this problem, we need to give hints for the distribution when you load the DM, as is done now with Vec.</div><div>We have replaced the DMPlexCreateFromFile() with DMLoad() to better match the interface in the rest of PETSc.</div><div>Hopefully the wait is not too big an inconvenience.</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">
Berend.<br>
<br>
<br>
</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>