The Etree Library A System for Manipulating Large
The Etree Library: A System for Manipulating Large Octrees on Disk David R. O’Hallaron Associate Professor of CS and ECE Carnegie Mellon University (joint work with Tiankai Tu and Julio Lopez) www. cs. cmu. edu/~euclid
Pathway 2 Work Flow Viz Problem definition Geometric and physical properties and max freq CVM Solver specific code and data Convert Input mesh Solver 4 D Output Source definition Publish Verify Publish Inversion Validate Seismo extraction Std Output
Motivation Problem: – Need interoperability between AWM and analysis codes. General Solution Approach: – Represent input CVM and AWM data sets in a standard format that can be queried efficiently. Specific Solution Approach: – Represent CVM and AWM data sets as hierarchical spatial data structures called octrees » Octrees are compact ways to represent equivalent regions of space • i. e. , Regions of the CVM with similar density – Store the octrees in indexed databases (etrees) for fast retrieval and querying. – Provide an interface for C programs (etree library)
Pathway 2 Work Flow Viz Problem definition Geometric and physical properties and max freq CVM (3 D etree) Solver specific code and data Convert Input mesh Solver 4 D Output Source definition Publish Verify Publish Inversion Validate Seismo extraction 4 D etree
An Octree Domain y 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 Pixels 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 x
Equivalent Octree Representations Domain Representation Tree Representation y 15 14 13 k a l m 12 11 10 9 8 7 6 5 4 3 2 1 0 e i j g h Level 0 b c d e k f c b g 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 x h i : Interior octant j m Level 1 l Level 2 Level 3 : Leaf octant
Computing Addresses of Octants k f’s left lower corner (4, 8) l e b i j g h m Binary form (0100, 1000) c Interleave the bits to obtain Morton code 0100 Morton code: Maps n-dimensional points to one-dimensional scalars Locational code: Appends an octant’s level to the Morton code of its left-lower corner 1000 10010000 Append level of f to obtain locational code 10010000_010
Linear Octrees a Octants are stored on disk in locational code order – Interior nodes are optional b Cool fact: the following are equivalent: – Sorted order on disk – Space filling Z-order – Preorder tree traversal k l e i j g h b e g m c d c m k f h i l j B-tree index a b c d e f g h B-tree Pages i j k l m
Finding a Leaf Octant Without Knowing its Exact Locational Code a k l e i j g h b m b c d e c g m k f h i l j q Query pixel q Another cool (and powerful) fact: In the linear ordering on disk h<q< i
Representing Point Sets with Sparse Octrees 00 10 01 00 01 11 10 11
The Etree Library C library with 22 functions for manipulating large linear octree files (called etrees) on disk – – – Opening and closing etrees Inserting and deleting octants and subtrees Searching for octants Traversing octants in Z-order (preorder traversal) Loading and storing application metadata Supports 3 D or 4 D spatial data sets Portable file format – Standard header characterizes byte ordering and data sizes – Text trailer contains arbitrary application-level metadata Code and documentation available on the Web – www. cs. cmu. edu/~euclid
Current Pathway 2 Etree Application Codes Discrete Community Velocity Model – 3 D etree created by sampling Magistrale/Day CVM program. – Distributed with etree library CVM Web Service – Web server that queries the discrete CVM etree. – Returns 2 D GIF slices or 3 D FD and FEM meshes. – Distributed with etree library Finite Element Mesh Generation [Tu, 2002] – Converts discrete CVM etree to FEM mesh. – Mesh represented as an element etree and a node etree. Finite Difference Mesh Generation – Generates mesh for Kim Olsen’s AWM – Current part of CVM Web service
Future Pathway 2 Etree Application Codes Conversion from flat AWM files to etree files. Visualization of 3 D discrete CVM etree files. Visualization of 4 D etrees.
- Slides: 13