data structures for orthogonal range queries a new data structure and comparison to previous work....

16
Data Structures for Orthogonal Range Queries A New Data Structure and Comparison to Previous Work. Application to Contact Detection in Solid Mechanics. Sean Mauch Caltech October 22-23, 2001

Post on 21-Dec-2015

217 views

Category:

Documents


0 download

TRANSCRIPT

Data Structures for Orthogonal Range Queries

A New Data Structure and Comparison to Previous Work.

Application to Contact Detection in Solid Mechanics.

Sean Mauch

Caltech

October 22-23, 2001

2

Multiple Component Meshes

• The CSC, (characteristic scan converting), algorithm uses only local information about the b-rep. It has no knowledge of the topology.

• The computational complexity and performance of the CSC algorithm is unaffected by the number of components in the b-rep. The computational complexity is linear in the size of the b-rep and the number of grid points within a given distance of the b-rep.

• Scalable parallel contact detection algorithm has been developed by Attaway et al., Sandia National Naboratories. Recursive coordinate bisection algorithm.

• Thus it is possible to do fracture and contact detection in the VTF integrated solid-fluid simulation within the current solution framework.

3

B-rep With Multiple Components

• The CPT converts a b-rep with multiple components and contact to a level set function.

4

Terminology: Orthogonal Range Queries

• An orthogonal range query, (ORQ), determines the points in a set which lie within a given window (bounding box).

• Below is a window and its projections onto the coordinate planes.

5

Contact Detection

• Algorithm for solid mechanics simulation with contact detection:– Search for potential contacts between nodes and surfaces. Which

nodes are close to each face?– Do detailed contact check among potential contacts.– Enforce contacts by computing force required to remove overlap.

Contact Search Contact Check

6

Contact Detection Depends on ORQ’s

• Searches for potential contacts are done with orthogonal range queries.– Make a bounding box containing the space around a face on the

surface.– An ORQ finds the nodes in the bounding box.

• Detecting possible contacts is computationally expensive, typically half of total solid simulation execution time.

• Good performance depends on choosing an efficient data structure and search algorithm for the orthogonal range queries.

7

Data Structures for ORQ’s

• Kd-trees and Octrees.– Tried and tested data structure from computational geometry.

• Point in box method, (Swegle, et al.).– Developed at Sandia National Laboratories for doing parallel

contact.• Bucket arrays.

– A radix sort in 3D.– Optimal computational complexity.– High storage overhead.

• Sparse bucket arrays.– New data structure.

8

Kd-trees

• Kd-trees recursively divide the domain by choosing the median in the current coordinate direction.

• Depth is determined by number of points.

9

Octrees

• Quadtrees (2D) and Octrees (3D) recursively divide space into quadrants or octants.

• Depth is determined by number of points and point spacing.

10

Point-in-box Method (Swegle et. al.)

• The point-in-box search algorithm sorts and ranks the points in each coordinate direction.

• There are three slices for a window. Choose the slice with the least points and see if those points are in the window.

• The rank array allows integer instead of floating point comparisons.

11

Bucket Arrays

• The computational domain is spanned by an array of buckets. Each bucket contains a list of points.

• Constant time access to buckets, but perhaps large storage overhead because of empty buckets.

12

Sparse Bucket Arrays

• The array of buckets is sparse in one dimension.• Trade reduced storage for logarithmic access time to a bucket.

13

Computational Complexity and Storage

• There are n points in the b-rep. • There are k points in the window.• There are s points in a slice using the point-in-box method.• The Octree has a depth d.• There are m3 buckets in the bucket array.

Data Structure Construction Storage Search Search on a Surface

Kd-Tree n log2 n n log2 n log3 n +k log3 n +kOctree (d+1) n (d+1)n n+k n+k

Point-in-Box n log n 7n log n +s+k log n +n1/2+k

Bucket Array n n+m3 k k

Sparse Bucket Array n n+m2 k+k2/3 log m k+k2/3 log n1/2

14

Execution Time Comparisons

• Tesselations of a sphere.

Vertices 258 1026 4098 16386 65538

Kd-Tree 0.023 0.10 0.46 2.06 8.87

Octree 0.012 0.05 0.28 1.16 4.94

Point-in-Box 0.005 0.04 0.32 2.52 20.58

Bucket Array 0.006 0.02 0.10 0.39 1.64

Sparse Bucket Array 0.007 0.03 0.11 0.45 1.81

15

Execution Time Comparisons

• B-rep for a chair.

Vertices 1782 7200 28968 116232 465672

Kd-Tree 0.33 1.70 7.43 32.4 149

Octree 0.12 0.60 2.67 10.6 84

Point-in-Box 0.07 0.57 4.58 39.9 324

Bucket Array 0.04 0.18 0.72 2.8 Out of memory

Sparse Bucket Array 0.05 0.21 0.87 3.5 15

16

Conclusions

• Sparse bucket arrays out-perform previously developed data structures.• Sparse bucket arrays come close to the optimal complexity offered by

dense bucket arrays.• Storage requirement for sparse bucket arrays is linear in the number of

vertices.