Skip to content

4th-order accurate gradient of 3-dimensional scalar function

License

Notifications You must be signed in to change notification settings

chem-william/gradient04

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

24 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Calculates the 4th-order accurate gradient of a 3-dimensional scalar function. Uses central differences on the interior and first differences on boundaries to give the same shape as the input function.

To be used in calculating the current density through a molecule and has thus not been made general, but that should be somewhat straightforward.

Originally it was implemented in Python as it is essentially a port of numpy.gradient, but to increase performance and get more experience writing Rust, I decided to port it. It is probably horribly coded, but it gave me almost 3x speedup.

About

4th-order accurate gradient of 3-dimensional scalar function

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages