/[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 999 - (hide annotations)
Tue Feb 27 08:12:37 2007 UTC (12 years, 7 months ago) by gross
Original Path: trunk/doc/user/guide_defs.tex
File MIME type: application/x-tex
File size: 13344 byte(s)
start to put some pycad documentation into the users 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 879 \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 gross 593 \newcommand{\ReferenceGuide}{\url{http://www.iservo.edu.au/esys/epydoc/index.html}}
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     \newcommand{\Scene}{\class{Scene}\xspace}
101 jongui 886 \newcommand{\Image}{\class{Image}\xspace}
102     \newcommand{\Text}{\class{Text}\xspace}
103 jongui 879 \newcommand{\DataCollector}{\class{DataCollector}\xspace}
104     \newcommand{\Camera}{\class{Camera}\xspace}
105 jongui 886 \newcommand{\Light}{\class{Light}\xspace}
106 jongui 879 \newcommand{\Map}{\class{Map}\xspace}
107     \newcommand{\MapOnPlane}{\class{MapOnPlane}\xspace}
108     \newcommand{\MapOnClip}{\class{MapOnClip}\xspace}
109 jongui 886 \newcommand{\MapOnScalarClip}{\class{MapOnScalarClip}\xspace}
110     \newcommand{\Arrows}{\class{Arrows}\xspace}
111     \newcommand{\ArrowsOnPlane}{\class{ArrowsOnPlane}\xspace}
112     \newcommand{\ArrowsOnClip}{\class{ArrowsOnClip}\xspace}
113     \newcommand{\IsoSurface}{\class{IsoSurface}\xspace}
114     \newcommand{\IsoSurfaceOnPlane}{\class{IsoSurfaceOnPlane}\xspace}
115     \newcommand{\IsoSurfaceOnClip}{\class{IsoSurfaceOnClip}\xspace}
116 jongui 879 \newcommand{\Contour}{\class{Contour}\xspace}
117     \newcommand{\ContourOnPlane}{\class{ContourOnPlane}\xspace}
118     \newcommand{\ContourOnClip}{\class{ContourOnClip}\xspace}
119     \newcommand{\TensorC}{\class{Tensor}\xspace}
120     \newcommand{\TensorOnPlane}{\class{TensorOnPlane}\xspace}
121     \newcommand{\TensorOnClip}{\class{TensorOnClip}\xspace}
122 jongui 886 \newcommand{\StreamLines}{\class{StreamLines}\xspace}
123 jongui 879 \newcommand{\Carpet}{\class{Carpet}\xspace}
124     \newcommand{\Position}{\class{Position}\xspace}
125     \newcommand{\Transform}{\class{Transform}\xspace}
126     \newcommand{\Style}{\class{Style}\xspace}
127     \newcommand{\BlueToRed}{\class{BlueToRed}\xspace}
128     \newcommand{\RedToBlue}{\class{RedToBlue}\xspace}
129 jongui 886 \newcommand{\Plane}{\class{Plane}\xspace}
130 jgs 102
131 gross 593
132 jgs 82 % default width for figures
133     \newcommand{\figwidth}{100mm}
134     % commands useful in cross-referencing
135     \newcommand {\Ref}[1] {Reference~\cite{#1}}
136     \newcommand {\Sec}[1] {Section~\ref{#1}}
137     \newcommand {\App}[1] {Appendix~\ref{#1}}
138     \newcommand {\Chap}[1] {Chapter~\ref{#1}}
139     \newcommand {\etal} {\emph{~et~al.}}
140     \newcommand {\fig}[1] {Figure~\ref{#1}}
141     \newcommand {\eqn}[1] {Equation~(\ref{#1})}
142     \newcommand {\tab}[1] {Table~\ref{#1}}
143    
144 jgs 102 % this stops one figure taking up a whole page and lets more text onto
145     % the one page when a figure exists
146     \renewcommand{\floatpagefraction}{0.8} % Default = 0.5
147    
148 jgs 82 % improved version of caption handling
149     \usepackage{ccaption}
150     \captionnamefont{\scshape}
151     \captionstyle{}
152     \makeatletter
153     \renewcommand{\fnum@figure}[1]{\quad\small\textsc{\figurename~\thefigure}:}
154     \renewcommand{\@makecaption}[2]{%
155     \vskip\abovecaptionskip
156     \sbox\@tempboxa{#1: #2}%
157     \ifdim \wd\@tempboxa >\hsize
158     \def\baselinestretch{1}\@normalsize
159     #1: #2\par
160     \def\baselinestretch{1.5}\@normalsize
161     \else
162     \global \@minipagefalse
163     \hb@xt@\hsize{\hfil\box\@tempboxa\hfil}%
164     \fi
165     \vskip\belowcaptionskip}
166     \makeatother
167    
168 gross 572 % \usepackage{fancyvrb} % fancy verbatim stuff. Needed so code below goes
169 jgs 82 %%% this code grabbed from the PyScript docs
170     %%% pyscript.sourceforge.net
171    
172     % --------------------------------------------------------------
173     % Code format within \Verb
174     % --------------------------------------------------------------
175    
176 gross 572 % \definecolor{pycolor}{rgb}{0,0.4,0}
177 jgs 82
178 jgs 102 %% \DefineVerbatimEnvironment{python}{Verbatim}
179     %% {frame=leftline,framerule=.5mm,rulecolor=\color{pycolor},
180     %% formatcom=\color{pycolor}\small,fontshape=rm}
181 jgs 82
182     %\DefineShortVerb[formatcom=\color{dgreen}\small,fontshape=sl]{\|}
183    
184 gross 572 % \RecustomVerbatimCommand{\Verb}{Verb}{formatcom=\color{pycolor}\small,fontshape=rm}
185 jgs 82
186     %%% end of grabbed code
187    
188     % this is for when one uses pdflatex and therefore needs to load pdf
189     % figures into \includegraphics
190     \ifpdf
191     \DeclareGraphicsExtensions{.pdf} % this command defined in graphicx
192     \pdfcompresslevel=9 % 0: no compression, 9: highest compression
193     % or, set compress_level 9 in file pdftex.cfg
194     \else
195     \DeclareGraphicsExtensions{.eps}
196     \fi
197 jgs 102
198     % defines the colour for the background of code examples
199     \definecolor{LightGrey}{gray}{0.9}
200    
201     % add the listings package to pretty print the code output
202     \usepackage{listings}
203    
204     \lstdefinestyle{myC++}{%
205     %\lstset{%
206     language=C++,
207     showstringspaces=false,
208     basicstyle=\small\ttfamily,
209     commentstyle=\color[named]{BrickRed}\ttfamily,
210     keywordstyle=\color[named]{Purple}\ttfamily,
211     %identifierstyle=\color[named]{Blue}\ttfamily,
212     %functionstyle=\color[named]{Blue}\ttfamily,
213     %typestyle=\color[named]{ForestGreen}\ttfamily,
214     stringstyle=\color[named]{Tan}\ttfamily,%
215     morekeywords={,complex,}%
216     frame=none,%
217     backgroundcolor=\color{LightGrey}%
218     }
219    
220     \lstdefinestyle{myMatlab}{%
221     %\lstset{%
222     language=Matlab,
223     showstringspaces=false,
224     basicstyle=\small\ttfamily,
225     commentstyle=\color[named]{BrickRed}\ttfamily,
226     keywordstyle=\color[named]{Purple}\ttfamily,
227     %identifierstyle=\color[named]{Blue}\ttfamily,
228     %functionstyle=\color[named]{Blue}\ttfamily,
229     %typestyle=\color[named]{ForestGreen}\ttfamily,
230     stringstyle=\color[named]{Tan}\ttfamily,%
231     frame=none,%
232     backgroundcolor=\color{LightGrey}%
233     }
234    
235     \lstdefinestyle{myScilab}{%
236     %\lstset{%
237     language=Scilab,
238     showstringspaces=false,
239     basicstyle=\small\ttfamily,
240     commentstyle=\color[named]{BrickRed}\ttfamily,
241     keywordstyle=\color[named]{Purple}\ttfamily,
242     %identifierstyle=\color[named]{Blue}\ttfamily,
243     %functionstyle=\color[named]{Blue}\ttfamily,
244     %typestyle=\color[named]{ForestGreen}\ttfamily,
245     stringstyle=\color[named]{Tan}\ttfamily,%
246     frame=none,%
247     backgroundcolor=\color{LightGrey}%
248     }
249    
250     \lstdefinestyle{myShell}{%
251     %\lstset{%
252     language=ksh,
253     showstringspaces=false,
254     basicstyle=\small\ttfamily,
255     commentstyle=\color[named]{Black}\ttfamily,
256     keywordstyle=\color[named]{Black}\ttfamily,
257     %identifierstyle=\color[named]{Blue}\ttfamily,
258     %functionstyle=\color[named]{Blue}\ttfamily,
259     %typestyle=\color[named]{ForestGreen}\ttfamily,
260     stringstyle=\color[named]{Black}\ttfamily,%
261     frame=none,%
262     backgroundcolor=\color{LightGrey}%
263     }
264    
265     \lstdefinestyle{myPython}{%
266     %\lstset{%
267     language=python,
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{myhtml}{%
281     %\lstset{%
282     language=xml,
283     showstringspaces=false,
284     basicstyle=\small\ttfamily,
285     commentstyle=\color[named]{BrickRed}\ttfamily,
286     keywordstyle=\color[named]{Purple}\ttfamily,
287     %identifierstyle=\color[named]{Blue}\ttfamily,
288     %functionstyle=\color[named]{Blue}\ttfamily,
289     %typestyle=\color[named]{ForestGreen}\ttfamily,
290     stringstyle=\color[named]{Tan}\ttfamily,
291     morekeywords={,simulation,prop_dim,error_check,stochastic,%
292     globals,field,dimensions,lattice,domains,samples,vector,%
293     components,fourier_space,sequence,integrate,algorithm,%
294     interval,k_operators,constant,operator_names,vectors,%
295     output,filename,group,sampling,moments,benchmark,use_double,%
296     use_wisdom,use_prefs,binary_output,cycles,filter,post_propagation,%
297     default_value,argv,arg,iterations,cross_propagation,%
298     use_mpi,paths,seed,noises,author,description,name,type,%
299     }
300     frame=none,%
301     %framerule=2pt,%
302     backgroundcolor=\color{LightGrey}%
303     }
304    
305     % this implements producing nice code blocks
306     % it also saves time, typing and
307     % *should* reduce errors in the text by removing doubling up of code
308     \lstnewenvironment{xmdsCode}[1][]{\lstset{style=myhtml}\lstset{#1}}{}
309    
310     % this implements nicely formatted shell code
311     \lstnewenvironment{shellCode}[1][]{\lstset{style=myShell}\lstset{#1}}{}
312    
313     % this implements nicely formatted Perl code
314     \lstnewenvironment{perlCode}[1][]{\lstset{style=myPerl}\lstset{#1}}{}
315    
316     % this implements nicely formatted Python code
317     \lstnewenvironment{python}[1][]{\lstset{style=myPython}\lstset{#1}}{}
318    
319     % this implements nicely formatted C++ code
320     \lstnewenvironment{CCode}{\lstset{style=myC++}}{}
321    
322     % this implements nicely formatted matlab code
323     \lstnewenvironment{matlabCode}{\lstset{style=myMatlab}}{}
324    
325     % this implements nicely formatted scilab code
326     \lstnewenvironment{scilabCode}{\lstset{style=myScilab}}{}
327    

Properties

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

  ViewVC Help
Powered by ViewVC 1.1.26