Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix Cofunction.sub with adjoint #3470

Merged
merged 13 commits into from
May 1, 2024
Merged

Fix Cofunction.sub with adjoint #3470

merged 13 commits into from
May 1, 2024

Conversation

connorjward
Copy link
Contributor

Description

Fixes #3469

firedrake/adjoint_utils/function.py Show resolved Hide resolved
firedrake/cofunction.py Outdated Show resolved Hide resolved
tests/regression/test_adjoint_operators.py Outdated Show resolved Hide resolved
@Ig-dolci
Copy link
Contributor

Ig-dolci commented Mar 25, 2024

Ok. Assign requires more thoughts. So, I will keep this PR to fix only the Cofunction.sub issue 3469.

@Ig-dolci Ig-dolci marked this pull request as draft April 3, 2024 08:45
@Ig-dolci Ig-dolci marked this pull request as ready for review April 18, 2024 06:39
@Ig-dolci
Copy link
Contributor

I am now fine with this PR.

  • Cofunctions.sub are working in adjoints;

  • We have a generalized FunctionMergeBlock class;

  • We have a test with FunctionMergeBlock on the pyadjoint Tape.

@Ig-dolci Ig-dolci requested a review from nbouziani April 18, 2024 06:45
firedrake/cofunction.py Outdated Show resolved Hide resolved
@dham dham enabled auto-merge (squash) May 1, 2024 15:30
@dham dham merged commit e393ef4 into master May 1, 2024
10 checks passed
@dham dham deleted the connorjward/fix-3469 branch May 1, 2024 16:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

BUG: Cofunction.sub() crashes when pyadjoint is activated
4 participants