/[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 3094 - (show annotations)
Fri Aug 13 08:38:06 2010 UTC (8 years, 11 months ago) by gross
File MIME type: application/x-tex
File size: 16684 byte(s)
The MPI and sequational GAUSS_SEIDEL have been merged.
The couring and main diagonal pointer is now manged by the patternm which means that they are calculated once only even if the preconditioner is deleted.



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