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 5-arg mul! #40

Merged
merged 2 commits into from
Mar 30, 2021
Merged

Add 5-arg mul! #40

merged 2 commits into from
Mar 30, 2021

Conversation

briochemc
Copy link
Contributor

This PR simply adds a 5-arg mul! for AbstractDiffEqLinearOperator.

I'd like this functionality to be able to compose more things together and facilitate in place computations of sums of ODE-like functions and linear operators, i.e. something like f(u) + L * u:

f(du, u, p, t) # some in-place function writes du <- f(u)
mul!(du, L, u, 1, 1) # du <- L * u + f(u)

I'm not sure this is the right way to add this, please let me know if I need to think more about it! 😅 My current thinking is that I could use that, but maybe there's just no need for it? 🤷

This PR simply adds a 5-arg `mul!` for `AbstractDiffEqLinearOperator`.

I'd like this functionality to be able to compose more things together and facilitate in place computations of sums of ODE-like functions and linear operators, i.e. something like `f(u) + L * u`:

```julia
f(du, u, p, t) # some in-place function writes du <- f(u)
mul!(du, L, u, 1, 1) # du <- L * u + f(u)
```

I'm not sure this is the right way to add this, please let me know if I need to think more about it! 😅 My current thinking is that I could use that, but maybe there's just no need for it?  🤷
@ChrisRackauckas
Copy link
Member

Yeah I think there might be some downstream piracy to delete?

@ChrisRackauckas
Copy link
Member

Can you rebase?

@briochemc
Copy link
Contributor Author

Done! (I think 😅)

@codecov
Copy link

codecov bot commented Mar 29, 2021

Codecov Report

Merging #40 (a201053) into master (7fcf8f4) will decrease coverage by 0.00%.
The diff coverage is 0.00%.

Impacted file tree graph

@@            Coverage Diff            @@
##           master     #40      +/-   ##
=========================================
- Coverage    9.66%   9.66%   -0.01%     
=========================================
  Files          39      39              
  Lines        2825    2826       +1     
=========================================
  Hits          273     273              
- Misses       2552    2553       +1     
Impacted Files Coverage Δ
src/operators/common_defaults.jl 0.00% <0.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 7fcf8f4...a201053. Read the comment docs.

@ChrisRackauckas ChrisRackauckas merged commit 3150439 into SciML:master Mar 30, 2021
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.

2 participants