[cig-commits] r15306 - in short/3D/PyLith/trunk/doc/userguide: benchmarks/savageprescott extending

sue at geodynamics.org sue at geodynamics.org
Tue Jun 16 14:45:03 PDT 2009


Author: sue
Date: 2009-06-16 14:45:03 -0700 (Tue, 16 Jun 2009)
New Revision: 15306

Modified:
   short/3D/PyLith/trunk/doc/userguide/benchmarks/savageprescott/savageprescott.lyx
   short/3D/PyLith/trunk/doc/userguide/extending/extending.lyx
Log:
fixed some typos, consistency issues

Modified: short/3D/PyLith/trunk/doc/userguide/benchmarks/savageprescott/savageprescott.lyx
===================================================================
--- short/3D/PyLith/trunk/doc/userguide/benchmarks/savageprescott/savageprescott.lyx	2009-06-16 21:02:26 UTC (rev 15305)
+++ short/3D/PyLith/trunk/doc/userguide/benchmarks/savageprescott/savageprescott.lyx	2009-06-16 21:45:03 UTC (rev 15306)
@@ -68,7 +68,7 @@
 status open
 
 \begin_layout Plain Layout
-CHARLES- use a nondimenisonal description of the problem and geometry.
+CHARLES- use a nondimensional description of the problem and geometry.
 \end_layout
 
 \end_inset

Modified: short/3D/PyLith/trunk/doc/userguide/extending/extending.lyx
===================================================================
--- short/3D/PyLith/trunk/doc/userguide/extending/extending.lyx	2009-06-16 21:02:26 UTC (rev 15305)
+++ short/3D/PyLith/trunk/doc/userguide/extending/extending.lyx	2009-06-16 21:45:03 UTC (rev 15306)
@@ -70,14 +70,14 @@
  facility.
  In this section we provide examples of how to extend PyLith for components
  that users will most likely want to replace with their own custom versions.
- You will need a familirarity with Python, Makefiles, and C++ to write your
+ You will need a familiarity with Python, Makefiles, and C++ to write your
  own components.
- The primary steps in constructing a component to extend PyLith' functionality
+ The primary steps in constructing a component to extend PyLith's functionality
  include:
 \end_layout
 
 \begin_layout Enumerate
-Setting up the sources files for the component or set of components based
+Setting up the source files for the component or set of components based
  on the templates.
 \end_layout
 
@@ -165,10 +165,18 @@
 \family typewriter
 README
 \family default
- file in templates/spatialdb provides detailed instructions for the various
- steps involved and the source files contain numerous comments to help guide
- you through the customization process.
- The UniformVelModel component provides uniform physical properties: P wave
+ file in 
+\family typewriter
+templates/spatialdb
+\family default
+ provides detailed instructions for the various steps involved, and the
+ source files contain numerous comments to help guide you through the customizat
+ion process.
+ 
+\end_layout
+
+\begin_layout Standard
+The UniformVelModel component provides uniform physical properties: P wave
  speed, S wave speed, and density.
  Although this is a rather trivial specification of physical properties
  that could be easily done using a UniformDB, this example demonstrates
@@ -181,12 +189,12 @@
  With our uniform physical properties we do not need to worry about any
  differences in coordinate systems between our seismic velocity model and
  points at which the model is queried.
- Howver, in many cases we do, so we illustrate this functionality by using
+ However, in many cases we do, so we illustrate this functionality by using
  a geographic projection as the coordinate system in our example.
 \end_layout
 
 \begin_layout Standard
-Using a top-down approach the first step is to determine what information
+Using a top-down approach, the first step is to determine what information
  the user will need to supply to the component.
  Is the data for the spatial database in a file or a series of files? If
  so, file names and possible paths to a directory containing files with
@@ -241,14 +249,17 @@
  the P wave speed, S wave speed, and density values to the user-specified
  values in the Python object.
  Additional information, such as a file name, parameters defined as data
- structures, etc.
- would be set via similar accessor functions.
+ structures, etc., would be set via similar accessor functions.
  You can also add additional functions and data structures to the C++ class
  to provide the necessary operations and functionality of the spatial database.
- In SimpleDB we use a separate class to read in the spatial database and
+ 
+\end_layout
+
+\begin_layout Standard
+In SimpleDB we use a separate class to read in the spatial database and
  yet another class to perform the actual query.
- In our example the C++ object also creates and stores the UTM zone 10 geographi
-c projection for the seismic velocity model.
+ In our example, the C++ object also creates and stores the UTM zone 10
+ geographic projection for the seismic velocity model.
  When the spatial database gets a query for physical properties, we transform
  the coordinates of the query point from its coordinate system to the coordinate
  system of our seismic velocity model.
@@ -256,61 +267,56 @@
 
 \begin_layout Standard
 In order to use SWIG to create the Python module that allows us to call
- C++ from Python, we use a 
-\begin_inset Quotes eld
-\end_inset
-
-main
-\begin_inset Quotes erd
-\end_inset
-
- SWIG interface file (
+ C++ from Python, we use a ``main'' SWIG interface file (
 \family typewriter
-spatialdbcontrib.
+\size small
+spatialdbcontrib.i
 \family default
-i in this case) and then one for each object (
+\size default
+ in this case) and then one for each object (
 \family typewriter
+\size small
 UniformVelModel.i
 \family default
+\size default
  in this case).
  This greatly simplifies keeping the Python module synchronized with the
  C++ and Python code.
  The 
 \family typewriter
+\size small
 UniformVelModel.i
 \family default
+\size default
  SWIG file is nearly identical to the corresponding C++ header file.
- There are a few differences as noted in the comments within the file.
+ There are a few differences, as noted in the comments within the file.
  Copying and pasting the C++ header file and then doing a little cleanup
  is a very quick and easy way to construct a SWIG interface file for a C++
  object.
  Because very little changes from SWIG module to SWIG module, it is usually
- easiest to construct the 
-\begin_inset Quotes eld
-\end_inset
-
-main
-\begin_inset Quotes erd
-\end_inset
-
- SWIG interface by copying and customizing an existing one.
+ easiest to construct the ``main'' SWIG interface by copying and customizing
+ an existing one.
 \end_layout
 
 \begin_layout Standard
 Once the Python, C++, and SWIG interface files are complete, we are ready
  to build the module.
- The Makefile.am file defines how to compile and link the C++ library and
- generate the Python module via SWIG.
  The 
 \family typewriter
+Makefile.am
+\family default
+ file defines how to compile and link the C++ library and generate the Python
+ module via SWIG.
+ The 
+\family typewriter
 configure.ac
 \family default
  file contains the information used to build a configure script.
  The configure script checks to make sure it can find all of the tools needed
  to build the component (C++ compiler, Python, installed spatial database
- package, etc).
+ package, etc.).
  See the README file for detailed instructions on how to generate the configure
- script, build, and install the component.
+ script, and build and install the component.
 \end_layout
 
 \begin_layout Standard
@@ -318,20 +324,28 @@
 g properly before attempting to use it in an application.
  The 
 \family typewriter
+\size small
 tests
 \family default
+\size default
  directory within 
 \family typewriter
+\size small
 templates/spatialdb
 \family default
+\size default
  contains a Python script, 
 \family typewriter
+\size small
 testcontrib.py
 \family default
+\size default
 , that runs the tests of the UniformVelModel component defined in 
 \family typewriter
+\size small
 TestUniformVelModel.py
 \family default
+\size default
 .
  Normally, one would want to test each function individually to isolate
  errors and create C++ tests as well as the Python tests included here.
@@ -388,7 +402,7 @@
 dislocation-statevars_info.vtk
 \family default
  file should reflect the use of physical properties from the uniform seismic
- velocity with with 
+ velocity with 
 \begin_inset Formula $\mu=1.69\times10^{10}\mathrm{Pa}$
 \end_inset
 
@@ -415,16 +429,16 @@
 
 \begin_layout Standard
 PyLith includes several linearly elastic and inelastic bulk constitutive
- models for 2-D and 3-D problems.
- In this example we demonstrate how to extend PyLith by adding your own
+ models for 2D and 3D problems.
+ In this example, we demonstrate how to extend PyLith by adding your own
  bulk constitutive model.
- We reimplement the 2-D plane strain constitutive model while adding the
+ We reimplement the 2D plane strain constitutive model while adding the
  current strain and stress tensors as state variables.
  This constitutive model, 
 \family typewriter
 PlaneStrainState
 \family default
- is not particularly useful, but it illustrates the basic steps involved
+, is not particularly useful, but it illustrates the basic steps involved
  in creating a bulk constitutive model with state variables.
  The sources files are included with the main PyLith source code in the
  
@@ -440,7 +454,7 @@
 \family typewriter
 templates/materials
 \family default
- provides detailed instructions for the various steps and the source files
+ provides detailed instructions for the various steps, and the source files
  contain numerous comments to guide you through the customization process.
 \end_layout
 
@@ -487,7 +501,7 @@
 \family typewriter
 _nondimProperties()
 \family default
- Nondimensionalize the physical properties used in the constitutive model
+ Nondimensionalizes the physical properties used in the constitutive model
  equations.
 \end_layout
 
@@ -496,7 +510,8 @@
 \family typewriter
 _dimProperties()
 \family default
- Dimensionalize the physical properties used in the constitutive model equations.
+ Dimensionalizes the physical properties used in the constitutive model
+ equations.
 \end_layout
 
 \begin_layout Description
@@ -513,7 +528,7 @@
 \family typewriter
 _calcDensity()
 \family default
- Compute the density given the physical properties and state variables.
+ Computes the density given the physical properties and state variables.
  In most cases density is a physical property used in the constitutive equations
 , so this is a trivial function in those cases.
 \end_layout
@@ -523,7 +538,7 @@
 \family typewriter
 _calcStress()
 \family default
- Compute the stress tensor given the physical properties, state variables,
+ Computes the stress tensor given the physical properties, state variables,
  total strain, initial stress, and initial strain.
 \end_layout
 
@@ -532,7 +547,7 @@
 \family typewriter
 _calcElasticConsts()
 \family default
- Compute the elastic constants given the physical properties, state variables,
+ Computes the elastic constants given the physical properties, state variables,
  total strain, initial stress, and initial strain.
 \end_layout
 
@@ -541,7 +556,7 @@
 \family typewriter
 _updateStateVars()
 \family default
- Update the state variables given the physical properties, total strain,
+ Updates the state variables given the physical properties, total strain,
  initial stress, and initial strain.
  If a constitutive model does not use state variables, then this routine
  is omitted.
@@ -559,11 +574,11 @@
 \begin_inset Formula $\lambda,$
 \end_inset
 
-and density), each bulk constitutive model component has routines to convert
+ and density), each bulk constitutive model component has routines to convert
  the physical property parameters and state variables a user specifies via
  spatial databases to the physical property properties and state variables
  used in the constitutive model equations.
- In quasi-static problems PyLith computes an elastic solution for the first
+ In quasi-static problems, PyLith computes an elastic solution for the first
  time step (
 \begin_inset Formula $-\Delta t$
 \end_inset
@@ -584,15 +599,7 @@
 The SWIG interface files for a bulk constitutive component are setup in
  the same manner as in the previous example of creating a customized spatial
  database component.
- The 
-\begin_inset Quotes eld
-\end_inset
-
-main
-\begin_inset Quotes erd
-\end_inset
-
- SWIG interface file (
+ The ``main'' SWIG interface file (
 \family typewriter
 materialscontrib.i
 \family default
@@ -610,9 +617,9 @@
  object defines a number of pure virtual methods (which merely specify the
  interface for the functions and do not implement default behavior), we
  must include many protected functions in the SWIG interface file.
- If these are omitted SWIG will give a warning indicating that some of functions
- remain abstract (i.e., some pure virtual functions defined in the parent
- class 
+ If these are omitted, SWIG will give a warning indicating that some of
+ the functions remain abstract (i.e., some pure virtual functions defined
+ in the parent class 
 \family typewriter
 ElasticMaterial
 \family default
@@ -620,7 +627,7 @@
 \family typewriter
 PlaneStrainState
 \family default
-) and no constructor is created.
+), and no constructor is created.
  When this happens, you cannot create a 
 \family typewriter
 PlaneStrainState
@@ -650,7 +657,7 @@
 component
 \family default
  should include tests for both the C++ code and Python code.
- The C++ unit tests can be quite complex and it is best to examine those
+ The C++ unit tests can be quite complex, and it is best to examine those
  used for the bulk constitutive models included with PyLith.
  In this example we create the Python unit tests to verify that we can create
  a 
@@ -680,7 +687,7 @@
 PlaneStrainState
 \family default
  component, it is time to use it in a simple example.
- You can try using it in any of the 2-D examples.
+ You can try using it in any of the 2D examples.
  For the examples in 
 \family typewriter
 examples/twocells/twoquad4
@@ -706,14 +713,16 @@
 
 \begin_layout Standard
 or simply add the command line argument
-\begin_inset Newline newline
-\end_inset
+\end_layout
 
+\begin_layout LyX-Code
 
 \family typewriter
 --material.problem.homogeneous.material=pylith.materials.contrib.PlaneStrainState
-\family default
- when running any of the 2-D examples.
+\end_layout
+
+\begin_layout Standard
+when running any of the 2D examples.
  The output should remain identical, but you should see the 
 \family typewriter
 PlaneStrainState



More information about the CIG-COMMITS mailing list