/[escript]/branches/stage3.1/doc/user/guide_defs.tex
ViewVC logotype

Annotation of /branches/stage3.1/doc/user/guide_defs.tex

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1112 - (hide annotations)
Thu Apr 19 06:31:49 2007 UTC (12 years, 5 months ago) by jongui
Original Path: trunk/doc/user/guide_defs.tex
File MIME type: application/x-tex
File size: 14014 byte(s)
Made some updates to the guide.
1 jgs 82 % $Id$
2 gross 625 %
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 jgs 82
10 gross 625
11 jgs 82 \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 gross 565 \newcommand{\LINUX}{{\it Linux}\xspace}
24 gross 993 \newcommand{\netCDF}{{\it netCDF}\cite{NETCDF}\index{netCDF} \xspace}
25 jgs 107 \newcommand{\escript}{\module{esys.escript}\xspace}
26     \newcommand{\finley}{\module{esys.finley}\xspace}
27 gross 999 \newcommand{\esys}{\module{esys}\xspace}
28 gross 606 \newcommand{\bruce}{\module{esys.bruce}\xspace}
29 gross 565 \newcommand{\pyvisi}{\module{esys.pyvisi}\xspace}
30 gross 993 \newcommand{\pycad}{\module{esys.pycad}\xspace}
31 gross 999 \newcommand{\gmsh}{\module{esys.pycad.gmsh}\xspace}
32     \newcommand{\gmshextern}{{\it Gmsh}\cite{GMSH}\index{Gmsh} \xspace}
33 gross 565
34 gross 999
35 gross 565 \newcommand{\linearPDEs}{\module{esys.escript.linearPDEs}\xspace}
36 jgs 102 \newcommand{\LinearPDE}{\class{LinearPDE}\xspace}
37 jgs 121 \newcommand{\timeseries}{\module{esys.timeseries}\xspace}
38     \newcommand{\modelframe}{\module{esys.modelframe}\xspace}
39     \newcommand{\pdetools}{\module{esys.pdetools}\xspace}
40 gross 565
41 jgs 102 \newcommand{\AdvectivePDE}{\class{AdvectivePDE}\xspace}
42     \newcommand{\Poisson}{\class{Poisson}\xspace}
43 gross 568 \newcommand{\Helmholtz}{\class{Helmholtz}\xspace}
44 gross 653 \newcommand{\Lame}{\class{Lame}\xspace}
45 jgs 82 \newcommand{\Data}{\class{Data}\xspace}
46 jgs 102 \newcommand{\EmptyData}{empty \class{Data} \index{empty Data}\xspace}
47     \newcommand{\Domain}{\class{Domain}\xspace}
48 jongui 1002 %\newcommand{\VTK}{{\it vtk} \cite{VTK}\index{visualization!vtk} \xspace}
49 gross 606 \newcommand{\GnuPlot}{{\it gnuplot} \cite{GNUPLOT}\index{visualization!gnuplot}\index{gnuplot}}
50 gross 565 \newcommand{\mayavi}{{\it mayavi} \index{visualization!mayavi}\index{mayavi}}
51 gross 599 \newcommand{\OpenDX}{{\it OpenDX} \cite{OPENDX}\xspace}
52 jgs 102 \newcommand{\finleyelement}[1]{{\it #1}\index{finley!#1}}
53     \newcommand{\False}{\constant{False}\xspace}
54     \newcommand{\True}{\constant{True}\xspace}
55 gross 653 \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 jgs 82
68 jgs 102 \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 gross 565 \newcommand{\RankOne}{{rank-1 \Data object}\xspace}
78 jgs 102 \newcommand{\RankTwo}{{rank-2 \Data object}\xspace}
79     \newcommand{\RankThree}{{rank-3 \Data object}\xspace}
80     \newcommand{\RankFour}{{rank-4 \Data object}\xspace}
81 gross 660 \newcommand{\Tensor}{{tensor \Data object}\xspace}
82     \newcommand{\Vector}{{vector \Data object}\xspace}
83 jgs 102 \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 gross 565 \newcommand{\Rank}{rank\xspace\index{shape}}
89 jgs 102 \newcommand{\ExampleDirectory}{example directory\xspace}
90 jongui 1002 \newcommand{\ReferenceGuide}{\url{http://www.iservo.edu.au/esys/epydoc/index.html} \xspace}
91 gross 999 \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 jgs 102
99 jongui 879 % handy commands for pyvisi
100 jongui 1002 \newcommand{\VTK}{{\it VTK} \xspace}
101     \newcommand{\VTKUrl}{\url{http://www.vtk.org/}\xspace}
102 jongui 879 \newcommand{\Scene}{\class{Scene}\xspace}
103     \newcommand{\Camera}{\class{Camera}\xspace}
104 jongui 886 \newcommand{\Light}{\class{Light}\xspace}
105 jongui 1035 \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 jongui 879 \newcommand{\Map}{\class{Map}\xspace}
113 jongui 1035 \newcommand{\MapOnPlaneCut}{\class{MapOnPlaneCut}\xspace}
114     \newcommand{\MapOnPlaneClip}{\class{MapOnPlaneClip}\xspace}
115 jongui 886 \newcommand{\MapOnScalarClip}{\class{MapOnScalarClip}\xspace}
116 jongui 1035 \newcommand{\GlyphThreeD}{\class{Glyph3D}\xspace}
117 jongui 1078 \newcommand{\MaskPoints}{\class{MaskPoints}\xspace}
118 jongui 1035 \newcommand{\Velocity}{\class{Velocity}\xspace}
119     \newcommand{\VelocityOnPlaneCut}{\class{VelocityOnPlaneCut}\xspace}
120     \newcommand{\VelocityOnPlaneClip}{\class{VelocityOnPlaneClip}\xspace}
121     \newcommand{\Sphere}{\class{Sphere}\xspace}
122     \newcommand{\TensorGlyph}{\class{TensorGlyph}\xspace}
123     \newcommand{\Ellipsoid}{\class{Ellipsoid}\xspace}
124     \newcommand{\EllipsoidOnPlaneCut}{\class{EllipsoidOnPlaneCut}\xspace}
125     \newcommand{\EllipsoidOnPlaneClip}{\class{EllipsoidOnPlaneClip}\xspace}
126     \newcommand{\ContourModule}{\class{ContourModule}\xspace}
127 jongui 879 \newcommand{\Contour}{\class{Contour}\xspace}
128 jongui 1035 \newcommand{\ContourOnPlaneCut}{\class{ContourOnPlaneCut}\xspace}
129     \newcommand{\ContourOnPlaneClip}{\class{ContourOnPlaneClip}\xspace}
130     \newcommand{\PointSource}{\class{PointSource}\xspace}
131     \newcommand{\StreamLineModule}{\class{StreamLineModule}\xspace}
132     \newcommand{\Tube}{\class{Tube}\xspace}
133     \newcommand{\StreamLine}{\class{StreamLine}\xspace}
134     \newcommand{\Warp}{\class{Warp}\xspace}
135 jongui 879 \newcommand{\Carpet}{\class{Carpet}\xspace}
136 jongui 1035 \newcommand{\PlaneSource}{\class{PlaneSource}\xspace}
137     \newcommand{\Image}{\class{Image}\xspace}
138 jongui 1112 \newcommand{\Logo}{\class{Logo}\xspace}
139     \newcommand{\ImageReslice}{\class{ImageReslice}\xspace}
140 jongui 879 \newcommand{\Position}{\class{Position}\xspace}
141 jongui 1081 \newcommand{\thumbnailwidth}{50mm}
142 jgs 102
143 jgs 82 % default width for figures
144     \newcommand{\figwidth}{100mm}
145     % commands useful in cross-referencing
146     \newcommand {\Ref}[1] {Reference~\cite{#1}}
147     \newcommand {\Sec}[1] {Section~\ref{#1}}
148     \newcommand {\App}[1] {Appendix~\ref{#1}}
149     \newcommand {\Chap}[1] {Chapter~\ref{#1}}
150     \newcommand {\etal} {\emph{~et~al.}}
151     \newcommand {\fig}[1] {Figure~\ref{#1}}
152     \newcommand {\eqn}[1] {Equation~(\ref{#1})}
153     \newcommand {\tab}[1] {Table~\ref{#1}}
154    
155 jgs 102 % this stops one figure taking up a whole page and lets more text onto
156     % the one page when a figure exists
157     \renewcommand{\floatpagefraction}{0.8} % Default = 0.5
158    
159 jgs 82 % improved version of caption handling
160     \usepackage{ccaption}
161     \captionnamefont{\scshape}
162     \captionstyle{}
163     \makeatletter
164     \renewcommand{\fnum@figure}[1]{\quad\small\textsc{\figurename~\thefigure}:}
165     \renewcommand{\@makecaption}[2]{%
166     \vskip\abovecaptionskip
167     \sbox\@tempboxa{#1: #2}%
168     \ifdim \wd\@tempboxa >\hsize
169     \def\baselinestretch{1}\@normalsize
170     #1: #2\par
171     \def\baselinestretch{1.5}\@normalsize
172     \else
173     \global \@minipagefalse
174     \hb@xt@\hsize{\hfil\box\@tempboxa\hfil}%
175     \fi
176     \vskip\belowcaptionskip}
177     \makeatother
178    
179 gross 572 % \usepackage{fancyvrb} % fancy verbatim stuff. Needed so code below goes
180 jgs 82 %%% this code grabbed from the PyScript docs
181     %%% pyscript.sourceforge.net
182    
183     % --------------------------------------------------------------
184     % Code format within \Verb
185     % --------------------------------------------------------------
186    
187 gross 572 % \definecolor{pycolor}{rgb}{0,0.4,0}
188 jgs 82
189 jgs 102 %% \DefineVerbatimEnvironment{python}{Verbatim}
190     %% {frame=leftline,framerule=.5mm,rulecolor=\color{pycolor},
191     %% formatcom=\color{pycolor}\small,fontshape=rm}
192 jgs 82
193     %\DefineShortVerb[formatcom=\color{dgreen}\small,fontshape=sl]{\|}
194    
195 gross 572 % \RecustomVerbatimCommand{\Verb}{Verb}{formatcom=\color{pycolor}\small,fontshape=rm}
196 jgs 82
197     %%% end of grabbed code
198    
199     % this is for when one uses pdflatex and therefore needs to load pdf
200     % figures into \includegraphics
201     \ifpdf
202     \DeclareGraphicsExtensions{.pdf} % this command defined in graphicx
203     \pdfcompresslevel=9 % 0: no compression, 9: highest compression
204     % or, set compress_level 9 in file pdftex.cfg
205     \else
206     \DeclareGraphicsExtensions{.eps}
207     \fi
208 jgs 102
209     % defines the colour for the background of code examples
210     \definecolor{LightGrey}{gray}{0.9}
211    
212     % add the listings package to pretty print the code output
213     \usepackage{listings}
214    
215     \lstdefinestyle{myC++}{%
216     %\lstset{%
217     language=C++,
218     showstringspaces=false,
219     basicstyle=\small\ttfamily,
220     commentstyle=\color[named]{BrickRed}\ttfamily,
221     keywordstyle=\color[named]{Purple}\ttfamily,
222     %identifierstyle=\color[named]{Blue}\ttfamily,
223     %functionstyle=\color[named]{Blue}\ttfamily,
224     %typestyle=\color[named]{ForestGreen}\ttfamily,
225     stringstyle=\color[named]{Tan}\ttfamily,%
226     morekeywords={,complex,}%
227     frame=none,%
228     backgroundcolor=\color{LightGrey}%
229     }
230    
231     \lstdefinestyle{myMatlab}{%
232     %\lstset{%
233     language=Matlab,
234     showstringspaces=false,
235     basicstyle=\small\ttfamily,
236     commentstyle=\color[named]{BrickRed}\ttfamily,
237     keywordstyle=\color[named]{Purple}\ttfamily,
238     %identifierstyle=\color[named]{Blue}\ttfamily,
239     %functionstyle=\color[named]{Blue}\ttfamily,
240     %typestyle=\color[named]{ForestGreen}\ttfamily,
241     stringstyle=\color[named]{Tan}\ttfamily,%
242     frame=none,%
243     backgroundcolor=\color{LightGrey}%
244     }
245    
246     \lstdefinestyle{myScilab}{%
247     %\lstset{%
248     language=Scilab,
249     showstringspaces=false,
250     basicstyle=\small\ttfamily,
251     commentstyle=\color[named]{BrickRed}\ttfamily,
252     keywordstyle=\color[named]{Purple}\ttfamily,
253     %identifierstyle=\color[named]{Blue}\ttfamily,
254     %functionstyle=\color[named]{Blue}\ttfamily,
255     %typestyle=\color[named]{ForestGreen}\ttfamily,
256     stringstyle=\color[named]{Tan}\ttfamily,%
257     frame=none,%
258     backgroundcolor=\color{LightGrey}%
259     }
260    
261     \lstdefinestyle{myShell}{%
262     %\lstset{%
263     language=ksh,
264     showstringspaces=false,
265     basicstyle=\small\ttfamily,
266     commentstyle=\color[named]{Black}\ttfamily,
267     keywordstyle=\color[named]{Black}\ttfamily,
268     %identifierstyle=\color[named]{Blue}\ttfamily,
269     %functionstyle=\color[named]{Blue}\ttfamily,
270     %typestyle=\color[named]{ForestGreen}\ttfamily,
271     stringstyle=\color[named]{Black}\ttfamily,%
272     frame=none,%
273     backgroundcolor=\color{LightGrey}%
274     }
275    
276     \lstdefinestyle{myPython}{%
277     %\lstset{%
278     language=python,
279     showstringspaces=false,
280     basicstyle=\small\ttfamily,
281     commentstyle=\color[named]{BrickRed}\ttfamily,
282     keywordstyle=\color[named]{Purple}\ttfamily,
283     %identifierstyle=\color[named]{Blue}\ttfamily,
284     %functionstyle=\color[named]{Blue}\ttfamily,
285     %typestyle=\color[named]{ForestGreen}\ttfamily,
286     stringstyle=\color[named]{Tan}\ttfamily,%
287     frame=none,%
288     %backgroundcolor=\color{LightGrey}%
289     }
290    
291     \lstdefinestyle{myhtml}{%
292     %\lstset{%
293     language=xml,
294     showstringspaces=false,
295     basicstyle=\small\ttfamily,
296     commentstyle=\color[named]{BrickRed}\ttfamily,
297     keywordstyle=\color[named]{Purple}\ttfamily,
298     %identifierstyle=\color[named]{Blue}\ttfamily,
299     %functionstyle=\color[named]{Blue}\ttfamily,
300     %typestyle=\color[named]{ForestGreen}\ttfamily,
301     stringstyle=\color[named]{Tan}\ttfamily,
302     morekeywords={,simulation,prop_dim,error_check,stochastic,%
303     globals,field,dimensions,lattice,domains,samples,vector,%
304     components,fourier_space,sequence,integrate,algorithm,%
305     interval,k_operators,constant,operator_names,vectors,%
306     output,filename,group,sampling,moments,benchmark,use_double,%
307     use_wisdom,use_prefs,binary_output,cycles,filter,post_propagation,%
308     default_value,argv,arg,iterations,cross_propagation,%
309     use_mpi,paths,seed,noises,author,description,name,type,%
310     }
311     frame=none,%
312     %framerule=2pt,%
313     backgroundcolor=\color{LightGrey}%
314     }
315    
316     % this implements producing nice code blocks
317     % it also saves time, typing and
318     % *should* reduce errors in the text by removing doubling up of code
319     \lstnewenvironment{xmdsCode}[1][]{\lstset{style=myhtml}\lstset{#1}}{}
320    
321     % this implements nicely formatted shell code
322     \lstnewenvironment{shellCode}[1][]{\lstset{style=myShell}\lstset{#1}}{}
323    
324     % this implements nicely formatted Perl code
325     \lstnewenvironment{perlCode}[1][]{\lstset{style=myPerl}\lstset{#1}}{}
326    
327     % this implements nicely formatted Python code
328     \lstnewenvironment{python}[1][]{\lstset{style=myPython}\lstset{#1}}{}
329    
330     % this implements nicely formatted C++ code
331     \lstnewenvironment{CCode}{\lstset{style=myC++}}{}
332    
333     % this implements nicely formatted matlab code
334     \lstnewenvironment{matlabCode}{\lstset{style=myMatlab}}{}
335    
336     % this implements nicely formatted scilab code
337     \lstnewenvironment{scilabCode}{\lstset{style=myScilab}}{}
338    

Properties

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

  ViewVC Help
Powered by ViewVC 1.1.26