/Helmholtz_decomp

Calculating the streamfunction and potential of a vector field

Primary LanguageMATLABMIT LicenseMIT

Helmholtz_decomp

GitHub last commit GitHub repo size

Perform the Helmholtz decomposition of a vector field, i.e., computing the streamfuction and potential by solving a minimization problem proposed by Li et al. (2006), without the need to specify boundary conditions.

The optimization function is minFunc instead of MATLAB's fminunc for computational efficiency. The quasi-Newton algorithm with limited-memory BFGS updates is used by default.

The code is inspired by the Python version but with a more general configuration of grid and an accurate approach to calculating the Jacobian of the Tikhonov’s functional.

This code has been used in the studies of Kamenkovich et al. (2021), Kamenkovich and Garraffo (2022), and Lu et al. (2022).