PUGHReduce

Gabrielle Allen, Thomas Radke

Date

Abstract

Reductions operations which are performed using the PUGH driver

1 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 CactusPUGH/PUGH is active.

The reduction operations this thorn registers are




Reduction Operator Calculates By



average, meanthe average/mean of a grid variable GV N
count the number of grid points in a grid variableN
maximum the maximum of a grid variable maxGV
minimum the minimum of a grid variable minGV
norm1, L1Norm the L1 norm of a grid variable Σ|GV |N
norm2, L2Norm the L2 norm of a grid variable (Σ|GV |2)N2
norm3, L3Norm the L3 norm of a grid variable (Σ|GV |3)N3
norm4, L4Norm the L4 norm of a grid variable (Σ|GV |4)N4
norm_inf, LinfNorm the Infinitity norm of a grid variable max|GV |
sum the sum of the elements of a grid variable 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 cannot be applied to grid variables of complex datatype.

2 Examples

The following C example illustrates how the get the maximum value of a grid function.