SciCompResources / LearnSciComp

Julia package for sharing ideas/codes in numerical methods and/or HPC
5 stars 0 forks source link

adding more algorithms for calculating Finite difference weights #8

Open yewalenikhil65 opened 2 years ago

yewalenikhil65 commented 2 years ago

add variants of stencil-based finite-differences algorithms to calculate finite difference weights , namely as follows:

In this case, I think it is better to create find_fd_weigths named function, which takes an argument as function calling the algorithms of variants of stencil-based finite-difference methods(FD_algorithms). I imagine this as follows

find_fd_weights(order, location, grid_points, FD_algorithm())
yewalenikhil65 commented 2 years ago

In this case, I think it is better to create find_fd_weigths named function, which takes an argument as function calling the algorithms of variants of stencil-based finite-difference methods(FD_algorithms). I imagine this as follows

find_fd_weights(order, location, grid_points, FD_algorithm())

On second thought about this, for now finite difference weight calculating fornberg algorithms (classical (1998) and hermite(2020)) reside in single function named fornberg , and classical version is invoked by default . For invoking hermite version, pass a kwarg , dfdx = true. This shall return weights associated with function values as well as first derivatives at the stencil points