Changeset 2809
- Timestamp:
- May 5, 2006, 5:03:01 PM (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
documentation/user_manual/anuga_user_manual.tex
r2805 r2809 279 279 \code{`right'}, \code{`top'} and \code{`bottom'}, indicating 280 280 which boundary the edge in question belongs to. 281 282 # TO DO: Clarify the description of vertices to make it clear the 283 entries are *indices* to points. Also good to have an example 281 284 282 285 \end{itemize} … … 847 850 848 851 \chapter{\anuga Public Interface} 852 \label{ch:interface} 849 853 850 854 This chapter gives an overview of the features of \anuga available … … 909 913 and are omitted from the descriptions given below: 910 914 911 \begin{tabular}{|l|l|} \hline 912 \textbf{Name } & \textbf{Description}\\ 913 \hline 914 \code{usecache} & Specifies whether caching is to be used\\ 915 \code{verbose} & If \code{True}, provides detailed terminal output 916 to the user\\ \hline 915 %\begin{center} 916 \begin{tabular}{ll} %\hline 917 %\textbf{Name } & \textbf{Description}\\ 918 %\hline 919 \emph{usecache} & Specifies whether caching is to be used\\ 920 \emph{verbose} & If \code{True}, provides detailed terminal output 921 to the user\\ % \hline 917 922 \end{tabular} 918 923 %\end{center} 919 924 920 925 \section{Mesh Generation} … … 930 935 Module: \module{pmesh.mesh\_interface} 931 936 937 This function allows a user to initiate the automatic creation of a 938 mesh inside a specified polygon. Among the parameters that can be 939 set are the \emph{resolution} (maximal area for any triangle in the 940 mesh) and the minimal angle allowable in any triangle. The user can 941 specify a number of internal polygons within each of which a 942 separate mesh is to be created, generally with a smaller resolution. 943 Additionally, the user specifies a list of boundary tags, one for 944 each edge of the bounding polygon. 945 \end{funcdesc} 946 947 948 \begin{funcdesc} {Mesh}{userSegments=None, 949 userVertices=None, 950 holes=None, 951 regions=None, 952 geo_reference=None} 953 Module: \module{pmesh.mesh} 932 954 933 955 % Translate following into layman's language 934 This function is used to create a triangular mesh suitable for use with 935 \anuga, within a specified region. The region is specified as the interior of a polygon 936 (the \emph{bounding polygon}). The user specifies the bounding polygon and the 937 \emph{resolution}---that is, maximal area of any triangle in the mesh. There is 938 also an option to specify a number of internal polygons within each of which a 939 separate mesh is created, generally with a smaller resolution. Additionally, 940 the user specifies a list of boundary tags, one for each edge of the bounding 941 polygon. 942 \end{funcdesc} 943 944 945 \begin{funcdesc} {Mesh}{} 946 Module: \module{pmesh.mesh} 947 948 % Translate following into layman's language 949 This function is used to create a Mesh instance. This can then be 950 used to build the outline of the mesh and then generate the 956 An instance of the class \class{Mesh} is used to store . This can 957 then be used to build the outline of the mesh and then generate the 951 958 mesh. 952 959 \end{funcdesc} … … 958 965 959 966 % Translate following into layman's language 960 This method is used to add a region to a Mesh instance. The region is 961 described by the polygon passed in. Additionally, 962 the user specifies a list of boundary tags, one for each edge of the bounding 963 polygon. 967 This method is used to add a region to a \class{Mesh} instance. The 968 region is described by the polygon passed in. Additionally, the 969 user specifies a list of boundary tags, one for each edge of the 970 bounding polygon. 971 972 964 973 \end{funcdesc} 965 974 … … 969 978 970 979 % Translate following into layman's language 971 This method is used to add a region where the triangular mesh will not972 be generated to a Mesh instance. The region is 973 described by the polygon passed in. Additionally, 974 the user specifies a list of boundary tags, one for each edge of the bounding 975 polygon.980 This method is used to add a `hole'---that is, a region where the 981 triangular mesh will not be generated---to a \class{Mesh} instance. 982 The region is described by the polygon passed in. Additionally, the 983 user specifies a list of boundary tags, one for each edge of the 984 bounding polygon. 976 985 \end{funcdesc} 977 986 … … 1004 1013 Module: \module{pyvolution.pmesh2domain} 1005 1014 1006 Once the initial mesh file has been created, this function is applied 1007 to convert it to a domain object---that is, to a member of 1008 the special Python class Domain (or a subclass of Domain), which provides access to properties and 1009 methods that allow quantities to be set and other operations to be carried out. 1015 Once the initial mesh file has been created, this function is 1016 applied to convert it to a domain object---that is, to a member of 1017 the special Python class \class{Domain} (or a subclass of 1018 \class{Domain}), which provides access to properties and methods 1019 that allow quantities to be set and other operations to be carried 1020 out. 1010 1021 1011 1022 \code{file\_name} is the name of the mesh file to be converted, … … 1031 1042 1032 1043 Returns the name assigned to the domain by \code{set_name}. If no name has been 1033 assigned, returns `domain'.1044 assigned, returns \code{`domain'}. 1034 1045 \end{funcdesc} 1035 1046 … … 1047 1058 in your code, before the first appearance of \code{set\_datadir}. 1048 1059 1049 For example, if you wishedto set the data directory to a subdirectory1050 \code{data} of the directory \code{project}, you mightuse1051 statements of the following type:1060 For example, to set the data directory to a subdirectory 1061 \code{data} of the directory \code{project}, you could use 1062 the statements: 1052 1063 1053 1064 {\small \begin{verbatim} … … 1535 1546 \item \code{volumes}, a list specifying the points at the vertices of each of the 1536 1547 triangles 1548 % Refer here to the example to be provided in describing the simple example 1537 1549 \item \code{time}, a Numeric array containing times for model 1538 1550 evaluation … … 1551 1563 CDL representation of the output file \file{bedslope.sww} generated 1552 1564 from running the simple example \file{bedslopephysical.py} of 1553 Chapter \ref{ch:getstarted} .1565 Chapter \ref{ch:getstarted}: 1554 1566 1555 1567 \verbatiminput{examples/bedslopeexcerpt.cdl} 1556 1568 1557 A TMS file is used to store time series... 1569 The SWW format is used not only for output but also serves as input 1570 for functions such as \function{file_boundary} and 1571 \function{file_function}, described in Chapter \ref{ch:interface}. 1572 1573 A TMS file is used to store time series data that is independent of 1574 position. 1558 1575 1559 1576 … … 1563 1580 mesh data for \anuga. A meshfile can have one of two formats: it can 1564 1581 be either a TSH file, which is an ASCII file, or an MSH file, which 1565 is a NetCDF file. 1582 is a NetCDF file. A meshfile can be generated from the function 1583 \function{create_mesh_from_regions} (see ) and used to initialise a 1584 domain. 1566 1585 1567 1586 A meshfile describes the outline of the mesh---the vertices and line … … 1586 1605 attributes associated with a set of points. 1587 1606 1588 The format for a .xya file is: 1589 \begin{verbatim} 1590 1st line: [attribute names] 1591 other lines: x y [attributes] 1592 1593 for example: 1594 elevation, friction 1595 0.6, 0.7, 4.9, 0.3 1596 1.9, 2.8, 5, 0.3 1597 2.7, 2.4, 5.2, 0.3 1598 1599 The first two columns are always implicitly assumed to be x, y coordinates. 1600 Use the same delimiter for the attribute names and the data 1601 1602 An xya file can optionally end with 1603 #geo reference 1604 56 1605 466600.0 1606 8644444.0 1607 1608 When the 1st # is the zone, 1609 2nd # the xllcorner and 1610 3rd # the yllcorner 1611 \end{verbatim} 1607 The format for an XYA file is: 1608 %\begin{verbatim} 1609 1610 first line: \code{[attribute names]}\\ 1611 other lines: \code{x y [attributes]}\\ 1612 1613 for example:\\ 1614 \code{elevation, friction}\\ 1615 \code{0.6, 0.7, 4.9, 0.3}\\ 1616 \code{1.9, 2.8, 5, 0.3}\\ 1617 \code{2.7, 2.4, 5.2, 0.3} 1618 1619 The first two columns are always implicitly assumed to be $x$, $y$ coordinates. 1620 Use the same delimiter for the attribute names and the data. 1621 1622 An XYA file can optionally end with lines having the format exemplified here: 1623 1624 \code{\#geo reference}\\ 1625 \code{56}\\ 1626 \code{466600.0}\\ 1627 \code{8644444.0} 1628 1629 where the first number specifies the zone (here 56) and other numbers are the 1630 coordinates of the lower left corner (466600.0, 8644444.0). 1631 1632 A PTS file is a NetCDF representation of the data held in an XYA 1633 file. If the data is associated with a set of $N$ points, then the 1634 data is stored using an $N \times 2$ Numeric array of float 1635 variables for the points and an $N \times 1$ Numeric array for each 1636 attribute. 1637 1638 %\end{verbatim} 1612 1639 1613 1640 \subsection{ArcView Formats} 1614 1641 1642 Files of the three formats ASC, PRJ and ERS are all associated with 1643 data from ArcView. 1644 1645 An ASC file is an ASCII representation of DEM output from ArcView. 1646 It has the following format... 1647 1648 A PRJ file is an ArcView file used in conjunction with an ASC file 1649 to represent metadata for a DEM. 1650 1651 1652 \subsection{DEM Format} 1653 1654 A DEM file is a NetCDF representation of regular DEM data. 1655 1615 1656 1616 1657 \subsection{Other Formats} 1658 1659 1660 1617 1661 1618 1662 \subsection{Basic File Conversions}
Note: See TracChangeset
for help on using the changeset viewer.