/[escript]/trunk/doc/user/guide_defs.tex
ViewVC logotype

Annotation of /trunk/doc/user/guide_defs.tex

Parent Directory Parent Directory | Revision Log Revision Log


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

Properties

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

  ViewVC Help
Powered by ViewVC 1.1.26