Skip to content

Commit

Permalink
fix memoization in a couple of spots
Browse files Browse the repository at this point in the history
  • Loading branch information
majosm committed May 23, 2022
1 parent 22d09f4 commit bd79083
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion grudge/dt_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,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 freeze(
Expand Down
2 changes: 1 addition & 1 deletion grudge/reductions.py
Original file line number Diff line number Diff line change
Expand Up @@ -342,7 +342,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
Expand Down

0 comments on commit bd79083

Please sign in to comment.