[cig-commits] r12603 - in short/3D/PyLith/trunk: doc/userguide/fileformats doc/userguide/runpylith pylith/problems unittests/pytests/problems/data
brad at geodynamics.org
brad at geodynamics.org
Sun Aug 10 18:47:21 PDT 2008
Author: brad
Date: 2008-08-10 18:47:21 -0700 (Sun, 10 Aug 2008)
New Revision: 12603
Modified:
short/3D/PyLith/trunk/doc/userguide/fileformats/fileformats.lyx
short/3D/PyLith/trunk/doc/userguide/runpylith/runpylith.lyx
short/3D/PyLith/trunk/pylith/problems/TimeStepUser.py
short/3D/PyLith/trunk/unittests/pytests/problems/data/timesteps.txt
Log:
Finished documentation of time stepping (uniform, user, adaptive). Changed comment delimiter from '#' to '//' for consistency with spatial database files and mesh ASCII files.
Modified: short/3D/PyLith/trunk/doc/userguide/fileformats/fileformats.lyx
===================================================================
--- short/3D/PyLith/trunk/doc/userguide/fileformats/fileformats.lyx 2008-08-10 21:57:22 UTC (rev 12602)
+++ short/3D/PyLith/trunk/doc/userguide/fileformats/fileformats.lyx 2008-08-11 01:47:21 UTC (rev 12603)
@@ -1,4 +1,4 @@
-#LyX 1.5.4 created this file. For more info see http://www.lyx.org/
+#LyX 1.5.2 created this file. For more info see http://www.lyx.org/
\lyxformat 276
\begin_document
\begin_header
@@ -41,6 +41,7 @@
\tracking_changes false
\output_changes false
\author ""
+\author ""
\end_header
\begin_body
@@ -1325,5 +1326,103 @@
\end_layout
+\begin_layout Section
+\begin_inset 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 files format is a text 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 Standard
+\begin_inset Caption
+
+\begin_layout Standard
+Format of user-specified time step files.
+\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 2008-08-10 21:57:22 UTC (rev 12602)
+++ short/3D/PyLith/trunk/doc/userguide/runpylith/runpylith.lyx 2008-08-11 01:47:21 UTC (rev 12603)
@@ -1,4 +1,4 @@
-#LyX 1.5.6 created this file. For more info see http://www.lyx.org/
+#LyX 1.5.2 created this file. For more info see http://www.lyx.org/
\lyxformat 276
\begin_document
\begin_header
@@ -1814,8 +1814,13 @@
\begin_layout Standard
The nonuniform, user-specified time step implementation allows the user
- to specify the time steps in an ASCII file (see Section ?? for the format
- specification of the time step file).
+ to specify the time steps in an ASCII file (see Section
+\begin_inset LatexCommand ref
+reference "sec:FileFormat:TimeStepUser"
+
+\end_inset
+
+ for the format specification of the time step file).
If the total duration exceeds the time associated with the time steps,
then a flag determines whether to cycle through the time steps or to use
the last specified time step for the time remaining.
Modified: short/3D/PyLith/trunk/pylith/problems/TimeStepUser.py
===================================================================
--- short/3D/PyLith/trunk/pylith/problems/TimeStepUser.py 2008-08-10 21:57:22 UTC (rev 12602)
+++ short/3D/PyLith/trunk/pylith/problems/TimeStepUser.py 2008-08-11 01:47:21 UTC (rev 12603)
@@ -18,7 +18,7 @@
##
## Format of file with user specified time steps:
##
-## Notes: Whitespace is ignored. Comment lines begin with '#'.
+## Notes: Whitespace is ignored. Comment lines begin with '//'.
##
## units = VALUE
##
@@ -42,7 +42,7 @@
Format of file with user specified time steps:
- Notes: Whitespace is ignored. Comment lines begin with '#'.
+ Notes: Whitespace is ignored. Comment lines begin with '//'.
units = VALUE
@@ -176,7 +176,7 @@
self.steps = []
for line in lines:
fields = line.split()
- if line[0] != "#" and len(fields) > 0:
+ if line[0:2] != "//" and len(fields) > 0:
if line[0:5] != "units":
try:
value = float(fields[0])
Modified: short/3D/PyLith/trunk/unittests/pytests/problems/data/timesteps.txt
===================================================================
--- short/3D/PyLith/trunk/unittests/pytests/problems/data/timesteps.txt 2008-08-10 21:57:22 UTC (rev 12602)
+++ short/3D/PyLith/trunk/unittests/pytests/problems/data/timesteps.txt 2008-08-11 01:47:21 UTC (rev 12603)
@@ -1,11 +1,11 @@
-# File with time step sizes.
+// File with time step sizes.
-# Units of values
+// Units of values
units = year
-# Values
-1.0 # Comment
+// Values
+1.0 // Comment
2.0
3.0
-# Another comment
+// Another comment
More information about the cig-commits
mailing list