Changeset 3061


Ignore:
Timestamp:
Jun 2, 2006, 4:57:45 PM (18 years ago)
Author:
howard
Message:

Corrected further small errors and added material on polygons

File:
1 edited

Legend:

Unmodified
Added
Removed
  • documentation/user_manual/anuga_user_manual.tex

    r3053 r3061  
    774774the user to specify a number of \emph{interior polygons}, which are
    775775triangulated separately, each according to a separately specified
    776 resolution. See Figure \ref{fig:interior meshes}.
     776resolution. See Figure \ref{fig:interior meshes}. It is also
     777possible to specify one or more `holes'---that is, areas bounded by
     778polygons in which no triangulation is required.
    777779
    778780\begin{figure}[hbt]
     
    11491151
    11501152%%%%%%
    1151 \section{Initialising Domain}
     1153\section{Initialising the Domain}
     1154
     1155%Include description of the class Domain and the module domain.
     1156
     1157\declaremodule{standard}{pyvolution.domain}
     1158
     1159\begin{classdesc} {Domain} {source=None,
     1160                 triangles=None,
     1161                 boundary=None,
     1162                 conserved_quantities=None,
     1163                 other_quantities=None,
     1164                 tagged_elements=None,
     1165                 geo_reference=None,
     1166                 use_inscribed_circle=False,
     1167                 mesh_filename=None,
     1168                 use_cache=False,
     1169                 verbose=False,
     1170                 full_send_dict=None,
     1171                 ghost_recv_dict=None,
     1172                 processor=0,
     1173                 numproc=1}
     1174Module: \refmodule{pyvolution.domain}
     1175
     1176
     1177\end{classdesc}
    11521178
    11531179\begin{funcdesc}  {pmesh\_to\_domain\_instance}{file_name, DomainClass, use_cache = False, verbose = False}
     
    13761402
    13771403%%%
    1378 \begin{funcdesc}{set\_region}{functions}
    1379 [Low priority. Will be merged into set\_quantity]
    1380 
    1381 Module:\module{pyvolution.domain}
    1382 \end{funcdesc}
     1404%\begin{funcdesc}{set\_region}{functions}
     1405%[Low priority. Will be merged into set\_quantity]
     1406
     1407%Module:\module{pyvolution.domain}
     1408%\end{funcdesc}
    13831409
    13841410
     
    19441970  If the function definition changes after a result has been cached, this will be
    19451971  detected by examining the functions \code{bytecode (co_code, co_consts,
    1946   func_defualts, co_argcount)} and the function will be recomputed.
     1972  func_defaults, co_argcount)} and the function will be recomputed.
    19471973
    19481974  Options are set by means of the function \code{set_option(key, value)},
     
    20442070\section{utilities/polygons}
    20452071
     2072  \declaremodule{standard}{utilities.polygon}
     2073  \refmodindex{utilities.polygon}
     2074
    20462075  \begin{classdesc}{Polygon_function}{regions, default = 0.0, geo_reference = None}
    20472076  Module: \code{utilities.polygon}
    20482077
    20492078  Creates a callable object that returns one of a specified list of values when
    2050   evaluated at a point, depending on which polygon, from a specified list of polygons, the
     2079  evaluated at a point \code{x, y}, depending on which polygon, from a specified list of polygons, the
    20512080  point belongs to. The parameter \code{regions} is a list of pairs
    20522081  \code{(P, v)}, where each \code{P} is a polygon and each \code{v}
     
    20572086  point lies in more than one polygon, the return value is taken to
    20582087  be the value for whichever of these polygon appears later in the
    2059   list.
    2060   [ CAN WE ALSO CALL IT AT A VECTOR x, y (WHERE x, y ARE LISTS)? ]
     2088  list.
     2089  %FIXME (Howard): CAN x, y BE VECTORS?
     2090
    20612091  \end{classdesc}
    20622092
     
    20872117  Module: \code{utilities.polygon}
    20882118
    2089   Used to test whether a single point---or the members of a list of points---
    2090   are inside the specified polygon. If the first argument is a single point,
    2091   returns \code{True} if the point is inside the polygon, or \code{False}
    2092   otherwise. If the first argument is a list of points, returns a Numeric
     2119  Used to test whether the members of a list of points
     2120  are inside the specified polygon. Returns a Numeric
    20932121  array comprising the indices of the points in the list that lie inside the polygon.
    20942122  (If none of the points are inside, returns \code{zeros((0,), 'l')}.)
     
    21032131  \end{funcdesc}
    21042132
     2133  \begin{funcdesc}{is_inside_polygon}{point, polygon, closed=True, verbose=False}
     2134  Module: \code{utilities.polygon}
     2135
     2136  Returns \code{True} if \code{point} is inside \code{polygon} or
     2137  \code{False} otherwise. Points on the edges of the polygon are regarded as inside if
     2138  \code{closed} is set to \code{True} or omitted; otherwise they are regarded as outside.
     2139  \end{funcdesc}
     2140
     2141  \begin{funcdesc}{is_outside_polygon}{point, polygon, closed=True, verbose=False}
     2142  Module: \code{utilities.polygon}
     2143
     2144  Exactly like \code{is_outside_polygon}, but with the words `inside' and `outside' interchanged.
     2145  \end{funcdesc}
     2146
    21052147  \begin{funcdesc}{point_on_line}{x, y, x0, y0, x1, y1}
    21062148  Module: \code{utilities.polygon}
     
    21322174\section{coordinate_transforms}
    21332175
    2134 \section{geo_spatial_data}
     2176\section{geospatial_data}
    21352177
    21362178This describes a class that represents arbitrary point data in UTM
    21372179coordinates along with named attribute values.
    21382180
    2139 TBA
     2181\declaremodule{geospatial_data}
     2182
     2183\begin{classdesc}{Geospatial_data}{data_points = None,
     2184                 attributes = None,
     2185                 geo_reference = None,
     2186                 default_attribute_name = None,
     2187                 file_name = None}
     2188
     2189Create instance from data points and associated attributes
     2190
     2191
     2192        data_points: x,y coordinates in metres. Type must be either a
     2193        sequence of 2-tuples or an Mx2 Numeric array of floats.
     2194
     2195        attributes: Associated values for each data point. The type
     2196        must be either a list or an array of length M or a dictionary
     2197        of lists (or arrays) of length M. In the latter case the keys
     2198        in the dictionary represent the attribute names, in the former
     2199        the attribute will get the default name 'attribute'.
     2200
     2201        geo_reference: Object representing the origin of the data
     2202        points. It contains UTM zone, easting and northing and data
     2203        points are assumed to be relative to this origin.
     2204        If geo_reference is None, the default geo ref object is used
     2205
     2206        default_attribute_name: Name of default attribute to be used with
     2207        get_attribute_values. The idea is that the dataset can be
     2208        equipped with information about which attribute to return.
     2209        If None, the default is the 'first'
     2210
     2211        file_name: Name of input NetCDF file or xya file. NetCDF file must
     2212        have dimensions "points" etc.
     2213        XYA file is a CVS file with lats(x), longs(y) and elevation(a).
     2214        first line must be attribute name eg elevation
     2215
     2216\end{classdesc}
    21402217
    21412218\section{pmesh GUI}
     
    22562333\chapter{Glossary}
    22572334
    2258 \begin{itemize}
    2259     \item \indexedbold{\anuga} Name of software (joint development between ANU and GA)
    2260 
    2261     \item \indexedbold{domain} The domain of a function is the set of all input values to the function.
    2262 
    2263     \item \indexedbold{Dirichlet boundary} - A Dirichlet boundary condition imposed on a differential equation
    2264  which specifies the values the solution is to take on the boundary of the domain.
    2265 
    2266     \item \indexedbold{elevation} - refers to bathymetry and topography
    2267 
    2268     \item \indexedbold{bathymetry} - offshore elevation
    2269 
    2270     \item \indexedbold{topography} - onshore elevation
    2271 
    2272     \item \indexedbold{evolution} - integration of the shallow water wave equations over time
    2273 
    2274     \item \indexedbold{forcing term}
    2275 
    2276     \item \indexedbold{IDLE} - Development environment shipped with Python
    2277 
    2278     \item \indexedbold{Manning friction coefficient}
    2279 
    2280     \item \indexedbold{mesh}    - Triangulation of domain
    2281 
    2282     \item \indexedbold{meshfile}  [generic word for either .tsh or
    2283     .msh file]
    2284 
    2285     \item \indexedbold{points file}  [generic word for either .pts or
    2286     .xya file]
    2287 
    2288     \item \indexedbold{grid} - evenly spaced mesh
    2289 
    2290     \item \indexedbold{NetCDF}
    2291 
    2292     \item \indexedbold{pmesh} does this really need to be here? it's a class/module?
    2293 
    2294     \item \indexedbold{pyvolution} does this really need to be here? it's a class/module?
    2295 
    2296     \item \indexedbold{conserved quantity} conserved (stage, x and y momentum)
    2297 
    2298     \item \indexedbold{reflective boundary}
    2299 
    2300     \item \indexedbold{smoothing} is this really needed?
    2301 
    2302     \item \indexedbold{stage}
    2303 
    2304 %    \item \indexedbold{try this}
    2305 
    2306     \item \indexedbold{swollen} - visualisation tool
    2307 
    2308     \item \indexedbold{time boundary} - defined in the manual (flog from there)
    2309 
    2310     \item \indexedbold{transmissive boundary} - defined in the manual (flog from there)
    2311 
    2312     \item \indexedbold{xmomentum} - conserved quantity (note, two-dimensional SWW equations say only x and y and NOT z)
    2313 
    2314     \item \indexedbold{ymomentum}  - conserved quantity
    2315 
    2316     \item \indexedbold{resolution} -  The maximal area of a triangular cell in a mesh
    2317 
    2318     \item \indexedbold{polygon} - A sequence of points in the plane. (Arbitrary polygons can be created
     2335\begin{tabular}{|l|p{4cm}|c|}   \hline
     2336    \indexedbold{\anuga} & Name of software (joint development between ANU and
     2337    GA) &\\
     2338
     2339    \indexedbold{domain} & The domain of a function is the set of all input values to the
     2340    function.&\\
     2341
     2342    \indexedbold{Dirichlet boundary} & A Dirichlet boundary condition imposed on a differential equation
     2343 which specifies the values the solution is to take on the boundary of the
     2344 domain.&\\
     2345
     2346    \indexedbold{elevation} & refers to bathymetry and topography&\\
     2347
     2348    \indexedbold{bathymetry} & offshore elevation &\\
     2349
     2350    \indexedbold{topography} & onshore elevation &\\
     2351
     2352    \indexedbold{evolution} & integration of the shallow water wave equations
     2353    over time &\\
     2354
     2355    \indexedbold{forcing term} & &\\
     2356
     2357    \indexedbold{IDLE} & Development environment shipped with
     2358    Python &\\
     2359
     2360    \indexedbold{Manning friction coefficient} & &\\
     2361
     2362    \indexedbold{mesh} & Triangulation of domain & &\\
     2363
     2364    \indexedbold{meshfile} & [generic word for either .tsh or
     2365    .msh file] & \\
     2366
     2367    \indexedbold{points file} & [generic word for either .pts or
     2368    .xya file] & \\
     2369
     2370    \indexedbold{grid} & evenly spaced mesh & \\
     2371
     2372    \indexedbold{NetCDF} & &\\
     2373
     2374    \indexedbold{conserved quantity} & conserved (stage, x and y
     2375    momentum) & \\
     2376
     2377    \indexedbold{reflective boundary} & &\\
     2378
     2379    \indexedbold{stage} & &\\
     2380
     2381%    \indexedbold{try this}
     2382
     2383    \indexedbold{swollen} & visualisation tool &\\
     2384
     2385    \indexedbold{time boundary} & defined in the manual (flog from
     2386    there)&\\
     2387
     2388    \indexedbold{transmissive boundary} & defined in the manual (flog from
     2389    there)&\\
     2390
     2391    \indexedbold{xmomentum} & conserved quantity (note, two-dimensional SWW equations say only x and y and NOT
     2392    z) &\\
     2393
     2394    \indexedbold{ymomentum}  & conserved quantity & \\
     2395
     2396    \indexedbold{resolution} &  The maximal area of a triangular cell in a
     2397    mesh & \\
     2398
     2399    \indexedbold{polygon} & A sequence of points in the plane. (Arbitrary polygons can be created
    23192400    in this way.)
    23202401    \anuga represents a polygon in one of two ways. One way is to represent it as a
     
    23252406    $N \times 2$ Numeric array, where $N$ is the number of points.
    23262407
    2327     NOTE: More can be read in the module utilities/polygon.py ....
    2328 
    2329     \item \indexedbold{easting} - A rectangular (x,y) coordinate measurement of distance east from a north-south reference line,
    2330 usually a meridian used as the axis of origin within a map zone or projection. Easting is a UTM (Universal Transverse Mercator) Coordinate.
    2331 
    2332     \item \indexedbold{northing} - A rectangular (x,y) coordinate measurement of distance north from a north-south reference line,
    2333 usually a meridian used as the axis of origin within a map zone or projection. Northing is a UTM (Universal Transverse Mercator) Coordinate.
    2334 
    2335 
    2336     \item \indexedbold{latitude} - The angular distance on a mericlear north and south of the equator, expressed in degrees and minutes.
    2337 
    2338     \item \indexedbold{longitude} - The angular distance east or west, between the meridian of a particular place on Earth and that of the
    2339 Prime Meridian (located in Greenwich, England) expressed in degrees or time.
    2340 
    2341     \item \indexedbold{edge} - A triangular cell within the computational mesh can be depicted as a set of vertices joined by lines (the edges).
    2342 
    2343     \item \indexedbold{vertex} - A point at which edges meet.
    2344 
    2345     \item \indexedbold{finite volume} - The method evaluates the terms in the shallow water wave equation as fluxes at the surfaces of each
    2346 finite volume. Because the flux entering a given volume is identical to that leaving the adjacent volume, these methods are conservative.
    2347 Another advantage of the finite volume method is that it is easily formulated to allow for unstructured meshes.
    2348 The method is used in many computational fluid dynamics packages.
    2349 
    2350 
    2351     \item \indexedbold{flux} - the amount of flow through the volume per unit time
    2352 
    2353     \item \indexedbold{Digital Elevation Model (DEM)} - DEMs are digital files consisting of points of elevations,
    2354 sampled systematically at equally spaced intervals.
    2355 
    2356 
    2357 \end{itemize}
     2408    NOTE: More can be read in the module utilities/polygon.py .... &
     2409    \\
     2410
     2411    \indexedbold{easting} & A rectangular (x,y) coordinate measurement of distance east from a north-south reference line,
     2412usually a meridian used as the axis of origin within a map zone or
     2413projection. Easting is a UTM (Universal Transverse Mercator)
     2414Coordinate. & \\
     2415
     2416    \indexedbold{northing} & A rectangular (x,y) coordinate measurement of distance north from a north-south reference line,
     2417usually a meridian used as the axis of origin within a map zone or
     2418projection. Northing is a UTM (Universal Transverse Mercator)
     2419Coordinate. & \\
     2420
     2421
     2422    \indexedbold{latitude} & The angular distance on a mericlear north and south of the equator, expressed in degrees and
     2423    minutes. & \\
     2424
     2425    \indexedbold{longitude} & The angular distance east or west, between the meridian of a particular place on Earth and that of the
     2426Prime Meridian (located in Greenwich, England) expressed in degrees
     2427or time.& \\
     2428
     2429    \indexedbold{edge} & A triangular cell within the computational mesh can be depicted as a set of vertices joined by lines (the
     2430    edges). & \\
     2431
     2432    \indexedbold{vertex} & A point at which edges meet. & \\
     2433
     2434    \indexedbold{finite volume} & The method evaluates the terms in the shallow water wave equation as fluxes at the surfaces of each
     2435finite volume. Because the flux entering a given volume is identical
     2436to that leaving the adjacent volume, these methods are conservative.
     2437Another advantage of the finite volume method is that it is easily
     2438formulated to allow for unstructured meshes. The method is used in
     2439many computational fluid dynamics packages. & \\
     2440
     2441
     2442    \indexedbold{flux} & the amount of flow through the volume per unit
     2443    time & \\
     2444
     2445    \indexedbold{Digital Elevation Model (DEM)} & DEMs are digital files consisting of points of elevations,
     2446sampled systematically at equally spaced intervals.& \\  \hline
     2447
     2448
     2449\end{tabular}
    23582450
    23592451%The \code{\e appendix} markup need not be repeated for additional
Note: See TracChangeset for help on using the changeset viewer.