Changeset 8975
- Timestamp:
- Sep 14, 2013, 12:47:29 PM (12 years ago)
- Location:
- trunk/anuga_core/user_manual
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/anuga_core/user_manual/anuga_user_manual.tex
r8974 r8975 327 327 \verbatiminput{demos/runup.py} 328 328 329 \subsection{Establishing the Mesh}\index{mesh, establishing}329 \subsection{Establishing the Domain}\index{domain, establishing} 330 330 331 331 The first task is to set up the triangular mesh to be used for the … … 333 333 334 334 \begin{verbatim} 335 points, vertices, boundary = anuga.rectangular_cross(10, 10) 336 \end{verbatim} 337 338 The function \function{rectangular_cross} is imported from a module 339 \module{mesh\_factory} defined elsewhere. (\anuga also contains 340 several other schemes that can be used for setting up meshes, but we 341 shall not discuss these.) The above assignment sets up a $10 \times 342 10$ rectangular mesh, triangulated in a regular way. The assignment: 343 344 \begin{verbatim} 345 points, vertices, boundary = anuga.rectangular_cross(m, n) 346 \end{verbatim} 347 348 returns: 349 335 domain = anuga.rectangular_cross_domain(10, 5, len1=10.0, len2=5.0) 336 \end{verbatim} 337 338 The above assignment sets up a $10 \times 339 5$ rectangular mesh, triangulated in a regular way with boundary tags \code{'left'}, \code{'right'}, 340 \code{'top'} or \code{'bottom'}. 341 342 It is also possible to set up a domain from ``first principles'' using \code{points}, \code{vertices} and \code{boundary} via the assignment: 343 \begin{verbatim} 344 domain = anuga.Domain(points, vertices, boundary) 345 \end{verbatim} 346 % 347 where 350 348 \begin{itemize} 351 349 \item a list \code{points} giving the coordinates of each mesh point, 352 350 \item a list \code{vertices} specifying the three vertices of each triangle, and 353 351 \item a dictionary \code{boundary} that stores the edges on 354 the boundary and associates each with one of the symbolic tags \code{'left'}, \code{'right'}, 355 \code{'top'} or \code{'bottom'}. The edges are represented as pairs (i, j) where i refers to the triangle id and j to the edge id of that triangle. 352 the boundary and associates with each a symbolic tag. The edges are represented as pairs (i, j) where i refers to the triangle id and j to the edge id of that triangle. 356 353 Edge ids are enumerated from 0 to 2 based on the id of the vertex opposite. 357 354 \end{itemize} … … 364 361 given in Section \ref{sec:meshexample}. 365 362 366 \subsection{Initialising the Domain} 367 368 These variables are then used to set up a data structure 369 \code{domain}, through the assignment: 370 371 \begin{verbatim} 372 domain = anuga.Domain(points, vertices, boundary) 373 \end{verbatim} 363 374 364 375 365 This creates an instance of the \class{Domain} class, which
Note: See TracChangeset
for help on using the changeset viewer.