slimgroup / JUDI.jl

Julia Devito inversion.
https://slimgroup.github.io/JUDI.jl
MIT License
96 stars 29 forks source link

Derivative of the Jacaobian w.r.t to the source with rrule #152

Closed mloubout closed 1 year ago

mloubout commented 1 year ago

can compute

gradient(x -> norm(judiJacobain(F, x)*dm - D), q)

and for adjoint Jacobian as well.

Added test and backend cleanup.

Fixes #123

codecov[bot] commented 1 year ago

Codecov Report

Base: 82.36% // Head: 81.83% // Decreases project coverage by -0.52% :warning:

Coverage data is based on head (45bd76b) compared to base (b1eb957). Patch coverage: 75.36% of modified lines in pull request are covered.

:exclamation: Current head 45bd76b differs from pull request most recent head 86abd3f. Consider uploading reports for the commit 86abd3f to get more accurate results

Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #152 +/- ## ========================================== - Coverage 82.36% 81.83% -0.53% ========================================== Files 28 28 Lines 2143 2186 +43 ========================================== + Hits 1765 1789 +24 - Misses 378 397 +19 ``` | [Impacted Files](https://codecov.io/gh/slimgroup/JUDI.jl/pull/152?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=slimgroup) | Coverage Δ | | |---|---|---| | [src/TimeModeling/Types/abstract.jl](https://codecov.io/gh/slimgroup/JUDI.jl/pull/152/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=slimgroup#diff-c3JjL1RpbWVNb2RlbGluZy9UeXBlcy9hYnN0cmFjdC5qbA==) | `77.23% <0.00%> (ø)` | | | [src/TimeModeling/LinearOperators/operators.jl](https://codecov.io/gh/slimgroup/JUDI.jl/pull/152/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=slimgroup#diff-c3JjL1RpbWVNb2RlbGluZy9MaW5lYXJPcGVyYXRvcnMvb3BlcmF0b3JzLmps) | `79.82% <50.00%> (-1.76%)` | :arrow_down: | | [src/TimeModeling/TimeModeling.jl](https://codecov.io/gh/slimgroup/JUDI.jl/pull/152/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=slimgroup#diff-c3JjL1RpbWVNb2RlbGluZy9UaW1lTW9kZWxpbmcuamw=) | `80.00% <56.25%> (-20.00%)` | :arrow_down: | | [src/TimeModeling/LinearOperators/lazy.jl](https://codecov.io/gh/slimgroup/JUDI.jl/pull/152/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=slimgroup#diff-c3JjL1RpbWVNb2RlbGluZy9MaW5lYXJPcGVyYXRvcnMvbGF6eS5qbA==) | `84.70% <57.14%> (-2.48%)` | :arrow_down: | | [...meModeling/Preconditioners/ModelPreconditioners.jl](https://codecov.io/gh/slimgroup/JUDI.jl/pull/152/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=slimgroup#diff-c3JjL1RpbWVNb2RlbGluZy9QcmVjb25kaXRpb25lcnMvTW9kZWxQcmVjb25kaXRpb25lcnMuamw=) | `67.92% <66.66%> (-0.04%)` | :arrow_down: | | [src/rrules.jl](https://codecov.io/gh/slimgroup/JUDI.jl/pull/152/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=slimgroup#diff-c3JjL3JydWxlcy5qbA==) | `67.16% <70.83%> (-6.91%)` | :arrow_down: | | [src/TimeModeling/Utils/auxiliaryFunctions.jl](https://codecov.io/gh/slimgroup/JUDI.jl/pull/152/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=slimgroup#diff-c3JjL1RpbWVNb2RlbGluZy9VdGlscy9hdXhpbGlhcnlGdW5jdGlvbnMuamw=) | `81.60% <83.33%> (+2.67%)` | :arrow_up: | | [src/JUDI.jl](https://codecov.io/gh/slimgroup/JUDI.jl/pull/152/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=slimgroup#diff-c3JjL0pVREkuamw=) | `90.47% <100.00%> (+1.58%)` | :arrow_up: | | [src/TimeModeling/Modeling/propagation.jl](https://codecov.io/gh/slimgroup/JUDI.jl/pull/152/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=slimgroup#diff-c3JjL1RpbWVNb2RlbGluZy9Nb2RlbGluZy9wcm9wYWdhdGlvbi5qbA==) | `71.92% <100.00%> (+0.50%)` | :arrow_up: | | [src/TimeModeling/Modeling/python\_interface.jl](https://codecov.io/gh/slimgroup/JUDI.jl/pull/152/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=slimgroup#diff-c3JjL1RpbWVNb2RlbGluZy9Nb2RlbGluZy9weXRob25faW50ZXJmYWNlLmps) | `98.97% <100.00%> (-0.19%)` | :arrow_down: | | ... and [6 more](https://codecov.io/gh/slimgroup/JUDI.jl/pull/152/diff?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=slimgroup) | | Help us with your feedback. Take ten seconds to tell us [how you rate us](https://about.codecov.io/nps?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=slimgroup). Have a feature suggestion? [Share it here.](https://app.codecov.io/gh/feedback/?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=slimgroup)

:umbrella: View full report at Codecov.
:loudspeaker: Do you have feedback about the report comment? Let us know in this issue.