From 5fffa0b56d406c9e089c12e56466effafd500757 Mon Sep 17 00:00:00 2001 From: Matthew Smith Date: Fri, 8 Apr 2022 10:46:15 -0500 Subject: [PATCH] fix memoization in a couple of spots --- grudge/dt_utils.py | 2 +- grudge/reductions.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/grudge/dt_utils.py b/grudge/dt_utils.py index 711d55c41..3bbf374b5 100644 --- a/grudge/dt_utils.py +++ b/grudge/dt_utils.py @@ -94,7 +94,7 @@ def characteristic_lengthscales( methods has been used as a guide. Any concrete time integrator will likely require scaling of the values returned by this routine. """ - @memoize_in(dcoll, (characteristic_lengthscales, + @memoize_in(dcoll, (characteristic_lengthscales, dd, "compute_characteristic_lengthscales")) def _compute_characteristic_lengthscales(): return actx.freeze( diff --git a/grudge/reductions.py b/grudge/reductions.py index ab106c8c4..6087b5725 100644 --- a/grudge/reductions.py +++ b/grudge/reductions.py @@ -344,7 +344,7 @@ def _apply_elementwise_reduction( ) ) else: - @memoize_in(actx, (_apply_elementwise_reduction, + @memoize_in(actx, (_apply_elementwise_reduction, dd, "elementwise_%s_prg" % op_name)) def elementwise_prg(): # FIXME: This computes the reduction value redundantly for each