[cig-commits] r18559 - short/3D/PyLith/trunk/doc/userguide/tutorials/3dhex8/quasistatic

willic3 at geodynamics.org willic3 at geodynamics.org
Wed Jun 8 19:21:44 PDT 2011


Author: willic3
Date: 2011-06-08 19:21:44 -0700 (Wed, 08 Jun 2011)
New Revision: 18559

Modified:
   short/3D/PyLith/trunk/doc/userguide/tutorials/3dhex8/quasistatic/quasistatic.lyx
Log:
Updated examples in manual to include HDF5 output.

Modified: short/3D/PyLith/trunk/doc/userguide/tutorials/3dhex8/quasistatic/quasistatic.lyx
===================================================================
--- short/3D/PyLith/trunk/doc/userguide/tutorials/3dhex8/quasistatic/quasistatic.lyx	2011-06-08 23:09:01 UTC (rev 18558)
+++ short/3D/PyLith/trunk/doc/userguide/tutorials/3dhex8/quasistatic/quasistatic.lyx	2011-06-09 02:21:44 UTC (rev 18559)
@@ -1,5 +1,5 @@
-#LyX 1.6.5 created this file. For more info see http://www.lyx.org/
-\lyxformat 345
+#LyX 2.0 created this file. For more info see http://www.lyx.org/
+\lyxformat 413
 \begin_document
 \begin_header
 \textclass book
@@ -7,18 +7,26 @@
 
 \end_preamble
 \use_default_options false
+\maintain_unincluded_children false
 \language english
+\language_package default
 \inputencoding latin1
+\fontencoding global
 \font_roman default
 \font_sans default
 \font_typewriter default
 \font_default_family default
+\use_non_tex_fonts false
 \font_sc false
 \font_osf false
 \font_sf_scale 100
 \font_tt_scale 100
 
 \graphics default
+\default_output_format default
+\output_sync 0
+\bibtex_command default
+\index_command default
 \paperfontsize default
 \spacing single
 \use_hyperref false
@@ -26,9 +34,18 @@
 \use_geometry true
 \use_amsmath 0
 \use_esint 0
+\use_mhchem 1
+\use_mathdots 1
 \cite_engine basic
 \use_bibtopic false
+\use_indices false
 \paperorientation portrait
+\suppress_date false
+\use_refstyle 0
+\index Index
+\shortcut idx
+\color #008000
+\end_index
 \leftmargin 1in
 \topmargin 1in
 \rightmargin 1in
@@ -36,15 +53,16 @@
 \secnumdepth 3
 \tocdepth 3
 \paragraph_separation indent
-\defskip medskip
+\paragraph_indentation default
 \quotes_language english
 \papercolumns 1
 \papersides 1
 \paperpagestyle default
 \tracking_changes false
 \output_changes false
-\author "" 
-\author "" 
+\html_math_output 0
+\html_css_as_file 0
+\html_be_strict false
 \end_header
 
 \begin_body
@@ -72,6 +90,10 @@
 \end_layout
 
 \begin_layout Itemize
+HDF5 output
+\end_layout
+
+\begin_layout Itemize
 Output of velocity field
 \end_layout
 
@@ -949,6 +971,178 @@
 \end_layout
 
 \begin_layout Standard
+In this example and the remainder of the examples in this section, we also
+ make use of HDF5 output rather than the default VTK output.
+ HDF5 output is a new feature beginning with PyLith version 1.6.0, and it
+ provides a more efficient output method (smaller files that take less time
+ to write) with the additional advantage that multiple time steps can be
+ contained in a single file.
+ PyLith also produces XDMF files describing the contents of the HDF5 files,
+ which allows the files to be read easily by applications such as ParaView.
+ Since VTK output is still the default, we must explicitly define the writer
+ to use.
+ Also note that the filename suffix is 
+\family typewriter
+.h5
+\family default
+:
+\end_layout
+
+\begin_layout LyX-Code
+# Give basename for output of solution over domain.
+ [pylithapp.problem.formulation.output.domain]
+\end_layout
+
+\begin_layout LyX-Code
+# We specify that output occurs in terms of a given time frequency, and
+\end_layout
+
+\begin_layout LyX-Code
+# ask for output every 50 years.
+\end_layout
+
+\begin_layout LyX-Code
+output_freq = time_step
+\end_layout
+
+\begin_layout LyX-Code
+time_step = 50.0*year
+\end_layout
+
+\begin_layout LyX-Code
+
+\end_layout
+
+\begin_layout LyX-Code
+# We are using HDF5 output so we must change the default writer.
+\end_layout
+
+\begin_layout LyX-Code
+writer = pylith.meshio.DataWriterHDF5Mesh
+\end_layout
+
+\begin_layout LyX-Code
+writer.filename = output/step06.h5  
+\end_layout
+
+\begin_layout Standard
+Note that we no longer need the 
+\family typewriter
+writer.time_format
+\family default
+ or 
+\family typewriter
+writer.time_constant
+\family default
+ properties, since all time steps are contained in a single file.
+ The HDF5 writer does not have these properties, so if we attempt to define
+ them an error will result.
+\end_layout
+
+\begin_layout Standard
+We need to explicitly define the HDF5 writer for other output as well, since
+ it is not the default.
+ When specifying output for a subdomain or a fault, this also means we must
+ explicitly provide the appropriate writer, which was not necessary for
+ VTK output.
+ For subdomain output we use:
+\end_layout
+
+\begin_layout LyX-Code
+# Give basename for output of solution over ground surface.
+ [pylithapp.problem.formulation.output.subdomain]
+\end_layout
+
+\begin_layout LyX-Code
+# Name of nodeset for ground surface.
+\end_layout
+
+\begin_layout LyX-Code
+label = face_zpos
+\end_layout
+
+\begin_layout LyX-Code
+
+\end_layout
+
+\begin_layout LyX-Code
+# We keep the default output frequency behavior (skip every n steps), and
+\end_layout
+
+\begin_layout LyX-Code
+# ask to skip 0 steps between output, so that we get output every time step.
+\end_layout
+
+\begin_layout LyX-Code
+# We again switch the writer to produce HDF5 output.
+\end_layout
+
+\begin_layout LyX-Code
+# Note that we specifically ask for a submesh writer.
+\end_layout
+
+\begin_layout LyX-Code
+skip = 0
+\end_layout
+
+\begin_layout LyX-Code
+writer = pylith.meshio.DataWriterHDF5SubMesh
+\end_layout
+
+\begin_layout LyX-Code
+writer.filename = output/step06-groundsurf.h5  
+\end_layout
+
+\begin_layout Standard
+For fault output we use:
+\end_layout
+
+\begin_layout LyX-Code
+# Give basename for fault rupture output.
+ [pylithapp.problem.interfaces.fault.output]
+\end_layout
+
+\begin_layout LyX-Code
+# We keep the default output frequency behavior (skip every n steps), and
+\end_layout
+
+\begin_layout LyX-Code
+# ask to skip 0 steps between output, so that we get output every time step.
+\end_layout
+
+\begin_layout LyX-Code
+# We again switch the writer to produce HDF5 output.
+\end_layout
+
+\begin_layout LyX-Code
+# Note that we specifically ask for a subsubmesh writer.
+\end_layout
+
+\begin_layout LyX-Code
+skip = 0
+\end_layout
+
+\begin_layout LyX-Code
+writer = pylith.meshio.DataWriterHDF5SubSubMesh
+\end_layout
+
+\begin_layout LyX-Code
+writer.filename = output/step06-fault.h5
+\end_layout
+
+\begin_layout Standard
+Note the usage of 
+\family typewriter
+pylith.meshio.DataWriterHDF5SubMesh
+\family default
+ for subdomain output and 
+\family typewriter
+pylith.meshio.DataWriterHDF5SubSubMesh
+\family default
+ for fault output.
+\end_layout
+
+\begin_layout Standard
 Due to the simplicity of the boundary conditions, we are able to use the
  default 
 \family typewriter
@@ -1146,13 +1340,13 @@
 \begin_layout Standard
 This additional information will be contained in file 
 \family typewriter
-step06-fault_info.vtk
+step06-fault_info.
 \family default
-.
+h5.
  It will contain final slip information for each earthquake source along
  with slip time information.
- When we have run the simulation, the output VTK files will be contained
- in 
+ When we have run the simulation, the output HDF5 and XDMF files will be
+ contained in 
 \family typewriter
 examples/3d/hex8/output
 \family default
@@ -1161,6 +1355,11 @@
 step06
 \family default
 ).
+ To open the files in ParaView, the XDMF (
+\family typewriter
+.xmf
+\family default
+) files should be opened, as these files describe the HDF5 data structure.
  Results using ParaView are shown in Figure 
 \begin_inset CommandInset ref
 LatexCommand ref
@@ -1338,39 +1537,24 @@
 \end_layout
 
 \begin_layout LyX-Code
-# Give basename for VTK domain output of solution over domain.
+# Give basename for output of solution over domain.
+ [pylithapp.problem.formulation.output.domain]
 \end_layout
 
 \begin_layout LyX-Code
-[pylithapp.problem.formulation.output.domain]
-\end_layout
-
-\begin_layout LyX-Code
 # We specify that output occurs in terms of a given time frequency, and
 \end_layout
 
 \begin_layout LyX-Code
 # ask for output every 50 years.
- The time stamps of the output files are
 \end_layout
 
 \begin_layout LyX-Code
-# in years (rather than the default of seconds), and we give a format for
-\end_layout
-
-\begin_layout LyX-Code
-# the time stamp.
-\end_layout
-
-\begin_layout LyX-Code
 # We also request velocity output in addition to displacements.
+ vertex_data_fields = [displacement,velocity]
 \end_layout
 
 \begin_layout LyX-Code
-vertex_data_fields = [displacement,velocity]
-\end_layout
-
-\begin_layout LyX-Code
 output_freq = time_step
 \end_layout
 
@@ -1379,27 +1563,28 @@
 \end_layout
 
 \begin_layout LyX-Code
-writer.filename = output/step07.vtk
+
 \end_layout
 
 \begin_layout LyX-Code
-writer.time_format = %04.0f
+# We are using HDF5 output so we must change the default writer.
 \end_layout
 
 \begin_layout LyX-Code
-writer.time_constant = 1.0*year
+writer = pylith.meshio.DataWriterHDF5Mesh
 \end_layout
 
 \begin_layout LyX-Code
-
+writer.filename = output/step07.h5
 \end_layout
 
 \begin_layout LyX-Code
-# Give basename for VTK domain output of solution over ground surface.
+
 \end_layout
 
 \begin_layout LyX-Code
-[pylithapp.problem.formulation.output.subdomain]
+# Give basename for output of solution over ground surface.
+ [pylithapp.problem.formulation.output.subdomain]
 \end_layout
 
 \begin_layout LyX-Code
@@ -1411,11 +1596,12 @@
 \end_layout
 
 \begin_layout LyX-Code
-# We also request velocity output in addition to displacements.
+
 \end_layout
 
 \begin_layout LyX-Code
-vertex_data_fields = [displacement,velocity]
+# We also request velocity output in addition to displacements.
+ vertex_data_fields = [displacement,velocity]
 \end_layout
 
 \begin_layout LyX-Code
@@ -1431,20 +1617,28 @@
 \end_layout
 
 \begin_layout LyX-Code
-writer.filename = output/step07-groundsurf.vtk
+
 \end_layout
 
 \begin_layout LyX-Code
-writer.time_format = %04.0f
+# We again switch the writer to produce HDF5 output.
 \end_layout
 
 \begin_layout LyX-Code
-writer.time_constant = 1.0*year
+# Note that we specifically ask for a submesh writer.
 \end_layout
 
+\begin_layout LyX-Code
+writer = pylith.meshio.DataWriterHDF5SubMesh
+\end_layout
+
+\begin_layout LyX-Code
+writer.filename = output/step07-groundsurf.h5
+\end_layout
+
 \begin_layout Standard
-When we have run the simulation, the output VTK files will be contained
- in 
+When we have run the simulation, the output HDF5 and XDMF files will be
+ contained in 
 \family typewriter
 examples/3d/hex8/output
 \family default
@@ -1453,6 +1647,19 @@
 step07
 \family default
 ).
+ As for example 
+\family typewriter
+step06
+\family default
+, make sure to open the 
+\family typewriter
+.xmf
+\family default
+ files rather than the 
+\family typewriter
+.h5
+\family default
+ files.
  Results using ParaView are shown in Figure 
 \begin_inset CommandInset ref
 LatexCommand ref
@@ -1841,8 +2048,8 @@
 \end_layout
 
 \begin_layout Standard
-When we have run the simulation, the output VTK files will be contained
- in 
+When we have run the simulation, the output HDF5 and XDMF files will be
+ contained in 
 \family typewriter
 examples/3d/hex8/output
 \family default
@@ -1880,16 +2087,16 @@
  for example step08 at t = 150 years visualized using ParaView.
  For this visualization, we loaded both the 
 \family typewriter
-step08-lower_crust_txxxx.vtk
+step08-lower_crust.xmf
 \family default
  and 
 \family typewriter
-step08-upper_crust_txxxx.vtk
+step08-upper_crust.xmf
 \family default
  files to contour the strain field, and superimposed on it the displacement
  field vectors from 
 \family typewriter
-step08_txxxx.vtk
+step08.xmf
 \family default
 .
 \begin_inset CommandInset label
@@ -2107,8 +2314,8 @@
 \end_layout
 
 \begin_layout Standard
-When we have run the simulation, the output VTK files will be contained
- in 
+When we have run the simulation, the output HDF5 and XDMF files will be
+ contained in 
 \family typewriter
 examples/3d/hex8/output
 \family default
@@ -2146,16 +2353,16 @@
  for example step09 at t = 150 years visualized using ParaView.
  For this visualization, we loaded both the 
 \family typewriter
-step09-lower_crust_txxxx.vtk
+step09-lower_crust.xmf
 \family default
  and 
 \family typewriter
-step09-upper_crust_txxxx.vtk
+step09-upper_crust.xmf
 \family default
  files to contour the strain field, and superimposed on it the displacement
  field vectors from 
 \family typewriter
-step09_txxxx.vtk
+step09.xmf
 \family default
 .
 \begin_inset CommandInset label



More information about the CIG-COMMITS mailing list