/[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 1211 - (show annotations)
Wed Jul 4 05:16:46 2007 UTC (12 years, 4 months ago) by jongui
File MIME type: application/x-tex
File size: 14562 byte(s)
- Fixed some minor bugs.
- Added a new feature called 'MapOnScalarClipWithRotation' that clips a two-dimensional data with a scalar value and subsequently rotating it to create a three-dimensional effect.
- Corresponding examples, test cases and documentation of the new module have also been added.
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{\Camera}{\class{Camera}\xspace}
104 \newcommand{\Light}{\class{Light}\xspace}
105 \newcommand{\DataCollector}{\class{DataCollector}\xspace}
106 \newcommand{\ImageReader}{\class{ImageReader}\xspace}
107 \newcommand{\TextTwoD}{\class{Text2D}\xspace}
108 \newcommand{\ActorTwoD}{\class{Actor2D}\xspace}
109 \newcommand{\ActorThreeD}{\class{Actor3D}\xspace}
110 \newcommand{\Transform}{\class{Transform}\xspace}
111 \newcommand{\Clipper}{\class{Clipper}\xspace}
112 \newcommand{\Map}{\class{Map}\xspace}
113 \newcommand{\MapOnPlaneCut}{\class{MapOnPlaneCut}\xspace}
114 \newcommand{\MapOnPlaneClip}{\class{MapOnPlaneClip}\xspace}
115 \newcommand{\MapOnScalarClip}{\class{MapOnScalarClip}\xspace}
116 \newcommand{\MapOnScalarClipWithRotation}{\class{MapOnScalarClipWithRotation}\xspace}
117 \newcommand{\GlyphThreeD}{\class{Glyph3D}\xspace}
118 \newcommand{\MaskPoints}{\class{MaskPoints}\xspace}
119 \newcommand{\Velocity}{\class{Velocity}\xspace}
120 \newcommand{\VelocityOnPlaneCut}{\class{VelocityOnPlaneCut}\xspace}
121 \newcommand{\VelocityOnPlaneClip}{\class{VelocityOnPlaneClip}\xspace}
122 \newcommand{\Sphere}{\class{Sphere}\xspace}
123 \newcommand{\TensorGlyph}{\class{TensorGlyph}\xspace}
124 \newcommand{\Ellipsoid}{\class{Ellipsoid}\xspace}
125 \newcommand{\EllipsoidOnPlaneCut}{\class{EllipsoidOnPlaneCut}\xspace}
126 \newcommand{\EllipsoidOnPlaneClip}{\class{EllipsoidOnPlaneClip}\xspace}
127 \newcommand{\ContourModule}{\class{ContourModule}\xspace}
128 \newcommand{\Contour}{\class{Contour}\xspace}
129 \newcommand{\ContourOnPlaneCut}{\class{ContourOnPlaneCut}\xspace}
130 \newcommand{\ContourOnPlaneClip}{\class{ContourOnPlaneClip}\xspace}
131 \newcommand{\PointSource}{\class{PointSource}\xspace}
132 \newcommand{\StreamLineModule}{\class{StreamLineModule}\xspace}
133 \newcommand{\Tube}{\class{Tube}\xspace}
134 \newcommand{\StreamLine}{\class{StreamLine}\xspace}
135 \newcommand{\Warp}{\class{Warp}\xspace}
136 \newcommand{\Carpet}{\class{Carpet}\xspace}
137 \newcommand{\PlaneSource}{\class{PlaneSource}\xspace}
138 \newcommand{\Image}{\class{Image}\xspace}
139 \newcommand{\Logo}{\class{Logo}\xspace}
140 \newcommand{\ImageReslice}{\class{ImageReslice}\xspace}
141 \newcommand{\Position}{\class{Position}\xspace}
142 \newcommand{\DataSetMapper}{\class{DataSetMapper}\xspace}
143 \newcommand{\Legend}{\class{Legend}\xspace}
144 \newcommand{\ScalarBar}{\class{ScalarBar}\xspace}
145 \newcommand{\Movie}{\class{Movie}\xspace}
146 \newcommand{\CubeSource}{\class{CubeSource}\xspace}
147 \newcommand{\Rectangle}{\class{Rectangle}\xspace}
148 \newcommand{\LocalPosition}{\class{LocalPosition}\xspace}
149 \newcommand{\GlobalPosition}{\class{GlobalPosition}\xspace}
150 \newcommand{\Rotation}{\class{Rotation}\xspace}
151 \newcommand{\thumbnailwidth}{50mm}
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
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 \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 \lstdefinestyle{myC++}{%
226 %\lstset{%
227 language=C++,
228 showstringspaces=false,
229 basicstyle=\small\ttfamily,
230 commentstyle=\color[named]{BrickRed}\ttfamily,
231 keywordstyle=\color[named]{Purple}\ttfamily,
232 %identifierstyle=\color[named]{Blue}\ttfamily,
233 %functionstyle=\color[named]{Blue}\ttfamily,
234 %typestyle=\color[named]{ForestGreen}\ttfamily,
235 stringstyle=\color[named]{Tan}\ttfamily,%
236 morekeywords={,complex,}%
237 frame=none,%
238 backgroundcolor=\color{LightGrey}%
239 }
240
241 \lstdefinestyle{myMatlab}{%
242 %\lstset{%
243 language=Matlab,
244 showstringspaces=false,
245 basicstyle=\small\ttfamily,
246 commentstyle=\color[named]{BrickRed}\ttfamily,
247 keywordstyle=\color[named]{Purple}\ttfamily,
248 %identifierstyle=\color[named]{Blue}\ttfamily,
249 %functionstyle=\color[named]{Blue}\ttfamily,
250 %typestyle=\color[named]{ForestGreen}\ttfamily,
251 stringstyle=\color[named]{Tan}\ttfamily,%
252 frame=none,%
253 backgroundcolor=\color{LightGrey}%
254 }
255
256 \lstdefinestyle{myScilab}{%
257 %\lstset{%
258 language=Scilab,
259 showstringspaces=false,
260 basicstyle=\small\ttfamily,
261 commentstyle=\color[named]{BrickRed}\ttfamily,
262 keywordstyle=\color[named]{Purple}\ttfamily,
263 %identifierstyle=\color[named]{Blue}\ttfamily,
264 %functionstyle=\color[named]{Blue}\ttfamily,
265 %typestyle=\color[named]{ForestGreen}\ttfamily,
266 stringstyle=\color[named]{Tan}\ttfamily,%
267 frame=none,%
268 backgroundcolor=\color{LightGrey}%
269 }
270
271 \lstdefinestyle{myShell}{%
272 %\lstset{%
273 language=ksh,
274 showstringspaces=false,
275 basicstyle=\small\ttfamily,
276 commentstyle=\color[named]{Black}\ttfamily,
277 keywordstyle=\color[named]{Black}\ttfamily,
278 %identifierstyle=\color[named]{Blue}\ttfamily,
279 %functionstyle=\color[named]{Blue}\ttfamily,
280 %typestyle=\color[named]{ForestGreen}\ttfamily,
281 stringstyle=\color[named]{Black}\ttfamily,%
282 frame=none,%
283 backgroundcolor=\color{LightGrey}%
284 }
285
286 \lstdefinestyle{myPython}{%
287 %\lstset{%
288 language=python,
289 showstringspaces=false,
290 basicstyle=\small\ttfamily,
291 commentstyle=\color[named]{BrickRed}\ttfamily,
292 keywordstyle=\color[named]{Purple}\ttfamily,
293 %identifierstyle=\color[named]{Blue}\ttfamily,
294 %functionstyle=\color[named]{Blue}\ttfamily,
295 %typestyle=\color[named]{ForestGreen}\ttfamily,
296 stringstyle=\color[named]{Tan}\ttfamily,%
297 frame=none,%
298 %backgroundcolor=\color{LightGrey}%
299 }
300
301 \lstdefinestyle{myhtml}{%
302 %\lstset{%
303 language=xml,
304 showstringspaces=false,
305 basicstyle=\small\ttfamily,
306 commentstyle=\color[named]{BrickRed}\ttfamily,
307 keywordstyle=\color[named]{Purple}\ttfamily,
308 %identifierstyle=\color[named]{Blue}\ttfamily,
309 %functionstyle=\color[named]{Blue}\ttfamily,
310 %typestyle=\color[named]{ForestGreen}\ttfamily,
311 stringstyle=\color[named]{Tan}\ttfamily,
312 morekeywords={,simulation,prop_dim,error_check,stochastic,%
313 globals,field,dimensions,lattice,domains,samples,vector,%
314 components,fourier_space,sequence,integrate,algorithm,%
315 interval,k_operators,constant,operator_names,vectors,%
316 output,filename,group,sampling,moments,benchmark,use_double,%
317 use_wisdom,use_prefs,binary_output,cycles,filter,post_propagation,%
318 default_value,argv,arg,iterations,cross_propagation,%
319 use_mpi,paths,seed,noises,author,description,name,type,%
320 }
321 frame=none,%
322 %framerule=2pt,%
323 backgroundcolor=\color{LightGrey}%
324 }
325
326 % this implements producing nice code blocks
327 % it also saves time, typing and
328 % *should* reduce errors in the text by removing doubling up of code
329 \lstnewenvironment{xmdsCode}[1][]{\lstset{style=myhtml}\lstset{#1}}{}
330
331 % this implements nicely formatted shell code
332 \lstnewenvironment{shellCode}[1][]{\lstset{style=myShell}\lstset{#1}}{}
333
334 % this implements nicely formatted Perl code
335 \lstnewenvironment{perlCode}[1][]{\lstset{style=myPerl}\lstset{#1}}{}
336
337 % this implements nicely formatted Python code
338 \lstnewenvironment{python}[1][]{\lstset{style=myPython}\lstset{#1}}{}
339
340 % this implements nicely formatted C++ code
341 \lstnewenvironment{CCode}{\lstset{style=myC++}}{}
342
343 % this implements nicely formatted matlab code
344 \lstnewenvironment{matlabCode}{\lstset{style=myMatlab}}{}
345
346 % this implements nicely formatted scilab code
347 \lstnewenvironment{scilabCode}{\lstset{style=myScilab}}{}
348

Properties

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

  ViewVC Help
Powered by ViewVC 1.1.26