From 2bcc66d39a69c5d24c809b6748ad0e6f1eb98a4e Mon Sep 17 00:00:00 2001 From: tradke Date: Mon, 14 Apr 2003 10:02:43 +0000 Subject: Document new reduction operator "average". Also mark those operators which cannot be applied to complex datatypes. git-svn-id: http://svn.cactuscode.org/arrangements/CactusPUGH/PUGHReduce/trunk@38 d60812e6-3970-4df4-986e-c251b06effeb --- doc/documentation.tex | 24 +++++++++++++----------- 1 file changed, 13 insertions(+), 11 deletions(-) diff --git a/doc/documentation.tex b/doc/documentation.tex index 1ffbcd7..c83f3f0 100644 --- a/doc/documentation.tex +++ b/doc/documentation.tex @@ -1,7 +1,7 @@ \documentclass{article} % Use the Cactus ThornGuide style file -% (Automatically used from Cactus distribution, if you have a +% (Automatically used from Cactus distribution, if you have a % thorn without the Cactus Flesh download this from the Cactus % homepage at www.cactuscode.org) \usepackage{../../../../doc/ThornGuide/cactus} @@ -23,7 +23,7 @@ Reductions operations which are performed using the PUGH driver %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \section{Purpose} % -This thorn registers a number of reduction operators with the flesh. The +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.\\ @@ -33,17 +33,19 @@ The reduction operations this thorn registers are\\ \hline Reduction Operator & Calculates & By \\ \hline -{\tt minimum} & the minimum of a grid variable & $ \min{ GV } $ \\ -{\tt maximum} & the maximum of a grid variable & $ \max{ GV } $ \\ -{\tt sum} & the sum of the elements of a grid variable & $ \sum{ GV } $ \\ -{\tt norm1} & the L1 norm of a grid variable & $ \left(\Sigma | GV | \right)/n $ \\ -{\tt norm2} & the L2 norm of a grid variable & $ \sqrt{(\Sigma GV^2)/n} $ \\ -{\tt norm\_inf} & the Inf norm of a grid variable & $ \max{| GV |} $ \\ +{\tt average$^*$} & the average of a grid variable & $ \sum{ GV }/n $ \\ +{\tt minimum$^*$} & the minimum of a grid variable & $ \min{ GV } $ \\ +{\tt maximum$^*$} & the maximum of a grid variable & $ \max{ GV } $ \\ +{\tt sum$^*$} & the sum of the elements of a grid variable & $ \sum{ GV } $ \\ +{\tt norm1} & the L1 norm of a grid variable & $ \left(\Sigma | GV | \right)/n $ \\ +{\tt norm2} & the L2 norm of a grid variable & $ \sqrt{(\Sigma GV^2)/n} $ \\ +{\tt norm\_inf} & the Inf norm of a grid variable & $ \max{| GV |} $ \\ \hline \end{tabular}\\ In the formulas $GV$ is the grid variable to be reduced, and $n$ denotes the -number of its elements. +number of its elements. Reduction operators marked with $^*$ cannot be applied +to grid variables of complex datatype. % % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% @@ -69,7 +71,7 @@ function. /* get the handle for the given reduction operator */ reduction_handle = CCTK_ReductionHandle (reduction_name); - if (reduction_handle >= 0) + if (reduction_handle >= 0) { /* now do the reduction using the flesh's generic reduction API (passing in one input, expecting one output value of REAL type) */ @@ -90,7 +92,7 @@ function. else { CCTK_VWarn (1, __LINE__, __FILE__, CCTK_THORNSTRING, - "Invalid reduction operator '%s'", reduction_name); + "Invalid reduction operator '%s'", reduction_name); } \end{verbatim} -- cgit v1.2.3