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

Transpose interpolation -> adjoint interpolation #3965

Conversation

jrmaddison
Copy link
Contributor

Description

Replace transpose interpolation with adjoint interpolation, including the extra complex conjugation.

Fixes #3955

@jrmaddison jrmaddison marked this pull request as ready for review January 10, 2025 11:05
connorjward
connorjward previously approved these changes Jan 10, 2025
Copy link
Contributor

@connorjward connorjward left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@jrmaddison
Copy link
Contributor Author

There's the caveat that this

  • changes behaviour if using adjoint interpolation via interpolation methods. Transpose interpolation becomes adjoint interpolation.
  • changes and corrects behaviour if using interpolation via assembly. Assembly of the adjoint yields the adjoint, as expected.

@connorjward
Copy link
Contributor

There's the caveat that this

  • changes behaviour if using adjoint interpolation via interpolation methods. Transpose interpolation becomes adjoint interpolation.
  • changes and corrects behaviour if using interpolation via assembly. Assembly of the adjoint yields the adjoint, as expected.

@dham what are your thoughts?

@dham
Copy link
Member

dham commented Jan 15, 2025

There's the caveat that this

  • changes behaviour if using adjoint interpolation via interpolation methods. Transpose interpolation becomes adjoint interpolation.
  • changes and corrects behaviour if using interpolation via assembly. Assembly of the adjoint yields the adjoint, as expected.

@dham what are your thoughts?

I'm fine with this because I think what James is proposing is mathematically correct. The small number of complex users that will even notice can deal with it.

@connorjward
Copy link
Contributor

@jrmaddison please can you update this branch. We have just merged #3976 which will fix these test failures.

@jrmaddison jrmaddison force-pushed the jrmaddison/adjoint_interpolation branch from c4d0a65 to 5836640 Compare January 22, 2025 17:09
@jrmaddison
Copy link
Contributor Author

@jrmaddison please can you update this branch. We have just merged #3976 which will fix these test failures.

Done

@jrmaddison
Copy link
Contributor Author

Updated to use Interpolator directly to work around #3988

@connorjward connorjward enabled auto-merge (squash) January 23, 2025 12:11
@connorjward connorjward merged commit 35c088d into firedrakeproject:master Jan 23, 2025
18 checks passed
@jrmaddison jrmaddison deleted the jrmaddison/adjoint_interpolation branch January 23, 2025 12:56
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: adjoint interpolation is missing complex conjugation
3 participants