Skip to content

Commit

Permalink
Fix rf.
Browse files Browse the repository at this point in the history
  • Loading branch information
Ig-dolci committed Nov 27, 2024
1 parent b783253 commit e211e60
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,7 @@ jobs:
--install defcon \
--install gadopt \
--install asQ \
--package-branch pyadjoint dolci/fix_out_floatoperator \
|| (cat firedrake-install.log && /bin/false)
- name: Install test dependencies
run: |
Expand Down
2 changes: 1 addition & 1 deletion tests/output/test_adjoint_disk_checkpointing.py
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,6 @@ def test_disk_checkpointing_successive_writes():

J = assemble(v*dx)
Jhat = ReducedFunctional(J, Control(u))
assert np.allclose(J, Jhat(1))
assert np.allclose(J, Jhat(Function(cg_space).interpolate(1.)))
pause_disk_checkpointing()
tape.clear_tape()
2 changes: 1 addition & 1 deletion tests/regression/test_adjoint_operators.py
Original file line number Diff line number Diff line change
Expand Up @@ -717,7 +717,7 @@ def test_init_constant():
c2.assign(c1)
J = assemble(c2*dx(domain=mesh))
rf = ReducedFunctional(J, Control(c1))
assert np.isclose(rf(-1.0), -1.0)
assert np.isclose(rf(Function(R, val=-1.0)), -1.0)


@pytest.mark.skipcomplex # Taping for complex-valued 0-forms not yet done
Expand Down

0 comments on commit e211e60

Please sign in to comment.