Skip to content

Commit

Permalink
Update firedrake/adjoint/all_at_once_reduced_functional.py
Browse files Browse the repository at this point in the history
  • Loading branch information
JHopeCollins authored Oct 24, 2024
1 parent e48aba7 commit b1020d2
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions firedrake/adjoint/all_at_once_reduced_functional.py
Original file line number Diff line number Diff line change
Expand Up @@ -243,8 +243,10 @@ def set_observation(self, state: OverloadedType,
# get the tape used for this stage and make sure its the right one
prev_stage_tape = get_working_tape()
if prev_stage_tape is not self._stage_tape:
msg = "working tape canot be changed during observation stage"
raise ValueError(msg)
raise ValueError(
"Working tape at the end of the observation stage"
" differs from the tape at the stage beginning."
)

# # record forward propogation
with set_working_tape(prev_stage_tape.copy()) as tape:
Expand Down

0 comments on commit b1020d2

Please sign in to comment.