Skip to content

Commit

Permalink
Adjoint: annotate __itruediv__
Browse files Browse the repository at this point in the history
  • Loading branch information
pbrubeck committed Jul 12, 2024
1 parent 7372172 commit 1d560a6
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions firedrake/adjoint_utils/function.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion firedrake/function.py
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down

0 comments on commit 1d560a6

Please sign in to comment.