From 9886993d1d279f91866cf66099ede1efd57311e4 Mon Sep 17 00:00:00 2001 From: Matthew Smith <mjsmith6@illinois.edu> Date: Fri, 15 Oct 2021 12:40:04 -0500 Subject: [PATCH] add comment explaining why abs() is outside of the sum --- grudge/reductions.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/grudge/reductions.py b/grudge/reductions.py index 6ec71c1d..5e8b4da7 100644 --- a/grudge/reductions.py +++ b/grudge/reductions.py @@ -80,6 +80,8 @@ def _norm(dcoll: DiscretizationCollection, vec, p, dd): return np.fabs(vec) if p == 2: from grudge.op import _apply_mass_operator + # Quantities being summed are real up to rounding error, so abs() can go on + # the outside return abs( nodal_sum( dcoll, -- GitLab