FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

api: fix derivatives kw for tensors by mloubout · Pull Request #2723 · devitocodes/devito · GitHub

api: fix derivatives kw for tensors - #2723

Merged
mloubout merged 2 commits into
mainfrom
tens-deriv-kw
Sep 8, 2025
Merged

api: fix derivatives kw for tensors#2723
mloubout merged 2 commits into
mainfrom
tens-deriv-kw

Conversation

mloubout commented Sep 2, 2025

Copy link
Copy Markdown
Contributor

Fixes #2721

mloubout added bug-py-minor API api (symbolics, types, ...) labels Sep 2, 2025

codecov Bot commented Sep 2, 2025
edited
Loading

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 94.11765% with 2 lines in your changes missing coverage. Please review.
✅ Project coverage is 92.15%. Comparing base (b4e9995) to head (af0bd23).
⚠️ Report is 3 commits behind head on main.

Files with missing lines Patch % Lines
devito/types/basic.py 60.00% 2 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##             main    #2723   +/-   ##
=======================================
  Coverage   92.15%   92.15%           
=======================================
  Files         248      248           
  Lines       49961    49995   +34     
  Branches     4399     4401    +2     
=======================================
+ Hits        46040    46072   +32     
- Misses       3211     3213    +2     
  Partials      710      710           
Flag Coverage Δ
pytest-gpu-aomp-amdgpuX 70.92% <38.46%> (-0.02%) ⬇️
pytest-gpu-nvc-nvidiaX 71.88% <38.46%> (-0.03%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Comment thread devito/types/basic.py Outdated
mloubout force-pushed the tens-deriv-kw branch 3 times, most recently from 32cc14d to fcf95ab Compare September 3, 2025 20:02

FabioLuporini left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

Uncontroverisal

PS: I just noted applyfunc should probably be a private meth

mloubout commented Sep 4, 2025

Copy link
Copy Markdown
Contributor Author

PS: I just noted applyfunc should probably be a private meth

It's a sympy method from the sympy matrix type, not ours.

mloubout force-pushed the tens-deriv-kw branch 3 times, most recently from aea705d to abcb8d1 Compare September 6, 2025 02:35

EdCaunt left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

A couple super tiny nitpicks, feel free to ignore. Looks g2g otherwise

Comment thread tests/test_derivatives.py Outdated
u = Function(name="u", grid=grid, space_order=2, staggered=x)
v = Function(name="v", grid=grid, space_order=2, staggered=NODE)

w = [-2, 2] # Should 4 coeff since this is staggered

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

2 coeffs?

Comment thread tests/test_derivatives.py Outdated

eq0 = Eq(u, v.dx(w=w)).evaluate
exp0 = -2 * v / x.spacing + 2 * v._subs(x, x + x.spacing)/x.spacing
# This one should fallback to taylor coeffs sinc w is too short

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

"sinc" -> "since"

Comment thread tests/test_tensors.py Outdated
f = func(name="t", grid=grid, space_order=2)

# Custom coefficients
c = [10, 10, 10]

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

Nitpick: is it worth making these 10, 20, 30 just to remove a potential non-uniqueness?

mloubout merged commit eaa4891 into main Sep 8, 2025
36 checks passed
mloubout deleted the tens-deriv-kw branch September 8, 2025 14:37
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

API api (symbolics, types, ...) bug-py-minor

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Support for custom FD coefficients when using Vector objects

3 participants


Back | FazBrowse Home | New Git URL