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

derivative_options argument to minimize is likely incorrect #153

Open
jrmaddison opened this issue Jun 20, 2024 · 2 comments
Open

derivative_options argument to minimize is likely incorrect #153

jrmaddison opened this issue Jun 20, 2024 · 2 comments

Comments

@jrmaddison
Copy link
Contributor

e.g. for SciPy's L-BFGS-B using a (non $l^2$) Riesz map will lead to the derivative being supplied to the optimizer being inconsistent. SciPy requires the (non-mapped) derivative.

@Ig-dolci
Copy link
Contributor

Ig-dolci commented Jun 20, 2024

Yes, I agree. This was the key reasons I considered adding the derivative option to the minimize. The default Riesz representation in Firedrake is L2, and without the PR 151, we were not able to use SciPy's minimisation with l2 riesz representation because there was no way to set it. I am just thinking why the test is working with scipy using L2.

@jrmaddison
Copy link
Contributor Author

minimize could access the adjoint variable directly, i.e. use derivative to run the adjoint, but then ignore it's return value and access the Control.block_variable.adj_value directly. That would still cost an extra mass matrix solve but would work without needing to know Firedrake-specific Riesz map parameters.

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

No branches or pull requests

2 participants