Changeset 2631


Ignore:
Timestamp:
Mar 29, 2006, 4:22:08 PM (18 years ago)
Author:
ole
Message:

Meeting with Howard

File:
1 edited

Legend:

Unmodified
Added
Removed
  • documentation/user_manual/anuga_user_manual.tex

    r2628 r2631  
    910910
    911911\begin{funcdesc} {set\_name}{name}
    912     Module: \codee{pyvolution.domain}
     912    Module: \code{pyvolution.domain}
    913913   
    914914    Assigns the name \code{name} to the domain
     
    926926   
    927927    Sets the directory used for data to the value \code{name}. The default value, before
    928     \code{set\_datadir} is run, is the value \code{default_datadir} specified in \config.py}.
     928    \code{set\_datadir} is run, is the value \code{default_datadir}
     929    specified in \code{config.py}.
    929930\end{funcdesc}
    930931
     
    933934   
    934935    Returns the data directory set by \code{set\_datadir} or, if \code{set\_datadir} has not
    935     been run, returns the value \code{default_datadir} specified in \config.py}.
     936    been run, returns the value \code{default_datadir} specified in
     937    \code{config.py}.
    936938\end{funcdesc}
    937939
     
    946948\section{Setting Quantities}
    947949
    948 \begin{funcdesc}{set\_quantity}{name, numeric = None, quantity = None, function = None,
    949                    geospatial_data = None, filename = None, attribute_name = None,
    950                    alpha = None, location = 'vertices', indices = None, verbose = False,
    951                    use_cache = False}
    952 Module: \code{pyvolution.domain}  (see also
    953 \code{pyvolution.quantity.set_values})
    954 
    955 This function is used to assign values to individual quantities for a domain. It is very flexible and can be
    956 used with many data types: a statement of the form \code{domain.set\_quantity{name, x}} can
    957 be used to define a quantity having the name \code{name}, where the other argument \code{x} can
    958 be any of the following:
     950\begin{funcdesc}{set\_quantity}{name,
     951    numeric = None,
     952    quantity = None,
     953    function = None,
     954    geospatial_data = None,
     955    filename = None,
     956    attribute_name = None,
     957    alpha = None,
     958    location = 'vertices',
     959    indices = None,
     960    verbose = False,
     961    use_cache = False}
     962  Module: \code{pyvolution.domain}
     963  (see also \code{pyvolution.quantity.set_values})
     964
     965This function is used to assign values to individual quantities for a
     966domain. It is very flexible and can be used with many data types: a
     967statement of the form \code{domain.set\_quantity(name, x)} can be used
     968to define a quantity having the name \code{name}, where the other
     969argument \code{x} can be any of the following:
    959970
    960971\begin{itemize}
    961 \item a number in which case all vertices in the mesh gets that for the quantity in question.
     972\item a number, in which case all vertices in the mesh gets that for
     973the quantity in question.
    962974\item a list of numbers or a Numeric array ordered the same way as the mesh vertices.
    963975\item a function (e.g.\ see the samples introduced in Chapter 2)
    964976\item an expression composed of other quantities and numbers, arrays, lists (for
    965977example, a linear combination of quantities)
    966 \item the name of a file from which the data can be read
    967 \item a geospatial dataset (See ?????)
     978\item the name of a file from which the data can be read. In this case, the optional argument attribute_name will select which attribute to use from the file. If left out, set_quantity will pick one. This is useful in cases where there is only one attribute.
     979\item a geospatial dataset (See ?????). Optional argument attribute_name applies here as with files.
    968980\end{itemize}
    969981
     
    972984  numeric, quantity, function, points, filename
    973985must be present.
     986
     987
     988Set quantity will look at the type of the second argument (\code{numeric}) and
     989determine what action to take.
     990
     991Values can also be set using the appropriate keyword arguments.
     992If x is a function, for example, \code{domain.set\_quantity(name, x)}, \code{domain.set\_quantity(name, numeric=x)}, and \code{domain.set\_quantity(name, function=x)}
     993are all equivalent.
     994
     995
     996Other optional arguments are
     997\begin{itemize}
     998\item \code{indices} which is a list of ids of triangles to which set_quantity should apply its assignment of values.
     999\item \code{location} determines which part of the triangles to assign to. Options are 'vertices' (default), 'edges', and 'centroids'.
     1000\end{itemize}
     1001
     1002
     1003a number, in which case all vertices in the mesh gets that for
     1004the quantity in question.
     1005\item a list of numbers or a Numeric array ordered the same way as the mesh vertices.
     1006
     1007
    9741008\end{funcdesc}
     1009
     1010
     1011
     1012
     1013
     1014
    9751015
    9761016%%%
     
    10251065Module: \code{pyvolution.least\_squares}
    10261066
    1027 Given a time series defined at the vertices of a
    1028 triangular mesh (such as those stored in \code{sww} files),
    1029 \code{Interpolation\_function} is used to create a callable object
    1030 that assigns a value \code{f(t, x, y)}, interpolated from the given time-series values,
    1031 to an arbitrary time \code{t} and point \code{(x, y)}
    1032 within the mesh region. Since, in practice, values need to be computed at specified
     1067Given a time series, either as a sequence of numbers or
     1068defined at the vertices of a triangular mesh (such
     1069as those stored in \code{sww} files), \code{Interpolation\_function}
     1070is used to create a callable object that interpolates a value for
     1071an arbitrary time \code{t} within the model limits and possibly a
     1072point \code{(x, y)} within a mesh region.
     1073
     1074The actual time series at which data is available is specified by means
     1075of an array \code{time} of monotonically increasing times.
     1076The quantities containing the values to be interpolated are specified in
     1077an array---or dictionary of arrays (used in conjunction with the optional argument
     1078\code{quantitity\_names}) --- called \code{quantities}.
     1079The optional arguments \code{vertex_coordinates} and \code{triangles} represent
     1080the spatial mesh associated with the quantity arrays. If omitted the function created
     1081by \code{Interpolation\_function} will be a function of \code{t} only.
     1082
     1083
     1084Since, in practice, values need to be computed at specified
    10331085points, the syntax allows the user to specify, once and for all, a list
    10341086\code{interpolation\_points} of points at which values are required. In this case,
     
    10361088index identifying a member of \code{interpolation\_points}.
    10371089
    1038 The time series is specified by means of an array \code{time}
    1039 of monotonically increasing times and an array---or dictionary of arrays---\code{quantities}
    1040 containing the values to be interpolated.
     1090
     1091
     1092
     1093
    10411094\end{classdesc}
    10421095
     
    10531106\section{Boundary Conditions}
    10541107
    1055 \anuga provides a large number of predefined boundary conditions, represented by
    1056 objects such as \code{Reflective\_boundary(domain)} and \code{Dirichlet\_boundary([0.2, 0.0, 0.0])},
    1057 described in the examples in Chapter 2. Alternatively, you may prefer to ``roll
    1058 your own'', following the method explained in \ref{sec:roll_your_own}.
     1108\anuga provides a large number of predefined boundary conditions,
     1109represented by objects such as \code{Reflective\_boundary(domain)} and
     1110\code{Dirichlet\_boundary([0.2, 0.0, 0.0])}, described in the examples
     1111in Chapter 2. Alternatively, you may prefer to ``roll your own'',
     1112following the method explained in Section \ref{sec:roll your own}.
    10591113
    10601114These boundary objects may be used with the function \code{set\_boundary} described below
     
    10731127\end{funcdesc}
    10741128
    1075 \begin{funcdesc} {get_boundary_tags}{??}
     1129\begin{funcdesc} {get_boundary_tags}{}
     1130Module: \code{pyvolution.mesh}
    10761131\end{funcdesc}
    10771132
     
    11281183
    11291184\subsection{User-defined boundary conditions}
    1130 \label{sec:roll_your_own}
     1185\label{sec:roll your own}
    11311186[How to roll your own]
    11321187
Note: See TracChangeset for help on using the changeset viewer.