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

Properties

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

  ViewVC Help
Powered by ViewVC 1.1.26