/[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 2589 - (show annotations)
Wed Aug 5 23:06:35 2009 UTC (10 years, 1 month ago) by ahallam
Original Path: trunk/doc/cookbook/TEXT/cookbook_defs.tex
File MIME type: application/x-tex
File size: 14410 byte(s)


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

  ViewVC Help
Powered by ViewVC 1.1.26