Table Of ContentSMBInterp: anNth-Order Accurate,Distributed Interpolation Library
StephenM.McQuay
Athesissubmittedtothefacultyof
BrighamYoungUniversity
inpartialfulfillmentoftherequirements forthedegreeof
MasterofScience
StevenE.Gorrell, Chair
C.GregJensen
ScottL.Thomson
DepartmentofMechanicalEngineering
BrighamYoungUniversity
December2011
Copyright ©2011StephenM.McQuay
AllRightsReserved
ABSTRACT
SMBInterp: anNth-Order Accurate,Distributed Interpolation Library
StephenM.McQuay
DepartmentofMechanicalEngineering,BYU
MasterofScience
Theresearchcontainedhereinyieldedanopensourceinterpolationlibraryimplementedin
and designed for use with the Python programming language. This library, named smbinterp,
providesaninterpolationtoanarbitrarydegreeofaccuracy. Thelibraryisparametricinthatiscan
takeinputfromtheusertoadjusttheunderlyinginterpolationmechanism. Thecharacteristicsand
behaviorofthelibraryaccordingtotheadjustmentoftheseparametersispresentedherein,aswell
astheresultsofameshresolutionstudydepictingtheaccuracyobtainedbythelibrary.
The smbinterp library was designed with parallel computing environments in mind. The
library includes modules that allow for its use in high-performance computing environments.
These modules were implemented using built-in Python modules to simplify deployment. This
implementation wasfoundtoscalelinearlyapproximately 180participating computeprocesses.
The smbinterp library was designed to be mesh agnostic. A plugin system was imple-
mented that allows end users to conveniently and consistently present their numerical results to
the library for rapid prototyping and integration. Two plugins are provided as examples and for
documentation ofthepluginmechanism.
Keywords: StephenM.McQuay,smbinterp,N-th-orderaccurategeneralinterpolation,distributed
calculationschemes,multiphysics simulation
ACKNOWLEDGMENTS
I would like to thank Dr. Steven E. Gorrell for his willingness to advise me, his patient
attitude, and understanding during the lengthy process of compiling this research. His kind moti-
vationandtechnicalassistanceduringthistimewerebothessentialtothecompletionofthiswork,
andwillneverbeforgotten.
I am also grateful for the friendly and crucial assistance provided by Marshall Galbraith
which helped clarify the complicated parts of the implementation of the numerical method used
herein. Also, I am grateful for Alex Esplin for his help explaining the more esoteric computer
science-related concepts, and Matthew Peet whose blog entry helped put an end to a long stretch
ofdebugging.
I amespeciallygrateful to have performed this researchduring atime wheninformation is
so freely shared and readily available; I am truly indebted to all of the contributors to the Python
and Scipy projects. I would also like to acknowledge the engineers in the aerospace group at Pratt
& Whitney for the contribution of the research topic and for the partial funding provided at the
beginning ofthisresearch.
I am particularly thankful for the incessant nagging, computer assistance, and editing help
provided in large helpings by my father, Dr. Mardson Q. McQuay, who, despite his abnormally
refinedtechnicalprowess,wassurprisedtofindoutthatpeoplethesedaysstilluseviandLATEX.
Lastly,noacknowledgmentiscompletewithoutanunfairlyterseandobscenelyunderstated
thankstotheauthor’swife;Vanessa,thankyou.
TABLEOFCONTENTS
LISTOF TABLES . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . vi
LISTOF FIGURES . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . viii
NOMENCLATURE . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . x
Chapter1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1
Chapter2 LiteratureReview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
2.1 Interpolation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
2.1.1 Polynomial Interpolation . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
2.1.2 ButterflyInterpolation . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
2.1.3 Baker’sInterpolation Method . . . . . . . . . . . . . . . . . . . . . . . . 15
2.2 SpatialDataStructuresandDistributed Algorithms . . . . . . . . . . . . . . . . . 16
2.2.1 SpatialTreeStructures . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17
2.2.2 Distribution ofWorkload . . . . . . . . . . . . . . . . . . . . . . . . . . . 18
Chapter3 Method . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21
3.1 BakerMethod . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21
3.1.1 LinearInterpolant . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22
3.1.2 LeastSquaresApproximation ofErrorTerms . . . . . . . . . . . . . . . . 26
3.2 BasisFunctionPattern . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27
3.3 MeshPlugins . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30
3.3.1 △RandS VertexSelection . . . . . . . . . . . . . . . . . . . . . . . . . 30
k
3.3.2 PluginSystemDesign . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32
3.3.3 ProvidedPlugins . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33
3.3.4 BenefitsofthePluginSystem . . . . . . . . . . . . . . . . . . . . . . . . 33
3.4 ParallelExecutionFramework . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34
Chapter4 ResultsandDiscussionofResults . . . . . . . . . . . . . . . . . . . . . . . 37
4.1 GeneralLibraryPerformance . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37
4.1.1 Interpolation Improvement . . . . . . . . . . . . . . . . . . . . . . . . . . 39
4.1.2 TemporalPerformance . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47
4.1.3 MeshResolutionStudy . . . . . . . . . . . . . . . . . . . . . . . . . . . . 50
4.2 ParallelizationResults . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53
Chapter5 Conclusions&Recommendations . . . . . . . . . . . . . . . . . . . . . . . 59
REFERENCES . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 61
AppendixA smbinterpSourceCode . . . . . . . . . . . . . . . . . . . . . . . . . . . . 65
A.1 smbinterplibrary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 65
iv
A.2 smbinterpPluginSystem . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 73
A.3 ParallelizationScripts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 79
A.4 GmshMeshGenerationScripts . . . . . . . . . . . . . . . . . . . . . . . . . . . . 89
A.5 General-purposeUtilities . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 90
A.6 UnitTests . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 92
v
LISTOFTABLES
2.1 O(cN) Scaling of Memory Demonstrated When Subdividing a Single Triangular
Face . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
4.1 TheMeshVertexandElementCountsUsedintheParametricLibraryStudy . . . . 39
vi
vii
Description:which helped clarify the complicated parts of the implementation of the numerical
method used refined technical prowess, was surprised to find out that people
these days still use vi and LATEX. Number of vertexes in a destination mesh.