Abstract
Reductions operations which are performed using the PUGH driver
This thorn registers a number of reduction operators with the ﬂesh. The reductions are performed
using internals of the PUGH driver, so that this thorn can only be used when CactusPUGH/PUGH is
active.
The reduction operations this thorn registers are
Reduction Operator | Calculates | By |
average${}^{\ast}$, mean${}^{\ast}$ | the average/mean of a grid variable | $\sum GV\u2215N$ |
count | the number of grid points in a grid variable | $N$ |
maximum${}^{\ast}$ | the maximum of a grid variable | $maxGV$ |
minimum${}^{\ast}$ | the minimum of a grid variable | $minGV$ |
norm1, L1Norm | the L1 norm of a grid variable | $\left(\Sigma \left|GV\right|\right)\u2215N$ |
norm2, L2Norm | the L2 norm of a grid variable | $\sqrt[2]{\left(\Sigma |GV{|}^{2}\right)\u2215N}$ |
norm3, L3Norm | the L3 norm of a grid variable | $\sqrt[3]{\left(\Sigma |GV{|}^{3}\right)\u2215N}$ |
norm4, L4Norm | the L4 norm of a grid variable | $\sqrt[4]{\left(\Sigma |GV{|}^{4}\right)\u2215N}$ |
norm_inf, LinfNorm | the Inﬁnitity norm of a grid variable | $max\left|GV\right|$ |
sum${}^{\ast}$ | the sum of the elements of a grid variable | $\sum GV$ |
Reduction operators with multiple names are just synonyms for the same kind of reduction operation. In the formulas $GV$ is the grid variable to be reduced, and $N$ denotes the number of its elements. Reduction operators marked with ${}^{\ast}$ cannot be applied to grid variables of complex datatype.
The following C example illustrates how the get the maximum value of a grid function.