File Exchange

image thumbnail

Hamilton-Jacobi solver on unstructured triangular grids

version (306 KB) by Shawn Walker
Solves a class of static HJB equations on general triangular grids.


Updated 22 Sep 2011

View License

Implementation based on:

"Finite-Element Discretization Of Static Hamilton-Jacobi Equations Based On A Local Variational Principle"
by F. Bornemann and C. Rasch


1. There is no restriction on the type of triangulation, i.e. it does not need to be acute. But the method will require more than one sweep of the mesh (because of lack of causality). Howver, only a few iterations should be necessary to achieve convergence.

2. Two versions of the code are implemented. One is pure MATLAB and the other uses a MEX function. The MEX version is faster by about a factor of 100 for the example that I include.

3. The MEX version allows for a variable distance metric. See the test code for a demonstration.

4. The MEX version uses a FIFO buffer to implement a non-linear adaptive Gauss-Seidel iteration (see the paper). FIFO buffers cannot be easily implemented in pure MATLAB.

5. The MEX version C++ code uses Object-Oriented methods.

6. I put in a lot of error checking to make the code robust to user-error. However, I make no claim that this software is completely correct. Use it at your own risk!

Comments and Ratings (0)


This is now part of the FELICITY package, which can also be downloaded on the Central File Exchange.

minor portability update.

MATLAB Release Compatibility
Created with R2007a
Compatible with any release
Platform Compatibility
Windows macOS Linux

Discover Live Editor

Create scripts with code, output, and formatted text in a single executable document.

Learn About Live Editor