[petsc-users] Can PetscSections of a DMPlex be written out and read in with HDF5?

Matthew Knepley knepley at gmail.com
Fri Jul 13 10:46:14 CDT 2018


On Fri, Jul 13, 2018 at 9:17 AM Jordan Wagner <j.wagner at rice.edu> wrote:

> Hi,
>
> In my code, I have a separate preprocessing script that I usually run in
> serial to set up various things for my solver. One of the things I want
> the preprocessor to do is setup everything related to the DMPlex, and
> then I write it out to an HDF5 file to be read in the main solver. In
> the preprocessor, I have everything set up how I want it as far as the
> DM and have created and specified a default section. My problem is that
> when reading the resulting HDF5 file with DMLoad in my main solver, it
> doesn't look like I have the default section anymore. Most everything
> else, such as the labels, seem to be working fine. Is there a way to
> make the DMView/DMLoad functions write/read the default sections as
> well? That way I can immediately run DMPlexDistribute and have
> everything distributed right off the bat in the main solver.
>

Hi Jordan,

I had not written it this way because my Sections are created automatically
from a
specification of the discretization. What kind of discretization are you
using?

We could certainly do this. The easiest way I think is to wrap the internal
dof and off
arrays as IS and use ISView/Load. Would you also want the BC?

  Thanks,

    Matt


> Thanks a lot!
>
> jw
>
>

-- 
What most experimenters take for granted before they begin their
experiments is infinitely more interesting than any results to which their
experiments lead.
-- Norbert Wiener

https://www.cse.buffalo.edu/~knepley/ <http://www.caam.rice.edu/~mk51/>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20180713/60b8a9c9/attachment.html>


More information about the petsc-users mailing list