/[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 1811 - (show annotations)
Thu Sep 25 23:11:13 2008 UTC (10 years, 3 months ago) by ksteube
File MIME type: application/x-tex
File size: 14701 byte(s)
Copyright updated in all files

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

Properties

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

  ViewVC Help
Powered by ViewVC 1.1.26