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

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

Parent Directory Parent Directory | Revision Log Revision Log


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

  ViewVC Help
Powered by ViewVC 1.1.26