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

Annotation of /trunk/doc/user/guide_defs.tex

Parent Directory Parent Directory | Revision Log Revision Log


Revision 2128 - (hide annotations)
Thu Dec 4 03:48:22 2008 UTC (11 years ago) by lgraham
File MIME type: application/x-tex
File size: 14761 byte(s)
Added description of Rayleigh-Taylor instability python script, and a note on visualising the output with visit.

1 ksteube 1811
2     %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
3 ksteube 1316 %
4 ksteube 1811 % Copyright (c) 2003-2008 by University of Queensland
5     % Earth Systems Science Computational Center (ESSCC)
6     % http://www.uq.edu.au/esscc
7 gross 625 %
8 ksteube 1811 % Primary Business: Queensland, Australia
9     % Licensed under the Open Software License version 3.0
10     % http://www.opensource.org/licenses/osl-3.0.php
11 gross 625 %
12 ksteube 1811 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
13 jgs 82
14 ksteube 1811
15 lgraham 2128 \usepackage{subfigure}
16 jgs 82 \usepackage{epsfig}
17     \usepackage{graphicx,color}
18     \usepackage{makeidx} % handle the index properly
19     \usepackage{xspace} % handle spaces after commands more nicely
20     % use the ams math stuff, as it makes the maths easier to code, and
21     % nicer output than the standard LaTeX stuff
22     \usepackage{amsmath,amsfonts,amssymb} % this is handy for mathematicians and physicists
23     % see http://www.ams.org/tex/amslatex.html
24     \usepackage{alltt} % handy verbatim stuff
25    
26    
27     % define some handy commands for escript stuff
28 gross 565 \newcommand{\LINUX}{{\it Linux}\xspace}
29 gross 993 \newcommand{\netCDF}{{\it netCDF}\cite{NETCDF}\index{netCDF} \xspace}
30 jgs 107 \newcommand{\escript}{\module{esys.escript}\xspace}
31     \newcommand{\finley}{\module{esys.finley}\xspace}
32 gross 999 \newcommand{\esys}{\module{esys}\xspace}
33 gross 565 \newcommand{\pyvisi}{\module{esys.pyvisi}\xspace}
34 gross 993 \newcommand{\pycad}{\module{esys.pycad}\xspace}
35 gross 999 \newcommand{\gmsh}{\module{esys.pycad.gmsh}\xspace}
36     \newcommand{\gmshextern}{{\it Gmsh}\cite{GMSH}\index{Gmsh} \xspace}
37 gross 565
38 gross 999
39 gross 565 \newcommand{\linearPDEs}{\module{esys.escript.linearPDEs}\xspace}
40 jgs 102 \newcommand{\LinearPDE}{\class{LinearPDE}\xspace}
41 jgs 121 \newcommand{\timeseries}{\module{esys.timeseries}\xspace}
42     \newcommand{\modelframe}{\module{esys.modelframe}\xspace}
43     \newcommand{\pdetools}{\module{esys.pdetools}\xspace}
44 gross 565
45 jgs 102 \newcommand{\AdvectivePDE}{\class{AdvectivePDE}\xspace}
46     \newcommand{\Poisson}{\class{Poisson}\xspace}
47 gross 568 \newcommand{\Helmholtz}{\class{Helmholtz}\xspace}
48 gross 653 \newcommand{\Lame}{\class{Lame}\xspace}
49 jgs 82 \newcommand{\Data}{\class{Data}\xspace}
50 jfenwick 1955 \newcommand{\EmptyData}{empty \class{Data}\index{empty Data}\xspace}
51 jgs 102 \newcommand{\Domain}{\class{Domain}\xspace}
52 jongui 1002 %\newcommand{\VTK}{{\it vtk} \cite{VTK}\index{visualization!vtk} \xspace}
53 gross 606 \newcommand{\GnuPlot}{{\it gnuplot} \cite{GNUPLOT}\index{visualization!gnuplot}\index{gnuplot}}
54 jfenwick 1955 \newcommand{\mayavi}{{\it mayavi}\index{visualization!mayavi}\index{mayavi}}
55 gross 599 \newcommand{\OpenDX}{{\it OpenDX} \cite{OPENDX}\xspace}
56 jgs 102 \newcommand{\finleyelement}[1]{{\it #1}\index{finley!#1}}
57     \newcommand{\False}{\constant{False}\xspace}
58     \newcommand{\True}{\constant{True}\xspace}
59 gross 653 \newcommand{\PCG}{\constant{LinearPDE.PCG}\xspace\index{linear solver!PCG}\index{PCG}}
60     \newcommand{\BiCGStab}{\constant{LinearPDE.BICGSTAB}\xspace\index{linear solver!BiCGStab}\index{BiCGStab}}
61     \newcommand{\Direct}{\constant{LinearPDE.DIRECT}\xspace\index{linear solver!Direct}\index{Direct solver}}
62     \newcommand{\GMRES}{\constant{LinearPDE.GMRES}\xspace\index{linear solver!GMRES}\index{GMRES}}
63     \newcommand{\PRESTWENTY}{\constant{LinearPDE.PRES20}\xspace\index{linear solver!PRES20}\index{PRES20}}
64     \newcommand{\JACOBI}{\constant{LinearPDE.JACOBI}\xspace\index{preconditioner!Jacobi}\index{Jacobi}}
65     \newcommand{\ILU}{\constant{LinearPDE.ILU0}\xspace\index{preconditioner!ILU0}\index{ILU0}}
66     \newcommand{\ILUT}{\constant{LinearPDE.ILUT}\xspace\index{preconditioner!ILUT}\index{ILUT}}
67     \newcommand{\LUMPING}{\constant{LinearPDE.LUMPING}\xspace\index{linear solver!lumping}\index{lumping}}
68     \newcommand{\NOREORDERING}{\constant{LinearPDE.NO\hackscore REORDERING}\xspace}
69     \newcommand{\MINIMUMFILLIN}{\constant{LinearPDE.MINIMUM\hackscore FILL\hackscore IN}\xspace\index{linear solver!minimum fill-in ordering}\index{minimum fill-in ordering}}
70     \newcommand{\NESTEDDESCTION}{\constant{LinearPDE.NESTED\hackscore DISSECTION}\xspace\index{linear solver!nested dissection ordering}\index{nested dissection}}
71 jgs 82
72 jgs 102 \newcommand{\FunctionSpace}{\class{FunctionSpace}\xspace}
73     \newcommand{\Operator}{\class{Operator}\xspace}
74     \newcommand{\SolutionFS}{solution \class{FunctionSpace}\index{solution}\xspace}
75     \newcommand{\ReducedSolutionFS}{reduced solution \class{FunctionSpace}\index{solution!reduced}\xspace}
76     \newcommand{\FunctionOnBoundary}{boundary \class{FunctionSpace}\xspace}
77     \newcommand{\Function}{general \class{FunctionSpace}\xspace}
78     \newcommand{\FunctionOnContactZero}{contact \class{FunctionSpace} on side 0\xspace}
79     \newcommand{\FunctionOnContactOne}{contact \class{FunctionSpace} on side 1\xspace}
80     \newcommand{\ContinuousFunction}{continuous \class{FunctionSpace}\xspace}
81 gross 565 \newcommand{\RankOne}{{rank-1 \Data object}\xspace}
82 jgs 102 \newcommand{\RankTwo}{{rank-2 \Data object}\xspace}
83     \newcommand{\RankThree}{{rank-3 \Data object}\xspace}
84     \newcommand{\RankFour}{{rank-4 \Data object}\xspace}
85 gross 660 \newcommand{\Tensor}{{tensor \Data object}\xspace}
86     \newcommand{\Vector}{{vector \Data object}\xspace}
87 jgs 102 \newcommand{\Scalar}{{scalar \Data object}\xspace}
88 jfenwick 1955 \newcommand{\DataSample}{{data sample}\index{data sample}\xspace}
89     \newcommand{\DataSamplePoints}{{data sample points}\index{data sample!points}\xspace}
90 jgs 102 \newcommand{\numarray}{\module{numarray}\xspace}
91 jfenwick 1957 \newcommand{\numarrayNA}{\module{numarray}.\class{NumArray}\xspace}
92 jgs 102 \newcommand{\Shape}{shape\xspace\index{shape}}
93 gross 565 \newcommand{\Rank}{rank\xspace\index{shape}}
94 jgs 102 \newcommand{\ExampleDirectory}{example directory\xspace}
95 jfenwick 1959 \newcommand{\ReferenceGuide}{\url{http://shake200.esscc.uq.edu.au/esys/esys13/release/epydoc/index.html}\xspace}
96 gross 999 \newcommand{\Point}{\class{Point} \xspace}
97     \newcommand{\PropertySet}{\class{PropertySet} \xspace}
98     \newcommand{\Design}{\class{Design} \xspace}
99     \newcommand{\TagMap}{\class{TagMap} \xspace}
100     \newcommand{\ManifoldOneD}{\class{Manifold1D} \xspace}
101     \newcommand{\ManifoldTwoD}{\class{Manifold2D} \xspace}
102     \newcommand{\ManifoldThreeD}{\class{Manifold3D} \xspace}
103 jgs 102
104 jongui 879 % handy commands for pyvisi
105 jongui 1002 \newcommand{\VTK}{{\it VTK} \xspace}
106     \newcommand{\VTKUrl}{\url{http://www.vtk.org/}\xspace}
107 jongui 879 \newcommand{\Scene}{\class{Scene}\xspace}
108     \newcommand{\Camera}{\class{Camera}\xspace}
109 jongui 886 \newcommand{\Light}{\class{Light}\xspace}
110 jongui 1035 \newcommand{\DataCollector}{\class{DataCollector}\xspace}
111     \newcommand{\ImageReader}{\class{ImageReader}\xspace}
112     \newcommand{\TextTwoD}{\class{Text2D}\xspace}
113     \newcommand{\ActorTwoD}{\class{Actor2D}\xspace}
114     \newcommand{\ActorThreeD}{\class{Actor3D}\xspace}
115     \newcommand{\Transform}{\class{Transform}\xspace}
116     \newcommand{\Clipper}{\class{Clipper}\xspace}
117 jongui 879 \newcommand{\Map}{\class{Map}\xspace}
118 jongui 1035 \newcommand{\MapOnPlaneCut}{\class{MapOnPlaneCut}\xspace}
119     \newcommand{\MapOnPlaneClip}{\class{MapOnPlaneClip}\xspace}
120 jongui 886 \newcommand{\MapOnScalarClip}{\class{MapOnScalarClip}\xspace}
121 jongui 1211 \newcommand{\MapOnScalarClipWithRotation}{\class{MapOnScalarClipWithRotation}\xspace}
122 jongui 1035 \newcommand{\GlyphThreeD}{\class{Glyph3D}\xspace}
123 jongui 1078 \newcommand{\MaskPoints}{\class{MaskPoints}\xspace}
124 jongui 1035 \newcommand{\Velocity}{\class{Velocity}\xspace}
125     \newcommand{\VelocityOnPlaneCut}{\class{VelocityOnPlaneCut}\xspace}
126     \newcommand{\VelocityOnPlaneClip}{\class{VelocityOnPlaneClip}\xspace}
127     \newcommand{\Sphere}{\class{Sphere}\xspace}
128     \newcommand{\TensorGlyph}{\class{TensorGlyph}\xspace}
129     \newcommand{\Ellipsoid}{\class{Ellipsoid}\xspace}
130     \newcommand{\EllipsoidOnPlaneCut}{\class{EllipsoidOnPlaneCut}\xspace}
131     \newcommand{\EllipsoidOnPlaneClip}{\class{EllipsoidOnPlaneClip}\xspace}
132     \newcommand{\ContourModule}{\class{ContourModule}\xspace}
133 jongui 879 \newcommand{\Contour}{\class{Contour}\xspace}
134 jongui 1035 \newcommand{\ContourOnPlaneCut}{\class{ContourOnPlaneCut}\xspace}
135     \newcommand{\ContourOnPlaneClip}{\class{ContourOnPlaneClip}\xspace}
136     \newcommand{\PointSource}{\class{PointSource}\xspace}
137     \newcommand{\StreamLineModule}{\class{StreamLineModule}\xspace}
138     \newcommand{\Tube}{\class{Tube}\xspace}
139     \newcommand{\StreamLine}{\class{StreamLine}\xspace}
140     \newcommand{\Warp}{\class{Warp}\xspace}
141 jongui 879 \newcommand{\Carpet}{\class{Carpet}\xspace}
142 jongui 1035 \newcommand{\PlaneSource}{\class{PlaneSource}\xspace}
143     \newcommand{\Image}{\class{Image}\xspace}
144 jongui 1112 \newcommand{\Logo}{\class{Logo}\xspace}
145     \newcommand{\ImageReslice}{\class{ImageReslice}\xspace}
146 jongui 879 \newcommand{\Position}{\class{Position}\xspace}
147 jongui 1194 \newcommand{\DataSetMapper}{\class{DataSetMapper}\xspace}
148     \newcommand{\Legend}{\class{Legend}\xspace}
149     \newcommand{\ScalarBar}{\class{ScalarBar}\xspace}
150     \newcommand{\Movie}{\class{Movie}\xspace}
151 jongui 1205 \newcommand{\CubeSource}{\class{CubeSource}\xspace}
152     \newcommand{\Rectangle}{\class{Rectangle}\xspace}
153     \newcommand{\LocalPosition}{\class{LocalPosition}\xspace}
154     \newcommand{\GlobalPosition}{\class{GlobalPosition}\xspace}
155 jongui 1211 \newcommand{\Rotation}{\class{Rotation}\xspace}
156 jongui 1081 \newcommand{\thumbnailwidth}{50mm}
157 jgs 102
158 jgs 82 % default width for figures
159     \newcommand{\figwidth}{100mm}
160     % commands useful in cross-referencing
161     \newcommand {\Ref}[1] {Reference~\cite{#1}}
162     \newcommand {\Sec}[1] {Section~\ref{#1}}
163     \newcommand {\App}[1] {Appendix~\ref{#1}}
164     \newcommand {\Chap}[1] {Chapter~\ref{#1}}
165     \newcommand {\etal} {\emph{~et~al.}}
166     \newcommand {\fig}[1] {Figure~\ref{#1}}
167     \newcommand {\eqn}[1] {Equation~(\ref{#1})}
168     \newcommand {\tab}[1] {Table~\ref{#1}}
169    
170 jgs 102 % this stops one figure taking up a whole page and lets more text onto
171     % the one page when a figure exists
172     \renewcommand{\floatpagefraction}{0.8} % Default = 0.5
173    
174 jgs 82 % improved version of caption handling
175     \usepackage{ccaption}
176     \captionnamefont{\scshape}
177     \captionstyle{}
178     \makeatletter
179     \renewcommand{\fnum@figure}[1]{\quad\small\textsc{\figurename~\thefigure}:}
180     \renewcommand{\@makecaption}[2]{%
181     \vskip\abovecaptionskip
182     \sbox\@tempboxa{#1: #2}%
183     \ifdim \wd\@tempboxa >\hsize
184     \def\baselinestretch{1}\@normalsize
185     #1: #2\par
186     \def\baselinestretch{1.5}\@normalsize
187     \else
188     \global \@minipagefalse
189     \hb@xt@\hsize{\hfil\box\@tempboxa\hfil}%
190     \fi
191     \vskip\belowcaptionskip}
192     \makeatother
193    
194 gross 572 % \usepackage{fancyvrb} % fancy verbatim stuff. Needed so code below goes
195 jgs 82 %%% this code grabbed from the PyScript docs
196     %%% pyscript.sourceforge.net
197    
198     % --------------------------------------------------------------
199     % Code format within \Verb
200     % --------------------------------------------------------------
201    
202 gross 572 % \definecolor{pycolor}{rgb}{0,0.4,0}
203 jgs 82
204 jgs 102 %% \DefineVerbatimEnvironment{python}{Verbatim}
205     %% {frame=leftline,framerule=.5mm,rulecolor=\color{pycolor},
206     %% formatcom=\color{pycolor}\small,fontshape=rm}
207 jgs 82
208     %\DefineShortVerb[formatcom=\color{dgreen}\small,fontshape=sl]{\|}
209    
210 gross 572 % \RecustomVerbatimCommand{\Verb}{Verb}{formatcom=\color{pycolor}\small,fontshape=rm}
211 jgs 82
212     %%% end of grabbed code
213    
214     % this is for when one uses pdflatex and therefore needs to load pdf
215     % figures into \includegraphics
216     \ifpdf
217     \DeclareGraphicsExtensions{.pdf} % this command defined in graphicx
218     \pdfcompresslevel=9 % 0: no compression, 9: highest compression
219     % or, set compress_level 9 in file pdftex.cfg
220     \else
221     \DeclareGraphicsExtensions{.eps}
222     \fi
223 jgs 102
224     % defines the colour for the background of code examples
225     \definecolor{LightGrey}{gray}{0.9}
226    
227     % add the listings package to pretty print the code output
228     \usepackage{listings}
229    
230     \lstdefinestyle{myC++}{%
231     %\lstset{%
232     language=C++,
233     showstringspaces=false,
234     basicstyle=\small\ttfamily,
235     commentstyle=\color[named]{BrickRed}\ttfamily,
236     keywordstyle=\color[named]{Purple}\ttfamily,
237     %identifierstyle=\color[named]{Blue}\ttfamily,
238     %functionstyle=\color[named]{Blue}\ttfamily,
239     %typestyle=\color[named]{ForestGreen}\ttfamily,
240     stringstyle=\color[named]{Tan}\ttfamily,%
241     morekeywords={,complex,}%
242     frame=none,%
243     backgroundcolor=\color{LightGrey}%
244     }
245    
246     \lstdefinestyle{myMatlab}{%
247     %\lstset{%
248     language=Matlab,
249     showstringspaces=false,
250     basicstyle=\small\ttfamily,
251     commentstyle=\color[named]{BrickRed}\ttfamily,
252     keywordstyle=\color[named]{Purple}\ttfamily,
253     %identifierstyle=\color[named]{Blue}\ttfamily,
254     %functionstyle=\color[named]{Blue}\ttfamily,
255     %typestyle=\color[named]{ForestGreen}\ttfamily,
256     stringstyle=\color[named]{Tan}\ttfamily,%
257     frame=none,%
258     backgroundcolor=\color{LightGrey}%
259     }
260    
261     \lstdefinestyle{myScilab}{%
262     %\lstset{%
263     language=Scilab,
264     showstringspaces=false,
265     basicstyle=\small\ttfamily,
266     commentstyle=\color[named]{BrickRed}\ttfamily,
267     keywordstyle=\color[named]{Purple}\ttfamily,
268     %identifierstyle=\color[named]{Blue}\ttfamily,
269     %functionstyle=\color[named]{Blue}\ttfamily,
270     %typestyle=\color[named]{ForestGreen}\ttfamily,
271     stringstyle=\color[named]{Tan}\ttfamily,%
272     frame=none,%
273     backgroundcolor=\color{LightGrey}%
274     }
275    
276     \lstdefinestyle{myShell}{%
277     %\lstset{%
278     language=ksh,
279     showstringspaces=false,
280     basicstyle=\small\ttfamily,
281     commentstyle=\color[named]{Black}\ttfamily,
282     keywordstyle=\color[named]{Black}\ttfamily,
283     %identifierstyle=\color[named]{Blue}\ttfamily,
284     %functionstyle=\color[named]{Blue}\ttfamily,
285     %typestyle=\color[named]{ForestGreen}\ttfamily,
286     stringstyle=\color[named]{Black}\ttfamily,%
287     frame=none,%
288     backgroundcolor=\color{LightGrey}%
289     }
290    
291     \lstdefinestyle{myPython}{%
292     %\lstset{%
293     language=python,
294     showstringspaces=false,
295     basicstyle=\small\ttfamily,
296     commentstyle=\color[named]{BrickRed}\ttfamily,
297     keywordstyle=\color[named]{Purple}\ttfamily,
298     %identifierstyle=\color[named]{Blue}\ttfamily,
299     %functionstyle=\color[named]{Blue}\ttfamily,
300     %typestyle=\color[named]{ForestGreen}\ttfamily,
301     stringstyle=\color[named]{Tan}\ttfamily,%
302     frame=none,%
303     %backgroundcolor=\color{LightGrey}%
304     }
305    
306     \lstdefinestyle{myhtml}{%
307     %\lstset{%
308     language=xml,
309     showstringspaces=false,
310     basicstyle=\small\ttfamily,
311     commentstyle=\color[named]{BrickRed}\ttfamily,
312     keywordstyle=\color[named]{Purple}\ttfamily,
313     %identifierstyle=\color[named]{Blue}\ttfamily,
314     %functionstyle=\color[named]{Blue}\ttfamily,
315     %typestyle=\color[named]{ForestGreen}\ttfamily,
316     stringstyle=\color[named]{Tan}\ttfamily,
317     morekeywords={,simulation,prop_dim,error_check,stochastic,%
318     globals,field,dimensions,lattice,domains,samples,vector,%
319     components,fourier_space,sequence,integrate,algorithm,%
320     interval,k_operators,constant,operator_names,vectors,%
321     output,filename,group,sampling,moments,benchmark,use_double,%
322     use_wisdom,use_prefs,binary_output,cycles,filter,post_propagation,%
323     default_value,argv,arg,iterations,cross_propagation,%
324     use_mpi,paths,seed,noises,author,description,name,type,%
325     }
326     frame=none,%
327     %framerule=2pt,%
328     backgroundcolor=\color{LightGrey}%
329     }
330    
331     % this implements producing nice code blocks
332     % it also saves time, typing and
333     % *should* reduce errors in the text by removing doubling up of code
334     \lstnewenvironment{xmdsCode}[1][]{\lstset{style=myhtml}\lstset{#1}}{}
335    
336     % this implements nicely formatted shell code
337     \lstnewenvironment{shellCode}[1][]{\lstset{style=myShell}\lstset{#1}}{}
338    
339     % this implements nicely formatted Perl code
340     \lstnewenvironment{perlCode}[1][]{\lstset{style=myPerl}\lstset{#1}}{}
341    
342     % this implements nicely formatted Python code
343     \lstnewenvironment{python}[1][]{\lstset{style=myPython}\lstset{#1}}{}
344    
345     % this implements nicely formatted C++ code
346     \lstnewenvironment{CCode}{\lstset{style=myC++}}{}
347    
348     % this implements nicely formatted matlab code
349     \lstnewenvironment{matlabCode}{\lstset{style=myMatlab}}{}
350    
351     % this implements nicely formatted scilab code
352     \lstnewenvironment{scilabCode}{\lstset{style=myScilab}}{}
353    

Properties

Name Value
svn:eol-style native
svn:keywords Author Date Id Revision

  ViewVC Help
Powered by ViewVC 1.1.26