aboutsummaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorallen <allen@d60812e6-3970-4df4-986e-c251b06effeb>2000-11-27 14:11:28 +0000
committerallen <allen@d60812e6-3970-4df4-986e-c251b06effeb>2000-11-27 14:11:28 +0000
commit3444ee7db0e5e200643c58c150bd0c55620f4b0e (patch)
tree66913593f074e2db442e331deeb75ad18de504e2 /doc
parent003f513ec7c2e4f163261d6a9cae7d4ddfba390b (diff)
This commit was generated by cvs2svn to compensate for changes in r2, which
included commits to RCS files with non-trunk default branches. git-svn-id: http://svn.cactuscode.org/arrangements/CactusPUGH/PUGHReduce/trunk@3 d60812e6-3970-4df4-986e-c251b06effeb
Diffstat (limited to 'doc')
-rw-r--r--doc/documention.tex118
1 files changed, 118 insertions, 0 deletions
diff --git a/doc/documention.tex b/doc/documention.tex
new file mode 100644
index 0000000..68f584b
--- /dev/null
+++ b/doc/documention.tex
@@ -0,0 +1,118 @@
+\documentclass{article}
+
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% MANPAGE like description setting for options, use as
+% \begin{Lentry} \item[text] text \end{Lentry}
+
+\usepackage{ifthen,calc}
+
+\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}}
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+
+
+\begin{document}
+
+\title{PUGHReduce}
+\author{Gabrielle Allen, Thomas Radke}
+\date{2000}
+\maketitle
+
+\abstract{Reductions operations which are performed using the PUGH driver}
+
+\section{Purpose}
+
+This thorn registers a number of reduction operators with the flesh. The
+reductions are performed using internals of the PUGH driver, so that this
+thorn can only be used when {\tt CactusPUGH/PUGH} is active.
+
+The reduction operations this thorn registers are
+
+\begin{Lentry}
+\item[maximum]
+ Calculates the maximum of a grid variable
+\item[minimum]
+ Calculates the minimum of a grid variable
+\item[sum]
+ Calculates the sum of the elements of a grid variable
+\item[norm1]
+ Calculates the norm of a grid variable
+ $$
+ \left(\Sigma | GV | \right)/n
+ $$
+ where $n$ is the number of elements
+
+\item[norm2]
+ Calculates the norm of a grid variable
+ $$
+ \sqrt{\Sigma GV^2}/n
+ $$
+ where $n$ is the number of elements
+
+\end{Lentry}
+
+\section{Examples}
+
+\begin{itemize}
+
+\item{} Maximum Value of a Grid Function
+
+{\tt
+\begin{verbatim}
+ int ierr;
+ int handle; /* handle for reduction operator */
+ int index; /* grid variable index */
+ CCTK_REAL *value; /* value returned from reduction */
+ const char *reduction_name = "maximum";
+ /* reduction operation to use */
+
+ handle = CCTK_ReductionHandle (reduction_name);
+ if (handle >= 0)
+ {
+ if ( CCTK_Reduce (cctkGH, 0, handle,
+ 1, CCTK_VARIABLE_REAL,
+ &value, 1, index) == 0
+ && CCTK_MyProc(cctkGH) == 0)
+ {
+ printf("Reduction (%s) value is %f\n",reduction_name,value);
+ }
+ }
+ else
+ {
+ CCTK_WARN(1,"Invalid reduction operator");
+ }
+\end{verbatim}
+}
+
+\end{itemize}
+
+
+% Automatically created from the ccl files by using gmake thorndoc
+\include{interface}
+\include{param}
+\include{schedule}
+
+\end{document}