From f26341574fbd5951d716f1ad6e6d5a54576a7d65 Mon Sep 17 00:00:00 2001 From: "Keaton J. Burns" Date: Sat, 30 Mar 2024 10:09:14 -0400 Subject: [PATCH] Fix re-evaluation bug in Cartesian gradient of power dimensional fields. --- dedalus/core/operators.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/dedalus/core/operators.py b/dedalus/core/operators.py index 9d4be8ea..d6a099fa 100644 --- a/dedalus/core/operators.py +++ b/dedalus/core/operators.py @@ -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)