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

ReducedFunctional.derivative_cb_pre and ReducedFunctional.derivative_cb_post are overwritten if derivative_components is passed #168

Open
miguelcoolchips opened this issue Sep 11, 2024 · 1 comment

Comments

@miguelcoolchips
Copy link

I was looking at this part of the code in ReducedFunctional

https://github.com/dolfin-adjoint/pyadjoint/blob/master/pyadjoint/reduced_functional.py#L91-L97

and I saw that if the user passes a derivative_cb_post and a derivative_components to the constructor, the former gets overwritten. Is this the intended behavior?

@dham
Copy link
Member

dham commented Sep 11, 2024

I think @colinjcotter may have been slightly careless when he wrote that. I would have thought that any callback functions passed in to the constructor should be composed with the functions added on those lines.

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