Add unit tests for ShiftedMetricInterp#3262
Conversation
|
Not sure what the right thing to do is. It seems like I got "RGN_NOBNDRY" ( I think my expectation when writing this was that if using parallel slices, y boundary conditions would always be applied directly to the parallel slices, but I think that's not necessarily the case (e.g. boundary conditions that are applied by transforming to/from field-aligned)? So sometimes the interpolation should be done in the y-boundaries? My concern would be that in cases where the boundary condition is directly applied to the parallel slices, it is not (?) applied to the Field3D data, so interpolating would potentially overwrite the boundary conditions in the parallel slices with junk? Thinking out loud:
|
|
The unfortunately named To be precise, I guess BCs in y should always be applied to the parallel slices? Is the correct order of operations:
I think my confusion here is really just that |
|
Yes, at least for FCI, the mentioned order is the only correct one.
That feels wrong.
I am not sure about non-FCI, but does this region get added to the parallel boundary region? If not, it is certainly wrong. |
Oh, I missed that. |
|
I think ShiftedMetricInterp should be doing more or less the same thing as FCI, so would trust what @dschwoerer says. Just to add, this solver was written for consistency with the LaplacePetsc3dAmg/LaplaceHypre3d solvers, but I don't think it's ever been used, so anything that looks like a mistake/bug probably is one! |
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?