Add support for WENO4 interpolation #470
Open
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.
This PR is not currently working. I would like to add support for interpolation with a 4th order Weighted Essentially Non-Oscillatory (WENO) scheme, following Janett et al (2019). I wrote the standalone package WENO4.jl (not yet registered) that has been tested to work as it should. This PR is an attempt at bringing the same functionality into Interpolations.jl.
My experience with Julia is limited, and I don't fully understand the abstractions and architecture of Interpolations.jl, so I apologise for the many mistakes in the current PR and would appreciate some help at getting this code working and sufficiently general. This implementation follows closely what I saw in
monotonic.jl
, but I couldn't get my head around all the abstractions. This is the type of usage I was hoping it would get when working:The idea is to follow existing practice of getting a way to generate an interpolant for all input data values and nodes, and then a separate function to evaluate this interpolant at a required point. I have tested and the functions inside, in particular
interpolate
(to build the interpolant) and the function to evaluate the interpolant, currentlyworks if I rewrite it as the standalone function
However, it is not working in the present formulation because I don't really understand the relation between the
interpolate
function and the function with the same name as thestruct
, here calledWENO4Interpolation
.Currently the functions used perform about twice as slow as in the standalone package, which I attribute to the need of generating intermediate arrays. This could also be improved.