Changeset 4208
- Timestamp:
- Feb 1, 2007, 10:12:10 AM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
anuga_core/documentation/user_manual/anuga_user_manual.tex
r4207 r4208 3340 3340 \subsubsection{How do I access model time during the simulation?} 3341 3341 The variable \code{t} in the evolve for loop is the model time. 3342 For example to change the boundary at a particular time (instead of basing this on the state of the system as in Section \ref{sec:change boundary}) 3343 one would write something like 3342 3344 {\small \begin{verbatim} 3343 for t in domain.evolve(yieldstep = 0.1, duration = 4.0): 3344 if t > 15: 3345 <Do something> 3345 for t in domain.evolve(yieldstep = 0.2, duration = 40.0): 3346 3347 if Numeric.allclose(t, 15): 3348 print 'Changing boundary to outflow' 3349 domain.set_boundary({'right': Bo}) 3350 3346 3351 \end{verbatim}} 3347 3352 The model time can also be accessed through the public interface \code{domain.get\_time()}, or changed (at your own peril) through \code{domain.set\_time()}.
Note: See TracChangeset
for help on using the changeset viewer.