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

Contents of /trunk/doc/cookbook/cookbook_defs.tex

Parent Directory Parent Directory | Revision Log Revision Log


Revision 2634 - (show annotations)
Thu Aug 27 04:03:32 2009 UTC (9 years, 10 months ago) by ahallam
File MIME type: application/x-tex
File size: 14833 byte(s)
Updates to cookbook. Updates to scripts. Updates to figures. Working examples added to SCons. Data folder structure included minus data. More folder rejigging.
1
2 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
3 %
4 % Copyright (c) 2003-2009 by University of Queensland
5 % Earth Systems Science Computational Center (ESSCC)
6 % http://www.uq.edu.au/esscc
7 %
8 % 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 %
12 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
13
14
15 \usepackage{subfigure}
16 \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 physici % see http://www.ams.org/tex/amslatex.html
23 \usepackage{alltt} % handy verbatim stuff
24 \usepackage{textcomp}
25
26 %Tony's Commands
27 \newcommand{\editor}[1] {\textit{EDITORIAL: {#1}}}
28 %\newcommand{\eqref}[1] {(\ref{#1})}
29 \newcommand{\esc}{\module{escript}\xspace}
30 \newcommand{\fileex}[1]{\module{\textbackslash examples\textbackslash {#1}}\xspace}
31 \newcommand{\TODO}[1]{\textbf{TODO}:\xspace\textit{#1} }
32 \newcommand{\TBA}[1]{\textbf{TO BE ADDED: \begin{enumerate} {#1} \end{enumerate}}}
33 \newcommand{\ESCRIPT}{\textit{escript}\xspace}
34 \newcommand{\ESYS}{\textit{esys}\xspace}
35 \newcommand{\FINLEY}{\textit{finley}\xspac}
36 \newcommand{\exf}{\textit{/doc/examples/cookbook/}\xspace}
37 \newcommand{\mayavi}{\textit{Mayavi2}\xspace}
38
39 %referencing
40 \newcommand{\reffig}[1]{(Figure \ref{#1})}
41 \newcommand{\refeq}[1]{equation \ref{#1}}
42 \newcommand{\refEq}[1]{Equation \ref{#1}}
43 \newcommand{\refCh}[1]{Chapter \ref{#1}}
44
45 %modules
46 \newcommand{\modesys}{\module{esys}\xspace}
47 \newcommand{\modescript}{\module{esys.escript}\xspace}
48 \newcommand{\modLPDE}{\module{esys.escript.LinearPDEs}\xspace}
49 \newcommand{\modfinley}{\module{esys.finley}\xspace}
50 \newcommand{\modpycad}{\module{esys.pycad}\xspace}
51 \newcommand{\modvtk}{\module{vtk}\xspace}
52 \newcommand{\modnumpy}{\module{numpy}\xspace}
53 \newcommand{\modmpl}{\module{matplotlib}\xspace}
54 \newcommand{\pycad}{\module{esys.pycad}\xspace}
55 \newcommand{\gmsh}{\module{esys.pycad.gmsh}\xspace}
56 \newcommand{\pylab}{\module{pylab}\xspace}
57 \newcommand{\mpl}{\module{matplotlib}\xspace}
58 \newcommand{\numpy}{\module{numpy}\xspace}
59
60 % % define some handy commands for escript stuff
61 % \newcommand{\LINUX}{{\it Linux}\xspace}
62 % \newcommand{\WINDOWS}{{\it MS Windows}\xspace}
63 % \newcommand{\PYTHON}{{\it python}\xspace}
64 % % \newcommand{\netCDF}{{\it netCDF}\cite{NETCDF}\index{netCDF} \xspace}
65 % \newcommand{\netCDF}{{\it netCDF}\index{netCDF}\xspace}
66 % \newcommand{\escript}{\module{esys.escript}\xspace}
67 % \newcommand{\finley}{\module{esys.finley}\xspace}
68 % \newcommand{\esys}{\module{esys}\xspace}
69 % \newcommand{\pyvisi}{\module{esys.pyvisi}\xspace}
70 % \newcommand{\pycad}{\module{esys.pycad}\xspace}
71 % \newcommand{\gmsh}{\module{esys.pycad.gmsh}\xspace}
72 % \newcommand{\gmshextern}{{\it Gmsh}\cite{GMSH}\index{Gmsh} \xspace}
73 % \newcommand{\env}[1]{\textbf{\mbox{#1}}\index{Environment!#1}}
74 % % \newcommand{\MPI}{{\it MPI}\xspace\index{Message Passing Interface!MPI}\cite{MPI}\xspace}
75 % % \newcommand{\OPENMP}{{\it OpenMP}\xspace\index{OpenMP!threading}\cite{OPENMP}\xspace}
76 % \newcommand{\MPI}{{\it MPI}\xspace\index{Message Passing Interface!MPI}\xspace}
77 % \newcommand{\OPENMP}{{\it OpenMP}\xspace\index{OpenMP!threading}\xspace}
78 % \newcommand{\linearPDEs}{\module{esys.escript.linearPDEs}\xspace}
79 % \newcommand{\LinearPDE}{\class{LinearPDE}\xspace}
80 % \newcommand{\timeseries}{\module{esys.timeseries}\xspace}
81 % \newcommand{\modelframe}{\module{esys.modelframe}\xspace}
82 % \newcommand{\pdetools}{\module{esys.pdetools}\xspace}
83 % \newcommand{\esysxml}{{\it esysxml}}
84 %
85 % \newcommand{\AdvectivePDE}{\class{AdvectivePDE}\xspace}
86 % \newcommand{\Poisson}{\class{Poisson}\xspace}
87 % \newcommand{\Helmholtz}{\class{Helmholtz}\xspace}
88 % \newcommand{\Lame}{\class{Lame}\xspace}
89 % \newcommand{\Data}{\class{Data}\xspace}
90 % \newcommand{\EmptyData}{empty \class{Data}\index{empty Data}\xspace}
91 % \newcommand{\Domain}{\class{Domain}\xspace}
92 % %\newcommand{\VTK}{{\it vtk} \cite{VTK}\index{visualization!vtk} \xspace}
93 % \newcommand{\GnuPlot}{{\it gnuplot} \cite{GNUPLOT}\index{visualization!gnuplot}\index{gnuplot}}
94 % \newcommand{\mayavi}{{\it mayavi}\index{visualization!mayavi}\index{mayavi}}
95 % \newcommand{\OpenDX}{{\it OpenDX} \cite{OPENDX}\xspace}
96 % \newcommand{\finleyelement}[1]{{\it #1}\index{finley!#1}}
97 % \newcommand{\False}{\constant{False}\xspace}
98 % \newcommand{\True}{\constant{True}\xspace}
99 % \newcommand{\PCG}{\constant{LinearPDE.PCG}\xspace\index{linear solver!PCG}\index{PCG}}
100 % \newcommand{\BiCGStab}{\constant{LinearPDE.BICGSTAB}\xspace\index{linear solver!BiCGStab}\index{BiCGStab}}
101 % \newcommand{\Direct}{\constant{LinearPDE.DIRECT}\xspace\index{linear solver!Direct}\index{Direct solver}}
102 % \newcommand{\GMRES}{\constant{LinearPDE.GMRES}\xspace\index{linear solver!GMRES}\index{GMRES}}
103 % \newcommand{\PRESTWENTY}{\constant{LinearPDE.PRES20}\xspace\index{linear solver!PRES20}\index{PRES20}}
104 % \newcommand{\JACOBI}{\constant{LinearPDE.JACOBI}\xspace\index{preconditioner!Jacobi}\index{Jacobi}}
105 % \newcommand{\ILU}{\constant{LinearPDE.ILU0}\xspace\index{preconditioner!ILU0}\index{ILU0}}
106 % \newcommand{\ILUT}{\constant{LinearPDE.ILUT}\xspace\index{preconditioner!ILUT}\index{ILUT}}
107 % \newcommand{\LUMPING}{\constant{LinearPDE.LUMPING}\xspace\index{linear solver!lumping}\index{lumping}}
108 % \newcommand{\NOREORDERING}{\constant{LinearPDE.NO\hackscore REORDERING}\xspace}
109 % \newcommand{\MINIMUMFILLIN}{\constant{LinearPDE.MINIMUM\hackscore FILL\hackscore IN}\xspace\index{linear solver!minimum fill-in ordering}\index{minimum fill-in ordering}}
110 % \newcommand{\NESTEDDESCTION}{\constant{LinearPDE.NESTED\hackscore DISSECTION}\xspace\index{linear solver!nested dissection ordering}\index{nested dissection}}
111 %
112 % \newcommand{\FunctionSpace}{\class{FunctionSpace}\xspace}
113 % \newcommand{\Operator}{\class{Operator}\xspace}
114 % \newcommand{\SolutionFS}{solution \class{FunctionSpace}\index{solution}\xspace}
115 % \newcommand{\ReducedSolutionFS}{reduced solution \class{FunctionSpace}\index{solution!reduced}\xspace}
116 % \newcommand{\FunctionOnBoundary}{boundary \class{FunctionSpace}\xspace}
117 % \newcommand{\Function}{general \class{FunctionSpace}\xspace}
118 % \newcommand{\FunctionOnContactZero}{contact \class{FunctionSpace} on side 0\xspace}
119 % \newcommand{\FunctionOnContactOne}{contact \class{FunctionSpace} on side 1\xspace}
120 % \newcommand{\ContinuousFunction}{continuous \class{FunctionSpace}\xspace}
121 % \newcommand{\RankOne}{{rank-1 \Data object}\xspace}
122 % \newcommand{\RankTwo}{{rank-2 \Data object}\xspace}
123 % \newcommand{\RankThree}{{rank-3 \Data object}\xspace}
124 % \newcommand{\RankFour}{{rank-4 \Data object}\xspace}
125 % \newcommand{\Tensor}{{tensor \Data object}\xspace}
126 % \newcommand{\Vector}{{vector \Data object}\xspace}
127 % \newcommand{\Scalar}{{scalar \Data object}\xspace}
128 % \newcommand{\DataSample}{{data sample}\index{data sample}\xspace}
129 % \newcommand{\DataSamplePoints}{{data sample points}\index{data sample!points}\xspace}
130 % \newcommand{\numarray}{\module{numarray}\xspace}
131 % \newcommand{\numarrayNA}{\module{numarray}.\class{NumArray}\xspace}
132 % \newcommand{\Shape}{shape\xspace\index{shape}}
133 % \newcommand{\Rank}{rank\xspace\index{shape}}
134 % \newcommand{\ExampleDirectory}{example directory\xspace}
135 % \newcommand{\ReferenceGuide}{\url{http://shake200.esscc.uq.edu.au/esys/docs.html}\xspace}
136 % \newcommand{\Point}{\class{Point} \xspace}
137 % \newcommand{\PropertySet}{\class{PropertySet} \xspace}
138 % \newcommand{\Design}{\class{Design} \xspace}
139 % \newcommand{\TagMap}{\class{TagMap} \xspace}
140 % \newcommand{\ManifoldOneD}{\class{Manifold1D} \xspace}
141 % \newcommand{\ManifoldTwoD}{\class{Manifold2D} \xspace}
142 % \newcommand{\ManifoldThreeD}{\class{Manifold3D} \xspace}
143 %
144 % % default width for figures
145 % \newcommand{\figwidth}{100mm}
146 % % commands useful in cross-referencing
147 % \newcommand {\Ref}[1] {Reference~\cite{#1}}
148 % \newcommand {\Sec}[1] {Section~\ref{#1}}
149 % \newcommand {\App}[1] {Appendix~\ref{#1}}
150 % \newcommand {\Chap}[1] {Chapter~\ref{#1}}
151 % \newcommand {\etal} {\emph{~et~al.}}
152 % \newcommand {\fig}[1] {Figure~\ref{#1}}
153 % \newcommand {\eqn}[1] {Equation~(\ref{#1})}
154 % \newcommand {\tab}[1] {Table~\ref{#1}}
155 %
156 % % this stops one figure taking up a whole page and lets more text onto
157 % % the one page when a figure exists
158 % \renewcommand{\floatpagefraction}{0.8} % Default = 0.5
159 %
160 % % improved version of caption handling
161 % \usepackage{ccaption}
162 % \captionnamefont{\scshape}
163 % \captionstyle{}
164 % \makeatletter
165 % \renewcommand{\fnum@figure}[1]{\quad\small\textsc{\figurename~\thefigure}:}
166 % \renewcommand{\@makecaption}[2]{%
167 % \vskip\abovecaptionskip
168 % \sbox\@tempboxa{#1: #2}%
169 % \ifdim \wd\@tempboxa >\hsize
170 % \def\baselinestretch{1}\@normalsize
171 % #1: #2\par
172 % \def\baselinestretch{1.5}\@normalsize
173 % \else
174 % \global \@minipagefalse
175 % \hb@xt@\hsize{\hfil\box\@tempboxa\hfil}%
176 % \fi
177 % \vskip\belowcaptionskip}
178 % \makeatother
179 %
180 % % \usepackage{fancyvrb} % fancy verbatim stuff. Needed so code below goes
181 % %%% this code grabbed from the PyScript docs
182 % %%% pyscript.sourceforge.net
183
184 % --------------------------------------------------------------
185 % Code format within \Verb
186 % --------------------------------------------------------------
187
188 % \definecolor{pycolor}{rgb}{0,0.4,0}
189
190 %% \DefineVerbatimEnvironment{python}{Verbatim}
191 %% {frame=leftline,framerule=.5mm,rulecolor=\color{pycolor},
192 %% formatcom=\color{pycolor}\small,fontshape=rm}
193
194 %\DefineShortVerb[formatcom=\color{dgreen}\small,fontshape=sl]{\|}
195
196 % \RecustomVerbatimCommand{\Verb}{Verb}{formatcom=\color{pycolor}\small,fontshape=rm}
197
198 %%% end of grabbed code
199
200 % this is for when one uses pdflatex and therefore needs to load pdf
201 % figures into \includegraphics
202 % \ifpdf
203 % \DeclareGraphicsExtensions{.pdf} % this command defined in graphicx
204 % \pdfcompresslevel=9 % 0: no compression, 9: highest compression
205 % % or, set compress_level 9 in file pdftex.cfg
206 % \else
207 % \DeclareGraphicsExtensions{.eps}
208 % \fi
209 %
210 % % defines the colour for the background of code examples
211 % \definecolor{LightGrey}{gray}{0.9}
212 %
213 % % add the listings package to pretty print the code output
214 % \usepackage{listings}
215 %
216 %
217 % %Some colour definitions added to keep pdflatex happy
218 % %I make no claim that these values are particularly good
219 % \definecolor{Purple}{rgb}{0.7, 0, 0.6}
220 % \definecolor{Tan}{rgb}{0.5,0.5,0.5}
221 % \definecolor{BrickRed}{rgb}{0.7, 0.2, 0.2}
222 %
223 % % All the \color{x} used to be \color[named]{x}
224 % %end color defs
225 %
226 % \lstdefinestyle{myC++}{%
227 % %\lstset{%
228 % language=C++,
229 % showstringspaces=false,
230 % basicstyle=\small\ttfamily,
231 % commentstyle=\color{BrickRed}\ttfamily,
232 % keywordstyle=\color{Purple}\ttfamily,
233 % %identifierstyle=\color{Blue}\ttfamily,
234 % %functionstyle=\color{Blue}\ttfamily,
235 % %typestyle=\color{ForestGreen}\ttfamily,
236 % stringstyle=\color{Tan}\ttfamily,%
237 % morekeywords={,complex,}%
238 % frame=none,%
239 % backgroundcolor=\color{LightGrey}%
240 % }
241 %
242 % \lstdefinestyle{myMatlab}{%
243 % %\lstset{%
244 % language=Matlab,
245 % showstringspaces=false,
246 % basicstyle=\small\ttfamily,
247 % commentstyle=\color{BrickRed}\ttfamily,
248 % keywordstyle=\color{Purple}\ttfamily,
249 % %identifierstyle=\color{Blue}\ttfamily,
250 % %functionstyle=\color{Blue}\ttfamily,
251 % %typestyle=\color{ForestGreen}\ttfamily,
252 % stringstyle=\color{Tan}\ttfamily,%
253 % frame=none,%
254 % backgroundcolor=\color{LightGrey}%
255 % }
256 %
257 % \lstdefinestyle{myScilab}{%
258 % %\lstset{%
259 % language=Scilab,
260 % showstringspaces=false,
261 % basicstyle=\small\ttfamily,
262 % commentstyle=\color{BrickRed}\ttfamily,
263 % keywordstyle=\color{Purple}\ttfamily,
264 % %identifierstyle=\color{Blue}\ttfamily,
265 % %functionstyle=\color{Blue}\ttfamily,
266 % %typestyle=\color{ForestGreen}\ttfamily,
267 % stringstyle=\color{Tan}\ttfamily,%
268 % frame=none,%
269 % backgroundcolor=\color{LightGrey}%
270 % }
271 %
272 % \lstdefinestyle{myShell}{%
273 % %\lstset{%
274 % language=ksh,
275 % showstringspaces=false,
276 % basicstyle=\small\ttfamily,
277 % commentstyle=\color{Black}\ttfamily,
278 % keywordstyle=\color{Black}\ttfamily,
279 % %identifierstyle=\color{Blue}\ttfamily,
280 % %functionstyle=\color{Blue}\ttfamily,
281 % %typestyle=\color{ForestGreen}\ttfamily,
282 % stringstyle=\color{Black}\ttfamily,%
283 % frame=none,%
284 % backgroundcolor=\color{LightGrey}%
285 % }
286 %
287 % \lstdefinestyle{myPython}{%
288 % %\lstset{%
289 % language=python,
290 % showstringspaces=false,
291 % basicstyle=\small\ttfamily,
292 % commentstyle=\color{BrickRed}\ttfamily,
293 % keywordstyle=\color{Purple}\ttfamily,
294 % %identifierstyle=\color{Blue}\ttfamily,
295 % %functionstyle=\color{Blue}\ttfamily,
296 % %typestyle=\color{ForestGreen}\ttfamily,
297 % stringstyle=\color{Tan}\ttfamily,%
298 % frame=none,%
299 % %backgroundcolor=\color{LightGrey}%
300 % }
301 %
302 % \lstdefinestyle{myhtml}{%
303 % %\lstset{%
304 % language=xml,
305 % showstringspaces=false,
306 % basicstyle=\small\ttfamily,
307 % commentstyle=\color{BrickRed}\ttfamily,
308 % keywordstyle=\color{Purple}\ttfamily,
309 % %identifierstyle=\color{Blue}\ttfamily,
310 % %functionstyle=\color{Blue}\ttfamily,
311 % %typestyle=\color{ForestGreen}\ttfamily,
312 % stringstyle=\color{Tan}\ttfamily,
313 % morekeywords={,simulation,prop_dim,error_check,stochastic,%
314 % globals,field,dimensions,lattice,domains,samples,vector,%
315 % components,fourier_space,sequence,integrate,algorithm,%
316 % interval,k_operators,constant,operator_names,vectors,%
317 % output,filename,group,sampling,moments,benchmark,use_double,%
318 % use_wisdom,use_prefs,binary_output,cycles,filter,post_propagation,%
319 % default_value,argv,arg,iterations,cross_propagation,%
320 % use_mpi,paths,seed,noises,author,description,name,type,%
321 % }
322 % frame=none,%
323 % %framerule=2pt,%
324 % backgroundcolor=\color{LightGrey}%
325 % }
326 %
327 % % this implements producing nice code blocks
328 % % it also saves time, typing and
329 % % *should* reduce errors in the text by removing doubling up of code
330 % \lstnewenvironment{xmdsCode}[1][]{\lstset{style=myhtml}\lstset{#1}}{}
331 %
332 % % this implements nicely formatted shell code
333 % \lstnewenvironment{shellCode}[1][]{\lstset{style=myShell}\lstset{#1}}{}
334 %
335 % % this implements nicely formatted Perl code
336 % \lstnewenvironment{perlCode}[1][]{\lstset{style=myPerl}\lstset{#1}}{}
337 %
338 % % this implements nicely formatted Python code
339 % \lstnewenvironment{python}[1][]{\lstset{style=myPython}\lstset{#1}}{}
340 %
341 % % this implements nicely formatted C++ code
342 % \lstnewenvironment{CCode}{\lstset{style=myC++}}{}
343 %
344 % % this implements nicely formatted matlab code
345 % \lstnewenvironment{matlabCode}{\lstset{style=myMatlab}}{}
346 %
347 % % this implements nicely formatted scilab code
348 % \lstnewenvironment{scilabCode}{\lstset{style=myScilab}}{}
349 %
350 % %Ensures that latex doesn't have an error if we don't specify the version
351 % \providecommand{\RepVersion}{Unknown\xspace}
352 % to set this value use:
353 % (pdf)latex '\newcommand{\RepVersion}{version\xspace}\input{guide.tex}'
354 % as your command-line

  ViewVC Help
Powered by ViewVC 1.1.26