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

Properties

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

  ViewVC Help
Powered by ViewVC 1.1.26