
Numerical Experimentation in Differential Geometry Simon David Burton A thesis submitted for the degree of Graduate Diploma in Science Department of Physics The Australian National University Supervisor: Dr. Susan Scott June, 2007 ii Declaration This thesis is an account of research undertaken between February 2005 and June 2007 at The Department of Physics, Faculty of Science, The Australian National University, Canberra, Australia. Except where acknowledged in the customary manner, the material presented in this thesis is, to the best of my knowledge, original and has not been submitted in whole or part for a degree in any university. Simon Burton June, 2007 iii iv Abstract A software package, pydx, is developed for numerical experimentation in differential ge- ometry. The architecture builds upon several important techniques. Interval arithmetic provides exact quantification of errors, effectively allowing mathematical proof. Auto- matic differentiation provides a way to naturally generate taylor expansions for solutions of the initial value problem, and find derivatives of the metric as needed for the geodesic equation. Use of the pydx system in physics is demonstrated by an exploration of the geodesic structure of the spatial sections of the Curzon spacetime. v vi Acknowledgments I firstly thank my supervisor Susan Scott, for showing a greatly appreciated excitable attitude, and for providing clear guidance. I thank Antony Searle for initially defining the bold technical scope of this research as a whole. I also acknowledge my dear friend Patrick Lesslie, whose moral suppport and optimistic outlook had great positive impact on this work. Also thanks go to Erika Mordek, who continually pestered me into completing this thesis. Lastly, I would like to thank the python community, in particular for their warm response to this work at the 2007 python conference (PyCon). vii viii Contents Declaration iii Abstract v Acknowledgments vii Contents 1 1 Introduction 3 1.1 Overview of pydx ............................... 3 1.2 ChapterOutline ................................ 5 1.3 Notation..................................... 5 2 Python Survival Guide 7 3 Interval Arithmetic 13 3.1 Floating Point Arithmetic . 13 3.2 Implementation................................. 14 3.3 Example..................................... 14 3.4 Introduction to Interval Arithmetic . ...... 16 3.5 RealIntervalArithmetic . 18 3.6 Numerical Interval Arithmetic . 20 3.7 Implementation................................. 22 3.8 Example..................................... 22 3.9 UnitTests.................................... 23 3.10 BibliographicNotes. 24 4 Automatic Differentiation 25 4.1 Introduction................................... 25 4.2 Recursive Formulae for the Calculation of Normalized Derivatives . 28 4.3 Taylor’sTheorem................................ 32 4.4 JetsofFunctions ................................ 32 4.5 Example: Computing with Jet’s ....................... 34 4.5.1 TheScalarStack ............................ 36 4.5.2 TheSymbolicScalars . 37 4.6 Implementation: pydx.mjet .......................... 40 ix x Contents 4.7 Implementation: Taylor Expansion . 43 4.8 UnitTests: TaylorExpansion . 44 4.9 BibliographicNotes. .. .. .. .. .. .. .. .. .. 45 5 Ordinary Differential Equations 47 5.1 TheRiemannIntegral ............................. 47 5.2 TheInitialValueProblem . 48 5.3 EulerMethod.................................. 50 5.4 IntervalEulerMethod ............................. 50 5.4.1 Example: Interval Picard Contraction . 53 5.5 SecondOrderMethod ............................. 54 5.6 A General Interval Taylor Method . 56 5.6.1 Implementation............................. 58 5.6.2 UnitTests................................ 59 6 Differential Geometry 61 6.1 Motivation ................................... 61 6.1.1 CoordinateTransforms. 61 6.1.2 The2-Sphere .............................. 63 6.1.3 Example................................. 63 6.2 Tensors ..................................... 65 6.3 OperationsonTensors ............................. 66 6.3.1 InnerandOuterProducts . 66 6.4 DefinitionofaManifold ............................ 67 6.5 TensorFields .................................. 68 6.5.1 Operations on Tensor Fields . 69 6.5.2 Differentiation of Tensor Fields . 70 6.5.3 CoordinateTransforms. 72 6.6 Computation in (Semi-)Riemannian Geometry . ..... 74 6.7 Geodesics .................................... 75 6.8 BibliographicNotes. .. .. .. .. .. .. .. .. .. 76 7 The Curzon Spacetime 77 7.1 Introduction................................... 77 7.2 Implementation................................. 78 7.3 Geodesics with Constant φ .......................... 79 7.4 Geodesics in the Compactified Coordinate System . ...... 80 7.5 SpatialGeodesics................................ 81 7.6 VerifiedGeodesics ............................... 82 8 Conclusion and Further Work 85 8.1 FurtherWork .................................. 85 Contents 1 Bibliography 87 Appendix A: pydx Installation 89 Appendix B: Code Listing - pydx 91 B.1 scalar/ init .py .............................. 91 B.2 scalar/fmath.py ............................... 92 B.3 scalar/mpfi.pyx ............................... 93 B.4 scalar/symbolic.py .............................106 B.5 mjet.py .....................................114 B.6 ode.py .....................................126 B.7 tensor.py ...................................130 B.8 field.py ....................................134 B.9 metric.py ...................................140 B.10 manifold.py .................................143 B.11 geodesic.py .................................144 Appendix C: Code Listing - Unit Tests 145 C.1 test interval.py ...............................145 C.2 test mjet.py .................................146 C.3 test nops.py .................................150 C.4 test ode.py ..................................151 C.5 test field.py .................................152 C.6 test geodesic.py ...............................154 C.7 test curzon.py ................................157 C.8 test manifold.py ...............................158 C.9 test metric.py ................................159 2 Contents Chapter 1 Introduction Automatic differentiation provides a way to naturally generate taylor expansions for solutions of the initial value problem. It is also a way of finding derivatives of the metric needed in the geodesic equation. Combination of both of these is possible via multivariate automatic differentiation. Once we are ready to perform calculations with actual numbers the question remains of what number system to use. We provide access to three different number systems, the CPU’s native (double precision) floating point type, an arbitrary precision floating point type and an interval type. The latter keeps track of a lower and upper bound on each operation, and in this way can stand as computer generated mathematical proof. All of these ideas are orchestrated at the highest level by concepts from differen- tial geometry. We will show how these concepts are used and implemented in pydx,1 and how the language of automatic differentiation naturally fits in with the geometric constructions. As application in theoretical physics, we present computation of geodesics in the axisymmetric Curzon spacetime. 1.1 Overview of pydx The bulk of the pydx software is implemented in the Python scripting language [22]. The use of Python enables rapid prototyping, as well as clear expression of mathematical ideas and algorithms. pydx is the third complete rewrite of the envisioned “system for computing with differential geometry”. Python is a programming language famous for its use amongst programming “beginners” and the experts alike. pydx is not just a tool for obtaining numerical results, but also a way of investigating, understanding, and communicating the theory of differential geometry. A high-level overview of pydx is shown below. 1Pronounced: pie-dee-ecks. 3 4 Introduction call TensorField Tensor matrix of Jet lazy construction of derivatives Floatmpf float Interval pair of mpf Fig 1.1.1 pydx Components The first thing to note is that every node in this graph (corresponding to a class in Python) describes a type that we will be performing algebraic operations on. The classes in the bottom layer are used to represent scalar values. The float type is the native C-compiler’s double type. The mpf type is an arbitrary precision floating point type. The Interval type stores a pair of mpf’s representing the lower and upper bound on a computation. The Float type is for performing calculations symbolically. The next layer implements differentiation; derivatives are stored in the components of a Jet. Arithmetic operations induce appropriate operations on these components. The scalar type used for these components is switchable between the types shown in the bottom layer, as indicated by the dashed lines. The top layer of pydx involves tensor calculus. A tensor field is conceived of as a function (a callable) that returns a tensor. Operations on these fields are pointwise; this is implemented as lazy evaluation. pydx makes extensive use of lazy evaluation2 techniques. The idea is as follows. Suppose we have two objects lazy a and lazy b of type Lazy. Now we perform some operation, such as addition: lazy c = lazy a + lazy b. No actual arithmetic is per- formed at this stage. The type of lazy c is LazyAdd: these objects now respond to requests by performing the corresponding request on lazy a and lazy b and returning the appropriate addition of the results. The three types
Details
-
File Typepdf
-
Upload Time-
-
Content LanguagesEnglish
-
Upload UserAnonymous/Not logged-in
-
File Pages171 Page
-
File Size-