[petsc-users] Any examples to output a dmplex mesh as a hdf5 file?

Matthew Knepley knepley at gmail.com
Thu Jun 26 23:31:51 CDT 2014


On Thu, Jun 26, 2014 at 6:52 PM, Fande Kong <fd.kong at siat.ac.cn> wrote:

> 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.
>

I can, here is a representative HDF5 file (you can generate Xdmf using
bin/pythonscripts/petsc_gen_xdmf.py). Did the
viewer not work for you?

  Thanks,

     Matt


> 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
>>
>
>


-- 
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/20140626/c7f1bfb9/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: sol.h5
Type: application/octet-stream
Size: 246288 bytes
Desc: not available
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20140626/c7f1bfb9/attachment-0001.obj>


More information about the petsc-users mailing list