From 1d560a6445493b0eb384a9ac274cfe31edb6dd9e Mon Sep 17 00:00:00 2001 From: Pablo Brubeck Date: Fri, 12 Jul 2024 14:48:09 +0100 Subject: [PATCH] Adjoint: annotate __itruediv__ --- firedrake/adjoint_utils/function.py | 6 +++--- firedrake/function.py | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/firedrake/adjoint_utils/function.py b/firedrake/adjoint_utils/function.py index d56438fec7..dc034c7155 100644 --- a/firedrake/adjoint_utils/function.py +++ b/firedrake/adjoint_utils/function.py @@ -196,11 +196,11 @@ def wrapper(self, other, **kwargs): return wrapper @staticmethod - def _ad_annotate_idiv(__idiv__): - @wraps(__idiv__) + def _ad_annotate_itruediv(__itruediv__): + @wraps(__itruediv__) def wrapper(self, other, **kwargs): with stop_annotating(): - func = __idiv__(self, other, **kwargs) + func = __itruediv__(self, other, **kwargs) ad_block_tag = kwargs.pop("ad_block_tag", None) annotate = annotate_tape(kwargs) diff --git a/firedrake/function.py b/firedrake/function.py index 7307877de2..ddedebad10 100644 --- a/firedrake/function.py +++ b/firedrake/function.py @@ -521,7 +521,7 @@ def __imul__(self, expr): IMulAssigner(self, expr).assign() return self - @FunctionMixin._ad_annotate_idiv + @FunctionMixin._ad_annotate_itruediv def __itruediv__(self, expr): from firedrake.assign import IDivAssigner IDivAssigner(self, expr).assign()