/[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 3306 - (show annotations)
Mon Oct 25 05:09:13 2010 UTC (10 years, 10 months ago) by caltinay
File MIME type: application/x-tex
File size: 15263 byte(s)
Commented declaremodule and modulesynopsis.

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

Properties

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

  ViewVC Help
Powered by ViewVC 1.1.26