aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorschnetter <schnetter@7daa882c-dc44-4453-834e-278d26b18e6a>2005-11-10 01:30:00 +0000
committerschnetter <schnetter@7daa882c-dc44-4453-834e-278d26b18e6a>2005-11-10 01:30:00 +0000
commit109c3eab97262b870525c76796981abb23901af0 (patch)
treee3df4cd11e12d10b11083669caedd3789d674b05
parentd9b67dec27e5c814c0b3f4587b7fd9648100ce9f (diff)
Describe the local reduction operators and their definitions, both
with and without weights. git-svn-id: http://svn.cactuscode.org/arrangements/CactusBase/LocalReduce/trunk@70 7daa882c-dc44-4453-834e-278d26b18e6a
-rw-r--r--doc/documentation.tex75
1 files changed, 73 insertions, 2 deletions
diff --git a/doc/documentation.tex b/doc/documentation.tex
index 2bf7d95..bb001c8 100644
--- a/doc/documentation.tex
+++ b/doc/documentation.tex
@@ -86,8 +86,7 @@
% the date your document was last changed, if your document is in CVS,
% please use:
-% \date{$ $Date$ $}
-\date{May 26 2004}
+\date{$ $Date$ $}
\maketitle
@@ -143,6 +142,78 @@ mpi\_operation and perform\_division.
Please refer to the TestLocalReduce thorn in the CactusTest
arrangement.
+\section{Reduction Operations}
+
+\subsection{Basic Reduction Operations}
+The following reduction operations are imlemented. $a_i$ are the
+values that are reduced, $i \in [1 \ldots n]$.
+\begin{description}
+\item[count:] The number of values
+$$ \mathrm{count} := n $$
+\item[sum:] The sum of the values
+$$ \mathrm{sum} := \sum_i a_i $$
+\item[product:] The product of the values
+$$ \mathrm{product} := \prod_i a_i $$
+\item[sum2:] The sum of the squares of the values
+$$ \mathrm{sum2} := \sum_i a_i^2 $$
+\item[sumabs:] The sum of the absolute values
+$$ \mathrm{sum2} := \sum_i |a_i| $$
+\item[sumabs2:] The sum of the squares of the absolute values
+$$ \mathrm{sumabs2} := \sum_i |a_i|^2 $$
+\item[min:] The minimum of the values
+$$ \mathrm{min} := \min_i a_i $$
+\item[max:] The maximum of the values
+$$ \mathrm{max} := \max_i a_i $$
+\item[maxabs:] The maximum of the absolute values
+$$ \mathrm{maxabs} := \max_i |a_i| $$
+\end{description}
+Note that the above definitions are for both real and complex values.
+For $n=0$, the result of the reduction operation is $0$, except for
+$\mathrm{product}$, which is $1$, $\mathrm{min}$, which is $+\infty$,
+and $\mathrm{max}$, which is $-\infty$.
+
+\subsection{High-level Reduction Operations}
+The following high-level reduction operations are also implemented.
+They can be defined in terms of the basic reduction operations above.
+\begin{description}
+\item[average:] The algebraic mean of the values
+$$ \mathrm{average} := \mathrm{sum} / \mathrm{count} $$
+\item[norm1:] The $L_1$ norm, i.e., the sum of the absolute values
+$$ \mathrm{norm1} := \mathrm{sumabs} / \mathrm{count} $$
+\item[norm2:] The $L_2$ norm, i.e., the Pythagorean norm
+$$ \mathrm{norm2} := \sqrt{\mathrm{sumabs2} / \mathrm{count}} $$
+\item[norm\_inf:] The $L_\infty$ norm
+$$ \mathrm{norm\_inf} := \mathrm{maxabs} $$
+\end{description}
+
+\subsection{Weighted Reduction Operations}
+It is often convenient to assign a weight $w_i$ to each value $a_i$.
+In this case, the basic reduction operations are redefined as follows.
+\begin{description}
+\item[count:] The number of values
+$$ \mathrm{count} := \sum_i w_i $$
+\item[sum:] The sum of the values
+$$ \mathrm{sum} := \sum_i w_i a_i $$
+\item[product:] The product of the values
+$$ \mathrm{product} := \exp \sum_i w_i \log a_i $$
+\item[sum2:] The sum of the squares of the values
+$$ \mathrm{sum2} := \sum_i w_i a_i^2 $$
+\item[sumabs:] The sum of the absolute values
+$$ \mathrm{sum2} := \sum_i w_i |a_i| $$
+\item[sumabs2:] The sum of the squares of the absolute values
+$$ \mathrm{sumabs2} := \sum_i w_i |a_i|^2 $$
+\item[min:] The minimum of the values
+$$ \mathrm{min} := \min_i w_i \ne 0: a_i $$
+\item[max:] The maximum of the values
+$$ \mathrm{max} := \max_i w_i \ne 0: a_i $$
+\item[maxabs:] The maximum of the absolute values
+$$ \mathrm{maxabs} := \max_i w_i \ne 0: |a_i| $$
+\end{description}
+The notation $\min_i w_i \ne 0: a_i$ means: ``The minimum of $a_i$
+where $i$ runs over all values where $w_i \ne 0$''. The definition of
+the high-level reduction operations does not change when weights are
+present.
+
% Do not delete next line
% END CACTUS THORNGUIDE