| Title | Consistent representation of two-dimensional flow |
| Publication Type | thesis |
| School or College | School of Computing |
| Department | Computing |
| Author | Jadhav, Shreeraj |
| Date | 2012-08 |
| Description | Analysis and visualization of flow is an important part of many scientific endeavors. Computation of streamlines is fundamental to many of these analysis and visualization tasks. A streamline is the path a massless particle traces under the instantenous velocities of a given vector field. Flow data are often stored as a sampled vector field over a mesh. We propose a new representation of flow defined by such a vector field. Given a triangulation and a vector field defined over its vertices, we represent flow in the form of its transversal behavior over the edges of the triangulation. A streamline is represented as a set of discrete jumps over these edges. Any information about the actual path taken through the interior of the triangles is discarded. We eliminate the necessity to compute actual paths of streamlines through the interior of each triangle while maintaining the aggregate behavior of flow within each of them. We discretize each edge uniformly into a fixed number of bins and use this discretization to form a combinatorial representation of flow in the form of a directed graph whose nodes are the set of all bins and its edges represent the discrete jumps between these bins. This representation is a combinatorial structure that provides robustness and consistency in expressing flow features like the critical points, streamlines, separatrices and closed streamlines which are otherwise hard to compute consistently. |
| Type | Text |
| Publisher | University of Utah |
| Subject | data analysis; discrete methods; vector fields; two-dimensional flow |
| Subject LCSH | Flow visualization |
| Dissertation Institution | University of Utah |
| Dissertation Name | Master of Science |
| Language | eng |
| Rights Management | © Shreeraj Jadhav |
| Format | application/pdf |
| Format Medium | application/pdf |
| Format Extent | 14,994,490 bytes |
| Identifier | etd3/id/1787 |
| Source | Original in Marriott Library Special Collections, TA7.5 2012 .J33 |
| ARK | ark:/87278/s60c59kj |
| DOI | https://doi.org/doi:10.26053/0H-D6YA-AY00 |
| Setname | ir_etd |
| ID | 195476 |
| OCR Text | Show CONSISTENT REPRESENTATION OF TWO-DIMENSIONAL FLOW by Shreeraj Jadhav A thesis submitted to the faculty of The University of Utah in partial ful llment of the requirements for the degree of Master of Science in Computing School of Computing The University of Utah August 2012 Copyright c Shreeraj Jadhav 2012 All Rights Reserved The University of Utah Graduate School STATEMENT OF THESIS APPROVAL The thesis of has been approved by the following supervisory committee members: , Chair Date Approved , Member Date Approved , Member Date Approved and by , Chair of the Department of and by Charles A. Wight, Dean of The Graduate School. Shreeraj Jadhav Valerio Pascucci 4-30-2012 Christopher Johnson 4-30-2012 Elaine Cohen 4-30-2012 Alan Davis Computer Science ABSTRACT Analysis and visualization of ow is an important part of many scienti c endeavors. Computation of streamlines is fundamental to many of these analysis and visualization tasks. A streamline is the path a massless particle traces under the instantenous velocities of a given vector eld. Flow data are often stored as a sampled vector eld over a mesh. We propose a new representation of ow de ned by such a vector eld. Given a triangulation and a vector eld de ned over its vertices, we represent ow in the form of its transversal behavior over the edges of the triangulation. A streamline is represented as a set of discrete jumps over these edges. Any information about the actual path taken through the interior of the triangles is discarded. We eliminate the necessity to compute actual paths of streamlines through the interior of each triangle while maintaining the aggregate behavior of ow within each of them. We discretize each edge uniformly into a xed number of bins and use this discretization to form a combinatorial representation of ow in the form of a directed graph whose nodes are the set of all bins and its edges represent the discrete jumps between these bins. This representation is a combinatorial structure that provides robustness and consistency in expressing ow features like the critical points, streamlines, separatrices and closed streamlines which are otherwise hard to compute consistently. CONTENTS ABSTRACT : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : iii LIST OF FIGURES : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : v LIST OF TABLES: : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : vii ACKNOWLEDGMENTS : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : viii CHAPTERS 1. INTRODUCTION : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : 1 2. RELATED WORK : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : 5 3. TWO-DIMENSIONAL STEADY STATE VECTOR FIELDS: : : : : : : : : 7 4. DISCRETE REPRESENTATION : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : 10 4.1 Local Representation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10 4.1.1 Discretizing Edges . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11 4.1.2 Restrictions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12 4.1.3 Feasibility and Accuracy . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13 4.2 Topological Features in Descrete Form . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15 4.2.1 Quantized Streamlines . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15 4.2.2 Quantized Critical Points . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17 4.2.3 Quantized Cycles . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18 4.2.4 Separatrices . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19 4.2.5 (Un)Stable Manifolds . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20 5. IMPLEMENTATION : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : 22 5.1 Conversion of Vector Field . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22 5.1.1 Consistency . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23 5.1.2 Map Data Structure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23 5.2 Cycle Detection . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25 5.2.1 Link-Graph Data Structure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27 5.3 Complete Topological Segmentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28 6. RESULTS AND DISCUSSION: : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : 30 REFERENCES : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : 35 LIST OF FIGURES 1.1 Inconsistent topology generated by computing separatrices using numerical in- tegration. Compounding integration error causes two separatrices to intersect, producing an invalid topological skeleton. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 3.1 Types of rst order critical points. (a) Sink and attracting focus; (b) source and repelling focus; (c) saddle and center . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8 4.1 Construction of quantized edge maps. (a) Formation of links within a triangle. Each color represents a pair of origin and destination interval creating a link. (b) Mapping of in ow and out ow bins under such ow. . . . . . . . . . . . . . . . . . 12 4.2 Re nement of quantized edge maps. (a) Estimating error and (b) re nement procedure. The dashed curve indicates an actual streamline computed from original ow. The dash-dotted line indicates linear approximation of the streamline within its link. Red lines in (a) indicate the origin and destination intervals of the initial link, while the red and green lines in (b) indicate two di erent links created by splitting the initial link. . . . . . . . . . . . . . . . . . . . . . 14 4.3 Subgraphs shown with colored bins indicating links and grey dashed lines for each bin-to-bin rasterization. Two q-streamlines are shown, a forward q-streamline with a solid black line and black triangles and a backward q- streamline is shown with a dashed black line and white triangles. Triangle direction indicates the direction of vector eld, not the direction of integration. In both cases, the q-streamlines choose the rightmost (with respect to the integration direction) bin. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16 4.4 Forward (a) and backward (b) bin-graphs for the links illustrated in Figure 4.3. For each edge in this sequence, the bins are displayed as a column of circles, colored to indicate the links they fall in on either side of the edge. . . . . . . . . . 17 4.5 Classi cation of cycles. Images show di erent examples of forward stable cycles with corresponding bin graph. Grey bins refer to the bins in the cycle. Solid arrows indicate forward q-streamlines; dashed arrows indicate backward q-streamlines. (a) Forward stable cycle attracting on both sides. (b) Forward stable cycle attracting on one side and neutral on the other side. (c) Forward stable cycle attracting on right side and repelling on left. (d) A forward stable cycle cannot repel on its right-hand side. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19 4.6 Italy (A tile from climate dataset): Exact cycles with classi cation. Red cycles are attracting on both sides; green cycles are repelling on both sides. There are a total of 412 cycles in this dataset. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20 4.7 In triangles with saddles, we grow q-streamlines at the grey dashed bins to trace separatrices. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21 5.1 Data structure for quantized edge maps. (a) A piecewise linear ow in a triangle, (b) corresponding quantized edge map, and (c) storage of quantized edge map as an array of intervals in a memory e cient data structure. . . . . . . 25 5.2 Closed streamline detection using graphs. (a) Link-graph corresponding to the links illustrated in Figure 4.3. (b) Assuming there is a closed q-streamline running from the green link-node on the left to the blue link-node on the right, the MSCC computation will remove the orange, purple, and light green nodes in the center. Next, pruning will reduce the intervals in the green, red, and cyan links as shown by the circled bins since their q-streamlines leave the MSCC. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26 5.3 Graph-splitting progressively convergence to cycles. Left to right:a gradual reduction in the size of regions. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28 5.4 Link-graph data structure. (a) A simple link-graph using a variable sized array in every node for storing incoming and outgoing nodes. (b) E cient data structure for a node. (c) Link-graph stored using the suggested data structure. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29 5.5 Topological skeleton / segmentation: Cuba tile from climate dataset on the left shows its topological skeleton (cycles in yellow and separatrices in black). Image in the center shows topological segmentation generated using region growing approach for computing stable/unstable manifolds. Image on the right shows topological segmentation produced using ood lling on skeleton. . 29 6.1 Synthetic dataset (100 x 100): Left: Shown with inconsistent topological skeleton due to numerical errors. There are two saddles in the dataset. One on the left (saddle1) and another on the right (saddle2). Middle: Zoomed view of saddles with unre ned (base) maps. Right: Zoomed view of saddles with re ned maps. Saddle1 is shown as the top zoom window and saddle2 is shown as bottom zoom window. Both, coarse and re ned maps demonstrate consistency. Follow the green (outer) separatrix that ows downward from saddle1. It remains outside of the curved path, i.e., to the right hand side of the red separatrix as shown in the zoomed image of saddle2. . . . . . . . . . . . . . . 31 6.2 Climate dataset (3600 x 2400):Topological skeleton with 54411 cycles. Zoomed windows at the bottom show a dense network of separatrices that are crucial to be computed consistently. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32 vi LIST OF TABLES 6.1 Performance per dataset:Memory and time are given in MB and Min:Sec, respectively. The approximate orbits converge to roughly 1 million bins (2e-04 of an edge). Machine used:2.64 GHz 8 core CPU with 6GB RAM. . . . . . . . . . 33 ACKNOWLEDGMENTS I take this opportunity with great pleasure to express my gratitude towards all the people without whom this thesis would not have happened. I would like to thank my advisor Dr. Valerio Pascucci for all the guidance that he provided during my graduate studies. I am thankful for all the discussions, ideas and insights that he provided and for his patience all the way through. I am also thankful to Dr. Joshua Levine and Dr. Peer-Timo Bremer for being great mentors. They have shown immense patience and have spent a lot of their valuable time for helping me with my di culties. Their contribution cannot be overstated. I would also like to thank my other collaborators, i.e., Harsh Bhatia, Dr. Luis Gustavo Nonato and Dr. Guoning Chen for their important contribution to this work. Lastly, I am grateful to my friends and family for their emotional support and for keeping me motivated. I dedicate this thesis to them. CHAPTER 1 INTRODUCTION Study of uid ow is common in a variety of engineering and scienti c endeavors like combustion simulations, aerodynamics of automobiles and airplanes, study of climate and oceanic currents, and high energy physics. Analysis and visualization of uid ow is crucial for all such investigations. There are many di erent techniques for analyzing and understanding uid ow. For example, for visualizing behaviors like rotation and stretching, scalar quantities like vorticity [13, 23] and FTLE elds [12, 22] are computed. The variation in magnitude of these quantities indicates the distribution of such behavior across the domain. For analyzing global behavior and structural properties of ow, techniques rely on computing topological features [7, 17, 24]. This is done by computing streamlines that are paths of massless particles under instantaneous velocities of ow. If advected for in nite time in forward and backward direction, streamlines converge to features such as critical points and closed streamlines which are the limit sets of these streamlines. For obtaining a global structure, ow is subdivided into regions of uniform ow, such that streamlines within each of these regions have a common pair of limit sets. Streamlines that bound these regions are called separatrices. The above mentioned techniques are based on mathematical concepts that assume a smooth vector eld de ned over a smooth domain. They also assume exactness in computations. However, while representing and analyzing ow in a computer, assumptions made under this model do not hold. First, ow is traditionally represented in a discrete manner using a sampled vector eld over the vertices of a mesh. The vector eld is extended to the interior of the simplices using interpolation. This is an approximation of the vector eld as well as the underlying domain. Based on the interpolation chosen and whether the domain is nonplanar, this may violate the assumption that the vector eld and its 2 domain are smooth. Second, though ow features like streamlines, critical points, etc. are mathematically well de ned, the algorithms to compute them are based on numerical methods that are approximate. This approximation can cause violations of mathematical invariants of these features. For example, by de nition, streamlines are pairwise disjoint, i.e., they do not touch or intersect each other. Since, however, the numerical methods used to compute them are prone to errors, streamlines may cross over each other. Figure 1.1 shows an example of an invalid topological skeleton due to numerical integration errors. Similarly, due to numerical errors, critical points may go undetected or may get wrongly classi ed. Thus, computing these features consistently becomes a di cult task. Third, a computer can use only a nite set of bits to represent real numbers. Thus, it represents only a discrete set of values. This causes truncation error in every arithmetic operation, which may contribute to above mentioned inconsistencies. Analysis techniques compute results disregarding above mentioned e ects of representing and analyzing vector elds in a computer. Consequently, this prevents reliable interpreta- tion of data since consistency of computed features cannot be guaranteed. Furthermore, downstream analysis techniques such as those developed for scalar eld analysis [11, 16] cannot be applied without a valid underlying structure. To address these issues, a combinatorial representation of ow [21] was recently de- veloped based on the theory of combinatorial vector elds [6]. This theory de nes a combinatorial equivalent of smooth vector elds. It constructs a vector eld as a sim- plicial graph of the underlying mesh. Under this graph, computations can be performed consistently and robustly. However, conversion of a vector eld into a simplicial graph causes some coarsi cation. Finer mesh may be required for complex ow behaviors in such a representation. We describe a new representation of ow that avoids above mentioned issues in its analysis. This representation combines the characteristics of combinatorial and traditional methods of representing ow. This representation uses a combinatorial structure for robust- ness and consistency and it can also represent ow at approximation levels equivalent to that of traditional representation. We establish equivalent de nitions of ow features from smooth vector elds such as critical points, streamlines, separatrices, closed streamlines, etc. thus forming an analogous representation of ow. Using a triangulation of the domain, we represent ow in the form of its transversal behavior over the edges of this triangulation. We only maintain the relation between the 3 Figure 1.1. Inconsistent topology generated by computing separatrices using numerical integration. Compounding integration error causes two separatrices to intersect, producing an invalid topological skeleton. entry and exit points in form of a map through each triangle. Flow is represented as discrete jumps through the interior of triangles. This notion of capturing boundary behavior of ow follows from a recently developed representation called edge maps [1, 15]. We handle the discretization of real numbers explicitly using quantization of each edge into a uniform set of bins represented by integers. This provides a combinatorial structure to the representation which we exploit to form graph based algorithms for analysis of ow. Given a smooth vector eld, we can approximate ow to an abitrary accuracy level 4 while converting to our representation. Though approximation errors are incurred during this conversion, any further computations on the ow can be performed without incurring additional errors. In other words, by converting ow to our representation, we isolate accu- racy from consistency. We provide consistent algorithms for computing features like critical points, streamlines, separatrices and closed streamlines to demonstrate this capability of the representation. The goal of this thesis is to provide a solution to inconsistencies in conventional methods of data analysis for uid ow data. This thesis argues that use of discrete structures to approximate ow datasets can be e ective for consistent analysis which cannot be guaranteed by conventional methods that depend on numerical methods and oating point computations. We describe a new combinatorial representation for two dimensional steady state vector elds. This representation is analogous to smooth vector elds, that can represent equivalent structural features like critical points, streamlines, separatrices, closed streamlines, etc. We provide equivalent de nitions of these features in our representation and provide a method to compute them in a robust and consistent manner. CHAPTER 2 RELATED WORK Many analysis and visualization techniques have been developed that use traditional numerical tools like interpolation and integration. For example, computation of topological skeleton of vector elds. The idea of using topology for vector eld visualization was introduced by Helman and Hesselink [14]. Helman and Hesselink de ne a two-dimensional vector eld's topological skeleton as a graph constructed using a special set of streamlines, called separatrices, that connect the critical points of the eld. Separatrices are the four streamlines that (asymptotically) travel to and from each saddle point. The majority of approaches in both two and three dimensions for computation of topological skeleton are based on numerical streamline computations for separatrices [5, 9, 19, 28, 25]. Similar techniques have been extended to multiresolution representations as well as time-dependent ows [8, 27]. However, it is well known that computing the topological skeleton can be numerically unstable due to errors inherent in the integration of separatrices and inconsis- tencies among neighboring triangles [4]. Subsequent techniques in two [18, 26, 29] and three [30] dimensions augment even more sensitive features like closed streamlines to vector eld visualization. Closed streamline detection approaches are perhaps even more sensitive to numeric integration, as the pe- riodic nature of the ow quickly exposes any inconsistencies in the integration scheme. Consequently, many of these approaches prefer progressive techniques, where the orbits are rst detected at a combinatorial level (for example, in [29] a sequence of triangles containing a closed streamline is rst identi ed) and then relying on numeric computations to compute the exact orbit. To address consistency and robustness issues in the analysis of vector elds, an approach by Chen et. al. [3] computes a directed graph using triangles of the underlying mesh as nodes called the Morse Connection Graph (MCG). The construction of this graph is based on discretization of paths taken by streamlines through these triangles. This 6 graph is simpli ed by colapsing strongly connected components and removing redundant paths to converge to Morse Sets. These sets together with the graph form a conservative decomposition of ow and is guaranteed to be consistent. More recently, a combinatorial representation of ow [21] was recently developed based on the theory of combinatorial vector elds [6]. This theory de nes a combinatorial equivalent of smooth vector elds. It constructs a vector eld as a simplicial graph of the underlying mesh. Under this graph, computations can be performed consistently and robustly since they avoid numerical com- putations entirely. While similar approach have been successful for scalar eld topology [10], due to the coarse nature of discrete vector elds, expressing complex ow behaviors like the one in piecewise linear vector elds may be di cult without drastically increasing the mesh resolution. CHAPTER 3 TWO-DIMENSIONAL STEADY STATE VECTOR FIELDS In this section, we introduce concepts from smooth vector elds which are crucial for data analysis and visualization and are important for establishing an equivalent combina- torial representation (quantized ow). We will revise the de nitions of topological features like critical points, separatrices, limit sets and stable/unstable manifolds which form the topological skeleton of a two-dimensional vector eld. Using these features of a vector eld it is possible to form a topological segmentation of the domain called as Morse decomposition. Later, we will use such visualizations for demonstrating the capabilities and advantages of the quantized ow over traditional methods of computation. A two-dimensional steady state vector eld is de ned as a map ~V : M! R2 whereMis a smooth 2-manifold. ~V de nes a velocity (a vector) at every point on M. Each point can be classi ed as either a critical point or a regular point. A point c 2M is a critical point if ~V (c) is a zero vector. All other points that do not satisfy this condition are regular points. A critical point is classi ed based on the behavior of vector eld in its neighborhood. If the Jocobian matrix i.e. derivative of the vector eld at a critical point is full rank, then the critical point can be classi ed as a rst order critical point based on the eigen values of the matrix. First order critical points are broadly classi ed as sources, sinks, saddles and centers as shown in Figure 3.1. More complex classes of critical points can exist if one or more eigen values are zero. These are referred to as degenerate or higher order critical points. A more general classi- cation of critical points is given by the Poincar e-Hopf Formula. This formula maps the classes of critical points to an index number. This number is known as Poincar e index or winding number. By de nition of a manifold, neighborhood of a critical point is locally Euclidean, such that the vector eld in that neighborhood can be represented as 8 (a) (b) (c) Figure 3.1. Types of rst order critical points. (a) Sink and attracting focus; (b) source and repelling focus; (c) saddle and center (x1; x2) 7! (v1; v2) The Poincar e-Hopf formula is then given by: ic = 1 2 I d where = arctan v2 v1 and is a Jordan curve enclosing the critical point in that neighbor- hood. It basically computes the number of rotations that the vector makes while sliding along the curve around that neighborhood. Starting at any point x 2M, a path can be traced following the instantaneous velocities of ~V . In a steady state vector eld, this curve is called a streamline. A streamline can be de ned as a solution to the di erential equation, d (x; t) dt = ~V (x) with the initial condition (x; 0) = x0. A vector eld de nes a continuum of streamlines. Asymptotic behavior of these streamlines reveal topological features or invariants of the vector eld. Conventionally, numerical methods are used to compute these streamlines i.e. solve the di erential equation mentioned above. An important invariant of vector eld apart 9 from critical points are cycles. A cycle is a streamline such that there exists t1 > 0 where (x; t1) = x. If one traces a streamline from a point in a cycle, the streamline will ow back to that starting point making a closed streamline. Invariants like critical points and cycles that de ne the topological structure of a vector eld are limit sets of the streamlines in that vector eld. There are two types of limit sets for each streamline in a vector eld without a boundary. An -limit set (S ) and !-limit set (S!) of a streamline (x0; t) is de ned as follows: S = fy 2 Mj9(tn)n2N R; tn ! 1; lim n!1 (x0; tn) ! yg S! = fy 2 Mj9(tn)n2N R; tn ! 1; lim n!1 (x0; tn) ! yg: Intuitively, -limit set of a streamline is obtained by advecting the streamline for negative in nite time and indicates the origin of that streamline. Similarly, !-limit set is obtained by advecting a streamline for positive in nite time and it indicates the destination or end of that streamline. In steady state two-dimensional vector elds, the - and !-limit sets of all streamlines collectively form the set of all critical points and closed streamlines and describe the topological skeleton. Each limit set de nes a stable and an unstable manifold. Consider a limit set Y . Stable and unstable manifolds Ws and Wu of Y are de ned as follows: Ws = fp 2 Mj lim t!1 (p; t) = y; y 2 Y g Wu = fp 2 Mj lim t!1 (p; t) = y; y 2 Y g The intersections of the (un)stable manifolds of all limit sets describes a topological segmentation of M called the Morse decomposition. Generating such a segmentation of the domain provides an insight into the global behaviour of a vector eld. Generating a topological segmentation or detecting ow features like the ones mentioned above requires streamlines as a fundamental computation. It is very important to compute streamlines without any inconsistencies for the downstream analyses to be valid. Discrete models of ow like graph based approaches show promise since the computation of streamlines in such a representation is analogous to a graph traversal which ensures consistency by eliminating any kind of numerical computation. CHAPTER 4 DISCRETE REPRESENTATION In this chapter we de ne a discrete representation of vector eld which helps guarantee consistent analysis of ow. To avoid inconsistencies and robustness issues due to numer- ical errors, we develop a completely combinatorial structure that describes ow over a triangulation based on its transversal behavior over the edges. Theoretically, conventional representation of vector eld using interpolation represents a continuum of streamlines. Due to in nite number of streamlines, it is di cult to maintain consistency of computed streamlines specially due to errors incurred by numerical integration methods and oating point truncations. Also, it is di cult to compute unstable features like closed streamlines or periodic cycles. Our representation consists of a nite number of streamlines that approximate the actual ow. We refer to these as quantized streamlines. The granularity of this representation is based on the number of quantized streamlines used. Quantized streamlines are formed by discretizing each edge of the triangulation in a nite number of bins such that all streamlines entering a bin merge into a single quantized streamline and are not allowed to diverge. In this manner, we ensure that streamlines can merge but cannot cross over each other. We rst discuss how we discretize the domain, i.e., the triangulation over which the ow is de ned and how we de ne a graph called bin-graph, which discretely represents ow. We also discuss how this conversion impacts accuracy of represented ow as compared to its interpolated counterpart. We describe a method to represent ow at varying degrees of accuracy based on user de ned error threshold. 4.1 Local Representation In each triangle, we build a map that connects in owing and out owing bins, thereby maintaining all the quantized streamlines owing through it. In this section, we describe 11 the local construction of this combinatorial representation within each triangle. 4.1.1 Discretizing Edges Flow through each triangle is represented as a map between its edges. An entry and exit point on the boundary of a triangle will be mapped if there exists a streamline between them that is completely contained in the interior of that triangle. We call such a pair of points an origin-destination pair. If we identify the set of all such origin points and destination points, then we can de ne a map from the set of origin points to the set of destination points which represents all streamlines owing through the triangle. We discretize each edge of the triangulation into a set of 2k equal sized bins using a kbit integer, such that each bin is either an in ow or an out ow bin. Consider streamlines of the smooth vector eld owing through these bins as they cross over the edges of the triangles. Streamlines entering a triangle ow through in ow bins and exit through out ow bins. In this discrete model, all streamlines entering an in ow bin are considered merged and are not allowed to diverge again. Thus, each in ow bin maps either to an out ow bin; or maps to the interior of a triangle in case of a critical point like a sink or a source. Let O be the set of all in ow bins and D be the union of all out ow bins and the interior of triangle. Then we can de ne a map : O ! D that we call a Quantized Edge Map. Figure 4.1 shows an example of a quantized edge map. Quantized edge maps are similar to the Edge Maps developed by Bhatia, Jadhav et al. in [1, 15]. Edge maps are continuous maps derived to represent piece-wise linear ow. Edge maps too represent ow in form of boundary map between edges of triangulation. However, since the maps are continuous, there are in nite number of streamlines passing through any triangle. Therefore, it is di cult to construct edge maps without knowning the exact nature of ow within a triangle. Computation of features like closed streamlines is also di cult. On the other hand, quantized edge maps represent ow in form of a graph based on discretized edges of triangulation. In concept, due to nite granularity, it is possible to construct a quantized edge map within a triangle without knowing the exact nature of ow. We provide a simple and e cient algorithm to contruct quantized edge maps in the piecewise linear case. Quantized edge maps in each triangle collectively provide a global combinatorial structure describing ow over a given triangulation of domain. Varying the size of bins can provide variable granularity or precision in representing ow. This representation can be considered as a large graph constructed using the bins (bin-Graph) on each edge as nodes and a map for each triangle 12 (a) (b) Figure 4.1. Construction of quantized edge maps. (a) Formation of links within a triangle. Each color represents a pair of origin and destination interval creating a link. (b) Mapping of in ow and out ow bins under such ow. de ning connections between the nodes. In the text to follow, we refer to edges of this graph as connections to disambiguate it from the edges of triangulation. 4.1.2 Restrictions Though map within each triangle can be constructed independent from each other, there are certain requirements that they must satisfy to agree with the maps of their neighboring triangles as well as represent ow consistently in the interior. There are certain constraints that we apply on the bins and their mapping. These constraints and the properties thus implied are enumerated below. Properties 1, 2, and 3 are enforced, while properties 4, 5 and 6 are derived properties. 1. For any triangle T, each bin on @T is either an infow or an out ow bin. 2. On an edge, if a bin is an in ow bin for one triangle, then it has to be an out ow bin for the other triangle. 3. We do not represent separatrices of a saddle as bins. Thus these are implicitly represented as boundary between two bins. 4. From property 1, a switch from in ow to out ow on @T is represented as boundary between an in ow and an out ow bin. 5. From properties 1 and 2, there cannot exist a streamline owing along the edge. 13 6. From properties 1 and 2, there cannot exist a sink or a source on an edge. Note that sinks and sources have an explicit existence in quantized ow in the form of bins mapped to the interoir of T, while saddles and centers exist implicitly and should be detected by examining the neighborhood behavior. Above mentioned constraints help enforce consistency of ow. 4.1.3 Feasibility and Accuracy To e ciently represent ow in each triangle, we approximate the map between in ow and out ow bins as a linear map between connected subsets of the boundary of a triangle. We call these linear maps as links. A collection of such links that form a covering of the entire boundary of a triangle de nes a quantized edge map. Links can be identi ed as continuous set of streamlines entering and exiting a triangle. Since peicewise linear vector elds are commonly used, the notion of links and edge maps was used to study all possible structures in a piecewise linear vector eld in [15]. It is a detailed study of local ow behaviors of such vector elds in the form of links and enumerate di erent structures that they can exhibit. Since ow can switch direction only once per edge, there are a limited number of possibilities. This study helps to establish a bound over the complexity of data structure required in this representation of ow. To approximate the ow within each link, the map between in ow and out ow bins can be linearly approximated using rasterization. Due to the explicit quantization, each link de nes a map from m in ow bins to n out ow bins. We use Bresenham's algorithm [2] to compute the next point along an integration path, or more generally, given an in ow bin i < m, we compute its corresponding out ow bin (i) by rounding equation n i=m to the nearest integer. Clearly, there can be a one-to-many or a many-to-one mapping of bins. While, we allow streamlines to merge into a bin, we do not allow bifurcation. This condition is necessary for maintaining consistency of streamlines .If m < n, then by the rasterization algorithm an ith in ow bin may map to more than one out ow bins. In such a case we always choose the rightmost bin to make a consistent choice. This is done for both forward and backward streamline computation. This ensures that streamlines do not cross over each other once they merge into a bin. Based on whether we represent forward ow or backward ow, the links remain the same but the direction of ow is inverted. We designate forward rasterization map as + and backward rasterization map as . 14 The linear mapping of bins within each link is an approximation of actual ow. The actual ow can be more complex than assumed. This is a source of error in our repre- sentation. We estimate this error by using a regular sampling within each link for tracing streamlines of the actual ow. We nd the maximum o set between the destination of the actual streamlines and their approximated counterparts. Figure 4.2 illustrates this estimation process. Consider an in ow bin b and a true streamline (x0) sampled at any point x0 2 b. Let x0 0 be the point where (x0) rst exits the triangle. The approximation error a can be formulated as follows: a = jx0 0 (b)j In the above expression, (b) is considered to be the midpoint of the destination bin. If this error is higher than a user provided threshold, we can split the link into smaller links using the regularly sampled streamlines of actual ow. The mapping of bins within the old link is now represented by a polygonal curve rather than a single line which increases the accuracy with which we approximate a given vector eld. This process can be repeated recursively to achieve arbitrary levels of accuracy. (a) (b) Figure 4.2. Re nement of quantized edge maps. (a) Estimating error and (b) re nement procedure. The dashed curve indicates an actual streamline computed from original ow. The dash-dotted line indicates linear approximation of the streamline within its link. Red lines in (a) indicate the origin and destination intervals of the initial link, while the red and green lines in (b) indicate two di erent links created by splitting the initial link. 15 4.2 Topological Features in Descrete Form Two triangles sharing an edge also share the bins on that edge. The maps of such triangles represent in ow and out ow consistently across their shared edges. These maps connect up across the triangle edges to form a large graph which we call the bin-graph. Based on whether we are considering forward ow or backward ow, two bin-graphs can be de ned. Both, forward and backward bin-graphs have the same nodes (bins) but di erent connections (mapping) between them. De nition 1 (Bin-Graph) Let B be the set of bins on a triangulation. The forward bin-graph is a directed graph GB +(B;E+) with E+ = f(b; +(b)) j b 2 Bg. The backward bin-graph, G B, is de ned symmetrically. We represent ow as a nite number of streamlines in form of traversals through this graph starting from any bin. Each bin uniquely represents one forward and one backward streamline. Together, forward and backward bin-graphs describe the complete ow of a given vector eld in a discrete manner. We will now de ne quantized streamlines and structural features in the context of this discrete structure. 4.2.1 Quantized Streamlines In smooth vector elds, streamlines are computed using numerical integration methods. In our representation, we compute streamlines as a graph traversal through the bin-graph. Given the above de nition of a bin-graph, it is important to understand the properties of ow represented by it. To simplify the discussion below, we de ne a quantized streamline or a q-streamline represented by a bin-graph as: De nition 2 (Q-streamline) A forward q-streamline, S+(b0) starting at bin b0 is an or- dered sequence of bins fb0; b1; b1; : : : ; bng such that +(bi) = bi+1. A backward q-streamline S(b0) is de ned symmetrically. Q-streamlines are illustrated in Figure 4.3 and the corresponding forward and backward Bin-Graph is shown in Figure 4.4. This image shows both a forward and a backward q-streamline integrated through ve triangles. Based on the above de nition and the prop- erties of Bin-Graph, q-streamlines have some interesting properties that we state explicitly here: 16 Used as a starting point, each bin b de nes, at most, two q-streamlines S+(b) and S(b). However, each bin can be part of multiple q-streamlines and di erent bins may de ne the same q-streamline. If two forward (or backward) q-streamlines merge, they do not bifurcate again (this includes self merging). For example, in the red link of the second triangle in Figure 4.3, three forward q-streamlines merge when entering the cyan link of the third triangle. Traced forward these lines will never split. Q-streamlines do not cross. Clearly, the rasterization procedure preserves the order of q-streamlines except when two lines merge. However, two merged lines never split guaranteeing that no two q-streamlines can cross. However, if a forward and backward q-streamline merge, they may bifurcate in their respective directions (as shown by the two q-streamlines in Figure 4.3). We can exploit the combinatorial structure of this representation to identify important structural features of the ow like critical points, cycles, separatrices, and stable/unstable manifolds. Since the underlying structure is discrete we can avoid numerical methods for computing these features, thereby generating consistent and robust results. Figure 4.3. Subgraphs shown with colored bins indicating links and grey dashed lines for each bin-to-bin rasterization. Two q-streamlines are shown, a forward q-streamline with a solid black line and black triangles and a backward q-streamline is shown with a dashed black line and white triangles. Triangle direction indicates the direction of vector eld, not the direction of integration. In both cases, the q-streamlines choose the rightmost (with respect to the integration direction) bin. 17 (a) (b) Figure 4.4. Forward (a) and backward (b) bin-graphs for the links illustrated in Figure 4.3. For each edge in this sequence, the bins are displayed as a column of circles, colored to indicate the links they fall in on either side of the edge. 4.2.2 Quantized Critical Points In smooth vector elds, critical point in a neighborhood can be classi ed based on the Poincar e index or the winding number as mentioned in Chapter 3. This index is calculated as the number of rotations the vector at a point makes as it slides along a Jordan curve which does not have a zero vector on it. The point is moved in counter clockwise direction. Counter clockwise rotation of vector is considered positive while clockwise rotation of vector is considered negative rotation. The number of rotations is always an integer because the sliding point comes back to its starting position. Our representation inherently stores behavior of ow on boundary of each triangle, we use this to detect and classify critical points based on Poincar e Index or the winding number. The index can be computed using a simple count of transition points. Transition points on a quantized edge map are the switch points along the boundary of a triangle where ow switches from the in ow to out ow. If the bins adjacent to a transition point map to each other, then it is called an external transition point (ETP), else it is called an internal transition point (ITP). This classi cation indicates how the vector de ning such a ow would rotate. Since all these points are accounted for, the number of rotations can be computed independent of how the vectors behave between transition points. By developing an equivalent formula for computing Poincar e index (ind@T ) for the discrete representation, we detect and classify critical points consistently. ind@T = 1 2 0 @ X kTIk + X kTEk + 2 1 A = (kTIk kTEk)=2 + 1 18 TI is the set of ITPs and TE is the set of ETPs. This formula ignores any existence of a critical point on the edges or vertices of a triangle. Any such point will be treated as a transition point based on the quantized map thus computing Poincar e index of the interior of triangles. For detecting and classifying critical points that might lie on an edge, we compute Poincar e index of the quadrilateral formed by the two triangles sharing the edge and subtract the indices of the individual triangles. Similarly for a vertex, we compute the index for the polygon surrounding that vertex and subtract the indices of the surrounding triangles and edges. This can be done because classi cation of transition points existing at the vertices of quadrilaterals and polygons can be performed based on the local map of bins. 4.2.3 Quantized Cycles Like critical points, there is another topological feature of vector elds that is important is a cycle. A cycle is also called as closed streamline or periodic orbit. Such a streamline acts as a limit set in two-dimensional vector elds, i.e., it can act as a sink, source or a saddle. If the trajectory of a point on a closed streamline is traced, one returns to the same point completing a loop. Exact closed streamlines are particularly di cult to compute using numerical techniques due to the inherent computation errors and inconsistencies caused due to the same. Since in quantized ow we represent ow discretely as a graph, a closed streamlines exist explicitly as closed loops of connections (graph-edges) in a bin-graph. De nition 3 (Quantized Cycle) A closed q-streamline S(b0) is a q-streamline such that there exists an n > 0 such that b0 = bn. 4.2.3.1 Classi cation of Quantized Cycles Since forward and backward maps di er, there exist three primary classes of cycles: those stable in +; those stable in ; and those stable in both. Also, closed streamlines are limit sets and can be classi ed based on whether they are attracting, repelling or neither on the sides of their trajectories. Based on these possibilities and eliminating symmetrical cases, we classify cycles in a total of 12 classes. Figure 4.5 shows examples of forward stable cycles. +. Consider a forward stable cycle C. A forward stable cycle is de ned by As discussed in section 4.1.3, in case of one to many mapping of bins, we always choose the rightmost bin 19 (a) (b) (c) (d) Figure 4.5. Classi cation of cycles. Images show di erent examples of forward stable cycles with corresponding bin graph. Grey bins refer to the bins in the cycle. Solid arrows indicate forward q-streamlines; dashed arrows indicate backward q-streamlines. (a) Forward stable cycle attracting on both sides. (b) Forward stable cycle attracting on one side and neutral on the other side. (c) Forward stable cycle attracting on right side and repelling on left. (d) A forward stable cycle cannot repel on its right-hand side. in both + and . Thus, cycle C cannot have a diverging streamline on the right hand side. i.e. It cannot be repelling on right hand side w.r.t direction of forward ow. It can either be attracting if there exists at least one forward streamline approaching the cycle from the right side or neutral (neither attracting nor repelling). On the left side, cycle C can be either attracting (if there exists at least one streamline that approaches the cycle), repelling (if there exists at least one streamline that diverges from the cycle), or neutral (neither). Symmetrically, a backward-stable cycle cannot be attracting on the right hand side w.r.t direction of backward ow. It can only be repelling or neutral. On its left, it can be attracting, repelling or neutral. Note that a forward stable cycle which is repelling on its left is also backward stable. The property of repelling implies that backward streamlines converge to the cycle making it backward stable. Symmetrically, a backward cycle which is attracting on its left is also forward stable. Figure 4.6 demonstrates the computation and classi cation of exact cycles on the dataset of oceanic currents near Italy. 4.2.4 Separatrices The traditional approach to compute the topological skeleton is to nd all saddles and trace their four separatrices until they converge towards an orbit or hit another critical point. Some of the challenges for numerical techniques have been that separatrices by de nition are numerically unstable (they are asymptotic paths) and moreover it can be especially di cult to determine when a streamline converges towards an orbit. Quantized ow described by 20 Figure 4.6. Italy (A tile from climate dataset): Exact cycles with classi cation. Red cycles are attracting on both sides; green cycles are repelling on both sides. There are a total of 412 cycles in this dataset. bin-graph eliminates these issues making separatrix computation straightforward. An interesting consequence of the discretized ow is that separatrices are represented as boundaries between bins in stable/unstable manifolds, as opposed to lying on a particular q- streamline. Speci cally, every saddle exists on the interior of a triangle with a link structure like the one shown in Figure 4.7. Clearly, the separatrices are represented as the boundaries between the links as shown by the grey dots, as opposed to a speci c bin. However, given that q-streamlines when faced with a one-to-many mapping consistently choose the right most bin we simply extract the q-streamlines (forward or backward) of the bins just left of the separatrices. These q-streamlines by de nition must be a collection of bins lying on the boundary of a stable or unstable manifold (as anything to the right of them would have crossed the separatrix), and thus would include bins in a di erent manifold. As a result, we trace a path lying directly adjacent to where the separatrix exists, which is a suitable, (and more importantly) consistent representation of the separatrices. 4.2.5 (Un)Stable Manifolds As de ned earlier in Chapter 3, every limit set has stable and unstable manifolds. All streamlines owing into (or emerging from) a limit set demarcate the stable (or unstable) manifold of that limit set. We rede ne the stable/unstable manifolds in our discrete representation in terms of bins that belong to the q-streamlines that ow into or emerge from the limit sets of a vector eld. 21 Figure 4.7. In triangles with saddles, we grow q-streamlines at the grey dashed bins to trace separatrices. CHAPTER 5 IMPLEMENTATION Conversion of PL vector elds into a quantized form requires construction and e cient storage of quantized edge maps. We describe an algorithm that can construct quantized edge maps that are consistent with each other and make minimal assumptions about the ow in a triangle. We describe a data structure to e ciently store these maps. 5.1 Conversion of Vector Field In constructing a quantized version of edge map, our objective is to identify contiguous set of in ow bins (in ow interval) that ow to a contiguous set of out ow bins (out ow interval). Such pairs then form a link and linearly map to each other. We rst identify all transition points on the edges of a given mesh based on the interpolated vector eld in each triangle. An edge is shared between two triangles. A transition point is classi ed as internal or external independently based on the vector eld on either side. Since an interpolated vector eld is continuous, we enforce a condition that a transition point cannot be an ITP on both sides but it can be ETP on both sides. This gives us a total of two states of a transition point. In the rst state it is an ETP on one side and ITP on the other, while in the second state it is an ETP on both sides. Identi cation of these transition points also ensures that edge maps agree with the in ow and out ow intervals across the edges. In the next step, for each triangle, we identify the intial list of in ow and out ow intervals based on its edges and the preidenti ed transition points. We construct a circular linked list based on the order of the intervals along the triangle boundary. This circular linked list maintains consistency of the map. It avoids any cross linking and overlapping of intervals. A streamline is numerically traced from the mid point of the largest interval in the list and the list is split into two independent lists based on the origin and destination bins identi ed by the streamline. This can be done because streamlines are not supposed to cross each 23 other. Each time a streamline is traced from an in ow bin to an out ow bin, the triangle region is divided into two regions such that streamlines from one region cannot ow to the other without owing outside the triangle rst. Any streamline traced later cannot have a destination bin outside the list of intervals that it started from. This process is repeated recursively to identify the set of links that can then be put together to construct a quantized version of edge map. Every time a streamline is traced from the largest interval in a list, new links formed are updated into a list using updateLinks() function. We start with a list of intervals ordered along the boundary of triangle. We call the function Split(I; T) recursively until all links are formed. Alogrithm 1 depicts the pseudocode. I is the circular linked list of intervals and T is the set of transition points already identi ed such that they are consistent across edges with other triangles. This algorithm assumes that the rst order critical points in each triangle have been computed and are available as zero length intervals in the list for mapping / forming links. We modify our function for computing numerical streamline such that if a streamline ows to a bin that is not in the list of intervals, then we snap the streamline to the nearest available bin within the list. 5.1.1 Consistency There are two numerical methods involved in the construction of quantized maps. These are the indenti cation transition points on edges and computation of streamlines. We compute transition points by solving a simple linear system of equations and compute streamlines using the Local Exact Method (LEM) [20] which are highly accurate but can still cause inconsistencies due to oating point truncations and numerical errors. This is the primary motivation for constructing the quantized edge maps that enforce consistency of ow. Consistency is enforced since links are not allowed to overlap or intersect, and mapping of bins within each link is linear and order preserving. 5.1.2 Map Data Structure Each map once constructed is converted to a storage e cient data structure. We store a quantized edge map as an array of intervals. Each interval contains a k-bit integer as the starting bin number of that interval on an edge. Bins on each edge of the given mesh are considered to be numbered in an orientation from the lower indexed vertex to the higher indexed vertex for that edge. The number of bins to be used per edge is a user input parameter entered before contruction of quantized edge maps. Thus an interval spans from 24 Algorithm 1 Quantized Construction 1: procedure Split(I, T) 2: if jTj > 1 then 3: Cast a streamline from largest interval in I. 4: Divide I into I1; I2 and T into T1, T2. 5: Split(I1; T1). Split(I2; T2). 6: else if jTj = 1 then 7: if t 2 T is ETP and jIj 2 then 8: updateLinks() 9: else if t 2 T is ETP and jIj > 2 then 10: Cast a streamline from largest interval in I. 11: Divide I into I1; I2 and T into T1, T2. 12: Split(I1; T1). Split(I2; T2). 13: else if t 2 T is an ITP then 14: Find ITP images 15: updateLinks() 16: end if 17: else 18: if jIj > 2 then 19: Find SepX points. 20: end if 21: updateLinks() 22: end if 23: end procedure the begin-bin number that is stored in that interval upto the begin-bin number minus 1 of the next interval in the array. This data structure is illustrated in Figure 5.1. Two bytes per interval are bit-packed with following information: 2-bits for edge number within the face since bin numbering is only unique per edge; a 1-bit ag indicating whether the interval is in ow or out ow; 1-bit indicating orientation of the interval relative to the bin numbering; and remaining 12-bits for the index of the paired origin/destination interval in the array. Typically we use 4 bytes for storing begin-bin number and 2 bytes of other information. Hence, the size of an interval amounts to 6 bytes. 25 (a) e0 e1 e2 i0 i1 i2 i3 i9 (b) i0 i1 i2 i3 i9 i0 1 e0 i9 inflow true i9 8 e2 i0 outflow false i2 10 e0 null outflow true ....... start edge link flow orientation (c) Figure 5.1. Data structure for quantized edge maps. (a) A piecewise linear ow in a triangle, (b) corresponding quantized edge map, and (c) storage of quantized edge map as an array of intervals in a memory e cient data structure. 5.2 Cycle Detection Quantized cycles can be considered as strongly connected components (SCC) of the bin-graph. Identi cation of an SCC is a well known problem in graph theory. However in practice, bin-graphs can be very large to be process directly. Instead, we use a second graph, called the link-graph, as a coarser representation of the vector eld. To de ne the link-graph it is useful to realize that this representation contains two types of mappings: the mapping within each triangle and the mapping (across edges) between neighbor triangles. The bin-graphs directly encode the former and the latter is a trivial one-to-one mapping since neighboring triangles share bins. However, when considering links de ned as pairs of sequences of source and destination bins the intratriangle map becomes implicit, while the intertriangle map is nontrivial. Consider the bin-graph of Figure 4.4. The intratriangle mappings are indicated by the arrows while the intertriangle map is implicit in the ordering of bins. Conversely, Figure 5.2(a) shows the corresponding link-graph where the nodes (boxes) represent the set of bins indicated by the color and the edges encode that links have overlapping sequences of bins across an edge. For example, the red link's destination bins are split between the blue and orange link and thus the red node has two directed edges to the blue and orange nodes, respectively. Thus, the link-graph stores the intertriangle maps explicitly (as edges), while the intratriangle map is maintained internally within each node as a rasterization between two sequences of bins. Initially, nodes in the link-graph represent entire links, but as will be discussed below, our algorithm for cycle detection splits and prunes these sequences, 26 (a) (b) Figure 5.2. Closed streamline detection using graphs. (a) Link-graph corresponding to the links illustrated in Figure 4.3. (b) Assuming there is a closed q-streamline running from the green link-node on the left to the blue link-node on the right, the MSCC computation will remove the orange, purple, and light green nodes in the center. Next, pruning will reduce the intervals in the green, red, and cyan links as shown by the circled bins since their q-streamlines leave the MSCC. maintaining contiguous subsets of links as nodes. De nition 4 (Link-Graph) A link-graph is a directed graph GL(VL;EL) such that: VL = f ig, where each node i represents a contiguous sequence of bins from a single link. We call i a link-node. EL = ( 1; 2), such that 1 and 2 share at least one bin. Since the link-graph by de nition ignores the intratriangle mapping it represents paths between links for which no q-streamline exists. For example, the dark green and light green link in Figure 5.2(a) are connected even though no q-streamline exists that shares both light and dark green bins, see Figure 4.3. However, the link-graph is a conservative representation, meaning that if two links share a q-streamline they are connected in the link-graph yet the reverse is not necessarily true. More importantly for cycle detection is the following theorem. Theorem 5 Consider a link-graph and its forward and backward bin-graphs. If there exists a closed q-streamline in one of the two bin-graphs, then there exists a corresponding cycle of edges in the link-graph. 27 Proof: By construction, each pair of bins bi, bj with +(bi) = bj is represented by the same link-node. Thus, if there exists a closed q-streaming (b0; bi; : : : ; bn) with +(bi) = bi+1 there must exists a cycle in the link-graph. The argument for a cycle in the backward bin-graph is symmetric. Exploiting the conservative nature of the link-graph we extract closed q-streamlines by iteratively nding maximal strongly connected components (MSCCs) in the link-graph and re ning the graph through graph-cut and graph-prune operations. Graph-cut operations cut a strongly connected component of a link-graph by computing q-streamlines starting at the midpoint of the widest nodes (nodes with widest interval of bins). Since no other q-streamline can cross over the computed one, we can split the link-graph along this q- streamline. This operation allows to quickly cut away large parts of the graph before graph-prune is used. The progressive reduction in link-graphs by the process of graph- cutting is demonstrated in Figure 5.3. Graph-prune operation refers to reducing the bin intervals in each node by identifying the bins that ow into an MSCC from outside or ow outside from it. Graph-prune operation is slower since it requires inspection and possible update of every node of an MSCC. Graph-prune operation, however, allows to converge to the closed q-streamlines once the nodes reach smaller widths. 5.2.1 Link-Graph Data Structure Even though the link-graph is a coarser representation of ow, storing a link graph of a large dataset can be expensive. We design an e cient data structure to store a link- graph. This data structure is primarily based on maintaining adjacency list in every node. But we want to avoid storing a linked list or a variable length array in every node due to storage costs. Instead, we store only four pointers in every node which accounts for all the connectivities in the neighbourhood. Every node has a foward, backward, origin- side and destination-side pointer. Origin-side pointers are used to connect adjacent nodes inside a face that share the same origin edge in the counter-clockwise direction. Similarly, destination-side pointers are used to connect adjacent nodes inside a face that share the same destination edge in the counter-clockwise direction. Consider observing a node n with the direction of ow being upwards as shown in Figure 5.4. We know that each node contains an origin interval (On) and a destination interval (Dn). All outgoing nodes F = ff0; f1; f2; :::g of n are the nodes that belong to the face across the destination edge of n and share bins with Dn. Forward pointer of n0 28 Figure 5.3. Graph-splitting progressively convergence to cycles. Left to right:a gradual reduction in the size of regions. points to the rst outgoing node (f0), i.e., the rst node to the extreme left across the destination edge such that Dn \ Of0 6= . Remaining outgoing nodes can be found by dereferencing the origin-side pointer of f0 and the nodes to follow and then testing for the condition Dn \ Of 6= where f 2 F. Incoming nodes for n are found symmetrically. The backward pointer of n points to a node b0, which is the rst node on the extreme right across the origin edge of n such that On \ Db0 6= . Remaining incoming nodes are found using destination-side pointers and testing for the condition On \ Db 6= . 5.3 Complete Topological Segmentation Computing a complete topological segmentation includes identi cation of stable and unstable manifolds of all the limit sets of the vector eld. For two-dimensional steady vector elds, the limit sets are critical points and closed streamlines. We have already de ned the stable and unstable manifolds for these structures in the discrete representation in section 4.2.5. Using this de nition we observe that tracing all separatrices and identifying all cycles (closed q-streamlines) delineates the segmentation, which is referred to as topological skeleton. Our algorithm to compute this segmentation rst computes the topological skeleton and then uses ood ll approach to identify all regions of segmentation. A region of this segmentation is stored as indices of completely covered triangles and partially touched faces in form of quads. As an approximate rendering of these regions for large datasets, we use only the faces identi ed to shade these regions. This is a quick way to render the segmentation to get a high level view of a large dataset. Figure 5.5 demonstrates the ood ll approach and region growing approach for computing stable and unstable manifolds. 29 (a) direction of flow origin destination backward ptr forward ptr origin-side ptr dest.-side ptr (b) (c) Figure 5.4. Link-graph data structure. (a) A simple link-graph using a variable sized array in every node for storing incoming and outgoing nodes. (b) E cient data structure for a node. (c) Link-graph stored using the suggested data structure. Figure 5.5. Topological skeleton / segmentation: Cuba tile from climate dataset on the left shows its topological skeleton (cycles in yellow and separatrices in black). Image in the center shows topological segmentation generated using region growing approach for computing stable/unstable manifolds. Image on the right shows topological segmentation produced using ood lling on skeleton. CHAPTER 6 RESULTS AND DISCUSSION For demonstrating that our new representation produces consistent results, we show computation of topological skeleton over a synthetic dataset in Figure 6.1 that is known to produce inconsitent result in case of numerical integration method. With this guarantee, it is possible to compute topological skeletons of complex datasets as shown in Figure 6.2. In Table 6.1 we show the computational performance of our application on all the datasets used in this document. This includes size of the datasets in terms of number of tri- angles, memory footprint for representing quantized ow in each dataset and time required for conversion of vector eld to quantized ow as well as time required for approximate and exact cycle detection. Cycle detection is the process that requires the most amount of memory given the comprehensive nature of the algorithm. Depending on the size of the dataset and amount of re nement done on the quantized maps, the initial construction of link-graph and subsequent cutting of the graph can increase the number of nodes quickly. To contain the memory footprint during cycle detection, we use a process to cut the domain into smaller pieces that can be processed separately. We partition the domain / mesh into subsets by propagating all separatrices in the quantized ow. We know that quantized streamlines do no intersect each other and hence any cycle is completely contained within such a subset of the domain. Processing each subset separately helps to keep the working memory size under control. Note that this partitioning of domain is ow dependent and the subsets sizes may vary based on ow. But we observe that for most of the time large datasets will provide su cient separatrices to cut the domain into manageable subsets. Approximate cycles have been detected with an error threshold of 10,000 bins. This threshold indicates that all nodes in the link-graphs that represent approximate cycles are smaller in width than 10,000 bins. Time required to compute exact cycles is higher than approximate cycle computation and it 31 Figure 6.1. Synthetic dataset (100 x 100): Left: Shown with inconsistent topological skeleton due to numerical errors. There are two saddles in the dataset. One on the left (saddle1) and another on the right (saddle2). Middle: Zoomed view of saddles with unre ned (base) maps. Right: Zoomed view of saddles with re ned maps. Saddle1 is shown as the top zoom window and saddle2 is shown as bottom zoom window. Both, coarse and re ned maps demonstrate consistency. Follow the green (outer) separatrix that ows downward from saddle1. It remains outside of the curved path, i.e., to the right hand side of the red separatrix as shown in the zoomed image of saddle2. is highly ow dependent. The HCCI dataset takes the longest since there are much higher number of cycles as compared to other datasets and it represents incompressible ow. For conversion of vector elds into quantized ow, we use multi-threading to process multiple triangles simultaneously. We maintain consistency of ow by setting global ags before hand for in ow/out ow consistency between triangles. The numbers reported in Table 6.1 use 16 threads for quantized ow conversion. Quantized ow is a discrete representation of two-dimensional steady state vector elds, that represents ow as a large graph of bins over the edges of a triangulation of domain. This representation opens a way for using discrete algorithms for processing ow data with approximation capabilities similar to that of interpolation and numerical integration techniques. Since quantized ow is essentially a graph, e cient graph based alrogithms can be used to extract topological structures from the ow. We essentially focus on PL vector elds over triangle meshes, but the representation itself can be easily extended to quad 32 Figure 6.2. Climate dataset (3600 x 2400):Topological skeleton with 54411 cycles. Zoomed windows at the bottom show a dense network of separatrices that are crucial to be computed consistently. 33 Table 6.1. Performance per dataset:Memory and time are given in MB and Min:Sec, respectively. The approximate orbits converge to roughly 1 million bins (2e-04 of an edge). Machine used:2.64 GHz 8 core CPU with 6GB RAM. Dataset (Figure) Intervals Maps # Orbits (Time) Memory Gen. time Approx. Exact Italy currents (4.6) 56,071 38.9 17:01 200 (0:53) 412 (0:57) Cuba currents (5.5) 62,882 34.4 14:23 149 (0:32) 299 (0:37) HCCI (5.3) 816,642 196 70:58 376 (05:38) 5018 (78:12) Climate (6.2) 10.6M 948 47:30 16818 (78:49) 54411 (86:52) meshes and larger polygons. By developing a more general algorithm for construction of quantized maps, we believe that this representation can also be extended for approximating vector elds with higher interpolation methods. Of course, certain assumptions made for PL vector elds, like a single transition point per edge and a single critical point per polygon will not hold. Since, quantized ow represents boundary behaviour of ow, integration of streamlines within a polygon can be considered a black box. Given such a black box, ideally it is possible to construct a quantized map for each polygon providing a general construction process. Quantized ow also represents vector elds with varying degrees of accuracy as desireable and based on available resources like memory. We provide a method similar to edge maps for improving the accuracy of quantized ow as compared to its interpolated counterpart. Also, varying degrees of precision (granularity) can be easily achieved by using di erent number of bins per edge. This is particularly useful for faster analysis of data using lesser memory. Future development of this work should include investigation for a better form of map- ping of bins within a link. Currently we use a linear map. Using higher order mapping can provide higher accuracy with fewer links. This will help in reducing the overall memory footprint of the representation. Simplifying detected topological features would be of interest, since the representation is approximate and certain features such as clusters of cycles or critical points could be re nement artifacts rather than stable features of the ow. For example, if a dataset has slowly spiraling sinks and sources, these could appear to be large clusters of cycles under approximation and lesser granularity. Features that appear and disappear at di erent re nement levels are sensitive to accuracy and hence can be considered less important as compared to more stable features that are present even in the most approximate representation of the ow. Trying for more and more accurate quantized 34 ow with respect to a particular interpolation like linear interpolation may become an overkill given that choosing a di erent interpolation can give entirely di erent results. Extending this representation to three-dimensional vector elds will be challenging. Even if it is possible to represent a three-dimensional mesh simplex like a tetrahedron as a set of bins on its boundary, there is no notion of ordering to this set of bins. Constructing an order preserving map that can consistently map in ow bins to out ow bins may not be trivial. Perhaps, it will be helpful to start with a discrete represent of higher forms of ow descriptors like stream surfaces rather than streamlines. REFERENCES [1] Bhatia, H., Jadhav, S., Bremer, P.-T., Chen, G., Levine, J. A., Nonato, L. G., and Pascucci, V. Edge maps: Representing ow with bounded error. In IEEE Paci c Visualization Symposium (2011), pp. 75{82. [2] Bresenham, J. Algorithm for computer control of a digital plotter. IBM Systems Journal 4, 1 (1965), 25{30. [3] Chen, G., Mischaikow, K., Laramee, R. S., Pilarczyk, P., and Zhang, E. Vector eld editing and periodic orbit extraction using Morse decomposition. IEEE Trans. Vis. Comput. Graph. 13, 4 (2007), 769{785. [4] Chen, G., Mischaikow, K., Laramee, R. S., and Zhang, E. E cient Morse decompositions of vector elds. IEEE Trans. Vis. Comput. Graph. 14, 4 (2008), 848{ 862. [5] de Leeuw, W., and van Liere, R. Collapsing ow topology using area metrics. In Proc. of IEEE Visualization '99 (1999), pp. 349{354. [6] Forman, R. Combinatorial vector elds and dynamical systems. Math. Z. 228, 4 (1998), 629{681. [7] Garth, C., and Tricoche, X. Topology- and feature-based ow visualization: Methods and applications. In SIAM Conference on Geometric Design and Computing (2005). [8] Garth, C., Tricoche, X., and Scheuermann, G. Tracking of vector eld singularities in unstructured 3d time-dependent datasets. In 15th IEEE Visualization Conference (2004), pp. 329{336. [9] Globus, A., Levit, C., and Lasinski, T. A tool for visualizing the topology of three-dimensional vector elds. In IEEE Visualization (1991), pp. 33{41. [10] Gyulassy, A., Bremer, P.-T., Pascucci, V., and Hamann, B. A practical approach to Morse-Smale complex computation: Scalability and generality. IEEE Transactions on Visualization and Computer Graphics 14, 6 (2008), 1619{1626. [11] Gyulassy, A., Natarajan, V., Pascucci, V., Bremer, P.-T., and Hamann, B. A topological approach to simpli cation of three-dimensional scalar functions. IEEE Trans. Vis. Comput. Graph. 12, 4 (2006), 474{484. [12] Haller, G. Lagrangian coherent structures and the rate of strain in two-dimensional turbulence. Phys. Fluids A 13 (2001), 3365{3385. 36 [13] Helgeland, A., Reif, B., Andreassen, O., and Wasberg, C. Visualization of vorticity and vortices in wall-bounded turbulent ows. Visualization and Computer Graphics, IEEE Transactions on 13, 5 (sept.-oct. 2007), 1055 {1067. [14] Helman, J., and Hesselink, L. Representation and display of vector eld topology in uid ow data sets. IEEE Computer 22, 8 (1989), 27{36. [15] Jadhav, S., Bhatia, H., Bremer, P.-T., Levine, J. A., Nonato, L. G., and Pascucci, V. Consistent approximation of local ow behavior for 2d vector elds using edge maps. In Proceedings of TopoInVis (2011). Accepted. [16] Laney, D., Bremer, P. T., Mascarenhas, A., Miller, P., and Pascucci, V. Understanding the structure of the turbulent mixing layer in hydrodynamic instabilities. IEEE Transactions on Visualization and Computer Graphics 12, 5 (2006), 1053{1060. [17] Laramee, R. S., Hauser, H., Zhao, L., and Post, F. H. Topology Based Flow Visualization: The State of the Art. In Topology-Based Methods in Visualization (Proc. Topo-in-Vis 2005) (2007), Mathematics and Visualization, Springer, pp. 1{19. [18] Liu, Z., and II, R. J. M. Robust loop detection for interactively placing evenly spaced streamlines. Computing in Science and Engineering 9, 4 (2007), 86{91. [19] Mahrous, K., Bennett, J., Scheuermann, G., Hamann, B., and Joy, K. I. Topological segmentation in three-dimensional vector elds. IEEE Transactions on Visualization and Computer Graphics 10 (2004), 198{205. [20] Nielson, G. M., and Jung, I.-H. Tools for computing tangent curves for linearly varying vector elds over tetrahedral domains. IEEE Trans. Vis. Comput. Graph. 5, 4 (1999), 360{372. [21] Reininghaus, J., and Hotz, I. Combinatorial 2d vector eld topology extraction and simpli cation. In Topological Methods in Data Analysis and Visualization. Theory, Algorithms, and Applications. (TopoInVis'09) (2009). [22] Sadlo, F., and Peikert, R. Visualizing lagrangian coherent structures and compar- ison to vector eld topology. In Topology-Based Methods in Visualization II (2008), Springer, pp. 15{30. [23] Sadlo, F., Peikert, R., and Parkinson, E. Vorticity based ow analysis and visualization for pelton turbine design optimization. In Visualization, 2004. IEEE (oct. 2004), pp. 179 { 186. [24] Scheuermann, G., and Tricoche, X. Topological methods in ow visualization. In In Visualization Handbook (2004), C. Hansen and C. Johnson, Eds., Elsevier, pp. 341{ 356. [25] Theisel, H., Weinkauf, T., Hege, H.-C., and Seidel, H.-P. Saddle connectors - an approach to visualizing the topological skeleton of complex 3d vector elds. In Proc. of IEEE Visualization '03 (2003), pp. 225{232. 37 [26] Theisel, H., Weinkauf, T., Hege, H.-C., and Seidel, H.-P. Grid-independent detection of closed stream lines in 2d vector elds. In Proceedings of the Vision, Modeling, and Visualization Conference 2004 (VMV) (2004), pp. 421{428. [27] Theisel, H., Weinkauf, T., Hege, H.-C., and Seidel, H.-P. Topological methods for 2d time-dependent vector elds based on stream lines and path lines. IEEE Trans. Vis. Comput. Graph. 11, 4 (2005), 383{394. [28] Tricoche, X., Scheuermann, G., and Hagen, H. Continuous topology simpli - cation of planar vector elds. In Proc. of IEEE Visualization '01 (2001), pp. 159{166. [29] Wischgoll, T., and Scheuermann, G. Detection and visualization of closed streamlines in planar ows. IEEE Trans. Vis. Comput. Graph. 7, 2 (2001), 165{172. [30] Wischgoll, T., and Scheuermann, G. Locating closed streamlines in 3d vector elds. In Symposium on Data Visualisation 2002 (2002), VISSYM '02, Eurographics Association, pp. 227{232. |
| Reference URL | https://collections.lib.utah.edu/ark:/87278/s60c59kj |



