/[escript]/trunk/doc/user/firststep.tex
ViewVC logotype

Diff of /trunk/doc/user/firststep.tex

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

revision 2369 by gross, Fri Apr 3 03:56:19 2009 UTC revision 2370 by gross, Mon Apr 6 06:41:49 2009 UTC
# Line 153  elements is called a mesh\index{finite e Line 153  elements is called a mesh\index{finite e
153  method!mesh}. \fig{fig:FirstSteps.2} shows an  method!mesh}. \fig{fig:FirstSteps.2} shows an
154  example of a FEM mesh with four elements in the $x_0$ and four elements  example of a FEM mesh with four elements in the $x_0$ and four elements
155  in the $x_1$ direction over the unit square.    in the $x_1$ direction over the unit square.  
156  For more details we refer the reader to the literature, for instance  For more details we refer the reader to the literature, for instance \Ref{Zienc,NumHand}.
157  \Ref{Zienc,NumHand}.  
158    The \escript solver we want to use to solve this problem is embedded into the python interpreter language. So you can solve the problem interactively but you will learn quickly
159    that is more efficient to use scripts which you can edit with your favourite editor.
160    To enter the escript environment you use \program{escript} command\footnote{\program{escript} is not available under Windows yet. If you run under windows you can just use the
161    \program{python} command and the \env{OMP_NUM_THREADS} environment variable to control the number
162    of threads.}:
163    \begin{verbatim}
164      escript
165    \end{verbatim}
166    which will pass you on to the python prompt
167    \begin{verbatim}
168    Python 2.5.2 (r252:60911, Oct  5 2008, 19:29:17)
169    [GCC 4.3.2] on linux2
170    Type "help", "copyright", "credits" or "license" for more information.
171    >>>
172    \end{verbatim}
173    Here you can use all available python commands and language features, for instance
174    \begin{python}
175     >>> x=2+3
176    >>> print "2+3=",x
177    2+3= 5
178    \end{python}
179    We refer to the python users guide if you not familar with python.
180    
181  \escript provides the class \Poisson to define a Poisson equation \index{Poisson equation}.  \escript provides the class \Poisson to define a Poisson equation \index{Poisson equation}.
182  (We will discuss a more general form of a PDE \index{partial differential equation!PDE}  (We will discuss a more general form of a PDE \index{partial differential equation!PDE}
# Line 293  The entire code is available as \file{po Line 315  The entire code is available as \file{po
315    
316  The last statement writes the solution (tagged with the name "sol") to a file named \file{u.xml} in  The last statement writes the solution (tagged with the name "sol") to a file named \file{u.xml} in
317  \VTK file format.  \VTK file format.
318  Now you may run the script and visualize the solution using \mayavi:  Now you may run the script using the \escript environment
319    and visualize the solution using \mayavi:
320  \begin{verbatim}  \begin{verbatim}
321    python poisson.py    escript poisson.py
322    mayavi -d u.xml -m SurfaceMap    mayavi -d u.xml -m SurfaceMap
323  \end{verbatim}  \end{verbatim}
324  See \fig{fig:FirstSteps.3}.  See \fig{fig:FirstSteps.3}.

Legend:
Removed from v.2369  
changed lines
  Added in v.2370

  ViewVC Help
Powered by ViewVC 1.1.26