From 0ac377b3d8889ce60a4d426e2156579502579ddd Mon Sep 17 00:00:00 2001
From: Andreas Kloeckner <inform@tiker.net>
Date: Wed, 10 Jan 2018 23:19:20 -0600
Subject: [PATCH] Fix calculation of infinity norm

---
 grudge/symbolic/operators.py | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/grudge/symbolic/operators.py b/grudge/symbolic/operators.py
index 34ec47aa..84dd4679 100644
--- a/grudge/symbolic/operators.py
+++ b/grudge/symbolic/operators.py
@@ -519,10 +519,10 @@ def norm(p, arg, dd=None):
         return sym.CFunction("sqrt")(norm_squared)
 
     elif p == np.Inf:
-        result = sym.NodalMax()(sym.CFunction("fabs")(arg))
+        result = sym.NodalMax(dd_in=dd)(sym.CFunction("fabs")(arg))
         from pymbolic.primitives import Max
 
-        if isinstance(norm_squared, np.ndarray):
+        if isinstance(result, np.ndarray):
             from functools import reduce
             result = reduce(Max, result)
 
-- 
GitLab