Skip to content

Commit

Permalink
linting
Browse files Browse the repository at this point in the history
  • Loading branch information
Ig-dolci committed Jul 11, 2024
1 parent 3d4de3e commit 2f2d4a2
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion firedrake/adjoint_utils/checkpointing.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
"""A module providing support for disk checkpointing of the adjoint tape."""
from pyadjoint import get_working_tape, OverloadedType
from pyadjoint import get_working_tape
from pyadjoint.tape import TapePackageData
from pyop2.mpi import COMM_WORLD
import tempfile
Expand Down
4 changes: 2 additions & 2 deletions firedrake/adjoint_utils/dirichletbc.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
from pyadjoint.overloaded_type import FloatingType
from .blocks import DirichletBCBlock
from pyadjoint.tape import stop_annotating, annotate_tape
import weakref


class DirichletBCMixin(FloatingType):
@staticmethod
Expand Down Expand Up @@ -41,7 +41,7 @@ def _ad_create_checkpoint(self):
return None

return deps[0]

def _ad_clear_checkpoint(self, checkpoint):
checkpoint = None
return checkpoint
Expand Down
2 changes: 1 addition & 1 deletion firedrake/adjoint_utils/function.py
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,7 @@ def _ad_create_checkpoint(self):
return CheckpointFunction(self)
else:
return self.copy(deepcopy=True)

def _ad_clear_checkpoint(self, checkpoint):
tape = get_working_tape()
if tape._checkpoint_manager:
Expand Down
2 changes: 1 addition & 1 deletion firedrake/adjoint_utils/mesh.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ def wrapper(self, *args, **kwargs):
@no_annotations
def _ad_create_checkpoint(self):
return self.coordinates.copy(deepcopy=True)

@no_annotations
def _ad_clear_checkpoint(self, checkpoint):
checkpoint = None
Expand Down

0 comments on commit 2f2d4a2

Please sign in to comment.