[CIG-SHORT] Fwd: Question about saving both h5 and vtk file

Matthew Knepley knepley at rice.edu
Tue Oct 10 18:10:41 PDT 2017


On Tue, Oct 10, 2017 at 9:04 PM, Li, Teng <tengli2 at illinois.edu> wrote:

> Hi Brad,
>
> The reason I need both HDF5 and VTK files is because I would like to post
> process the data by using HDF5 file in Matlab. Post processing by using
> Matlab is more convenient and powerful. In order to make sure the results
> are right, I also need to use Paraview to show the data VTK file. That's
> why I think I need both kinds of output.


You can view the HDF5 file in Paraview using the XDMF file created by
PyLith. Does this not work for you?

  Thanks,

   Matt


>
> Best,
> Teng
>
>
>
>
> Teng Li
>
> Master Candidate in Structures
>
> Department of Civil and Environmental Engineering
>
> University of Illinois at Urbana-Champaign
>
> 205 North Mathews Ave, Urbana, IL. 61801
>
> Phone:(217)8196210, Email: tengli2 at illinois.edu
>
>
>
> ________________________________________
> From: CIG-SHORT [cig-short-bounces at geodynamics.org] on behalf of Brad
> Aagaard [baagaard at usgs.gov]
> Sent: Tuesday, October 10, 2017 3:58 PM
> To: cig-short at geodynamics.org
> Subject: Re: [CIG-SHORT] Fwd:  Question about saving both h5 and vtk file
>
> Teng,
>
> In designing the PyLith output we assume a user will only want to output
> information to a single format. For the solution fields it is possible
> to output the same information in multiple formats by simply creating
> additional output managers even though this was not the intent of the
> design. However, for state variable output we only provide one output
> manager, so you must pick one format. For real research applications, we
> strongly recommend people use the HDF5 writers as they are much more
> efficient as writing binary HDF5 files is much faster than writing ASCII
> VTK files.
>
> If you describe why you think you want both HDF5 and VTK output, we can
> probably point you in the right direction for how to use HDF5 output in
> the way you intend.
>
> Regards,
> Brad
>
>
> On 10/10/2017 01:52 PM, Charles Williams wrote:
> >
> >
> >> Begin forwarded message:
> >>
> >> *From: *"Li, Teng" <tengli2 at illinois.edu <mailto:tengli2 at illinois.edu>>
> >> *Subject: **[CIG-SHORT] Question about saving both h5 and vtk file*
> >> *Date: *11 October 2017 at 9:05:52 AM NZDT
> >> *To: *"cig-short at geodynamics.org <mailto:cig-short at geodynamics.org>"
> >> <cig-short at geodynamics.org <mailto:cig-short at geodynamics.org>>
> >> *Reply-To: *cig-short at geodynamics.org <mailto:cig-short at geodynamics.org
> >
> >>
> >> Hi all,
> >>
> >> I have a question about saving both h5 file and VTK files in the output.
> >>
> >> Right now, I use the following output command:
> >>
> >> #----Stress
> >> [pylithapp.problem.materials.elastic.output]
> >> cell_info_fields = []
> >> cell_data_fields = [stress]
> >> cell_filter = pylith.meshio.CellFilterAvg
> >> writer = pylith.meshio.DataWriterVTK
> >> writer.filename = ouptut/material.vtk
> >> skip=200
> >>
> >>
> >> #----Stress
> >> [pylithapp.problem.materials.elastic.output]
> >> cell_info_fields = []
> >> cell_data_fields = [stress]
> >> cell_filter = pylith.meshio.CellFilterAvg
> >> writer = pylith.meshio.DataWriterHDF5
> >> skip=200
> >> writer.filename = output/material.h5
> >>
> >> However, it seems the second part overrides the first part and I only
> >> get stress.h5 file. My question is how to output both h5 and vtk files?
> >>
> >> Best,
> >> Teng
> >>
> >> Teng Li
> >>
> >> Master Candidate in Structures
> >>
> >> Department of Civil and Environmental Engineering
> >>
> >> University of Illinois at Urbana-Champaign
> >>
> >> 205 North Mathews Ave, Urbana, IL. 61801
> >>
> >> Phone:(217)8196210, Email:tengli2 at illinois.edu
> >> <mailto:tengli2 at illinois.edu>
> >>
> >>
> >>
> >> _______________________________________________
> >> CIG-SHORT mailing list
> >> CIG-SHORT at geodynamics.org <mailto:CIG-SHORT at geodynamics.org>
> >> http://lists.geodynamics.org/cgi-bin/mailman/listinfo/cig-short
> >
> > *Charles Williams I Geodynamic Modeler
> > GNS Science **I** Te Pῡ Ao*
> > 1 Fairway Drive, Avalon 5010, PO Box 30368, Lower Hutt 5040, New Zealand
> > *Ph* 0064-4-570-4566 I *Mob* 0064-22-350-7326 I *Fax* 0064-4-570-4600*_
> > _**http://www.gns.cri.nz/**I**Email: **C.Williams at gns.cri.nz*
> > <mailto:your.email at gns.cri.nz>
> >
> > Notice: This email and any attachments are confidential and may not be
> > used, published or redistributed without the prior written consent of
> > the Institute of Geological and Nuclear Sciences Limited (GNS Science).
> > If received in error please destroy and immediately notify GNS Science.
> > Do not copy or disclose the contents.
>
> _______________________________________________
> CIG-SHORT mailing list
> CIG-SHORT at geodynamics.org
> http://lists.geodynamics.org/cgi-bin/mailman/listinfo/cig-short
> _______________________________________________
> CIG-SHORT mailing list
> CIG-SHORT at geodynamics.org
> http://lists.geodynamics.org/cgi-bin/mailman/listinfo/cig-short
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.geodynamics.org/pipermail/cig-short/attachments/20171010/90c3c0a6/attachment-0001.html>


More information about the CIG-SHORT mailing list