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

Brad Aagaard baagaard at usgs.gov
Tue Oct 10 13:58:26 PDT 2017


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.



More information about the CIG-SHORT mailing list