summaryrefslogtreecommitdiff
path: root/doc/MaintGuide/MaintGuide.tex
blob: 64fe1805550f14a9d4ca909f7cf5c7278300955b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
% /*@@
%   @file      MaintGuide.tex
%   @date      Wed Jan 12 14:38:29 2000
%   @author    Tom Goodale
%   @desc 
%   
%   @enddesc 
%   @version $Header$
% @@*/

\documentclass{report}
\usepackage{fancyhdr,ifthen,calc}
\usepackage{graphicx}

\makeatletter
\@addtoreset{chapter}{part}
\makeatother

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\parskip = 2 pt
\oddsidemargin = 0 cm
\textwidth = 16 cm
\topmargin = -1 cm
\textheight = 24 cm

\usepackage{tocloft}
\addtolength{\cftchapnumwidth}{0.5em}
\addtolength{\cftsecnumwidth}{0.5em}
\addtolength{\cftsubsecnumwidth}{0.5em}
\addtolength{\cftsubsubsecnumwidth}{0.5em}


\def\q{\bf QUERY: }
\def\t{\tt \obeylines }

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\newenvironment{CCTKroutine}{\newpage}{}
\newenvironment{CCTKsyn}{\noindent\begin{tabular}{@{}p{3cm}cp{11cm}}&&\\{\bf Synopis} \hfill&&\\}{\end{tabular}}
\newenvironment{CCTKpar}{\noindent\begin{tabular}{@{}p{3cm}cp{11cm}}&&\\{\bf Parameters} \hfill&&\\}{\end{tabular}}
\newcommand{\CCTKname}[1]{\noindent{\t #1}\hrule}
\newcommand{\CCTKdesc}[1]{\vskip .3cm \noindent #1}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%Define some saveboxes to hold data
\newsavebox{\cctkbox}
\newsavebox{\cctkcargbox}
\newsavebox{\cctkfargbox}
\newsavebox{\cctkfargdefs}
\newsavebox{\cctkcsepbox}
\newsavebox{\cctkfsepbox}
\newsavebox{\cctkfdefssep}
\newsavebox{\cctkcprefix}
\newsavebox{\cctkfprefix}
\newsavebox{\cctkparambox}


%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% MANPAGE like description setting for options, use as 
% \begin{Lentry} \item[text] text  \end{Lentry}

\newcommand{\entrylabel}[1]{\mbox{\textsf{#1}}\hfil}
\newenvironment{entry}
  {\begin{list}{}
    {\renewcommand{\makelabel}{\entrylabel}
      \setlength{\labelwidth}{90pt}
      \setlength{\leftmargin}{\labelwidth+\labelsep}
    }
  }
  {\end{list}}

\newlength{\Mylen}
\newcommand{\Lentrylabel}[1]{%
  \settowidth{\Mylen}{\textsf{#1}}%
  \ifthenelse{\lengthtest{\Mylen > \labelwidth}}%
    {\parbox[b]{\labelwidth} %  term > labelwidth
      {\makebox[0pt][l]{\textsf{#1}}\\}} %
    {\textsf{#1}} %

  \hfil\relax}
\newenvironment{Lentry}
  {\renewcommand{\entrylabel}{\Lentrylabel}
   \begin{entry}}
  {\end{entry}}
%%%%%%



\newenvironment{CCTKFunc}[2]
        {\sbox{\cctkbox}{#1}
         \newpage
         \noindent{\t #1}\hrule 
         \vskip .3cm \noindent #2\\
%Clear the saveboxes - this may not be neccessary
         \sbox{\cctkcargbox}{}
         \sbox{\cctkfargbox}{}
         \sbox{\cctkfargdefs}{}
         \sbox{\cctkcsepbox}{}
         \sbox{\cctkfsepbox}{}
         \sbox{\cctkfdefssep}{}
         \sbox{\cctkcprefix}{}
         \sbox{\cctkfprefix}{}
%A command to add an argument - takes ctype, ftype, name
         \newcommand{\argument}[3]
         {\sbox{\cctkcargbox}{\usebox{\cctkcargbox}\usebox{\cctkcsepbox} ##1 ##3} 
          \sbox{\cctkcsepbox}{,}
          \sbox{\cctkfargbox}{\usebox{\cctkfargbox}\usebox{\cctkfsepbox} ##3} 
          \sbox{\cctkfsepbox}{,}
          \sbox{\cctkfargdefs}{\noindent{}\vbox{\noindent\usebox{\cctkfargdefs}\noindent\usebox{\cctkfdefssep}\noindent {}  ##2 ##3}}
          \sbox{\cctkfdefssep}{\\}
         }
%Use this command if it is a subroutine, same args as \argument
         \newcommand{\subroutine}[3]
         {\sbox{\cctkcprefix}{##1 ##3 =}
          \sbox{\cctkfprefix}{call}
          \sbox{\cctkfargbox}{##3\usebox{\cctkfsepbox} \usebox{\cctkfargbox}} 
          \sbox{\cctkfsepbox}{,}
          \sbox{\cctkfargdefs}{\noindent{}\vbox{\noindent ##2 ##3 \usebox{\cctkfdefssep}\noindent{}\usebox{\cctkfargdefs}}}
          \sbox{\cctkfdefssep}{\\}
         }

%Use this command if it is a function, same args as \argument
         \newcommand{\function}[3]
         {\sbox{\cctkcprefix}{##1 ##3 =}
          \sbox{\cctkfprefix}{##3 = }
          \sbox{\cctkfargdefs}{\noindent{}\vbox{\noindent ##2 ##3 \usebox{\cctkfdefssep}\noindent{}\usebox{\cctkfargdefs}}}
          \sbox{\cctkfdefssep}{\\}
         }

%Use this to display the arguments
         \newcommand{\showargs}
         {\noindent
          \begin{tabular}{@{}p{3cm}cp{11cm}}&&\\
{\bf Synopis} \hfill&&\\ 
\hfill {\bf C} && {\t \usebox{\cctkcprefix} \usebox{\cctkbox}(\usebox{\cctkcargbox})}\\
\hfill {\bf Fortran} && 
{\t \usebox{\cctkfprefix} \usebox{\cctkbox}(\usebox{\cctkfargbox} ) }\\
&&\noindent\usebox{\cctkfargdefs}
\end{tabular}\\
}

%Use this to display the C arguments
         \newcommand{\showcargs}
         {\noindent
          \begin{tabular}{@{}p{3cm}cp{11cm}}&&\\
{\bf Synopis} \hfill&&\\ 
\hfill {\bf C} && {\t \usebox{\cctkcprefix} \usebox{\cctkbox}(\usebox{\cctkcargbox})}\\
\end{tabular}\\
}


%Environment for describing parameters
          \newenvironment{params}{
             \noindent\begin{tabular}{@{}p{3cm}cp{11cm}}&&\\{\bf Parameters} \hfill&&\\}{\end{tabular}\\}
%Command to describe a parameter, takes name and description
          \newcommand{\parameter}[2]{
\\
\hfill {\t ##1} &-&##2
\\
}
%Environment for discussion
    \newenvironment{discussion}
    {\noindent
     \begin{tabular}{@{}p{14cm}}
     \\{\bf Discussion} \hfill\\
    }
    {
     \end{tabular}\\
    }
%Environment for examples
    \newenvironment{examples}
    {\noindent
     \begin{tabular}{@{}p{14cm}}
     \\{\bf Examples} \hfill\\
    }
    {
     \end{tabular}\\\\
    }
%Environment for describing errors
     \newenvironment{errorcodes}
    {\noindent
     \begin{tabular}{@{}p{6cm}cp{10cm}}&&\\
     {\bf Errors} \hfill&&\\}
    {\end{tabular}\\}
%Command to describe an errorcode, takes name and description
          \newcommand{\errorcode}[2]{
\\
\hfill {\t ##1} &-&##2
\\
}

}
        {
        }

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Takes three arguments - the name of the document, the revision, and
% the date.
% Additionally ther eis an optional first argument with the version number

\newcommand{\cactustitlepage}[4][4.0]
{
\thispagestyle{empty}
\setlength{\parindent}{0mm}
\setlength{\parskip}{0mm}
\vspace*{\stretch{1}}
\rule{\linewidth}{1mm}
\begin{flushright}
  \Huge Cactus #1\\[5mm]
        #2
\end{flushright}
\rule{\linewidth}{1mm}
\vspace*{\stretch{2}}
\begin{center}
\includegraphics[angle=0,width=5cm]{bincactus2.eps}
\end{center}
\vspace*{\stretch{2}}
\begin{center}
   \Large #3 \\[3mm]
          #4
\end{center}
\newpage
}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\newenvironment{cactuspart}[4]
{
  \clearpage
  \renewcommand{\thepage}{\Alph{part}\arabic{page}}
  % Redefine the plain style
  \fancypagestyle{plain}
  {
    \fancyhf{} % Clear all header and footer fields
    \lfoot{#3}
    \cfoot{#4}
    \rfoot{\thepage/\pageref{lastpage:\thepart}}
    \renewcommand{\headrulewidth}{0.0pt}  
    \renewcommand{\footrulewidth}{0.4pt}  
    \renewcommand{\thepage}{\Alph{part}\arabic{page}}
  }

  % Make sure it's arabic numbering
  \pagenumbering{arabic}
  % Start the page counter at 1
  \setcounter{page}{1}
  % Start a new part
  \renewcommand{\thepage}{\Alph{part}\arabic{page}}
  \part{#2}
  \setcounter{part}{#1}
  % Redefine the page
  % Set up fancy headings.
  \lfoot{#3}
  \cfoot{#4}
  \rfoot{\thepage/\pageref{lastpage:\thepart}}
  \renewcommand{\headrulewidth}{0.4pt}
  \renewcommand{\footrulewidth}{0.4pt}
}
{
  % Remember the last page of the 
  \label{lastpage:\thepart}
  \clearpage
}


%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\begin{document}

\cactustitlepage{Maintainers' Guide DRAFT VERSION}{$$Revision$$}{$$Date$$}

\setcounter{page}{1}

% Table of contents
\pagenumbering{roman}

\tableofcontents

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\renewcommand{\thepart}{\Alph{part}}
\renewcommand{\thechapter}{\Alph{part}\arabic{chapter}}
\renewcommand{\thepage}{\Alph{part}\arabic{page}}
\pagestyle{fancy}

\newpage

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\include{Preface}

\include{Style}

\include{Procedures}

\include{Makesystem}

\include{CST}

\include{Main}

\include{Comm}

\include{IO}

\include{Util}

\include{Schedule}

\include{Appendices}


%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\end{document}





%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%% The rest is just odd bits for use in future documents.
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%


%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%