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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 660 - (show annotations)
Fri Mar 24 08:43:21 2006 UTC (13 years, 7 months ago) by gross
Original Path: trunk/doc/user/guide_defs.tex
File MIME type: application/x-tex
File size: 11215 byte(s)
that does not look to bad now although more stuff could be 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{\escript}{\module{esys.escript}\xspace}
25 \newcommand{\finley}{\module{esys.finley}\xspace}
26 \newcommand{\bruce}{\module{esys.bruce}\xspace}
27 \newcommand{\pyvisi}{\module{esys.pyvisi}\xspace}
28
29 \newcommand{\linearPDEs}{\module{esys.escript.linearPDEs}\xspace}
30 \newcommand{\LinearPDE}{\class{LinearPDE}\xspace}
31 \newcommand{\timeseries}{\module{esys.timeseries}\xspace}
32 \newcommand{\modelframe}{\module{esys.modelframe}\xspace}
33 \newcommand{\pdetools}{\module{esys.pdetools}\xspace}
34
35 \newcommand{\AdvectivePDE}{\class{AdvectivePDE}\xspace}
36 \newcommand{\Poisson}{\class{Poisson}\xspace}
37 \newcommand{\Helmholtz}{\class{Helmholtz}\xspace}
38 \newcommand{\Lame}{\class{Lame}\xspace}
39 \newcommand{\Data}{\class{Data}\xspace}
40 \newcommand{\EmptyData}{empty \class{Data} \index{empty Data}\xspace}
41 \newcommand{\Domain}{\class{Domain}\xspace}
42 \newcommand{\VTK}{{\it vtk} \cite{VTK}\index{visualization!vtk}\index{vtk}}
43 \newcommand{\GnuPlot}{{\it gnuplot} \cite{GNUPLOT}\index{visualization!gnuplot}\index{gnuplot}}
44 \newcommand{\mayavi}{{\it mayavi} \index{visualization!mayavi}\index{mayavi}}
45 \newcommand{\OpenDX}{{\it OpenDX} \cite{OPENDX}\xspace}
46 \newcommand{\finleyelement}[1]{{\it #1}\index{finley!#1}}
47 \newcommand{\False}{\constant{False}\xspace}
48 \newcommand{\True}{\constant{True}\xspace}
49 \newcommand{\PCG}{\constant{LinearPDE.PCG}\xspace\index{linear solver!PCG}\index{PCG}}
50 \newcommand{\BiCGStab}{\constant{LinearPDE.BICGSTAB}\xspace\index{linear solver!BiCGStab}\index{BiCGStab}}
51 \newcommand{\Direct}{\constant{LinearPDE.DIRECT}\xspace\index{linear solver!Direct}\index{Direct solver}}
52 \newcommand{\GMRES}{\constant{LinearPDE.GMRES}\xspace\index{linear solver!GMRES}\index{GMRES}}
53 \newcommand{\PRESTWENTY}{\constant{LinearPDE.PRES20}\xspace\index{linear solver!PRES20}\index{PRES20}}
54 \newcommand{\JACOBI}{\constant{LinearPDE.JACOBI}\xspace\index{preconditioner!Jacobi}\index{Jacobi}}
55 \newcommand{\ILU}{\constant{LinearPDE.ILU0}\xspace\index{preconditioner!ILU0}\index{ILU0}}
56 \newcommand{\ILUT}{\constant{LinearPDE.ILUT}\xspace\index{preconditioner!ILUT}\index{ILUT}}
57 \newcommand{\LUMPING}{\constant{LinearPDE.LUMPING}\xspace\index{linear solver!lumping}\index{lumping}}
58 \newcommand{\NOREORDERING}{\constant{LinearPDE.NO\hackscore REORDERING}\xspace}
59 \newcommand{\MINIMUMFILLIN}{\constant{LinearPDE.MINIMUM\hackscore FILL\hackscore IN}\xspace\index{linear solver!minimum fill-in ordering}\index{minimum fill-in ordering}}
60 \newcommand{\NESTEDDESCTION}{\constant{LinearPDE.NESTED\hackscore DISSECTION}\xspace\index{linear solver!nested dissection ordering}\index{nested dissection}}
61
62 \newcommand{\Scene}{\class{Scene}\xspace}
63
64 \newcommand{\FunctionSpace}{\class{FunctionSpace}\xspace}
65 \newcommand{\Operator}{\class{Operator}\xspace}
66 \newcommand{\SolutionFS}{solution \class{FunctionSpace}\index{solution}\xspace}
67 \newcommand{\ReducedSolutionFS}{reduced solution \class{FunctionSpace}\index{solution!reduced}\xspace}
68 \newcommand{\FunctionOnBoundary}{boundary \class{FunctionSpace}\xspace}
69 \newcommand{\Function}{general \class{FunctionSpace}\xspace}
70 \newcommand{\FunctionOnContactZero}{contact \class{FunctionSpace} on side 0\xspace}
71 \newcommand{\FunctionOnContactOne}{contact \class{FunctionSpace} on side 1\xspace}
72 \newcommand{\ContinuousFunction}{continuous \class{FunctionSpace}\xspace}
73 \newcommand{\RankOne}{{rank-1 \Data object}\xspace}
74 \newcommand{\RankTwo}{{rank-2 \Data object}\xspace}
75 \newcommand{\RankThree}{{rank-3 \Data object}\xspace}
76 \newcommand{\RankFour}{{rank-4 \Data object}\xspace}
77 \newcommand{\Tensor}{{tensor \Data object}\xspace}
78 \newcommand{\Vector}{{vector \Data object}\xspace}
79 \newcommand{\Scalar}{{scalar \Data object}\xspace}
80 \newcommand{\DataSample}{{data sample} \index{data sample}\xspace}
81 \newcommand{\DataSamplePoints}{{data sample points} \index{data sample!points}\xspace}
82 \newcommand{\numarray}{\module{numarray}\xspace}
83 \newcommand{\Shape}{shape\xspace\index{shape}}
84 \newcommand{\Rank}{rank\xspace\index{shape}}
85 \newcommand{\ExampleDirectory}{example directory\xspace}
86 \newcommand{\ReferenceGuide}{\url{http://www.iservo.edu.au/esys/epydoc/index.html}}
87
88
89
90
91 % default width for figures
92 \newcommand{\figwidth}{100mm}
93 % commands useful in cross-referencing
94 \newcommand {\Ref}[1] {Reference~\cite{#1}}
95 \newcommand {\Sec}[1] {Section~\ref{#1}}
96 \newcommand {\App}[1] {Appendix~\ref{#1}}
97 \newcommand {\Chap}[1] {Chapter~\ref{#1}}
98 \newcommand {\etal} {\emph{~et~al.}}
99 \newcommand {\fig}[1] {Figure~\ref{#1}}
100 \newcommand {\eqn}[1] {Equation~(\ref{#1})}
101 \newcommand {\tab}[1] {Table~\ref{#1}}
102
103 % this stops one figure taking up a whole page and lets more text onto
104 % the one page when a figure exists
105 \renewcommand{\floatpagefraction}{0.8} % Default = 0.5
106
107 % improved version of caption handling
108 \usepackage{ccaption}
109 \captionnamefont{\scshape}
110 \captionstyle{}
111 \makeatletter
112 \renewcommand{\fnum@figure}[1]{\quad\small\textsc{\figurename~\thefigure}:}
113 \renewcommand{\@makecaption}[2]{%
114 \vskip\abovecaptionskip
115 \sbox\@tempboxa{#1: #2}%
116 \ifdim \wd\@tempboxa >\hsize
117 \def\baselinestretch{1}\@normalsize
118 #1: #2\par
119 \def\baselinestretch{1.5}\@normalsize
120 \else
121 \global \@minipagefalse
122 \hb@xt@\hsize{\hfil\box\@tempboxa\hfil}%
123 \fi
124 \vskip\belowcaptionskip}
125 \makeatother
126
127 % \usepackage{fancyvrb} % fancy verbatim stuff. Needed so code below goes
128 %%% this code grabbed from the PyScript docs
129 %%% pyscript.sourceforge.net
130
131 % --------------------------------------------------------------
132 % Code format within \Verb
133 % --------------------------------------------------------------
134
135 % \definecolor{pycolor}{rgb}{0,0.4,0}
136
137 %% \DefineVerbatimEnvironment{python}{Verbatim}
138 %% {frame=leftline,framerule=.5mm,rulecolor=\color{pycolor},
139 %% formatcom=\color{pycolor}\small,fontshape=rm}
140
141 %\DefineShortVerb[formatcom=\color{dgreen}\small,fontshape=sl]{\|}
142
143 % \RecustomVerbatimCommand{\Verb}{Verb}{formatcom=\color{pycolor}\small,fontshape=rm}
144
145 %%% end of grabbed code
146
147 % this is for when one uses pdflatex and therefore needs to load pdf
148 % figures into \includegraphics
149 \ifpdf
150 \DeclareGraphicsExtensions{.pdf} % this command defined in graphicx
151 \pdfcompresslevel=9 % 0: no compression, 9: highest compression
152 % or, set compress_level 9 in file pdftex.cfg
153 \else
154 \DeclareGraphicsExtensions{.eps}
155 \fi
156
157 % defines the colour for the background of code examples
158 \definecolor{LightGrey}{gray}{0.9}
159
160 % add the listings package to pretty print the code output
161 \usepackage{listings}
162
163 \lstdefinestyle{myC++}{%
164 %\lstset{%
165 language=C++,
166 showstringspaces=false,
167 basicstyle=\small\ttfamily,
168 commentstyle=\color[named]{BrickRed}\ttfamily,
169 keywordstyle=\color[named]{Purple}\ttfamily,
170 %identifierstyle=\color[named]{Blue}\ttfamily,
171 %functionstyle=\color[named]{Blue}\ttfamily,
172 %typestyle=\color[named]{ForestGreen}\ttfamily,
173 stringstyle=\color[named]{Tan}\ttfamily,%
174 morekeywords={,complex,}%
175 frame=none,%
176 backgroundcolor=\color{LightGrey}%
177 }
178
179 \lstdefinestyle{myMatlab}{%
180 %\lstset{%
181 language=Matlab,
182 showstringspaces=false,
183 basicstyle=\small\ttfamily,
184 commentstyle=\color[named]{BrickRed}\ttfamily,
185 keywordstyle=\color[named]{Purple}\ttfamily,
186 %identifierstyle=\color[named]{Blue}\ttfamily,
187 %functionstyle=\color[named]{Blue}\ttfamily,
188 %typestyle=\color[named]{ForestGreen}\ttfamily,
189 stringstyle=\color[named]{Tan}\ttfamily,%
190 frame=none,%
191 backgroundcolor=\color{LightGrey}%
192 }
193
194 \lstdefinestyle{myScilab}{%
195 %\lstset{%
196 language=Scilab,
197 showstringspaces=false,
198 basicstyle=\small\ttfamily,
199 commentstyle=\color[named]{BrickRed}\ttfamily,
200 keywordstyle=\color[named]{Purple}\ttfamily,
201 %identifierstyle=\color[named]{Blue}\ttfamily,
202 %functionstyle=\color[named]{Blue}\ttfamily,
203 %typestyle=\color[named]{ForestGreen}\ttfamily,
204 stringstyle=\color[named]{Tan}\ttfamily,%
205 frame=none,%
206 backgroundcolor=\color{LightGrey}%
207 }
208
209 \lstdefinestyle{myShell}{%
210 %\lstset{%
211 language=ksh,
212 showstringspaces=false,
213 basicstyle=\small\ttfamily,
214 commentstyle=\color[named]{Black}\ttfamily,
215 keywordstyle=\color[named]{Black}\ttfamily,
216 %identifierstyle=\color[named]{Blue}\ttfamily,
217 %functionstyle=\color[named]{Blue}\ttfamily,
218 %typestyle=\color[named]{ForestGreen}\ttfamily,
219 stringstyle=\color[named]{Black}\ttfamily,%
220 frame=none,%
221 backgroundcolor=\color{LightGrey}%
222 }
223
224 \lstdefinestyle{myPython}{%
225 %\lstset{%
226 language=python,
227 showstringspaces=false,
228 basicstyle=\small\ttfamily,
229 commentstyle=\color[named]{BrickRed}\ttfamily,
230 keywordstyle=\color[named]{Purple}\ttfamily,
231 %identifierstyle=\color[named]{Blue}\ttfamily,
232 %functionstyle=\color[named]{Blue}\ttfamily,
233 %typestyle=\color[named]{ForestGreen}\ttfamily,
234 stringstyle=\color[named]{Tan}\ttfamily,%
235 frame=none,%
236 %backgroundcolor=\color{LightGrey}%
237 }
238
239 \lstdefinestyle{myhtml}{%
240 %\lstset{%
241 language=xml,
242 showstringspaces=false,
243 basicstyle=\small\ttfamily,
244 commentstyle=\color[named]{BrickRed}\ttfamily,
245 keywordstyle=\color[named]{Purple}\ttfamily,
246 %identifierstyle=\color[named]{Blue}\ttfamily,
247 %functionstyle=\color[named]{Blue}\ttfamily,
248 %typestyle=\color[named]{ForestGreen}\ttfamily,
249 stringstyle=\color[named]{Tan}\ttfamily,
250 morekeywords={,simulation,prop_dim,error_check,stochastic,%
251 globals,field,dimensions,lattice,domains,samples,vector,%
252 components,fourier_space,sequence,integrate,algorithm,%
253 interval,k_operators,constant,operator_names,vectors,%
254 output,filename,group,sampling,moments,benchmark,use_double,%
255 use_wisdom,use_prefs,binary_output,cycles,filter,post_propagation,%
256 default_value,argv,arg,iterations,cross_propagation,%
257 use_mpi,paths,seed,noises,author,description,name,type,%
258 }
259 frame=none,%
260 %framerule=2pt,%
261 backgroundcolor=\color{LightGrey}%
262 }
263
264 % this implements producing nice code blocks
265 % it also saves time, typing and
266 % *should* reduce errors in the text by removing doubling up of code
267 \lstnewenvironment{xmdsCode}[1][]{\lstset{style=myhtml}\lstset{#1}}{}
268
269 % this implements nicely formatted shell code
270 \lstnewenvironment{shellCode}[1][]{\lstset{style=myShell}\lstset{#1}}{}
271
272 % this implements nicely formatted Perl code
273 \lstnewenvironment{perlCode}[1][]{\lstset{style=myPerl}\lstset{#1}}{}
274
275 % this implements nicely formatted Python code
276 \lstnewenvironment{python}[1][]{\lstset{style=myPython}\lstset{#1}}{}
277
278 % this implements nicely formatted C++ code
279 \lstnewenvironment{CCode}{\lstset{style=myC++}}{}
280
281 % this implements nicely formatted matlab code
282 \lstnewenvironment{matlabCode}{\lstset{style=myMatlab}}{}
283
284 % this implements nicely formatted scilab code
285 \lstnewenvironment{scilabCode}{\lstset{style=myScilab}}{}
286

Properties

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

  ViewVC Help
Powered by ViewVC 1.1.26