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

  ViewVC Help
Powered by ViewVC 1.1.26