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

[wip] Overload operator application to correctly apply operators with nonlinear behavior #166

Draft
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

vpuri3
Copy link
Member

@vpuri3 vpuri3 commented Mar 13, 2023

Close #159. Detailed discussion in issue.

@codecov
Copy link

codecov bot commented Mar 13, 2023

Codecov Report

Merging #166 (5affa9e) into master (9baa715) will increase coverage by 0.45%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##           master     #166      +/-   ##
==========================================
+ Coverage   67.40%   67.86%   +0.45%     
==========================================
  Files          10       10              
  Lines        1267     1282      +15     
==========================================
+ Hits          854      870      +16     
+ Misses        413      412       -1     
Impacted Files Coverage Δ
src/basic.jl 73.95% <100.00%> (+1.32%) ⬆️

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@gaurav-arya
Copy link
Member

gaurav-arya commented Mar 13, 2023

I thought the conclusion was that this is not needed? If one really wanted to make a nonlinear op a SciMLOperator, then it should still do nothing on update_coefficients and do all its work in op(u,p,t). This interlacing of * and update_coefficients doesn't seem right?

(Perhaps I'm just not familiar with the use case here)

@gaurav-arya
Copy link
Member

And in this design, if you were to write A * A * B, A would be updated two different times with different u's. So I still maintain that u should always be the same in update_coefficients

@vpuri3 vpuri3 changed the title Fix update error when composing nonlinear operators Overload operator application to correctly apply operators with nonlinear behavior Mar 13, 2023
@vpuri3
Copy link
Member Author

vpuri3 commented Mar 13, 2023

Fixed the name to reflect what is happening here. We are overloading L(u, p, t), L(du, u, p, t). update_coeffs isn't touched.

@vpuri3
Copy link
Member Author

vpuri3 commented Mar 13, 2023

I have limited bandwidth during the week. So I'll get to this over the weekend or on some evening.

@vpuri3 vpuri3 changed the title Overload operator application to correctly apply operators with nonlinear behavior [wip] Overload operator application to correctly apply operators with nonlinear behavior Mar 13, 2023
…o propagate. maybe need more L(u, p, t) defs
@vpuri3
Copy link
Member Author

vpuri3 commented May 5, 2023

TODO

  • preserve order of operations in scalaroperator constructor: ie A * λ vs λ * A and apply updatecoeffs accordingly. Also need to write L(u,p,t) method for ComposedScalarOperator.
  • add L(u, p, t) for InvertedOperator as well.

@vpuri3 vpuri3 marked this pull request as draft June 25, 2023 17:55
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.

Overload operator application for ComposedOperator
2 participants