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

api: fix symbolic coeffs for cross derivatives #2185

Merged
merged 2 commits into from
Aug 11, 2023
Merged

Conversation

mloubout
Copy link
Contributor

Self explanatory

@mloubout mloubout added the API api (symbolics, types, ...) label Aug 10, 2023
@codecov
Copy link

codecov bot commented Aug 10, 2023

Codecov Report

Merging #2185 (36b6b21) into master (ca2960d) will increase coverage by 0.00%.
The diff coverage is 100.00%.

@@           Coverage Diff           @@
##           master    #2185   +/-   ##
=======================================
  Coverage   87.10%   87.10%           
=======================================
  Files         226      226           
  Lines       40183    40197   +14     
  Branches     7333     7335    +2     
=======================================
+ Hits        35000    35014   +14     
  Misses       4603     4603           
  Partials      580      580           
Files Changed Coverage Δ
devito/finite_differences/coefficients.py 92.96% <100.00%> (+0.28%) ⬆️
devito/finite_differences/differentiable.py 94.19% <100.00%> (+0.02%) ⬆️
devito/finite_differences/tools.py 93.71% <100.00%> (ø)
tests/test_symbolic_coefficients.py 99.13% <100.00%> (+0.02%) ⬆️

Copy link
Contributor

@FabioLuporini FabioLuporini left a comment

Choose a reason for hiding this comment

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

uncontroversial


for j in range(len(coeffs)):
subs.update({function._coeff_symbol
(indices[j], deriv_order, function, index): coeffs[j]})

# Set all unused weights to zero
for w in sweights:
Copy link
Contributor

Choose a reason for hiding this comment

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

cleaner:

subs.update({w: 0 for w in sweights if w not in subs})

@review-notebook-app
Copy link

Check out this pull request on  ReviewNB

See visual diffs & provide feedback on Jupyter Notebooks.


Powered by ReviewNB

@mloubout mloubout merged commit c8e5415 into master Aug 11, 2023
@mloubout mloubout deleted the custom-fd-v3 branch August 11, 2023 11:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
API api (symbolics, types, ...)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants