Forman Gradient 2D

The Forman Gradient 2D is a comprehensive library for computing a Forman Gradient on triangle meshes. The library provides all the basic functions for encoding a triangle mesh and a scalar function defined on its vertices (both provided in input) and for computing a Forman gradient on it. Two different methods have been implemented. The first one is based on homotopic expansion and the second one uses an input watershed segmentation to avoid spurious critical simplices. Additional functions are furnished for computing the cells of the discrete Morse complex and for producing output files to be visualized in Paraview. The library is composed of two main parts. The first one provides all the basic functions for managing the triangle mesh (LibMesh). The second part provides the functions for computing the Forman gradient and the Morse cells (LibForman). The source code and additional information can be found on GitHub.
References:
(1) Computing a discrete Morse gradient from a watershed decomposition by Lidija Comic, Leila De Floriani, Federico Iuricich, and Paola Magill in Computers & Graphics, 58, 43-52, 2016.
(2) A primal/dual representation for discrete Morse complexes on tetrahedral meshes by Kenneth Weiss, Federico Iuricich, Riccardo Fellegara, and Leila De Floriani in Computer Graphics Forum, 32 (3), 361-370, 2013.