This repository has been archived by the owner on Jul 19, 2023. It is now read-only.
fornberg(2020) weights based on hermite-based finite difference #501
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.
As per discussion earlier today with @ChrisRackauckas on slack, this PR extends
DiffEqOperators.calculate_weights
function to include recent algorithm of hermite-based finite difference weights by fornberg(2020)DiffEqOperators.calculate_weights
function..no changes here!)dfdx = true
to theDiffEqOperators.calculate_weights
function, thus, returning the weights/stencil for function values and weights/stencil for the first-derivative values of the function respectively.This algorithm uses same matrix of weights generated from fornberg(1988) algorithm to generate new set of weights.
Corresponding tests for both cases are added, and docstrings are also updated.
I do not yet know how to use these weights for MOL/discretisation and other boundary conditions functions etc, hence by default
calculate_weights
invokes same classical fornberg algorithm . I will try to cover those next time.