Changeset 4208


Ignore:
Timestamp:
Feb 1, 2007, 10:12:10 AM (18 years ago)
Author:
ole
Message:

FAQ update

File:
1 edited

Legend:

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

    r4207 r4208  
    33403340\subsubsection{How do I access model time during the simulation?}
    33413341The variable \code{t} in the evolve for loop is the model time.
     3342For 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})
     3343one would write something like
    33423344{\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           
    33463351\end{verbatim}}
    33473352The 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.