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

Properties

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

  ViewVC Help
Powered by ViewVC 1.1.26