Scientific data is becoming increasingly complex, and sophisticated techniques are required for its effective analysis and visualization. The Morse-Smale complex is an efficient data structure that represents the complete gradient flow behavior of a scalar function, and can be used to identify, order, and selectively remove features. This dissertation presents two algorithms for constructing Morse-Smale complexes in any dimensions. The first algorithm uses persistence-based simplification to remove excess topology from an artificially generated Morse-Smale complex, with important topological features preserved. The second algorithm uses discrete Morse theory to generate an explicit representation of the discrete gradient flow of a scalar function, and uses this representation to compute the Morse-Smale complex directly. This second method enables a divide-and-conquer strategy for handling large data, and is presented in a general framework that admits many common data formats, such as simplicial, gridded, and adaptive multi-resolution (AMR) meshes. Practical considerations are also presented, such as data structures, proper handling of boundary conditions, strategies to accelerate cancellations, and a method to extract a better-quality representation of the topology. A real-world example is also included, where the algorithms and techniques presented in this dissertation are applied to extract the core structure of a porous solid. |