[Developers] [Patches] Make ADMConstraints GF public

Jonathan Thornburg jthorn at aei.mpg.de
Sun Sep 17 13:11:45 CDT 2006

```Hi, Erik,

> The "sum" reduction has the problem that it can easily lead to large
> absolute
> differences that are small relative differences.  The "average" reduction
> behaves better in that respect, and, apart from that, tests the same
> thing.  I
> suggest to avoid using the sum reduction in test cases.

| I'm confused:  Since    average := sum / sum_of_weights   , why does
|  average   not also "lead to large absolute differences that are small
| relative differences"?

> Because of the division by "sum_of_weights".  If you assume 10^6 grid points,
> then the absolute difference in the sum is 10^6 times the absolution
> difference in the average.  If you allow an absolute difference of 10^-12,
> then there are often cases where the average is deemed accurate enough, while
> the sum is deemed inaccurate.
>
> Let me give an example:
>
> Assume there are 10^6 grid points, all having the value 1.0 plus a small error
> of the order of 10^-14.  Then we have
>
> the exact values:
>
> 	average: 1.0
> 	sum: 10^6
>
> the perturbed values:
>
> 	average: 1.0 + 10^-14
> 	sum: 10^6 + 10^-8
>
> The relative error of the perturbed values with respect to the accurate values
> is 10^-14 for both the average and the sum.  The absolute errors differ; the
> absolute error for the average is 10^-14, while the absolute error of the sum
> is 10^-8.

Ok, I see your point.  I hadn't realised we (are so foolish as to)
compare non-O(1) values with absolute tolerances.  Using relative
tolerances is *much* preferred...

ciao,

--
-- Jonathan Thornburg <jthorn at aei.mpg.de>
Max-Planck-Institut fuer Gravitationsphysik (Albert-Einstein-Institut),
Golm, Germany, "Old Europe"     http://www.aei.mpg.de/~jthorn/home.html
"Washing one's hands of the conflict between the powerful and the
powerless means to side with the powerful, not to be neutral."
-- quote by Freire / poster by Oxfam

```