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

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

Parent Directory Parent Directory | Revision Log Revision Log


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

Properties

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

  ViewVC Help
Powered by ViewVC 1.1.26