A Julia package for numerical computation of vector calculus operations in arbitrary orthogonal curvilinear coordinate systems. Currently implements gradient, curl, divergence, and Laplacian functions.
In the Julia REPL:
julia> using VectorCalculus
julia> f(point) = point[1]^2
f (generic function with 1 method)
julia> laplacian(f, [3.0, pi/3, pi/4], Spherical())
6.0
julia> gradient(f, [2.0, pi/4, 1.0], Cylindrical())
3-element SVector{3, Float64} with indices SOneTo(3):
4.0
0.0
0.0As of version 0.1.0, vector-valued results from this package's return in the local curvilinear basis of the supplied coordinate system, not just Cartesian components.
] add VectorCalculusSee https://michaeljhanley.github.io/VectorCalculus.jl
See https://github.com/michaeljhanley/VectorCalculus.jl/blob/main/CONTRIBUTING.md
Initial development of this package incorporated LLMs as a targeted writing and debugging aid. Generative tools helped draft docstrings and format LaTeX and KaTeX equations for the documentation. They also provided a second opinion on architecture, logic, and syntax while assisting with bug fixes. No autonomous agents were used. Every line was typed or pasted in manually, and all code was thoroughly verified before committing.
This project is licensed under the terms of the MIT license.