[cig-commits] r20915 - in short/3D/PyLith/trunk: . doc/releasenotes doc/userguide/fileformats doc/userguide/runpylith libsrc/pylith/problems pylith/apps tests_auto tests_auto/eqinfo unittests/libtests/meshio/data

brad at geodynamics.org brad at geodynamics.org
Wed Oct 24 14:51:33 PDT 2012


Author: brad
Date: 2012-10-24 14:51:32 -0700 (Wed, 24 Oct 2012)
New Revision: 20915

Modified:
   short/3D/PyLith/trunk/README
   short/3D/PyLith/trunk/configure.ac
   short/3D/PyLith/trunk/doc/releasenotes/announce_v1.8.0.txt
   short/3D/PyLith/trunk/doc/userguide/fileformats/fileformats.lyx
   short/3D/PyLith/trunk/doc/userguide/runpylith/runpylith.lyx
   short/3D/PyLith/trunk/libsrc/pylith/problems/SolverNonlinear.cc
   short/3D/PyLith/trunk/pylith/apps/EqInfoApp.py
   short/3D/PyLith/trunk/tests_auto/Makefile.am
   short/3D/PyLith/trunk/tests_auto/eqinfo/TestEqInfo.py
   short/3D/PyLith/trunk/unittests/libtests/meshio/data/quad4_bc_cell.h5
Log:
Merge from v1.7-trunk.

Modified: short/3D/PyLith/trunk/README
===================================================================
--- short/3D/PyLith/trunk/README	2012-10-24 20:54:19 UTC (rev 20914)
+++ short/3D/PyLith/trunk/README	2012-10-24 21:51:32 UTC (rev 20915)
@@ -97,6 +97,12 @@
     Output cell_info_fields "stable_dt_implicit" and
     "stable_dt_explicit" can be included in material output.
 
+  * Added netCDF Python module to binary distribution to provide
+    Python interface to NetCDF files, including Exodus-II files. This
+    is used in a new meshing example for setting the discretization
+    size using an Exodus-II vertex field. Note that this required
+    updating the NetCDF library.
+
 * Bug fixes
 
   - Fixed omission of synchronization of stable time step computation
@@ -129,7 +135,7 @@
 
   - Fixed bug in setting name of field in OutputSolnPoints when output
     multiple fields. This bug caused the name of the first output
-    field to be used and output data to overrite each other.
+    field to be used and output data to overwrite each other.
 
 ======================================================================
 MIGRATING FROM VERSION 1.6 TO 1.7

Modified: short/3D/PyLith/trunk/configure.ac
===================================================================
--- short/3D/PyLith/trunk/configure.ac	2012-10-24 20:54:19 UTC (rev 20914)
+++ short/3D/PyLith/trunk/configure.ac	2012-10-24 21:51:32 UTC (rev 20915)
@@ -312,7 +312,6 @@
 		tests_auto/Makefile
 		tests_auto/1d/Makefile
 		tests_auto/1d/line2/Makefile
-		tests_auto/1d/line3/Makefile
 		tests_auto/2d/Makefile
 		tests_auto/2d/tri3/Makefile
 		tests_auto/2d/quad4/Makefile

Modified: short/3D/PyLith/trunk/doc/releasenotes/announce_v1.8.0.txt
===================================================================
--- short/3D/PyLith/trunk/doc/releasenotes/announce_v1.8.0.txt	2012-10-24 20:54:19 UTC (rev 20914)
+++ short/3D/PyLith/trunk/doc/releasenotes/announce_v1.8.0.txt	2012-10-24 21:51:32 UTC (rev 20915)
@@ -58,6 +58,12 @@
     Output cell_info_fields "stable_dt_implicit" and
     "stable_dt_explicit" can be included in material output.
 
+  * Added netCDF Python module to binary distribution to provide
+    Python interface to NetCDF files, including Exodus-II files. This
+    is used in a new meshing example for setting the discretization
+    size using an Exodus-II vertex field. Note that this required
+    updating the NetCDF library.
+
 * Bug fixes
 
   - Fixed omission of synchronization of stable time step computation
@@ -90,5 +96,5 @@
 
   - Fixed bug in setting name of field in OutputSolnPoints when output
     multiple fields. This bug caused the name of the first output
-    field to be used and output data to overrite each other.
+    field to be used and output data to overwrite each other.
 

Modified: short/3D/PyLith/trunk/doc/userguide/fileformats/fileformats.lyx
===================================================================
--- short/3D/PyLith/trunk/doc/userguide/fileformats/fileformats.lyx	2012-10-24 20:54:19 UTC (rev 20914)
+++ short/3D/PyLith/trunk/doc/userguide/fileformats/fileformats.lyx	2012-10-24 21:51:32 UTC (rev 20915)
@@ -1,1694 +1,2007 @@
-#LyX 2.0 created this file. For more info see http://www.lyx.org/
-\lyxformat 413
-\begin_document
-\begin_header
-\textclass book
-\begin_preamble
-
-\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
-\papersize default
-\use_geometry true
-\use_amsmath 1
-\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
-\bottommargin 2in
-\secnumdepth 3
-\tocdepth 3
-\paragraph_separation indent
-\paragraph_indentation default
-\quotes_language english
-\papercolumns 1
-\papersides 2
-\paperpagestyle default
-\tracking_changes false
-\output_changes false
-\html_math_output 0
-\html_css_as_file 0
-\html_be_strict false
-\end_header
-
-\begin_body
-
-\begin_layout Chapter
-\begin_inset CommandInset label
-LatexCommand label
-name "cha:File-Formats"
-
-\end_inset
-
-File Formats
-\end_layout
-
-\begin_layout Section
-\begin_inset CommandInset label
-LatexCommand label
-name "sec:MeshIOAscii"
-
-\end_inset
-
-PyLith Mesh ASCII Files
-\end_layout
-
-\begin_layout Standard
-PyLith mesh ASCII files allow quick specification of the mesh information
- for very small, simple meshes that are most easily written by hand.
- We do not recommend using this format for anything other than these very
- small, simple meshes.
-\end_layout
-
-\begin_layout Standard
-\noindent
-\align center
-\begin_inset Float figure
-placement H
-wide false
-sideways false
-status open
-
-\begin_layout Plain Layout
-\noindent
-\align center
-\begin_inset Graphics
-	filename figs/meshquad4.eps
-
-\end_inset
-
-
-\end_layout
-
-\begin_layout Plain Layout
-\begin_inset Caption
-
-\begin_layout Plain Layout
-Diagram of mesh specified in Figure 
-\begin_inset CommandInset ref
-LatexCommand ref
-reference "fig:meshioascii:format"
-
-\end_inset
-
-.
-\begin_inset CommandInset label
-LatexCommand label
-name "fig:meshioascii:diagram"
-
-\end_inset
-
-
-\end_layout
-
-\end_inset
-
-
-\end_layout
-
-\end_inset
-
-
-\end_layout
-
-\begin_layout LyX-Code
-// This mesh file defines a finite-element mesh composed of two
-\end_layout
-
-\begin_layout LyX-Code
-// square cells of edge length 2.
-\end_layout
-
-\begin_layout LyX-Code
-
-\end_layout
-
-\begin_layout LyX-Code
-// Comments can appear almost anywhere in these files and are
-\end_layout
-
-\begin_layout LyX-Code
-// delimited with two slashes (//) just like in C++.
- All text and 
-\end_layout
-
-\begin_layout LyX-Code
-// whitespace after the delimiter on a given line is ignored.
-\end_layout
-
-\begin_layout LyX-Code
-mesh = { // begin specification of the mesh
-\end_layout
-
-\begin_layout LyX-Code
-  dimension = 2 // spatial dimension of the mesh
-\end_layout
-
-\begin_layout LyX-Code
-
-\end_layout
-
-\begin_layout LyX-Code
-  // Begin vertex and cell labels with 0.
- This is the default so 
-\end_layout
-
-\begin_layout LyX-Code
-  // this next line is optional
-\end_layout
-
-\begin_layout LyX-Code
-  use-index-zero = true
-\end_layout
-
-\begin_layout LyX-Code
-
-\end_layout
-
-\begin_layout LyX-Code
-  vertices = { // vertices or nodes of the finite-element cells
-\end_layout
-
-\begin_layout LyX-Code
-    dimension = 2 // spatial dimension of the vertex coordinates
-\end_layout
-
-\begin_layout LyX-Code
-    count = 6 // number of vertices in the mesh
-\end_layout
-
-\begin_layout LyX-Code
-    coordinates = { // list of vertex index and coordinates
-\end_layout
-
-\begin_layout LyX-Code
-      // the coordinates must coincide with the coordinate 
-\end_layout
-
-\begin_layout LyX-Code
-      // system specified in the Mesh object
-\end_layout
-
-\begin_layout LyX-Code
- 
-\end_layout
-
-\begin_layout LyX-Code
-      // exactly one vertex must appear on each line
-\end_layout
-
-\begin_layout LyX-Code
-      // (excluding whitespace)
-\end_layout
-
-\begin_layout LyX-Code
-      0    -2.0  -1.0
-\end_layout
-
-\begin_layout LyX-Code
-      1    -2.0  +1.0
-\end_layout
-
-\begin_layout LyX-Code
-      2     0.0  -1.0
-\end_layout
-
-\begin_layout LyX-Code
-      3     0.0  +1.0
-\end_layout
-
-\begin_layout LyX-Code
-      4    +2.0  -1.0
-\end_layout
-
-\begin_layout LyX-Code
-      5    +2.0  +1.0
-\end_layout
-
-\begin_layout LyX-Code
-    } // end of coordinates list
-\end_layout
-
-\begin_layout LyX-Code
-  } // end of vertices
-\end_layout
-
-\begin_layout LyX-Code
- 
-\end_layout
-
-\begin_layout LyX-Code
-  cells = { // finite-element cells
-\end_layout
-
-\begin_layout LyX-Code
-    count = 2 // number of cells in the mesh
-\end_layout
-
-\begin_layout LyX-Code
-    num-corners = 4 // number of vertices defining the cell
-\end_layout
-
-\begin_layout LyX-Code
-    simplices = { // list of vertices in each cell
-\end_layout
-
-\begin_layout LyX-Code
-      // see Section 4.2 for diagrams giving the order for each 
-\end_layout
-
-\begin_layout LyX-Code
-      // type of cell supported in PyLith
-\end_layout
-
-\begin_layout LyX-Code
- 
-\end_layout
-
-\begin_layout LyX-Code
-      // index of cell precedes the list of vertices for the cell 
-\end_layout
-
-\begin_layout LyX-Code
-
-\end_layout
-
-\begin_layout LyX-Code
-      // exactly one cell must appear on each line
-\end_layout
-
-\begin_layout LyX-Code
-      // (excluding whitespace)
-\end_layout
-
-\begin_layout LyX-Code
-      0    0  2  3  1
-\end_layout
-
-\begin_layout LyX-Code
-      1    4  5  3  2
-\end_layout
-
-\begin_layout LyX-Code
-    } // end of simplices list
-\end_layout
-
-\begin_layout LyX-Code
- 
-\end_layout
-
-\begin_layout LyX-Code
-    material-ids = { // associated each cell with a material model
-\end_layout
-
-\begin_layout LyX-Code
-      // the material id is specified using the index of the cell 
-\end_layout
-
-\begin_layout LyX-Code
-      // and then the corresponding material id
-\end_layout
-
-\begin_layout LyX-Code
-      0   0 // cell 0 has a material id of 0
-\end_layout
-
-\begin_layout LyX-Code
-      1   2 // cell 1 has a material id of 2
-\end_layout
-
-\begin_layout LyX-Code
-    } // end of material-ids list
-\end_layout
-
-\begin_layout LyX-Code
-  } // end of cells
-\end_layout
-
-\begin_layout LyX-Code
- 
-\end_layout
-
-\begin_layout LyX-Code
-  // This next section lists groups of vertices that can be used
-\end_layout
-
-\begin_layout LyX-Code
-  // in applying boundary conditions to portions of the domain
-\end_layout
-
-\begin_layout LyX-Code
-  group = { // start of a group
-\end_layout
-
-\begin_layout LyX-Code
-    // the name can have whitespace, so no comments are allowed
-\end_layout
-
-\begin_layout LyX-Code
-    // after the name
-\end_layout
-
-\begin_layout LyX-Code
-    name = face +y
-\end_layout
-
-\begin_layout LyX-Code
- 
-\end_layout
-
-\begin_layout LyX-Code
-    // Either groups of vertices or groups of cells can be     
-\end_layout
-
-\begin_layout LyX-Code
-    // specified, but currently PyLith only makes use of groups 
-\end_layout
-
-\begin_layout LyX-Code
-    // of vertices
-\end_layout
-
-\begin_layout LyX-Code
-    type = vertices // 'vertices' or 'cells'
-\end_layout
-
-\begin_layout LyX-Code
-    count = 2 // number of vertices in the group
-\end_layout
-
-\begin_layout LyX-Code
-    indices = { // list of vertex indices in the group
-\end_layout
-
-\begin_layout LyX-Code
-      // multiple vertices may appear on a line
-\end_layout
-
-\begin_layout LyX-Code
-      0  4 // this group contains vertices 0 and 4
-\end_layout
-
-\begin_layout LyX-Code
-    } // end of list of vertices
-\end_layout
-
-\begin_layout LyX-Code
-  } // end of group
-\end_layout
-
-\begin_layout LyX-Code
-  // additional groups can be listed here
-\end_layout
-
-\begin_layout Standard
-\begin_inset Float figure
-placement H
-wide false
-sideways false
-status open
-
-\begin_layout Plain Layout
-\begin_inset Caption
-
-\begin_layout Plain Layout
-Format of 
-\family typewriter
-PyLith
-\family default
- mesh ASCII files.
-\begin_inset CommandInset label
-LatexCommand label
-name "fig:meshioascii:format"
-
-\end_inset
-
-
-\end_layout
-
-\end_inset
-
-
-\end_layout
-
-\end_inset
-
-
-\end_layout
-
-\begin_layout Section
-\begin_inset CommandInset label
-LatexCommand label
-name "sec:Spatialdata:SimpleIOAscii"
-
-\end_inset
-
-SimpleDB Spatial Database Files
-\end_layout
-
-\begin_layout Standard
-SimpleDB spatial database files contain a header describing the set of points
- and then the data with each line listing the coordinates of a point followed
- by the values of the fields for that point.
- 
-\end_layout
-
-\begin_layout LyX-Code
-// This spatial database specifies the distribution of slip on the
-\end_layout
-
-\begin_layout LyX-Code
-// fault surface.
- In this case we prescribe a piecewise linear, 
-\end_layout
-
-\begin_layout LyX-Code
-// depth dependent distribution of slip.
- The slip is 2.0 m 
-\end_layout
-
-\begin_layout LyX-Code
-// right-lateral with 0.25 m of reverse slip at the surface with
-\end_layout
-
-\begin_layout LyX-Code
-// a linear taper from 2.0 m to 0.0 m from -2 km to -4 km.
-\end_layout
-
-\begin_layout LyX-Code
- 
-\end_layout
-
-\begin_layout LyX-Code
-// Comments can appear almost anywhere in these files and are
-\end_layout
-
-\begin_layout LyX-Code
-// delimited with two slashes (//) just like in C++.
- All text and 
-\end_layout
-
-\begin_layout LyX-Code
-// whitespace after the delimiter on a given line is ignored.
-\end_layout
-
-\begin_layout LyX-Code
- 
-\end_layout
-
-\begin_layout LyX-Code
-// The next line is the magic header for spatial database files 
-\end_layout
-
-\begin_layout LyX-Code
-// in ASCII format.
-\end_layout
-
-\begin_layout LyX-Code
-#SPATIAL.ascii 1
-\end_layout
-
-\begin_layout LyX-Code
-SimpleDB { // start specifying the database parameters
-\end_layout
-
-\begin_layout LyX-Code
-  num-values = 3 // number of values in the database
-\end_layout
-
-\begin_layout LyX-Code
- 
-\end_layout
-
-\begin_layout LyX-Code
-  // Specify the names and the order of the values as they appear 
-\end_layout
-
-\begin_layout LyX-Code
-  // in the data.
- The names of the values must correspond to the 
-\end_layout
-
-\begin_layout LyX-Code
-  // names PyLith requests in querying the database.
-\end_layout
-
-\begin_layout LyX-Code
-  value-names =  left-lateral-slip  reverse-slip  fault-opening
-\end_layout
-
-\begin_layout LyX-Code
- 
-\end_layout
-
-\begin_layout LyX-Code
-  // Specify the units of the values in Python syntax (e.g., kg/m**3).
-\end_layout
-
-\begin_layout LyX-Code
-  value-units =  m  m  m
-\end_layout
-
-\begin_layout LyX-Code
-
-\end_layout
-
-\begin_layout LyX-Code
-  num-locs = 3 // Number of locations where values are given
-\end_layout
-
-\begin_layout LyX-Code
-  data-dim = 1 // Locations of data points form a line
-\end_layout
-
-\begin_layout LyX-Code
-  space-dim = 3 // Spatial dimension in which data resides
-\end_layout
-
-\begin_layout LyX-Code
- 
-\end_layout
-
-\begin_layout LyX-Code
-  // Specify the coordinate system associated with the 
-\end_layout
-
-\begin_layout LyX-Code
-  // coordinates of the locations where data is given
-\end_layout
-
-\begin_layout LyX-Code
-  cs-data = cartesian { // Use a Cartesian coordinate system
-\end_layout
-
-\begin_layout LyX-Code
-    to-meters = 1.0e+3 // Coordinates are in km
-\end_layout
-
-\begin_layout LyX-Code
- 
-\end_layout
-
-\begin_layout LyX-Code
-    // Specify the spatial dimension of the coordinate system
-\end_layout
-
-\begin_layout LyX-Code
-    // This value must match the one associated with the database
-\end_layout
-
-\begin_layout LyX-Code
-    space-dim = 3
-\end_layout
-
-\begin_layout LyX-Code
-  } // cs-data // end of coordinate system specification
-\end_layout
-
-\begin_layout LyX-Code
-} // end of SimpleDB specification
-\end_layout
-
-\begin_layout LyX-Code
- 
-\end_layout
-
-\begin_layout LyX-Code
-// The locations and values are listed after the parameters.
-\end_layout
-
-\begin_layout LyX-Code
-// Columns are coordinates of the points (1 column for each 
-\end_layout
-
-\begin_layout LyX-Code
-// spatial dimension) followed by the data values in the order 
-\end_layout
-
-\begin_layout LyX-Code
-// specified by the value-names field.
-\end_layout
-
-\begin_layout LyX-Code
-0.0  0.0  0.0    -2.00  0.25  0.00
-\end_layout
-
-\begin_layout LyX-Code
-0.0  0.0 -2.0    -2.00  0.00  0.00
-\end_layout
-
-\begin_layout LyX-Code
-0.0  0.0 -4.0     0.00  0.00  0.00
-\end_layout
-
-\begin_layout Standard
-\begin_inset Float figure
-placement H
-wide false
-sideways false
-status open
-
-\begin_layout Plain Layout
-\begin_inset Caption
-
-\begin_layout Plain Layout
-Format of spatial database files.
-\end_layout
-
-\end_inset
-
-
-\end_layout
-
-\end_inset
-
-
-\end_layout
-
-\begin_layout Subsection
-Spatial Database Coordinate Systems
-\end_layout
-
-\begin_layout Standard
-The spatial database files support four different types of coordinate systems.
- Conversions among the three geographic coordinate systems are supported
- in 3D.
- Conversions among the geographic and geographic projected coordinate systems
- are supported in 2D.
- In using the coordinate systems, we assume that you have installed the
- 
-\family typewriter
-proj
-\family default
- program in addition to the Proj.4 libraries, so that you can obtain a list
- of support projections, datums, and ellipsoids.
- Alternatively, refer to the documentation for the Proj.4 Cartographic Projection
-s library 
-\begin_inset Flex URL
-status collapsed
-
-\begin_layout Plain Layout
-
-trac.osgeo.org/proj
-\end_layout
-
-\end_inset
-
-.
-\end_layout
-
-\begin_layout Subsubsection
-Cartesian
-\end_layout
-
-\begin_layout Standard
-This is a conventional Cartesian coordinate system.
- Conversions to other Cartesian coordinate systems are possible.
-\end_layout
-
-\begin_layout LyX-Code
-cs-data = cartesian {
-\end_layout
-
-\begin_layout LyX-Code
-  to-meters = 1.0e+3 // Locations in km
-\end_layout
-
-\begin_layout LyX-Code
-  space-dim = 2 // 1, 2, or 3 dimensions
-\end_layout
-
-\begin_layout LyX-Code
-}
-\end_layout
-
-\begin_layout Standard
-\begin_inset Float figure
-placement H
-wide false
-sideways false
-status open
-
-\begin_layout Plain Layout
-\begin_inset Caption
-
-\begin_layout Plain Layout
-Format for Cartesian coordinate systems in spatial database files.
-\end_layout
-
-\end_inset
-
-
-\end_layout
-
-\end_inset
-
-
-\end_layout
-
-\begin_layout Subsubsection
-Geographic
-\end_layout
-
-\begin_layout Standard
-This coordinate system is for geographic coordinates, such as longitude
- and latitude.
- Specification of the location in three-dimensions is supported.
- The vertical datum can be either the reference ellipsoid or mean sea level.
- The vertical coordinate is positive upwards.
-\end_layout
-
-\begin_layout LyX-Code
-cs-data = geographic {
-\end_layout
-
-\begin_layout LyX-Code
-  // Conversion factor to get to meters (only applies to vertical 
-\end_layout
-
-\begin_layout LyX-Code
-  // coordinate unless you are using a geocentric coordinate system).
-\end_layout
-
-\begin_layout LyX-Code
-  to-meters = 1.0e+3
-\end_layout
-
-\begin_layout LyX-Code
-  space-dim = 2 // 2 or 3 dimensions
-\end_layout
-
-\begin_layout LyX-Code
- 
-\end_layout
-
-\begin_layout LyX-Code
-  // Run 
-\begin_inset Quotes eld
-\end_inset
-
-proj -le
-\begin_inset Quotes erd
-\end_inset
-
- to see a list of available reference ellipsoids.
-\end_layout
-
-\begin_layout LyX-Code
-  // Comments are not allowed at the end of the next line.
-\end_layout
-
-\begin_layout LyX-Code
-  ellipsoid = WGS84
-\end_layout
-
-\begin_layout LyX-Code
- 
-\end_layout
-
-\begin_layout LyX-Code
-  // Run 
-\begin_inset Quotes eld
-\end_inset
-
-proj -ld
-\begin_inset Quotes erd
-\end_inset
-
- to see a list of available datums.
-\end_layout
-
-\begin_layout LyX-Code
-  // Comments are not allowed at the end of the next line.
-\end_layout
-
-\begin_layout LyX-Code
-  datum-horiz = WGS84
-\end_layout
-
-\begin_layout LyX-Code
- 
-\end_layout
-
-\begin_layout LyX-Code
-  // 
-\begin_inset Quotes eld
-\end_inset
-
-ellipsoid
-\begin_inset Quotes erd
-\end_inset
-
- or 
-\begin_inset Quotes eld
-\end_inset
-
-mean sea level
-\begin_inset Quotes erd
-\end_inset
-
-
-\end_layout
-
-\begin_layout LyX-Code
-  // Comments are not allowed at the end of the next line.
-\end_layout
-
-\begin_layout LyX-Code
-  datum-vert = ellipsoid
-\end_layout
-
-\begin_layout LyX-Code
- 
-\end_layout
-
-\begin_layout LyX-Code
-  // Use a geocentric coordinate system?
-\end_layout
-
-\begin_layout LyX-Code
-  is-geocentric = false // true or false
-\end_layout
-
-\begin_layout LyX-Code
-}
-\end_layout
-
-\begin_layout Standard
-\begin_inset Float figure
-placement H
-wide false
-sideways false
-status open
-
-\begin_layout Plain Layout
-\begin_inset Caption
-
-\begin_layout Plain Layout
-Format for geographic coordinate systems in spatial database files.
-\end_layout
-
-\end_inset
-
-
-\end_layout
-
-\end_inset
-
-
-\end_layout
-
-\begin_layout Subsubsection
-Geographic Projection
-\end_layout
-
-\begin_layout Standard
-This coordinate system applies to geographic projections.
- As in the geographic coordinate system, the vertical coordinate (if used)
- can be specified with respect to either the reference ellipsoid or mean
- sea level.
-\end_layout
-
-\begin_layout LyX-Code
-cs-data = geo-projected {
-\end_layout
-
-\begin_layout LyX-Code
-  to-meters = 1.0e+3 // Conversion factor to get to meters.
-\end_layout
-
-\begin_layout LyX-Code
-  space-dim = 2 // 2 or 3 dimensions
-\end_layout
-
-\begin_layout LyX-Code
-
-\end_layout
-
-\begin_layout LyX-Code
-  // Run 
-\begin_inset Quotes eld
-\end_inset
-
-proj -le
-\begin_inset Quotes erd
-\end_inset
-
- to see a list of available reference ellipsoids.
-\end_layout
-
-\begin_layout LyX-Code
-  // Comments are not allowed at the end of the next line.
-\end_layout
-
-\begin_layout LyX-Code
-  ellipsoid = WGS84
-\end_layout
-
-\begin_layout LyX-Code
- 
-\end_layout
-
-\begin_layout LyX-Code
-  // Run 
-\begin_inset Quotes eld
-\end_inset
-
-proj -ld
-\begin_inset Quotes erd
-\end_inset
-
- to see a list of available datums.
-\end_layout
-
-\begin_layout LyX-Code
-  // Comments are not allowed at the end of the next line.
-\end_layout
-
-\begin_layout LyX-Code
-  datum-horiz = WGS84
-\end_layout
-
-\begin_layout LyX-Code
- 
-\end_layout
-
-\begin_layout LyX-Code
-  // 
-\begin_inset Quotes eld
-\end_inset
-
-ellipsoid
-\begin_inset Quotes erd
-\end_inset
-
- or 
-\begin_inset Quotes eld
-\end_inset
-
-mean sea level
-\begin_inset Quotes erd
-\end_inset
-
-
-\end_layout
-
-\begin_layout LyX-Code
-  // Comments are not allowed at the end of the next line.
-\end_layout
-
-\begin_layout LyX-Code
-  datum-vert = ellipsoid
-\end_layout
-
-\begin_layout LyX-Code
- 
-\end_layout
-
-\begin_layout LyX-Code
-  // Run 
-\begin_inset Quotes eld
-\end_inset
-
-proj -lp
-\begin_inset Quotes erd
-\end_inset
-
- to see a list of available geographic 
-\end_layout
-
-\begin_layout LyX-Code
-  // projections.
-\end_layout
-
-\begin_layout LyX-Code
-    projector = projection {
-\end_layout
-
-\begin_layout LyX-Code
-    // Name of the projection.
- run 
-\begin_inset Quotes eld
-\end_inset
-
-proj -lp
-\begin_inset Quotes erd
-\end_inset
-
- to see a list of 
-\end_layout
-
-\begin_layout LyX-Code
-    // supported projections.
- Use the Universal Transverse Mercator
-\end_layout
-
-\begin_layout LyX-Code
-    // projection.
-\end_layout
-
-\begin_layout LyX-Code
-    projection = utm
-\end_layout
-
-\begin_layout LyX-Code
-    units = m // Units in the projection.
-\end_layout
-
-\begin_layout LyX-Code
- 
-\end_layout
-
-\begin_layout LyX-Code
-    // Provide a list of projection options; these are the command 
-\end_layout
-
-\begin_layout LyX-Code
-    // line arguments you would use with the proj program.
- Refer to
-\end_layout
-
-\begin_layout LyX-Code
-    // the Proj.4 library documentation for complete details.
-\end_layout
-
-\begin_layout LyX-Code
-    // Comments are not allowed at the end of the next line.
-\end_layout
-
-\begin_layout LyX-Code
-    proj-options = +zone=10
-\end_layout
-
-\begin_layout LyX-Code
-}
-\end_layout
-
-\begin_layout Standard
-\begin_inset Float figure
-placement H
-wide false
-sideways false
-status open
-
-\begin_layout Plain Layout
-\begin_inset Caption
-
-\begin_layout Plain Layout
-Format for geographic projection coordinate systems in spatial database
- files.
-\end_layout
-
-\end_inset
-
-
-\end_layout
-
-\end_inset
-
-
-\end_layout
-
-\begin_layout Subsubsection
-Geographic Local Cartesian
-\end_layout
-
-\begin_layout Standard
-This coordinate system is a geographically referenced, local 3D Cartesian
- coordinate system.
- This allows use of a conventional Cartesian coordinate system with accurate
- georeferencing.
- For example, one can construct a finite-element model in this coordinate
- system and use spatial databases in geographic coordinates.
- This coordinate system provides an alternative to using a geographic projection
- as the Cartesian grip.
- The advantage of this coordinate system is that it retains the curvature
- of the Earth, while a geographic projection does not.
-\end_layout
-
-\begin_layout LyX-Code
-cs-data = geo-local-cartesian {
-\end_layout
-
-\begin_layout LyX-Code
-  // Conversion factor to get to meters (only applies to vertical
-\end_layout
-
-\begin_layout LyX-Code
-  // coordinate unless you are using a geocentric coordinate system).
-\end_layout
-
-\begin_layout LyX-Code
-  to-meters = 1.0 // use meters
-\end_layout
-
-\begin_layout LyX-Code
-  space-dim = 2 // 2 or 3 dimensions
-\end_layout
-
-\begin_layout LyX-Code
- 
-\end_layout
-
-\begin_layout LyX-Code
-  // Run 
-\begin_inset Quotes eld
-\end_inset
-
-proj -le
-\begin_inset Quotes erd
-\end_inset
-
- to see a list of available reference ellipsoids.
-\end_layout
-
-\begin_layout LyX-Code
-  // Comments are not allowed at the end of the next line.
-\end_layout
-
-\begin_layout LyX-Code
-  ellipsoid = WGS84
-\end_layout
-
-\begin_layout LyX-Code
- 
-\end_layout
-
-\begin_layout LyX-Code
-  // Run 
-\begin_inset Quotes eld
-\end_inset
-
-proj -ld
-\begin_inset Quotes erd
-\end_inset
-
- to see a list of available datums.
-\end_layout
-
-\begin_layout LyX-Code
-  // Comments are not allowed at the end of the next line.
-\end_layout
-
-\begin_layout LyX-Code
-  datum-horiz = WGS84
-\end_layout
-
-\begin_layout LyX-Code
- 
-\end_layout
-
-\begin_layout LyX-Code
-  // 
-\begin_inset Quotes eld
-\end_inset
-
-ellipsoid
-\begin_inset Quotes erd
-\end_inset
-
- or 
-\begin_inset Quotes eld
-\end_inset
-
-mean sea level
-\begin_inset Quotes erd
-\end_inset
-
-
-\end_layout
-
-\begin_layout LyX-Code
-  // Comments are not allowed at the end of the next line.
-\end_layout
-
-\begin_layout LyX-Code
-  datum-vert = ellipsoid
-\end_layout
-
-\begin_layout LyX-Code
- 
-\end_layout
-
-\begin_layout LyX-Code
-  // Origin of the local Cartesian coordinate system.
- To avoid
-\end_layout
-
-\begin_layout LyX-Code
-  // round-off errors it is best to pick a location near the center of
-\end_layout
-
-\begin_layout LyX-Code
-  // the region of interest.
- An elevation on the surface of the Earth
-\end_layout
-
-\begin_layout LyX-Code
-  // in the middle of the region also works well (and makes the
-\end_layout
-
-\begin_layout LyX-Code
-  // vertical coordinate easy to interpret).
-\end_layout
-
-\begin_layout LyX-Code
-  origin-lon = -116.7094 // Longitude of the origin in decimal degrees
-\end_layout
-
-\begin_layout LyX-Code
-                         // (west is negative).
-\end_layout
-
-\begin_layout LyX-Code
-  origin-lat = 36.3874 // Latitude of the origin in decimal degrees 
-\end_layout
-
-\begin_layout LyX-Code
-                       // (north is positive).
-\end_layout
-
-\begin_layout LyX-Code
- 
-\end_layout
-
-\begin_layout LyX-Code
-  // Elevation with respect to the vertical datum.
- Units are the
-\end_layout
-
-\begin_layout LyX-Code
-  // same as the Cartesian coordinate system (in this case meters).
-\end_layout
-
-\begin_layout LyX-Code
-  origin-elev = 3.5
-\end_layout
-
-\begin_layout LyX-Code
-}
-\end_layout
-
-\begin_layout Standard
-\begin_inset Float figure
-placement H
-wide false
-sideways false
-status open
-
-\begin_layout Plain Layout
-\begin_inset Caption
-
-\begin_layout Plain Layout
-Format for the geographic local Cartesian coordinate system in spatial database
- files.
-\end_layout
-
-\end_inset
-
-
-\end_layout
-
-\end_inset
-
-
-\end_layout
-
-\begin_layout Section
-\begin_inset CommandInset label
-LatexCommand label
-name "sec:Spatialdata:TimeHistoryIO"
-
-\end_inset
-
-Time History Database Files
-\end_layout
-
-\begin_layout Standard
-Time history database files contain a header describing the number of points
- in the time history and the units for the time stamps followed by a list
- with pairs of time stamps and amplitude values.
- The amplitude at an arbitrary point in time is computed via interpolation
- of the values in the database.
- This means that the time history database must span the range of time values
- of interest.
- The points in the time history must also be ordered in time.
-\end_layout
-
-\begin_layout LyX-Code
-// This time history database specifies temporal variation in
-\end_layout
-
-\begin_layout LyX-Code
-// amplitude.
- In this case we prescribe a triangular slip time
-\end_layout
-
-\begin_layout LyX-Code
-// history.
- 
-\end_layout
-
-\begin_layout LyX-Code
- 
-\end_layout
-
-\begin_layout LyX-Code
-// Comments can appear almost anywhere in these files and are
-\end_layout
-
-\begin_layout LyX-Code
-// delimited with two slashes (//) just like in C++.
- All text and 
-\end_layout
-
-\begin_layout LyX-Code
-// whitespace after the delimiter on a given line is ignored.
-\end_layout
-
-\begin_layout LyX-Code
- 
-\end_layout
-
-\begin_layout LyX-Code
-// The next line is the magic header for spatial database files 
-\end_layout
-
-\begin_layout LyX-Code
-// in ASCII format.
-\end_layout
-
-\begin_layout LyX-Code
-#TIME HISTORY ascii
-\end_layout
-
-\begin_layout LyX-Code
-TimeHistory { // start specifying the database parameters
-\end_layout
-
-\begin_layout LyX-Code
-  num-points = 5 // number of points in time history
-\end_layout
-
-\begin_layout LyX-Code
- 
-\end_layout
-
-\begin_layout LyX-Code
-  // Specify the units used in the time stamps.
-\end_layout
-
-\begin_layout LyX-Code
-  time-units = year
-\end_layout
-
-\begin_layout LyX-Code
-
-\end_layout
-
-\begin_layout LyX-Code
-} // end of TimeHistory header
-\end_layout
-
-\begin_layout LyX-Code
- 
-\end_layout
-
-\begin_layout LyX-Code
-// The time history values are listed after the parameters.
-\end_layout
-
-\begin_layout LyX-Code
-// Columns time and amplitude where the amplitude values are unitless.
-\end_layout
-
-\begin_layout LyX-Code
- 0.0     0.00
-\end_layout
-
-\begin_layout LyX-Code
- 2.0     1.00
-\end_layout
-
-\begin_layout LyX-Code
- 6.0     4.00
-\end_layout
-
-\begin_layout LyX-Code
-10.0     2.00
-\end_layout
-
-\begin_layout LyX-Code
-11.0     0.00
-\end_layout
-
-\begin_layout Standard
-\begin_inset Float figure
-placement H
-wide false
-sideways false
-status open
-
-\begin_layout Plain Layout
-\begin_inset Caption
-
-\begin_layout Plain Layout
-Format of time history database files.
-\end_layout
-
-\end_inset
-
-
-\end_layout
-
-\end_inset
-
-
-\end_layout
-
-\begin_layout Section
-\begin_inset CommandInset label
-LatexCommand label
-name "sec:FileFormat:TimeStepUser"
-
-\end_inset
-
-User-Specified Time-Step File
-\end_layout
-
-\begin_layout Standard
-This file lists the time-step sizes for nonuniform, user-specified time
- steps.
- The file's format is an ASCII file that includes the units for the time-step
- sizes and then a list of the time steps.
- 
-\end_layout
-
-\begin_layout LyX-Code
-// This time step file specifies five time steps with the units in years.
-\end_layout
-
-\begin_layout LyX-Code
- 
-\end_layout
-
-\begin_layout LyX-Code
-// Comments can appear almost anywhere in these files and are
-\end_layout
-
-\begin_layout LyX-Code
-// delimited with two slashes (//) just like in C++.
- All text and 
-\end_layout
-
-\begin_layout LyX-Code
-// whitespace after the delimiter on a given line is ignored.
-\end_layout
-
-\begin_layout LyX-Code
-
-\end_layout
-
-\begin_layout LyX-Code
-// Units for the time steps
-\end_layout
-
-\begin_layout LyX-Code
-units = year
-\end_layout
-
-\begin_layout LyX-Code
-
-\end_layout
-
-\begin_layout LyX-Code
-1.0 // Comment
-\end_layout
-
-\begin_layout LyX-Code
-2.0
-\end_layout
-
-\begin_layout LyX-Code
-3.0
-\end_layout
-
-\begin_layout LyX-Code
-2.5
-\end_layout
-
-\begin_layout LyX-Code
-3.0
-\end_layout
-
-\begin_layout Standard
-\begin_inset Float figure
-placement H
-wide false
-sideways false
-status open
-
-\begin_layout Plain Layout
-\begin_inset Caption
-
-\begin_layout Plain Layout
-Format of user-specified time-step files.
-\end_layout
-
-\end_inset
-
-
-\end_layout
-
-\end_inset
-
-
-\end_layout
-
-\begin_layout Section
-\begin_inset CommandInset label
-LatexCommand label
-name "sec:FileFormat:PointsList"
-
-\end_inset
-
-Points List File
-\end_layout
-
-\begin_layout Standard
-This file lists the coordinates of the locations where output is requested
- for the 
-\family typewriter
-OutputSolnPoints
-\family default
- component.
- The coordinate system is specified in the 
-\family typewriter
-OutputSolnPoints
-\family default
- component.
- 
-\end_layout
-
-\begin_layout LyX-Code
-# This time step file specifies five time steps with the units in years.
-\end_layout
-
-\begin_layout LyX-Code
-#
-\end_layout
-
-\begin_layout LyX-Code
-# Comments are limited to complete lines.
- The default delimiter for comments
-\end_layout
-
-\begin_layout LyX-Code
-# is '#', which can be changed via parameters.
- Additionally, the delimiter 
-\end_layout
-
-\begin_layout LyX-Code
-# separating values can also be customized (default is whitespace).
-\end_layout
-
-\begin_layout LyX-Code
-1.0  -2.0   0.0
-\end_layout
-
-\begin_layout LyX-Code
-2.0  -4.0  -0.1
-\end_layout
-
-\begin_layout LyX-Code
-0.0  +2.0   0.0
-\end_layout
-
-\begin_layout LyX-Code
-2.5  -0.2  -0.2 
-\end_layout
-
-\begin_layout LyX-Code
-0.0   2.0  +0.2
-\end_layout
-
-\begin_layout Standard
-\begin_inset Float figure
-placement H
-wide false
-sideways false
-status open
-
-\begin_layout Plain Layout
-\begin_inset Caption
-
-\begin_layout Plain Layout
-Format of files with coordinates of points for output.
-\end_layout
-
-\end_inset
-
-
-\end_layout
-
-\end_inset
-
-
-\end_layout
-
-\end_body
-\end_document
+#LyX 2.0 created this file. For more info see http://www.lyx.org/
+\lyxformat 413
+\begin_document
+\begin_header
+\textclass book
+\begin_preamble
+
+\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
+\papersize default
+\use_geometry true
+\use_amsmath 1
+\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
+\bottommargin 2in
+\secnumdepth 3
+\tocdepth 3
+\paragraph_separation indent
+\paragraph_indentation default
+\quotes_language english
+\papercolumns 1
+\papersides 2
+\paperpagestyle default
+\tracking_changes false
+\output_changes false
+\html_math_output 0
+\html_css_as_file 0
+\html_be_strict false
+\end_header
+
+\begin_body
+
+\begin_layout Chapter
+\begin_inset CommandInset label
+LatexCommand label
+name "cha:File-Formats"
+
+\end_inset
+
+File Formats
+\end_layout
+
+\begin_layout Section
+\begin_inset CommandInset label
+LatexCommand label
+name "sec:MeshIOAscii"
+
+\end_inset
+
+PyLith Mesh ASCII Files
+\end_layout
+
+\begin_layout Standard
+PyLith mesh ASCII files allow quick specification of the mesh information
+ for very small, simple meshes that are most easily written by hand.
+ We do not recommend using this format for anything other than these very
+ small, simple meshes.
+\end_layout
+
+\begin_layout Standard
+\noindent
+\align center
+\begin_inset Float figure
+placement H
+wide false
+sideways false
+status open
+
+\begin_layout Plain Layout
+\noindent
+\align center
+\begin_inset Graphics
+	filename figs/meshquad4.eps
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Plain Layout
+\begin_inset Caption
+
+\begin_layout Plain Layout
+Diagram of mesh specified in Figure 
+\begin_inset CommandInset ref
+LatexCommand ref
+reference "fig:meshioascii:format"
+
+\end_inset
+
+.
+\begin_inset CommandInset label
+LatexCommand label
+name "fig:meshioascii:diagram"
+
+\end_inset
+
+
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout LyX-Code
+// This mesh file defines a finite-element mesh composed of two
+\end_layout
+
+\begin_layout LyX-Code
+// square cells of edge length 2.
+\end_layout
+
+\begin_layout LyX-Code
+
+\end_layout
+
+\begin_layout LyX-Code
+// Comments can appear almost anywhere in these files and are
+\end_layout
+
+\begin_layout LyX-Code
+// delimited with two slashes (//) just like in C++.
+ All text and 
+\end_layout
+
+\begin_layout LyX-Code
+// whitespace after the delimiter on a given line is ignored.
+\end_layout
+
+\begin_layout LyX-Code
+mesh = { // begin specification of the mesh
+\end_layout
+
+\begin_layout LyX-Code
+  dimension = 2 // spatial dimension of the mesh
+\end_layout
+
+\begin_layout LyX-Code
+
+\end_layout
+
+\begin_layout LyX-Code
+  // Begin vertex and cell labels with 0.
+ This is the default so 
+\end_layout
+
+\begin_layout LyX-Code
+  // this next line is optional
+\end_layout
+
+\begin_layout LyX-Code
+  use-index-zero = true
+\end_layout
+
+\begin_layout LyX-Code
+
+\end_layout
+
+\begin_layout LyX-Code
+  vertices = { // vertices or nodes of the finite-element cells
+\end_layout
+
+\begin_layout LyX-Code
+    dimension = 2 // spatial dimension of the vertex coordinates
+\end_layout
+
+\begin_layout LyX-Code
+    count = 6 // number of vertices in the mesh
+\end_layout
+
+\begin_layout LyX-Code
+    coordinates = { // list of vertex index and coordinates
+\end_layout
+
+\begin_layout LyX-Code
+      // the coordinates must coincide with the coordinate 
+\end_layout
+
+\begin_layout LyX-Code
+      // system specified in the Mesh object
+\end_layout
+
+\begin_layout LyX-Code
+ 
+\end_layout
+
+\begin_layout LyX-Code
+      // exactly one vertex must appear on each line
+\end_layout
+
+\begin_layout LyX-Code
+      // (excluding whitespace)
+\end_layout
+
+\begin_layout LyX-Code
+      0    -2.0  -1.0
+\end_layout
+
+\begin_layout LyX-Code
+      1    -2.0  +1.0
+\end_layout
+
+\begin_layout LyX-Code
+      2     0.0  -1.0
+\end_layout
+
+\begin_layout LyX-Code
+      3     0.0  +1.0
+\end_layout
+
+\begin_layout LyX-Code
+      4    +2.0  -1.0
+\end_layout
+
+\begin_layout LyX-Code
+      5    +2.0  +1.0
+\end_layout
+
+\begin_layout LyX-Code
+    } // end of coordinates list
+\end_layout
+
+\begin_layout LyX-Code
+  } // end of vertices
+\end_layout
+
+\begin_layout LyX-Code
+ 
+\end_layout
+
+\begin_layout LyX-Code
+  cells = { // finite-element cells
+\end_layout
+
+\begin_layout LyX-Code
+    count = 2 // number of cells in the mesh
+\end_layout
+
+\begin_layout LyX-Code
+    num-corners = 4 // number of vertices defining the cell
+\end_layout
+
+\begin_layout LyX-Code
+    simplices = { // list of vertices in each cell
+\end_layout
+
+\begin_layout LyX-Code
+      // see Section 4.2 for diagrams giving the order for each 
+\end_layout
+
+\begin_layout LyX-Code
+      // type of cell supported in PyLith
+\end_layout
+
+\begin_layout LyX-Code
+ 
+\end_layout
+
+\begin_layout LyX-Code
+      // index of cell precedes the list of vertices for the cell 
+\end_layout
+
+\begin_layout LyX-Code
+
+\end_layout
+
+\begin_layout LyX-Code
+      // exactly one cell must appear on each line
+\end_layout
+
+\begin_layout LyX-Code
+      // (excluding whitespace)
+\end_layout
+
+\begin_layout LyX-Code
+      0    0  2  3  1
+\end_layout
+
+\begin_layout LyX-Code
+      1    4  5  3  2
+\end_layout
+
+\begin_layout LyX-Code
+    } // end of simplices list
+\end_layout
+
+\begin_layout LyX-Code
+ 
+\end_layout
+
+\begin_layout LyX-Code
+    material-ids = { // associated each cell with a material model
+\end_layout
+
+\begin_layout LyX-Code
+      // the material id is specified using the index of the cell 
+\end_layout
+
+\begin_layout LyX-Code
+      // and then the corresponding material id
+\end_layout
+
+\begin_layout LyX-Code
+      0   0 // cell 0 has a material id of 0
+\end_layout
+
+\begin_layout LyX-Code
+      1   2 // cell 1 has a material id of 2
+\end_layout
+
+\begin_layout LyX-Code
+    } // end of material-ids list
+\end_layout
+
+\begin_layout LyX-Code
+  } // end of cells
+\end_layout
+
+\begin_layout LyX-Code
+ 
+\end_layout
+
+\begin_layout LyX-Code
+  // This next section lists groups of vertices that can be used
+\end_layout
+
+\begin_layout LyX-Code
+  // in applying boundary conditions to portions of the domain
+\end_layout
+
+\begin_layout LyX-Code
+  group = { // start of a group
+\end_layout
+
+\begin_layout LyX-Code
+    // the name can have whitespace, so no comments are allowed
+\end_layout
+
+\begin_layout LyX-Code
+    // after the name
+\end_layout
+
+\begin_layout LyX-Code
+    name = face +y
+\end_layout
+
+\begin_layout LyX-Code
+ 
+\end_layout
+
+\begin_layout LyX-Code
+    // Either groups of vertices or groups of cells can be     
+\end_layout
+
+\begin_layout LyX-Code
+    // specified, but currently PyLith only makes use of groups 
+\end_layout
+
+\begin_layout LyX-Code
+    // of vertices
+\end_layout
+
+\begin_layout LyX-Code
+    type = vertices // 'vertices' or 'cells'
+\end_layout
+
+\begin_layout LyX-Code
+    count = 2 // number of vertices in the group
+\end_layout
+
+\begin_layout LyX-Code
+    indices = { // list of vertex indices in the group
+\end_layout
+
+\begin_layout LyX-Code
+      // multiple vertices may appear on a line
+\end_layout
+
+\begin_layout LyX-Code
+      0  4 // this group contains vertices 0 and 4
+\end_layout
+
+\begin_layout LyX-Code
+    } // end of list of vertices
+\end_layout
+
+\begin_layout LyX-Code
+  } // end of group
+\end_layout
+
+\begin_layout LyX-Code
+  // additional groups can be listed here
+\end_layout
+
+\begin_layout Standard
+\begin_inset Float figure
+placement H
+wide false
+sideways false
+status open
+
+\begin_layout Plain Layout
+\begin_inset Caption
+
+\begin_layout Plain Layout
+Format of 
+\family typewriter
+PyLith
+\family default
+ mesh ASCII files.
+\begin_inset CommandInset label
+LatexCommand label
+name "fig:meshioascii:format"
+
+\end_inset
+
+
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Section
+\begin_inset CommandInset label
+LatexCommand label
+name "sec:Spatialdata:SimpleIOAscii"
+
+\end_inset
+
+SimpleDB Spatial Database Files
+\end_layout
+
+\begin_layout Standard
+SimpleDB spatial database files contain a header describing the set of points
+ and then the data with each line listing the coordinates of a point followed
+ by the values of the fields for that point.
+ 
+\end_layout
+
+\begin_layout LyX-Code
+// This spatial database specifies the distribution of slip on the
+\end_layout
+
+\begin_layout LyX-Code
+// fault surface.
+ In this case we prescribe a piecewise linear, 
+\end_layout
+
+\begin_layout LyX-Code
+// depth dependent distribution of slip.
+ The slip is 2.0 m 
+\end_layout
+
+\begin_layout LyX-Code
+// right-lateral with 0.25 m of reverse slip at the surface with
+\end_layout
+
+\begin_layout LyX-Code
+// a linear taper from 2.0 m to 0.0 m from -2 km to -4 km.
+\end_layout
+
+\begin_layout LyX-Code
+ 
+\end_layout
+
+\begin_layout LyX-Code
+// Comments can appear almost anywhere in these files and are
+\end_layout
+
+\begin_layout LyX-Code
+// delimited with two slashes (//) just like in C++.
+ All text and 
+\end_layout
+
+\begin_layout LyX-Code
+// whitespace after the delimiter on a given line is ignored.
+\end_layout
+
+\begin_layout LyX-Code
+ 
+\end_layout
+
+\begin_layout LyX-Code
+// The next line is the magic header for spatial database files 
+\end_layout
+
+\begin_layout LyX-Code
+// in ASCII format.
+\end_layout
+
+\begin_layout LyX-Code
+#SPATIAL.ascii 1
+\end_layout
+
+\begin_layout LyX-Code
+SimpleDB { // start specifying the database parameters
+\end_layout
+
+\begin_layout LyX-Code
+  num-values = 3 // number of values in the database
+\end_layout
+
+\begin_layout LyX-Code
+ 
+\end_layout
+
+\begin_layout LyX-Code
+  // Specify the names and the order of the values as they appear 
+\end_layout
+
+\begin_layout LyX-Code
+  // in the data.
+ The names of the values must correspond to the 
+\end_layout
+
+\begin_layout LyX-Code
+  // names PyLith requests in querying the database.
+\end_layout
+
+\begin_layout LyX-Code
+  value-names =  left-lateral-slip  reverse-slip  fault-opening
+\end_layout
+
+\begin_layout LyX-Code
+ 
+\end_layout
+
+\begin_layout LyX-Code
+  // Specify the units of the values in Python syntax (e.g., kg/m**3).
+\end_layout
+
+\begin_layout LyX-Code
+  value-units =  m  m  m
+\end_layout
+
+\begin_layout LyX-Code
+
+\end_layout
+
+\begin_layout LyX-Code
+  num-locs = 3 // Number of locations where values are given
+\end_layout
+
+\begin_layout LyX-Code
+  data-dim = 1 // Locations of data points form a line
+\end_layout
+
+\begin_layout LyX-Code
+  space-dim = 3 // Spatial dimension in which data resides
+\end_layout
+
+\begin_layout LyX-Code
+ 
+\end_layout
+
+\begin_layout LyX-Code
+  // Specify the coordinate system associated with the 
+\end_layout
+
+\begin_layout LyX-Code
+  // coordinates of the locations where data is given
+\end_layout
+
+\begin_layout LyX-Code
+  cs-data = cartesian { // Use a Cartesian coordinate system
+\end_layout
+
+\begin_layout LyX-Code
+    to-meters = 1.0e+3 // Coordinates are in km
+\end_layout
+
+\begin_layout LyX-Code
+ 
+\end_layout
+
+\begin_layout LyX-Code
+    // Specify the spatial dimension of the coordinate system
+\end_layout
+
+\begin_layout LyX-Code
+    // This value must match the one associated with the database
+\end_layout
+
+\begin_layout LyX-Code
+    space-dim = 3
+\end_layout
+
+\begin_layout LyX-Code
+  } // cs-data // end of coordinate system specification
+\end_layout
+
+\begin_layout LyX-Code
+} // end of SimpleDB specification
+\end_layout
+
+\begin_layout LyX-Code
+ 
+\end_layout
+
+\begin_layout LyX-Code
+// The locations and values are listed after the parameters.
+\end_layout
+
+\begin_layout LyX-Code
+// Columns are coordinates of the points (1 column for each 
+\end_layout
+
+\begin_layout LyX-Code
+// spatial dimension) followed by the data values in the order 
+\end_layout
+
+\begin_layout LyX-Code
+// specified by the value-names field.
+\end_layout
+
+\begin_layout LyX-Code
+0.0  0.0  0.0    -2.00  0.25  0.00
+\end_layout
+
+\begin_layout LyX-Code
+0.0  0.0 -2.0    -2.00  0.00  0.00
+\end_layout
+
+\begin_layout LyX-Code
+0.0  0.0 -4.0     0.00  0.00  0.00
+\end_layout
+
+\begin_layout Standard
+\begin_inset Float figure
+placement H
+wide false
+sideways false
+status open
+
+\begin_layout Plain Layout
+\begin_inset Caption
+
+\begin_layout Plain Layout
+Format of simple spatial database files.
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Subsection
+Spatial Database Coordinate Systems
+\end_layout
+
+\begin_layout Standard
+The spatial database files support four different types of coordinate systems.
+ Conversions among the three geographic coordinate systems are supported
+ in 3D.
+ Conversions among the geographic and geographic projected coordinate systems
+ are supported in 2D.
+ In using the coordinate systems, we assume that you have installed the
+ 
+\family typewriter
+proj
+\family default
+ program in addition to the Proj.4 libraries, so that you can obtain a list
+ of support projections, datums, and ellipsoids.
+ Alternatively, refer to the documentation for the Proj.4 Cartographic Projection
+s library 
+\begin_inset Flex URL
+status collapsed
+
+\begin_layout Plain Layout
+
+trac.osgeo.org/proj
+\end_layout
+
+\end_inset
+
+.
+\end_layout
+
+\begin_layout Subsubsection
+Cartesian
+\end_layout
+
+\begin_layout Standard
+This is a conventional Cartesian coordinate system.
+ Conversions to other Cartesian coordinate systems are possible.
+\end_layout
+
+\begin_layout LyX-Code
+cs-data = cartesian {
+\end_layout
+
+\begin_layout LyX-Code
+  to-meters = 1.0e+3 // Locations in km
+\end_layout
+
+\begin_layout LyX-Code
+  space-dim = 2 // 1, 2, or 3 dimensions
+\end_layout
+
+\begin_layout LyX-Code
+}
+\end_layout
+
+\begin_layout Standard
+\begin_inset Float figure
+placement H
+wide false
+sideways false
+status open
+
+\begin_layout Plain Layout
+\begin_inset Caption
+
+\begin_layout Plain Layout
+Format for Cartesian coordinate systems in spatial database files.
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Subsubsection
+Geographic
+\end_layout
+
+\begin_layout Standard
+This coordinate system is for geographic coordinates, such as longitude
+ and latitude.
+ Specification of the location in three-dimensions is supported.
+ The vertical datum can be either the reference ellipsoid or mean sea level.
+ The vertical coordinate is positive upwards.
+\end_layout
+
+\begin_layout LyX-Code
+cs-data = geographic {
+\end_layout
+
+\begin_layout LyX-Code
+  // Conversion factor to get to meters (only applies to vertical 
+\end_layout
+
+\begin_layout LyX-Code
+  // coordinate unless you are using a geocentric coordinate system).
+\end_layout
+
+\begin_layout LyX-Code
+  to-meters = 1.0e+3
+\end_layout
+
+\begin_layout LyX-Code
+  space-dim = 2 // 2 or 3 dimensions
+\end_layout
+
+\begin_layout LyX-Code
+ 
+\end_layout
+
+\begin_layout LyX-Code
+  // Run 
+\begin_inset Quotes eld
+\end_inset
+
+proj -le
+\begin_inset Quotes erd
+\end_inset
+
+ to see a list of available reference ellipsoids.
+\end_layout
+
+\begin_layout LyX-Code
+  // Comments are not allowed at the end of the next line.
+\end_layout
+
+\begin_layout LyX-Code
+  ellipsoid = WGS84
+\end_layout
+
+\begin_layout LyX-Code
+ 
+\end_layout
+
+\begin_layout LyX-Code
+  // Run 
+\begin_inset Quotes eld
+\end_inset
+
+proj -ld
+\begin_inset Quotes erd
+\end_inset
+
+ to see a list of available datums.
+\end_layout
+
+\begin_layout LyX-Code
+  // Comments are not allowed at the end of the next line.
+\end_layout
+
+\begin_layout LyX-Code
+  datum-horiz = WGS84
+\end_layout
+
+\begin_layout LyX-Code
+ 
+\end_layout
+
+\begin_layout LyX-Code
+  // 
+\begin_inset Quotes eld
+\end_inset
+
+ellipsoid
+\begin_inset Quotes erd
+\end_inset
+
+ or 
+\begin_inset Quotes eld
+\end_inset
+
+mean sea level
+\begin_inset Quotes erd
+\end_inset
+
+
+\end_layout
+
+\begin_layout LyX-Code
+  // Comments are not allowed at the end of the next line.
+\end_layout
+
+\begin_layout LyX-Code
+  datum-vert = ellipsoid
+\end_layout
+
+\begin_layout LyX-Code
+ 
+\end_layout
+
+\begin_layout LyX-Code
+  // Use a geocentric coordinate system?
+\end_layout
+
+\begin_layout LyX-Code
+  is-geocentric = false // true or false
+\end_layout
+
+\begin_layout LyX-Code
+}
+\end_layout
+
+\begin_layout Standard
+\begin_inset Float figure
+placement H
+wide false
+sideways false
+status open
+
+\begin_layout Plain Layout
+\begin_inset Caption
+
+\begin_layout Plain Layout
+Format for geographic coordinate systems in spatial database files.
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Subsubsection
+Geographic Projection
+\end_layout
+
+\begin_layout Standard
+This coordinate system applies to geographic projections.
+ As in the geographic coordinate system, the vertical coordinate (if used)
+ can be specified with respect to either the reference ellipsoid or mean
+ sea level.
+ The coordinate system can use a local origin and be rotated about the vertical
+ direction.
+\end_layout
+
+\begin_layout LyX-Code
+cs-data = geo-projected {
+\end_layout
+
+\begin_layout LyX-Code
+  to-meters = 1.0e+3 // Conversion factor to get to meters.
+\end_layout
+
+\begin_layout LyX-Code
+  space-dim = 2 // 2 or 3 dimensions
+\end_layout
+
+\begin_layout LyX-Code
+
+\end_layout
+
+\begin_layout LyX-Code
+  // Run 
+\begin_inset Quotes eld
+\end_inset
+
+proj -le
+\begin_inset Quotes erd
+\end_inset
+
+ to see a list of available reference ellipsoids.
+\end_layout
+
+\begin_layout LyX-Code
+  // Comments are not allowed at the end of the next line.
+\end_layout
+
+\begin_layout LyX-Code
+  ellipsoid = WGS84
+\end_layout
+
+\begin_layout LyX-Code
+ 
+\end_layout
+
+\begin_layout LyX-Code
+  // Run 
+\begin_inset Quotes eld
+\end_inset
+
+proj -ld
+\begin_inset Quotes erd
+\end_inset
+
+ to see a list of available datums.
+\end_layout
+
+\begin_layout LyX-Code
+  // Comments are not allowed at the end of the next line.
+\end_layout
+
+\begin_layout LyX-Code
+  datum-horiz = WGS84
+\end_layout
+
+\begin_layout LyX-Code
+ 
+\end_layout
+
+\begin_layout LyX-Code
+  // 
+\begin_inset Quotes eld
+\end_inset
+
+ellipsoid
+\begin_inset Quotes erd
+\end_inset
+
+ or 
+\begin_inset Quotes eld
+\end_inset
+
+mean sea level
+\begin_inset Quotes erd
+\end_inset
+
+
+\end_layout
+
+\begin_layout LyX-Code
+  // Comments are not allowed at the end of the next line.
+\end_layout
+
+\begin_layout LyX-Code
+  datum-vert = ellipsoid
+\end_layout
+
+\begin_layout LyX-Code
+ 
+\end_layout
+
+\begin_layout LyX-Code
+  // Longitude of local origin in WGS84.
+\end_layout
+
+\begin_layout LyX-Code
+  origin_lon = -120.0
+\end_layout
+
+\begin_layout LyX-Code
+  
+\end_layout
+
+\begin_layout LyX-Code
+  // Latitude of local origin in WGS84.
+\end_layout
+
+\begin_layout LyX-Code
+  origin_lat = 37.0
+\end_layout
+
+\begin_layout LyX-Code
+ 
+\end_layout
+
+\begin_layout LyX-Code
+  // Rotation angle in degrees (CCW) or local x-axis from east.
+\end_layout
+
+\begin_layout LyX-Code
+  rotation_angle = 23.0
+\end_layout
+
+\begin_layout LyX-Code
+
+\end_layout
+
+\begin_layout LyX-Code
+  // Run 
+\begin_inset Quotes eld
+\end_inset
+
+proj -lp
+\begin_inset Quotes erd
+\end_inset
+
+ to see a list of available geographic 
+\end_layout
+
+\begin_layout LyX-Code
+  // projections.
+\end_layout
+
+\begin_layout LyX-Code
+    projector = projection {
+\end_layout
+
+\begin_layout LyX-Code
+    // Name of the projection.
+ run 
+\begin_inset Quotes eld
+\end_inset
+
+proj -lp
+\begin_inset Quotes erd
+\end_inset
+
+ to see a list of 
+\end_layout
+
+\begin_layout LyX-Code
+    // supported projections.
+ Use the Universal Transverse Mercator
+\end_layout
+
+\begin_layout LyX-Code
+    // projection.
+\end_layout
+
+\begin_layout LyX-Code
+    projection = utm
+\end_layout
+
+\begin_layout LyX-Code
+    units = m // Units in the projection.
+\end_layout
+
+\begin_layout LyX-Code
+ 
+\end_layout
+
+\begin_layout LyX-Code
+    // Provide a list of projection options; these are the command 
+\end_layout
+
+\begin_layout LyX-Code
+    // line arguments you would use with the proj program.
+ Refer to
+\end_layout
+
+\begin_layout LyX-Code
+    // the Proj.4 library documentation for complete details.
+\end_layout
+
+\begin_layout LyX-Code
+    // Comments are not allowed at the end of the next line.
+\end_layout
+
+\begin_layout LyX-Code
+    proj-options = +zone=10
+\end_layout
+
+\begin_layout LyX-Code
+}
+\end_layout
+
+\begin_layout Standard
+\begin_inset Float figure
+placement H
+wide false
+sideways false
+status open
+
+\begin_layout Plain Layout
+\begin_inset Caption
+
+\begin_layout Plain Layout
+Format for geographic projection coordinate systems in spatial database
+ files.
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Subsubsection
+Geographic Local Cartesian
+\end_layout
+
+\begin_layout Standard
+This coordinate system is a geographically referenced, local 3D Cartesian
+ coordinate system.
+ This allows use of a conventional Cartesian coordinate system with accurate
+ georeferencing.
+ For example, one can construct a finite-element model in this coordinate
+ system and use spatial databases in geographic coordinates.
+ This coordinate system provides an alternative to using a geographic projection
+ as the Cartesian grip.
+ The advantage of this coordinate system is that it retains the curvature
+ of the Earth, while a geographic projection does not.
+\end_layout
+
+\begin_layout LyX-Code
+cs-data = geo-local-cartesian {
+\end_layout
+
+\begin_layout LyX-Code
+  // Conversion factor to get to meters (only applies to vertical
+\end_layout
+
+\begin_layout LyX-Code
+  // coordinate unless you are using a geocentric coordinate system).
+\end_layout
+
+\begin_layout LyX-Code
+  to-meters = 1.0 // use meters
+\end_layout
+
+\begin_layout LyX-Code
+  space-dim = 2 // 2 or 3 dimensions
+\end_layout
+
+\begin_layout LyX-Code
+ 
+\end_layout
+
+\begin_layout LyX-Code
+  // Run 
+\begin_inset Quotes eld
+\end_inset
+
+proj -le
+\begin_inset Quotes erd
+\end_inset
+
+ to see a list of available reference ellipsoids.
+\end_layout
+
+\begin_layout LyX-Code
+  // Comments are not allowed at the end of the next line.
+\end_layout
+
+\begin_layout LyX-Code
+  ellipsoid = WGS84
+\end_layout
+
+\begin_layout LyX-Code
+ 
+\end_layout
+
+\begin_layout LyX-Code
+  // Run 
+\begin_inset Quotes eld
+\end_inset
+
+proj -ld
+\begin_inset Quotes erd
+\end_inset
+
+ to see a list of available datums.
+\end_layout
+
+\begin_layout LyX-Code
+  // Comments are not allowed at the end of the next line.
+\end_layout
+
+\begin_layout LyX-Code
+  datum-horiz = WGS84
+\end_layout
+
+\begin_layout LyX-Code
+ 
+\end_layout
+
+\begin_layout LyX-Code
+  // 
+\begin_inset Quotes eld
+\end_inset
+
+ellipsoid
+\begin_inset Quotes erd
+\end_inset
+
+ or 
+\begin_inset Quotes eld
+\end_inset
+
+mean sea level
+\begin_inset Quotes erd
+\end_inset
+
+
+\end_layout
+
+\begin_layout LyX-Code
+  // Comments are not allowed at the end of the next line.
+\end_layout
+
+\begin_layout LyX-Code
+  datum-vert = ellipsoid
+\end_layout
+
+\begin_layout LyX-Code
+ 
+\end_layout
+
+\begin_layout LyX-Code
+  // Origin of the local Cartesian coordinate system.
+ To avoid
+\end_layout
+
+\begin_layout LyX-Code
+  // round-off errors it is best to pick a location near the center of
+\end_layout
+
+\begin_layout LyX-Code
+  // the region of interest.
+ An elevation on the surface of the Earth
+\end_layout
+
+\begin_layout LyX-Code
+  // in the middle of the region also works well (and makes the
+\end_layout
+
+\begin_layout LyX-Code
+  // vertical coordinate easy to interpret).
+\end_layout
+
+\begin_layout LyX-Code
+  origin-lon = -116.7094 // Longitude of the origin in decimal degrees
+\end_layout
+
+\begin_layout LyX-Code
+                         // (west is negative).
+\end_layout
+
+\begin_layout LyX-Code
+  origin-lat = 36.3874 // Latitude of the origin in decimal degrees 
+\end_layout
+
+\begin_layout LyX-Code
+                       // (north is positive).
+\end_layout
+
+\begin_layout LyX-Code
+ 
+\end_layout
+
+\begin_layout LyX-Code
+  // Elevation with respect to the vertical datum.
+ Units are the
+\end_layout
+
+\begin_layout LyX-Code
+  // same as the Cartesian coordinate system (in this case meters).
+\end_layout
+
+\begin_layout LyX-Code
+  origin-elev = 3.5
+\end_layout
+
+\begin_layout LyX-Code
+}
+\end_layout
+
+\begin_layout Standard
+\begin_inset Float figure
+placement H
+wide false
+sideways false
+status open
+
+\begin_layout Plain Layout
+\begin_inset Caption
+
+\begin_layout Plain Layout
+Format for the geographic local Cartesian coordinate system in spatial database
+ files.
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Section
+\begin_inset CommandInset label
+LatexCommand label
+name "sec:Spatialdata:SimpleGrid"
+
+\end_inset
+
+SimpleGridDB Spatial Database Files
+\end_layout
+
+\begin_layout Standard
+SimpleGridDB spatial database files contain a header describing the grid
+ of points and then the data with each line listing the coordinates of a
+ point followed by the values of the fields for that point.
+ The coordinates for each dimension of the grid do not need to be uniformly
+ spaced.
+ The coordinate systems are specified the same way as they are in SimpleDB
+ spatial database files as described in Section 
+\begin_inset CommandInset ref
+LatexCommand ref
+reference "sec:Spatialdata:SimpleIOAscii"
+
+\end_inset
+
+.
+ 
+\end_layout
+
+\begin_layout LyX-Code
+// This spatial database specifies the elastic properties on a
+\end_layout
+
+\begin_layout LyX-Code
+// 2-D grid in 3-D space.
+\end_layout
+
+\begin_layout LyX-Code
+ 
+\end_layout
+
+\begin_layout LyX-Code
+// Comments can appear almost anywhere in these files and are
+\end_layout
+
+\begin_layout LyX-Code
+// delimited with two slashes (//) just like in C++.
+ All text and 
+\end_layout
+
+\begin_layout LyX-Code
+// whitespace after the delimiter on a given line is ignored.
+\end_layout
+
+\begin_layout LyX-Code
+ 
+\end_layout
+
+\begin_layout LyX-Code
+// The next line is the magic header for spatial database files 
+\end_layout
+
+\begin_layout LyX-Code
+// in ASCII format.
+\end_layout
+
+\begin_layout LyX-Code
+#SPATIAL_GRID.ascii 1
+\end_layout
+
+\begin_layout LyX-Code
+SimpleGridDB { // start specifying the database parameters
+\end_layout
+
+\begin_layout LyX-Code
+  num-values = 3 // number of values in the database
+\end_layout
+
+\begin_layout LyX-Code
+ 
+\end_layout
+
+\begin_layout LyX-Code
+  // Specify the names and the order of the values as they appear 
+\end_layout
+
+\begin_layout LyX-Code
+  // in the data.
+ The names of the values must correspond to the
+\end_layout
+
+\begin_layout LyX-Code
+  // names PyLith requests in querying the database.
+\end_layout
+
+\begin_layout LyX-Code
+  value-names =  Vp  Vs  Density
+\end_layout
+
+\begin_layout LyX-Code
+ 
+\end_layout
+
+\begin_layout LyX-Code
+  // Specify the units of the values in Python syntax.
+\end_layout
+
+\begin_layout LyX-Code
+  value-units =  km/s  km/s  kg/m**3
+\end_layout
+
+\begin_layout LyX-Code
+  
+\end_layout
+
+\begin_layout LyX-Code
+  num-x = 3 // Number of locations along x coordinate direction
+\end_layout
+
+\begin_layout LyX-Code
+  num-y = 1 // Number of locations along y coordinate direction
+\end_layout
+
+\begin_layout LyX-Code
+  num-z = 2 // Number of locations along z coordinate direction
+\end_layout
+
+\begin_layout LyX-Code
+  space-dim = 3 // Spatial dimension in which data resides
+\end_layout
+
+\begin_layout LyX-Code
+ 
+\end_layout
+
+\begin_layout LyX-Code
+  // Specify the coordinate system associated with the 
+\end_layout
+
+\begin_layout LyX-Code
+  // coordinates of the locations where data is given
+\end_layout
+
+\begin_layout LyX-Code
+  cs-data = cartesian { // Use a Cartesian coordinate system
+\end_layout
+
+\begin_layout LyX-Code
+    to-meters = 1.0e+3 // Coordinates are in km
+\end_layout
+
+\begin_layout LyX-Code
+ 
+\end_layout
+
+\begin_layout LyX-Code
+    // Specify the spatial dimension of the coordinate system
+\end_layout
+
+\begin_layout LyX-Code
+    // This value must match the one associated with the database
+\end_layout
+
+\begin_layout LyX-Code
+    space-dim = 3
+\end_layout
+
+\begin_layout LyX-Code
+  } // cs-data // end of coordinate system specification
+\end_layout
+
+\begin_layout LyX-Code
+} // end of SimpleGridDB specification
+\end_layout
+
+\begin_layout LyX-Code
+// x coordinates
+\end_layout
+
+\begin_layout LyX-Code
+-3.0  1.0  2.0
+\end_layout
+
+\begin_layout LyX-Code
+
+\end_layout
+
+\begin_layout LyX-Code
+// y coordinates
+\end_layout
+
+\begin_layout LyX-Code
+8.0
+\end_layout
+
+\begin_layout LyX-Code
+
+\end_layout
+
+\begin_layout LyX-Code
+// z coordinates
+\end_layout
+
+\begin_layout LyX-Code
+2.0  4.0
+\end_layout
+
+\begin_layout LyX-Code
+
+\end_layout
+
+\begin_layout LyX-Code
+// The locations and values are listed after the parameters.
+\end_layout
+
+\begin_layout LyX-Code
+// Columns are coordinates of the points (1 column for each 
+\end_layout
+
+\begin_layout LyX-Code
+// spatial dimension) followed by the data values in the order 
+\end_layout
+
+\begin_layout LyX-Code
+// specified by the value-names field.
+ The points can be in any order.
+\end_layout
+
+\begin_layout LyX-Code
+-3.0  8.0  2.0    6.0  4.0  2500.0
+\end_layout
+
+\begin_layout LyX-Code
+ 1.0  8.0  2.0    6.2  4.1  2600.0
+\end_layout
+
+\begin_layout LyX-Code
+ 2.0  8.0  2.0    5.8  3.9  2400.0
+\end_layout
+
+\begin_layout LyX-Code
+-3.0  8.0  4.0    6.1  4.1  2500.0
+\end_layout
+
+\begin_layout LyX-Code
+ 1.0  8.0  4.0    5.9  3.8  2450.0
+\end_layout
+
+\begin_layout LyX-Code
+ 2.0  8.0  4.0    5.7  3.7  2400.0
+\end_layout
+
+\begin_layout Standard
+\begin_inset Float figure
+placement H
+wide false
+sideways false
+status open
+
+\begin_layout Plain Layout
+\begin_inset Caption
+
+\begin_layout Plain Layout
+Format of grid-based spatial database files.
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Section
+\begin_inset CommandInset label
+LatexCommand label
+name "sec:Spatialdata:TimeHistoryIO"
+
+\end_inset
+
+Time History Database Files
+\end_layout
+
+\begin_layout Standard
+Time history database files contain a header describing the number of points
+ in the time history and the units for the time stamps followed by a list
+ with pairs of time stamps and amplitude values.
+ The amplitude at an arbitrary point in time is computed via interpolation
+ of the values in the database.
+ This means that the time history database must span the range of time values
+ of interest.
+ The points in the time history must also be ordered in time.
+\end_layout
+
+\begin_layout LyX-Code
+// This time history database specifies temporal variation in
+\end_layout
+
+\begin_layout LyX-Code
+// amplitude.
+ In this case we prescribe a triangular slip time
+\end_layout
+
+\begin_layout LyX-Code
+// history.
+ 
+\end_layout
+
+\begin_layout LyX-Code
+ 
+\end_layout
+
+\begin_layout LyX-Code
+// Comments can appear almost anywhere in these files and are
+\end_layout
+
+\begin_layout LyX-Code
+// delimited with two slashes (//) just like in C++.
+ All text and 
+\end_layout
+
+\begin_layout LyX-Code
+// whitespace after the delimiter on a given line is ignored.
+\end_layout
+
+\begin_layout LyX-Code
+ 
+\end_layout
+
+\begin_layout LyX-Code
+// The next line is the magic header for spatial database files 
+\end_layout
+
+\begin_layout LyX-Code
+// in ASCII format.
+\end_layout
+
+\begin_layout LyX-Code
+#TIME HISTORY ascii
+\end_layout
+
+\begin_layout LyX-Code
+TimeHistory { // start specifying the database parameters
+\end_layout
+
+\begin_layout LyX-Code
+  num-points = 5 // number of points in time history
+\end_layout
+
+\begin_layout LyX-Code
+ 
+\end_layout
+
+\begin_layout LyX-Code
+  // Specify the units used in the time stamps.
+\end_layout
+
+\begin_layout LyX-Code
+  time-units = year
+\end_layout
+
+\begin_layout LyX-Code
+
+\end_layout
+
+\begin_layout LyX-Code
+} // end of TimeHistory header
+\end_layout
+
+\begin_layout LyX-Code
+ 
+\end_layout
+
+\begin_layout LyX-Code
+// The time history values are listed after the parameters.
+\end_layout
+
+\begin_layout LyX-Code
+// Columns time and amplitude where the amplitude values are unitless.
+\end_layout
+
+\begin_layout LyX-Code
+ 0.0     0.00
+\end_layout
+
+\begin_layout LyX-Code
+ 2.0     1.00
+\end_layout
+
+\begin_layout LyX-Code
+ 6.0     4.00
+\end_layout
+
+\begin_layout LyX-Code
+10.0     2.00
+\end_layout
+
+\begin_layout LyX-Code
+11.0     0.00
+\end_layout
+
+\begin_layout Standard
+\begin_inset Float figure
+placement H
+wide false
+sideways false
+status open
+
+\begin_layout Plain Layout
+\begin_inset Caption
+
+\begin_layout Plain Layout
+Format of time history database files.
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Section
+\begin_inset CommandInset label
+LatexCommand label
+name "sec:FileFormat:TimeStepUser"
+
+\end_inset
+
+User-Specified Time-Step File
+\end_layout
+
+\begin_layout Standard
+This file lists the time-step sizes for nonuniform, user-specified time
+ steps.
+ The file's format is an ASCII file that includes the units for the time-step
+ sizes and then a list of the time steps.
+ 
+\end_layout
+
+\begin_layout LyX-Code
+// This time step file specifies five time steps with the units in years.
+\end_layout
+
+\begin_layout LyX-Code
+ 
+\end_layout
+
+\begin_layout LyX-Code
+// Comments can appear almost anywhere in these files and are
+\end_layout
+
+\begin_layout LyX-Code
+// delimited with two slashes (//) just like in C++.
+ All text and 
+\end_layout
+
+\begin_layout LyX-Code
+// whitespace after the delimiter on a given line is ignored.
+\end_layout
+
+\begin_layout LyX-Code
+
+\end_layout
+
+\begin_layout LyX-Code
+// Units for the time steps
+\end_layout
+
+\begin_layout LyX-Code
+units = year
+\end_layout
+
+\begin_layout LyX-Code
+
+\end_layout
+
+\begin_layout LyX-Code
+1.0 // Comment
+\end_layout
+
+\begin_layout LyX-Code
+2.0
+\end_layout
+
+\begin_layout LyX-Code
+3.0
+\end_layout
+
+\begin_layout LyX-Code
+2.5
+\end_layout
+
+\begin_layout LyX-Code
+3.0
+\end_layout
+
+\begin_layout Standard
+\begin_inset Float figure
+placement H
+wide false
+sideways false
+status open
+
+\begin_layout Plain Layout
+\begin_inset Caption
+
+\begin_layout Plain Layout
+Format of user-specified time-step files.
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Section
+\begin_inset CommandInset label
+LatexCommand label
+name "sec:FileFormat:PointsList"
+
+\end_inset
+
+Points List File
+\end_layout
+
+\begin_layout Standard
+This file lists the coordinates of the locations where output is requested
+ for the 
+\family typewriter
+OutputSolnPoints
+\family default
+ component.
+ The coordinate system is specified in the 
+\family typewriter
+OutputSolnPoints
+\family default
+ component.
+ 
+\end_layout
+
+\begin_layout LyX-Code
+# This time step file specifies five time steps with the units in years.
+\end_layout
+
+\begin_layout LyX-Code
+#
+\end_layout
+
+\begin_layout LyX-Code
+# Comments are limited to complete lines.
+ The default delimiter for comments
+\end_layout
+
+\begin_layout LyX-Code
+# is '#', which can be changed via parameters.
+ Additionally, the delimiter 
+\end_layout
+
+\begin_layout LyX-Code
+# separating values can also be customized (default is whitespace).
+\end_layout
+
+\begin_layout LyX-Code
+1.0  -2.0   0.0
+\end_layout
+
+\begin_layout LyX-Code
+2.0  -4.0  -0.1
+\end_layout
+
+\begin_layout LyX-Code
+0.0  +2.0   0.0
+\end_layout
+
+\begin_layout LyX-Code
+2.5  -0.2  -0.2 
+\end_layout
+
+\begin_layout LyX-Code
+0.0   2.0  +0.2
+\end_layout
+
+\begin_layout Standard
+\begin_inset Float figure
+placement H
+wide false
+sideways false
+status open
+
+\begin_layout Plain Layout
+\begin_inset Caption
+
+\begin_layout Plain Layout
+Format of files with coordinates of points for output.
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\end_body
+\end_document

Modified: short/3D/PyLith/trunk/doc/userguide/runpylith/runpylith.lyx
===================================================================
--- short/3D/PyLith/trunk/doc/userguide/runpylith/runpylith.lyx	2012-10-24 20:54:19 UTC (rev 20914)
+++ short/3D/PyLith/trunk/doc/userguide/runpylith/runpylith.lyx	2012-10-24 21:51:32 UTC (rev 20915)
@@ -4226,6 +4226,83 @@
 \end_layout
 
 \begin_layout Subsection
+SimpleGridDB Spatial Database
+\end_layout
+
+\begin_layout Standard
+The SimpleGridDB object provides a much more efficient query algorithm than
+ SimpleDB in cases with a orthogonal grid.
+ The points do not need to be uniformly spaced along each coordinate direction.
+ Thus, in contrast to the SimpleDB there is an implicit topology.
+ Nevertheless, the points can be specified in any order, as well as over
+ a lower-dimension than the spatial dimension.
+ For example, one can specify a 2-D grid in 3-D space provided that the
+ 2-D grid is aligned with one of the coordinate axes.
+ 
+\end_layout
+
+\begin_layout Standard
+SimpleGridDB uses a simple ASCII file to specify the variation of values
+ (e.g., displacement field, slip field, physical properties) in space.
+ The file format is described in Section 
+\begin_inset CommandInset ref
+LatexCommand ref
+reference "sec:Spatialdata:SimpleGrid"
+
+\end_inset
+
+.
+ 
+\end_layout
+
+\begin_layout Standard
+As in the other Pyre objects, spatial database objects contain parameters
+ that can be set from the command line or using 
+\family typewriter
+.cfg or .pml
+\family default
+ files.
+ The parameters for a spatial database are:
+\end_layout
+
+\begin_layout Description
+label Label for the database, which is used in diagnostic messages.
+\end_layout
+
+\begin_layout Description
+query_type Type of search query to perform.
+ Values for this parameter are ``linear'' and ``nearest'' (default).
+\end_layout
+
+\begin_layout Description
+filename Filename for the spatial database.
+\end_layout
+
+\begin_layout Standard
+An example of setting these parameters in a 
+\family typewriter
+.cfg
+\family default
+ file is:
+\end_layout
+
+\begin_layout LyX-Code
+label = Material properties
+\end_layout
+
+\begin_layout LyX-Code
+query_type = linear
+\end_layout
+
+\begin_layout LyX-Code
+filename = mydb_grid.spatialdb
+\end_layout
+
+\begin_layout LyX-Code
+
+\end_layout
+
+\begin_layout Subsection
 \begin_inset CommandInset label
 LatexCommand label
 name "sub:SCECCVMH-Impl"

Modified: short/3D/PyLith/trunk/libsrc/pylith/problems/SolverNonlinear.cc
===================================================================
--- short/3D/PyLith/trunk/libsrc/pylith/problems/SolverNonlinear.cc	2012-10-24 20:54:19 UTC (rev 20914)
+++ short/3D/PyLith/trunk/libsrc/pylith/problems/SolverNonlinear.cc	2012-10-24 21:51:32 UTC (rev 20915)
@@ -107,6 +107,7 @@
   PetscSNESLineSearch ls;
   err = SNESGetSNESLineSearch(_snes, &ls);CHECK_PETSC_ERROR(err);
   err = SNESLineSearchSetType(ls, SNESSHELL);CHECK_PETSC_ERROR(err);
+  err = SNESLineSearchSetOrder(ls, SNES_LINESEARCH_ORDER_CUBIC);CHECK_PETSC_ERROR(err);
   err = SNESLineSearchShellSetUserFunc(ls, lineSearch, (void*) formulation);CHECK_PETSC_ERROR(err);
 
   // Get SNES options and allow the user to override the line search type

Modified: short/3D/PyLith/trunk/pylith/apps/EqInfoApp.py
===================================================================
--- short/3D/PyLith/trunk/pylith/apps/EqInfoApp.py	2012-10-24 20:54:19 UTC (rev 20914)
+++ short/3D/PyLith/trunk/pylith/apps/EqInfoApp.py	2012-10-24 21:51:32 UTC (rev 20915)
@@ -52,7 +52,7 @@
 
   def recalculate(self):
     self.avgslip = self.potency / (self.ruparea + 1.0e-30)
-    self.mommag = 2.0/3.0*numpy.log10(self.moment) - 10.7
+    self.mommag = 2.0/3.0*(numpy.log10(self.moment) - 9.05)
     return
 
 
@@ -163,6 +163,7 @@
     """
     Run the application.
     """
+    self.cs.initialize()
     nfaults = len(self.faults)
     
     if nfaults == 0:
@@ -179,7 +180,7 @@
 
       h5 = h5py.File(filenameIn, "r", driver='sec2')
       vertices = h5['geometry/vertices'][:]
-      cells = h5['topology/cells'][:]
+      cells = numpy.array(h5['topology/cells'][:], dtype=numpy.int32)
       timestamps = h5['time'][:]
       cellsArea = self._calcCellArea(cells, vertices)
       cellsShearMod = self._getShearModulus(cells, vertices)
@@ -257,15 +258,15 @@
 
   def _calcCellArea(self, cells, vertices):
     (ncells, ncorners) = cells.shape
-    if ncorners == 1:
+    if ncorners == 1: # point
       area = numpy.ones( (ncells,), dtype=numpy.float64)
-    elif ncorners == 2:
+    elif ncorners == 2: # line2
       area = self._vectorMag(vertices[cells[:,1]] - vertices[cells[:,0]])
-    elif ncorners == 3:
+    elif ncorners == 3: # tri3
       v01 = vertices[cells[:,1]] - vertices[cells[:,0]]
       v02 = vertices[cells[:,2]] - vertices[cells[:,0]]
       area = 0.5*self._vectorMag(numpy.cross(v01, v02))
-    elif ncorners == 4:
+    elif ncorners == 4: # quad4
       v01 = vertices[cells[:,1]] - vertices[cells[:,0]]
       v02 = vertices[cells[:,2]] - vertices[cells[:,0]]
       v03 = vertices[cells[:,3]] - vertices[cells[:,0]]

Modified: short/3D/PyLith/trunk/tests_auto/Makefile.am
===================================================================
--- short/3D/PyLith/trunk/tests_auto/Makefile.am	2012-10-24 20:54:19 UTC (rev 20914)
+++ short/3D/PyLith/trunk/tests_auto/Makefile.am	2012-10-24 21:51:32 UTC (rev 20915)
@@ -19,7 +19,8 @@
 SUBDIRS = \
 	1d \
 	2d \
-	petsc
+	petsc \
+	eqinfo
 
 
 # End of file 

Modified: short/3D/PyLith/trunk/tests_auto/eqinfo/TestEqInfo.py
===================================================================
--- short/3D/PyLith/trunk/tests_auto/eqinfo/TestEqInfo.py	2012-10-24 20:54:19 UTC (rev 20914)
+++ short/3D/PyLith/trunk/tests_auto/eqinfo/TestEqInfo.py	2012-10-24 21:51:32 UTC (rev 20915)
@@ -42,7 +42,7 @@
              ]
 
     statsE.avgslip = statsE.potency / (statsE.ruparea + 1.0e-30)
-    statsE.mommag = 2.0/3.0*numpy.log10(statsE.moment) - 10.7
+    statsE.mommag = 2.0/3.0*(numpy.log10(statsE.moment) - 9.05)
 
     for attr in attrs:
       valuesE = statsE.__getattribute__(attr)

Modified: short/3D/PyLith/trunk/unittests/libtests/meshio/data/quad4_bc_cell.h5
===================================================================
(Binary files differ)



More information about the CIG-COMMITS mailing list