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

Add second order partial derivatives w.r.t. parameters #840

Merged
merged 5 commits into from Jan 17, 2020

Conversation

TiKeil
Copy link

@TiKeil TiKeil commented Jan 8, 2020

In this PR, I expand the first order derivatives w.r.t parameters as done in #748 to second order partial derivatives.

I more or less edited the same amount of code as in #748 and I adapted the test to it.

I went for the name "second_derivative". Another idea was to call it hessian, but this is a little bit dependent on the application I guess. With the code, it is also possible to only give a few expressions and not all.

Any objections ?

@sdrave
Copy link
Member

sdrave commented Jan 14, 2020

@TiKeil, can you rebase on current master? This should hopefully make CI pass.

Can you argue why it is better to have a dedicated method for the second derivatives instead of calling d_mu twice?

@codecov
Copy link

codecov bot commented Jan 14, 2020

Codecov Report

Merging #840 into master will increase coverage by 0.03%.
The diff coverage is 91.3%.

Impacted Files Coverage Δ
src/pymor/parameters/functionals.py 93.75% <91.3%> (+1.19%) ⬆️

@TiKeil
Copy link
Author

TiKeil commented Jan 14, 2020

Can you argue why it is better to have a dedicated method for the second derivatives instead of calling d_mu twice?

This is actually a good point. I think there is no particular reason for having a second method although I find 'd_mui_muj' a little bit more intuitive to call.
However, I could change this PR by removing 'd_mui_muj' ?

@TiKeil
Copy link
Author

TiKeil commented Jan 14, 2020

I removed d_mui_muj in f74b059
Any more objections?

Copy link
Member

@sdrave sdrave left a comment

Choose a reason for hiding this comment

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

LGTM.

AUTHORS.md Outdated Show resolved Hide resolved
src/pymor/parameters/functionals.py Outdated Show resolved Hide resolved
@TiKeil
Copy link
Author

TiKeil commented Jan 17, 2020

I added the changes and rebased on master

@sdrave sdrave merged commit f79197d into pymor:master Jan 17, 2020
@TiKeil TiKeil deleted the add_hessian branch January 17, 2020 13:43
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.

None yet

2 participants