Level Set Method Library (LSMLIB)

Developers: Kevin T. Chu (Serendipity Research) and Masa Prodanovic (Univ. of Texas at Austin)

Table of Contents


May 13, 2011: LSMLIB source code repository moved to github! https://github.com/ktchu/LSMLIB
May 3, 2009: LSMLIB 1.0.1 Released! This is a minor bug fix release to ensure compatibility with the recently released LSMPQS software package.
February 17, 2009: Let us help showcase your research!
We continually update the LSMLIB Applications web page and are in the process of creating a new web page to list individuals and research groups who are actively using LSMLIB. If you would like your work to be included on either of these web pages, please let us know!
February 15, 2009: LSMLIB 1.0.0 Released!



The Level Set Method Library (LSMLIB) provides support for the serial and parallel simulation of implicit surface and curve dynamics in two- and three-dimensions. It contains an implementation of the basic level set method algorithms and numerical kernels described in "Level Set Methods and Dynamics Implicit Surfaces" by S. Osher and R. Fedkiw and "Level Set Methods and Fast Marching Methods" by J.A. Sethian. It also contains implementations of several advanced level set method techniques available in the literature.

The library consists of a collection of Fortran subroutines, C functions, and C++ classes. In addition, MATLAB interfaces are provided for some of the basic components of the level set method algorithm. The main features of the library include:

Software Dependencies

For a free Fortran compiler, we recommend using gfortran or G95. Both of these compilers provide binary installations for Linux, Mac OS X and Windows. At this point in time, LSMLIB has only been tested using gfortran.


LSMLIB has been tested on the following systems:

If you have successfully built and run LSMLIB on another system, please let us know and we'll add it to the list.

Windows Support

While we do officially support Windows at this time, we have been fortunate to have users who have graciously contributed notes on their experiences with LSMLIB on Windows. We provide these as a way to help our Windows users get started. Unfortunately, we do not have Windows systems to test on, so we will not be able to provide detailed support for Windows at this point in time.



LSMLIB Toolbox Package

The LSMLIB Toolbox package is a collection of numerical kernels that are commonly used in level set method calculations. It currently provides numerical kernels for the following:

Serial LSMLIB Package

The Serial LSMLIB package is intended to provide support for serial level set method calculations. Currently, it contains functions for

This package is still actively under development. In the near future, we hope to extend the package to cover more of core numerical kernels that support the following level set method calculations:

Parallel LSMLIB Package

The Parallel LSMLIB package is built using the Structured Adaptive Mesh Refinement Application Infrastructure (SAMRAI) developed and maintained in the Center for Applied Scientific Computing (CASC) at Lawrence Livermore National (LLNL) The decision to leverage SAMRAI for the Level Set Method Library was made because SAMRAI is specifically designed to address several key issues:

A major design goal of SAMRAI is to provide support for each of these features in a scalable manner. Furthermore, the API for SAMRAI is designed to shield the application developer from the tedious bookkeeping and memory management involved in writing code for parallel, structured adaptive mesh refinement applications. The underlying philosophy of SAMRAI is that an application developer should be able to migrate to a high-performance, parallel program with adaptive mesh capabilities with minimal effort once a satisfactory numerical algorithm has been developed for calculations on a single, simple rectangular mesh. We have taken advantage of these features to implement a high-performance, parallel (eventually adaptive) level set method library.


The MATLAB LSMLIB package provides a set of MATLAB scripts and MEX-files that support level set method calculations. This package currently provides functions for



Current Library Limitations and Known Problems


The LSMLIB developers gratefully acknowledge support from the following funding agencies:

We would also like to thank the following individuals:



Journal Articles

For Developers