Skip to content

Commit

Permalink
Fix re-evaluation bug in Cartesian gradient of power dimensional fields.
Browse files Browse the repository at this point in the history
  • Loading branch information
kburns committed Mar 30, 2024
1 parent 191879c commit f263415
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions dedalus/core/operators.py
Original file line number Diff line number Diff line change
Expand Up @@ -2322,6 +2322,9 @@ def __init__(self, operand, coordsys, out=None):
if args[i] == 0:
args[i] = 2*operand
args[i].args[0] = 0
original_args = list(args[i].original_args)
original_args[0] = 0
args[i].original_args = tuple(original_args)
bases = self._build_bases(*args)
args = [convert(arg, bases) for arg in args]
LinearOperator.__init__(self, *args, out=out)
Expand Down

0 comments on commit f263415

Please sign in to comment.