-
Notifications
You must be signed in to change notification settings - Fork 90
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
Add ShiftedMetricInterp: shifted metric using interpolation in Z #1946
Merged
Conversation
This file contains 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
Cherry-picked and rebased Previous commit message: Create new class ZInterpolation, to be used by ShiftedMetricInterp Previous HermiteSplineOnlyZ interpolation class is renamed to ZHermiteSpline and is now an implementation of ZInterpolation.
Construct and return vector immediately
Also make both ctors explicit This is needed to make the ZInterpolation ctors cleaner
This avoids assigning to skip_mask in ctor body (prefer init list) Also make ctors explicit (cleaner for single argument ctors)
Like ShiftedMetric but uses Interpolation object (so Hermite spline by default) for interpolation instead of FFT. (Cherry-picked commit removed changes to mesh.cxx due to conflicts resolved in later commit)
I updated the signatures of toFieldAligned and fromFieldAligned on ShiftedMetricInterp so that regions are passed as string rather than the REGION enum. This is so that the class matches the interface introduced in the next branch.
In ShiftedMetricInterp, do not interpolate in y-boundary points, leave those to be set by boundary conditions instead. Create parallel boundary regions "parallel_backward" and "parallel_forward" so that parallel boundary conditions can be applied.
This ensures the interpolation coefficients are available in x-boundaries, which is required for the LaplacePetsc3dAmg solver, and in the guard cells, which is required to use fromFieldAligned in create3D.
By interpolating only in Z, HermiteSplineOnlyZ allows ShiftedMetricInterp to calculate coefficients for x-boundary cells.
Avoids floating-point exception errors due to calculations using NaNs.
Merged
ShiftedMetricInterp using interpolation, so error scales with number of points, while ShiftedMetric is spectrally accurate
johnomotani
previously approved these changes
Mar 8, 2020
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me. I've also pulled in test-yupdown-weights
which tests ShiftedMetricInterp
.
Options for ParallelTransform and ZInterpolation have been moved to different sections.
I opened the PR so GitHub won't let me approve this, but @johnomotani approved up to 7ee4dd2; I have reviewed d85b6d3 onwards and approve those |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Cherry-picked, rebased, squashed and formatted from #1803
Note that this includes #1944, view 8395d8a onwards to see just
ShiftedMetricInterp
related changes