/[escript]/trunk/doc/cookbook/twodswp001.tex
ViewVC logotype

Diff of /trunk/doc/cookbook/twodswp001.tex

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 2632 by ahallam, Wed Aug 26 22:18:19 2009 UTC revision 2658 by ahallam, Thu Sep 10 02:58:44 2009 UTC
# Line 71  For our example we will use; Line 71  For our example we will use;
71  \end{verbatim}  \end{verbatim}
72  Next we must define the values of our entire domain for the first and second time step. For the purposes of this example it is sufficient to have these two timesteps as equal. Setting the source is similar to earlier problems where we can use \esc functions to set specific areas of the domain to certain values. We must also smooth our sourse to its surrounds to prevent ?diffusion? errors. This is acheived by using a cosine taper. Our source terms then become;  Next we must define the values of our entire domain for the first and second time step. For the purposes of this example it is sufficient to have these two timesteps as equal. Setting the source is similar to earlier problems where we can use \esc functions to set specific areas of the domain to certain values. We must also smooth our sourse to its surrounds to prevent ?diffusion? errors. This is acheived by using a cosine taper. Our source terms then become;
73  \begin{verbatim}  \begin{verbatim}
74   u=U0*(cos(length(x-xc)*3.1415/src_radius)+1)*whereNegative(length(x-xc)-src_radius)*dunit   u=U0*(cos(length(x-xc)*3.1415/src_radius)+1)*\
75                  whereNegative(length(x-xc)-src_radius)*dunit
76   u_m1=u   u_m1=u
77  \end{verbatim}  \end{verbatim}
78    

Legend:
Removed from v.2632  
changed lines
  Added in v.2658

  ViewVC Help
Powered by ViewVC 1.1.26