Changeset 5976


Ignore:
Timestamp:
Nov 19, 2008, 3:21:51 PM (16 years ago)
Author:
ole
Message:

Documentation update (get values, georef, etc)

Location:
anuga_core
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • anuga_core/documentation/user_manual/anuga_user_manual.tex

    r5956 r5976  
    11001100indices refer to edges in the order they appear: Edge 0 connects vertex 0 and vertex 1, edge 1 connects vertex 1 and 2; and so forth.
    11011101(Here, the values associated with each boundary tag are one-element lists, but they can have as many indices as there are edges)
    1102 If polygons intersect, or edges coincide the resolution may be undefined in some regions.
     1102If polygons intersect, or edges coincide (or are even very close) the resolution may be undefined in some regions.
    11031103Use the underlying mesh interface for such cases. See Section
    11041104\ref{sec:mesh interface}.
     
    19061906
    19071907
    1908 \begin{methoddesc}{get\_vertex_coordinates}{absolute=False}
    1909 
     1908\begin{methoddesc}{get\_vertex\_coordinates}{absolute=False}
     1909    \label{pg:get vertex coordinates}
    19101910    Return vertex coordinates for all triangles.
    19111911
     
    19141914    M the number of triangles in the mesh.
    19151915
     1916    Boolean keyword argument absolute determines whether coordinates
     1917    are to be made absolute by taking georeference into account
     1918    Default is False as many parts of ANUGA expects relative coordinates.
     1919\end{methoddesc}
     1920
     1921
     1922\begin{methoddesc}{get\_centroid\_coordinates}{absolute=False}
     1923
     1924    Return centroid coordinates for all triangles.
     1925
     1926    Return all centroid coordinates for all triangles as a M x 2 array
     1927   
    19161928    Boolean keyword argument absolute determines whether coordinates
    19171929    are to be made absolute by taking georeference into account
     
    20272039\item \code{location} determines which part of the triangles to assign
    20282040  to. Options are 'vertices' (default), 'edges', 'unique vertices', and 'centroids'.
     2041  If 'vertices' are use, edge and centroid values are automatically computed as the appropriate averages. This option ensures continuity of the surface.
     2042  If, on the other hand, 'centroids' is used vertex and edge values will be set to the same value effectively creating a piecewise constant surface with possible discontinuities at the edges.
    20292043\end{itemize}
    20302044
     
    25512565  model will evolve through several steps internally
    25522566  as the method forces the water speed to be calculated
    2553   on successive new cells). The user
     2567  on successive new cells).
     2568 
     2569  The code specified by the user in the block following the evolve statement is only executed once every \code{yieldstep} even though
     2570  ANUGA typically will take many more internal steps behind the scenes.
     2571 
     2572  The user
    25542573  specifies the total time period over which the evolution is to take
    25552574  place, by specifying values (in seconds) for either \code{duration}
     
    26172636  Module: \module{abstract\_2d\_finite\_volumes.domain}
    26182637
    2619   Allow access to individual quantities and their methods
    2620 
     2638  This function returns a Quantity object Q.
     2639  Access to it's values should be done through Q.get\__values documented on Page \pageref{pg:get values}.
     2640 
    26212641  \end{funcdesc}
    26222642
     
    26742694
    26752695  \begin{funcdesc}{get\_values}{location='vertices', indices = None}
     2696  \label{pg:get values}
    26762697  Module: \module{abstract\_2d\_finite\_volumes.quantity}
    26772698
    2678   Extract values for quantity as an array
    2679 
     2699  Extract values for quantity as a Numeric array.
     2700
     2701  {\small \begin{verbatim}
     2702  Inputs:
     2703          interpolation_points: List of x, y coordinates where value is
     2704                                sought (using interpolation). If points
     2705                                are given, values of location and indices
     2706                                are ignored. Assume either absolute UTM
     2707                                coordinates or geospatial data object.
     2708       
     2709          location: Where values are to be stored.
     2710                    Permissible options are: vertices, edges, centroids
     2711                    and unique vertices. Default is 'vertices'
     2712
     2713
     2714  The returned values will have the leading dimension equal to length of the indices list or
     2715  N (all values) if indices is None.
     2716       
     2717  In case of location == 'centroids' the dimension of returned
     2718  values will be a list or a Numerical array of length N, N being
     2719  the number of elements.
     2720       
     2721  In case of location == 'vertices' or 'edges' the dimension of
     2722  returned values will be of dimension Nx3
     2723
     2724  In case of location == 'unique vertices' the average value at
     2725  each vertex will be returned and the dimension of returned values
     2726  will be a 1d array of length "number of vertices"
     2727       
     2728  Indices is the set of element ids that the operation applies to.
     2729
     2730  The values will be stored in elements following their
     2731  internal ordering.
     2732 
    26802733  \end{funcdesc}
    26812734
     
    30303083Chapter \ref{ch:getstarted}:
    30313084
     3085%FIXME (Ole): Should put in example with nonzero xllcorner, yllcorner
    30323086\verbatiminput{examples/bedslopeexcerpt.cdl}
    30333087
     
    30793133
    30803134A mesh file can also contain a georeference, which describes an
    3081 offset to be applied to $x$ and $y$ values---eg to the vertices.
     3135offset to be applied to $x$ and $y$ values --- e.g.\ to the vertices.
    30823136
    30833137
     
    30913145%\begin{verbatim}
    30923146
    3093             first line:     \code{[column names]}\\
     3147            first line:   \code{[column names]}\\
    30943148            other lines:  \code{[x value], [y value], [attributes]}\\
    30953149
     
    35663620\chapter{Basic \anuga Assumptions}
    35673621
    3568 
     3622 \section{Time}
    35693623Physical model time cannot be earlier than 1 Jan 1970 00:00:00.
    35703624If one wished to recreate scenarios prior to that date it must be done
    35713625using some relative time (e.g. 0).
    35723626
    3573 
    3574 All spatial data relates to the WGS84 datum (or GDA94) and has been
    3575 projected into UTM with false easting of 500000 and false northing of
    3576 1000000 on the southern hemisphere (0 on the northern).
    3577 
    3578 It is assumed that all computations take place within one UTM zone and
    3579 all locations must consequently be specified in Cartesian coordinates
     3627The ANUGA domain has an attribute \code{starttime} which is used in cases where the simulation should be started later than the beginning of some input data such as those obtained from boundaries or forcing functions (hydrographs, file\_boundary etc)
     3628
     3629The \code{file\_boundary} may adjust domain.startime in case the input data does not itself start until a later time.
     3630
     3631 
     3632\section{Spatial data}
     3633
     3634\subsection{Projection}
     3635All spatial data relates to the WGS84 datum (or GDA94) and assumes a projection into UTM with false easting of 500000 and false northing of
     36361000000 on the southern hemisphere (0 on the northern hemisphere).
     3637All locations must consequently be specified in Cartesian coordinates
    35803638(eastings, northings) or (x,y) where the unit is metres.
    3581 
    3582 DEMs, meshes and boundary conditions can have different origins within
    3583 one UTM zone. However, the computation will use that of the mesh for
    3584 numerical stability.
    3585 
     3639Alternative projections can be assumed, but ANUGA does have the concept of a UTM zone
     3640that must be the same for all coordinates in the model.
     3641
     3642\subsection{Internal coordinates}
     3643It is important to realise that ANUGA for numerical precision uses coordinates that are relative
     3644to the lower left node of the rectangle containing the mesh ($x_$min, $y_$min).
     3645This origin is referred to internally as xllcorner, yllcorner following the ESRI ascii grid notation. 
     3646The sww file format also includes xllcorner, yllcorner and any coordinate in the file should be adjusted
     3647by adding this origin. See Section \ref{sec:sww format}.
     3648
     3649Throughout the ANUGA interface functions have optional boolean arguments \code{absolute} which control
     3650whether spatial data received is using the internal representation (absolute=False) or the
     3651user coordinate set (absolute=True). See e.g. \code{get\_vertex\_coordinates} on \pageref{pg:get vertex coordinates}.
     3652
     3653DEMs, meshes and boundary conditions can have different origins. However, the internal representation in ANUGA
     3654will use the origin of the mesh.
     3655
     3656\subsection{Polygons}
    35863657When generating a mesh it is assumed that polygons do not cross.
    35873658Having polygons tht cross can cause the mesh generation to fail or bad
  • anuga_core/source/anuga/abstract_2d_finite_volumes/quantity.py

    r5897 r5976  
    10841084        """get values for quantity
    10851085
    1086         return X, Compatible list, Numeric array (see below)
     1086        Extract values for quantity as a Numeric array.       
    10871087       
    10881088        Inputs:
     
    10981098
    10991099
    1100         The returned values with be a list the length of indices
    1101         (N if indices = None).
     1100        The returned values will have the leading dimension equal to length of the indices list or
     1101        N (all values) if indices is None.
    11021102
    11031103        In case of location == 'centroids' the dimension of returned
Note: See TracChangeset for help on using the changeset viewer.