[petsc-users] Any examples to output a dmplex mesh as a hdf5 file?
Fande Kong
fd.kong at siat.ac.cn
Thu Jun 26 20:52:12 CDT 2014
Hi Matt,
Is it possible to send me some printed hdf5 and xdmf files (representing a
simple mesh) that can be visualized by Paraview? Similarly like that
printed by pylith. From these files I think I can figure out how to write a
hdf5 viewer by myself.
Sorry for bothering you.
Thanks,
On Wed, Jun 25, 2014 at 11:46 PM, Matthew Knepley <knepley at gmail.com> wrote:
> On Tue, Jun 24, 2014 at 7:50 AM, Fande Kong <fd.kong at siat.ac.cn> wrote:
>
>> Hi all,
>>
>> There are some functions called DMPlex_load_hdf5 and DMPlex_view_hdf5 in
>> petsc-dev. They are really good functions for outputting the solution as a
>> hdf5 file in parallel. Are there any examples to show how to use these
>> functions? Or are there some printed hdf5 and xdmf files that can be
>> visualized by paraview?
>>
>
> This is very new code. I plan to write a manual section as soon as the
> functionality solidifies. However, here is how I am currently using it.
> Anywhere that you think about viewing something add
>
> ierr = PetscObjectViewFromOptions((PetscObject) obj, prefix,
> "-my_obj_view");CHKERRQ(ierr);
>
> Then you can use the standard option style
>
> -my_obj_view hdf5:my.h5
>
> This extends nicely to many objects. Here is what I use for my magma
> dynamics output
>
> -dm_view hdf5:sol_solver_debug.h5 -magma_view_solution
> hdf5:sol_solver_debug.h5::append -compaction_vec_view
> hdf5:sol_solver_debug.h5:HDF5_VIZ:append
>
> There is still a problem in that you cannot choose multiple formats using
> this method. I am going to extend
> the view options format
>
> type:file:format:mode
>
> to allow
>
> type:file:format,format,format:mode
>
> to handle this.
>
> Thanks,
>
> Matt
>
>
>> Thanks,
>>
>> Fande,
>>
>>
>>
>
>
> --
> 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
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20140627/652e454c/attachment.html>
More information about the petsc-users
mailing list