Add unit tests for ShiftedMetricInterp
#3262
Open
+121
−75
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Because this method should be identical to
ShiftedMetric, we can just parameterise the existing unit tests over the two types (although theFieldPerpoverloads are not implemented so we have to skip those). This is in support of the work to parallelise in Z, by getting more tests on bits that that touches.One important thing to note is that
ZHermiteSpline(the z-only interpolation) explicitly doesn't do anything in any of the guards. This means thatf.yup(mesh->yend + 1)does not get filled in. There's a comment the guards should be filled in by the boundary conditions, but I'm not actually sure that's true for the parallel slices.In the second commit, I end up just masking the guards out basically, just to make the test pass.
If I instead comment out the region masking in
ZInterpolation, and just useRGN_NOYinstead, all the tests seem to pass, including the integrated tests that use MAST grids.@dschwoerer @johnomotani Thoughts? Am I missing something why we can't just use
RGN_NOYfor the Z interpolation here?