Changeset 3121


Ignore:
Timestamp:
Jun 8, 2006, 4:49:08 PM (18 years ago)
Author:
howard
Message:

Added entries for index and made numerous other minor changes

File:
1 edited

Legend:

Unmodified
Added
Removed
  • documentation/user_manual/anuga_user_manual.tex

    r3119 r3121  
    281281%\verbatiminput{examples/bedslope.py}
    282282
    283 \subsection{Establishing the Mesh}
     283\subsection{Establishing the Mesh}\index{mesh, establishing}
    284284
    285285The first task is to set up the triangular mesh to be used for the
     
    454454details.
    455455
    456 \subsection{Boundary Conditions}
     456\subsection{Boundary Conditions}\index{boundary conditions}
    457457
    458458The boundary conditions are specified as follows:
     
    524524boundary. An edge with endpoints \code{points[i]} and
    525525\code{points[j]} is represented by the 2-tuple \code{(i, j)}. The
    526 keys for the dictionary are the 2-tuples \code{[i, j]} corresponding
     526keys for the dictionary are the 2-tuples \code{(i, j)} corresponding
    527527to boundary edges in the mesh, and the values are the tags are used
    528 to label them. In the present example, the value \code{boundary[i,
    529 j]} assigned to \code{[i, j]} is one of the four tags \code{`left'},
    530 \code{`right'}, \code{`top'} or \code{`bottom'}, depending on
    531 whether the boundary edge represented by \code{(i, j)} occurs at the
    532 left, right, top or bottom of the rectangle bounding the mesh. The
    533 function \code{rectangular} automatically assigns these tags to the
    534 boundary edges when it generates the mesh.
     528to label them. In the present example, the value \code{boundary[(i,
     529j)]} assigned to \code{(i, j)]} is one of the four tags
     530\code{`left'}, \code{`right'}, \code{`top'} or \code{`bottom'},
     531depending on whether the boundary edge represented by \code{(i, j)}
     532occurs at the left, right, top or bottom of the rectangle bounding
     533the mesh. The function \code{rectangular} automatically assigns
     534these tags to the boundary edges when it generates the mesh.
    535535\end{itemize}
    536536
     
    539539(In Section \ref{sec:realdataexample} we describe an example that
    540540uses different boundary tags---in general, the possible tags are not
    541 limited to `left', `right', `top' and `bottom', but can be selected
     541limited to `left', `right', `top' and `bottom', but can be specified
    542542by the user.)
    543543
     
    565565
    566566
    567 \subsection{Evolution}
     567\subsection{Evolution}\index{evolution}
    568568
    569569The final statement \nopagebreak[3]
     
    690690given above, discussing each major step of the code in turn.
    691691
    692 \subsection{Establishing the Mesh}
     692\subsection{Establishing the Mesh}\index{mesh, establishing}
    693693
    694694One obvious way that the present example differs from
     
    906906\code{combinedname} in the file \file{project.py}.
    907907
    908 \subsection{Boundary Conditions}
     908\subsection{Boundary Conditions}\index{boundary conditions}
    909909
    910910Setting boundaries follows a similar pattern to the one used for
     
    11251125Additionally, the user specifies a list of boundary tags, one for
    11261126each edge of the bounding polygon.
     1127
     1128\textbf{WARNING}. Note that the dictionary structure used for the
     1129parameter \code{boundary\_tags} is different from that used for the
     1130variable \code{boundary} that occurs in the specification of a mesh.
     1131In the case of \code{boundary}, the tags are the \emph{values} of
     1132the dictionary, whereas in the case of \code{boundary_tags}, the
     1133tags are the \emph{keys} and the \emph{value} corresponding to a
     1134particular tag is a list of numbers identifying boundary edges
     1135labelled with that tag. Because of this, it is theoretically
     1136possible to assign the same edge to more than one tag. However, an
     1137attempt to do this will cause an error.
    11271138\end{funcdesc}
    11281139
     
    11591170\begin{methoddesc}  {add\_region\_from\_polygon}{self, polygon, tags=None,
    11601171                                max_triangle_area=None, geo_reference=None}
    1161 Module: \module{pmesh.mesh}  Class: \class{Mesh}
     1172Module: \module{pmesh.mesh},  Class: \class{Mesh}
    11621173
    11631174This method is used to add a region to a \class{Mesh} instance.  The
     
    11711182\begin{methoddesc}  {add\_hole\_from\_polygon}{self, polygon, tags=None,
    11721183    geo_reference=None}
    1173 Module: \module{pmesh.mesh}  Class: \class{Mesh}
     1184Module: \module{pmesh.mesh},  Class: \class{Mesh}
    11741185
    11751186% Translate following into layman's language
     
    11851196                      minimum_triangle_angle=28.0,
    11861197                      verbose=False}
    1187 Module: \module{pmesh.mesh}  Class: \class{Mesh}
     1198Module: \module{pmesh.mesh},  Class: \class{Mesh}
    11881199
    11891200% Translate following into layman's language
     
    11951206
    11961207\begin{methoddesc}  {export\_mesh_file}{self,ofile}
    1197 Module: \module{pmesh.mesh}  Class: \class{Mesh}
     1208Module: \module{pmesh.mesh},  Class: \class{Mesh}
    11981209
    11991210% Translate following into layman's language
     
    12061217
    12071218\begin{methoddesc}  {import_ungenerate_file}{self,ofile, tag=None}
    1208 Module: \module{pmesh.mesh}  Class: \class{Mesh}
     1219Module: \module{pmesh.mesh},  Class: \class{Mesh}
    12091220
    12101221% Translate following into layman's language
     
    12861297    Module: \module{pyvolution.domain}
    12871298
    1288     Specifies the directory used for data, assigning it to the pathname \code{name}. The default value, before
     1299    Specifies the directory used for SWW files, assigning it to the pathname \code{name}. The default value, before
    12891300    \code{set\_datadir} has been run, is the value \code{default\_datadir}
    12901301    specified in \code{config.py}.
     
    14651476Module: \module{pyvolution.least\_squares}
    14661477
    1467 Given a time series, either as a sequence of numbers or defined at
    1468 the vertices of a triangular mesh (such as those stored in SWW
    1469 files), \code{Interpolation\_function} is used to create a callable
    1470 object that interpolates a value for an arbitrary time \code{t}
    1471 within the model limits and possibly a point \code{(x, y)} within a
    1472 mesh region.
     1478Given a time series (i.e. a series of values associated with
     1479different times), whose values are either just numbers or a set of
     1480numbers defined at the vertices of a triangular mesh (such as those
     1481stored in SWW files), \code{Interpolation\_function} is used to
     1482create a callable object that interpolates a value for an arbitrary
     1483time \code{t} within the model limits and possibly a point \code{(x,
     1484y)} within a mesh region.
    14731485
    14741486The actual time series at which data is available is specified by
     
    15011513
    15021514%%%%%%
    1503 \section{Boundary Conditions}
     1515\section{Boundary Conditions}\index{boundary conditions}
    15041516
    15051517\anuga provides a large number of predefined boundary conditions,
     
    16261638
    16271639
    1628 \section{Evolution}
     1640\section{Evolution}\index{evolution}
    16291641
    16301642  \begin{methoddesc}{evolve}{yieldstep = None, finaltime = None, duration = None, skip_initial_step = False}
     
    16671679  Module: \module{pyvolution.domain}
    16681680
    1669 
     1681  Returns a string of the following type for each
     1682  timestep:
     1683
     1684  \code{Time = 0.9000, delta t in [0.00598964, 0.01177388], steps=12
     1685  (12)}
     1686
     1687  Here the numbers in \code{steps=12 (12)} indicate the number of steps taken and
     1688  the number of first-order steps, respectively.
    16701689  \end{funcdesc}
    16711690
     
    16741693  Module: \module{pyvolution.domain}
    16751694
     1695  Returns a string of the following type when \code{quantities = 'stage'} and \code{tags = ['top', 'bottom']}:
     1696
     1697  {\small \begin{verbatim}
     1698 Boundary values at time 0.5000:
     1699    top:
     1700        stage in [ -0.25821218,  -0.02499998]
     1701    bottom:
     1702        stage in [ -0.27098821,  -0.02499974]
     1703  \end{verbatim}}
    16761704
    16771705  \end{funcdesc}
     
    17081736  See \file{Analytical\_solution\_circular\_hydraulic\_jump.py} for an example of use.
    17091737  \end{funcdesc}
    1710 
    1711 
    1712   \begin{classdesc}{Geospatial\_data}{data_points = None,
    1713                  attributes = None,
    1714                  geo_reference = None,
    1715                  default_attribute_name = None,
    1716                  file_name = None}
    1717     Module: \module{geospatial\_data.geo\_spatial\_data}
    1718     Creates a georeferenced geospatial data object from either arrays or
    1719     a file (pts or xya).
    1720 
    1721     Objects of this class can be used with \method{set\_quantity}.
    1722 
    1723     FIXME (Ole): Describe methods such as get\_attributes() etc
    1724   \end{classdesc}
    17251738
    17261739
     
    17991812\begin{tabular}{ll}
    18001813ASC, PRJ & Digital elevation models (gridded)\\
    1801 TSH & Triangular meshes (e.g. created from \code{pmesh})\\
    18021814NC & Model outputs for use as boundary conditions (e.g. from MOST)
    18031815\end{tabular}
     
    18181830
    18191831TSH + Boundary SWW $\rightarrow$ SWW & Simulation using
    1820 \code{pyvolution}
     1832\code{pyvolution}\\
     1833
     1834Polygonal mesh outline $\rightarrow$ & TSH or MSH
    18211835\end{tabular}
    18221836
     
    18731887
    18741888A mesh file is a file that has a specific format suited to
    1875 specifying mesh data for \anuga. A mesh file can have one of two
    1876 formats: it can be either a TSH file, which is an ASCII file, or an
    1877 MSH file, which is a NetCDF file. A mesh file can be generated from
    1878 the function \function{create\_mesh\_from\_regions} (see Section
    1879 \ref{sec:meshgeneration}) and used to initialise a domain.
    1880 
    1881 A mesh file describes the outline of the mesh---the vertices and
     1889triangular meshes and their outlines. A mesh file can have one of
     1890two formats: it can be either a TSH file, which is an ASCII file, or
     1891an MSH file, which is a NetCDF file. A mesh file can be generated
     1892from the function \function{create\_mesh\_from\_regions} (see
     1893Section \ref{sec:meshgeneration}) and used to initialise a domain.
     1894
     1895A mesh file can define the outline of the mesh---the vertices and
    18821896line segments that enclose the region in which the mesh is
    18831897created---and the triangular mesh itself, which is specified by
     
    18871901
    18881902In addition, a mesh file may contain `holes' and/or `regions'. A
    1889 hole or region is defined by specifying a point and a number of
    1890 segments that enclose that point. A hole represents an area where no
    1891 mesh is to be created, while a region is a labelled area used for
    1892 defining properties of a mesh, such as friction values.
     1903hole represents an area where no mesh is to be created, while a
     1904region is a labelled area used for defining properties of a mesh,
     1905such as friction values.  A hole or region is specified by a point
     1906and bounded by a number of segments that enclose that point.
    18931907
    18941908A mesh file can also contain a georeference, which describes an
     
    24822496                          expand_pinch=False,
    24832497                          boundary_points_fraction=0.2}
    2484 Module: \code{alpha\_shape}  Class: \class{Alpha\_Shape}
     2498Module: \code{alpha\_shape},  Class: \class{Alpha\_Shape}
    24852499
    24862500This function sets flags that govern the operation of the algorithm
     
    24992513
    25002514\begin{methoddesc}{get\_boundary}{}
    2501 Module: \code{alpha\_shape}  Class: \class{Alpha\_Shape}
     2515Module: \code{alpha\_shape},  Class: \class{Alpha\_Shape}
    25022516
    25032517Returns a list of tuples representing the boundary of the alpha
     
    25082522
    25092523\begin{methoddesc}{write\_boundary}{file_name}
    2510 Module: \code{alpha\_shape}  Class: \class{Alpha\_Shape}
     2524Module: \code{alpha\_shape},  Class: \class{Alpha\_Shape}
    25112525
    25122526Writes the list of 2-tuples returned by \code{get\_boundary} to the
     
    25362550if \code{n} = \code{None}). If denominator evaluates to zero or if
    25372551\code{y}
    2538 is omitted, absolute error is returned.\\
     2552is omitted or if \code{relative = False}, absolute error is returned.\\
    25392553
    25402554\code{norm(x)} & 2-norm of \code{x}.\\
     
    25432557\code{y} is \code{None} returns autocorrelation of \code{x}.\\
    25442558
    2545 \code{ensure\_numeric(A, typecode = None)} & Ensure that sequence is
    2546 a Numeric array. If \code{A} is already a Numeric array it will be
    2547 returned unaltered. Otherwise, an attempt is made to convert it to a
    2548 Numeric array. (Needed because \code{array(A)} can
     2559\code{ensure\_numeric(A, typecode = None)} & Returns a Numeric array
     2560for any sequence \code{A}. If \code{A} is already a Numeric array it
     2561will be returned unaltered. Otherwise, an attempt is made to convert
     2562it to a Numeric array. (Needed because \code{array(A)} can
    25492563cause memory overflow.)\\
    25502564
Note: See TracChangeset for help on using the changeset viewer.