compiler: Attach staggering metadata to IndexDerivative - #3024
compiler: Attach staggering metadata to IndexDerivative#3024FabioLuporini wants to merge 1 commit into
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #3024 +/- ##
==========================================
+ Coverage 83.77% 83.82% +0.04%
==========================================
Files 257 257
Lines 55007 55134 +127
Branches 4708 4719 +11
==========================================
+ Hits 46083 46215 +132
+ Misses 8109 8105 -4
+ Partials 815 814 -1
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
07a58b2 to
e93685d
Compare
| """ | ||
| The requested evaluation staggering relative to the input lattice: | ||
| `centered` on that lattice, `staggered` halfway between its points, | ||
| or None for other or unknown evaluation locations. | ||
|
|
||
| This classification is independent of differential order, stencil bias, | ||
| and transposition. In particular, `centered` does not imply symmetric | ||
| weights, and interpolation is identified separately by `deriv_order == 0`. | ||
| """ |
There was a problem hiding this comment.
Nitpick: excessively verbose docstring.
| if (mid % 1).is_zero: | ||
| staggering = 'centered' | ||
| elif ((mid - S.Half) % 1).is_zero: | ||
| staggering = 'staggered' | ||
| else: | ||
| staggering = None |
There was a problem hiding this comment.
This seems oddly convoluted? Can this really not be simplified at all?
mloubout
left a comment
There was a problem hiding this comment.
I don't understand the need or utility of this. THe staggering doesn't matter, x0 does and is already attached.
@mloubout how do I know if an IndexDerivative represents a staggered derivative, a centered derivative, or, fwiw, an interpolation ? for the latter I guess I might look at the deriv_order and infer it if it's 0 ? (this is me speculating...) what about staggered vs centered? if I'm missing something, happy to close this; I honestly cooked the simplest thing that came to mind |
Again, this has nothing to do with the staggering of the equation but with the difference betwenn |
|
@mloubout I need a way to distinguish centered derivatives from staggered derivatives, because they tend to represent two similarly balanced sets of derivatives , in terms of total number, type and number of underlying objects they're applied to, and so on. I could use the set of coefficients I guess, but not ideal other ways? |
I need this info for CIRE in PRO (so that we can be more surgical about "what derivatives to catch" during a CIRE round)