UBC Theses and Dissertations

UBC Theses Logo

UBC Theses and Dissertations

Coordinates and boundary conditions for the general relativistic initial data problem Thornburg, Jonathan 1985

Your browser doesn't seem to have a PDF viewer, please download the PDF to view this item.

Item Metadata

Download

Media
831-UBC_1985_A6_7 T49.pdf [ 17.97MB ]
Metadata
JSON: 831-1.0085797.json
JSON-LD: 831-1.0085797-ld.json
RDF/XML (Pretty): 831-1.0085797-rdf.xml
RDF/JSON: 831-1.0085797-rdf.json
Turtle: 831-1.0085797-turtle.txt
N-Triples: 831-1.0085797-rdf-ntriples.txt
Original Record: 831-1.0085797-source.json
Full Text
831-1.0085797-fulltext.txt
Citation
831-1.0085797.ris

Full Text

Coordinates and Boundary Conditions for the General Relativistic Initial Data Problem by Jonathan Thornburg B.Sc. Honors 1st class Simon Fraser University, 1983 A Thesis Submitted in Partial Fulfillment of the Requirements for the Degree of MASTER OF SCIENCE in The Faculty of Graduate Studies Department of Geophysics and Astronomy We accept this thesis as conforming t to the reqiaired/standapd The University of British Columbia November 1985 © Jonathan Thornburg, 1985 In presenting t h i s thesis i n p a r t i a l f u l f i l m e n t of the requirements for an advanced degree at the University of B r i t i s h Columbia, I agree that the Library s h a l l make i t f r e e l y available for reference and study. I further agree that permission for extensive copying of t h i s thesis for scholarly purposes may be granted by the head of my department or by his or her representatives. I t i s understood that copying or publication of t h i s thesis for f i n a n c i a l gain s h a l l not be allowed without my written permission. Department of G e o p h y s i c s and A s t r o n o m y The University of B r i t i s h Columbia 1956 Main Mall Vancouver, Canada V6T 1Y3 Date 11 November 1985 DE-6 (3/81) ii Abstract Techniques for numerically constructing initial data in the 3+1 formalism of general relativity (GR) are studied, using the theoretical framework described in Bowen and York (1980), Physical Review D 21(8), 2047-2056. The two main assumptions made are maximal slicing and 3-conformal flatness of the generated spaces. For ease of numerical solution, axisymmetry is also assumed, but all the results should extend without difficulty to the non-axisymmetric case. The numerical code described in this thesis may be used to construct vacuum spaces containing arbitrary numbers of black holes, each with freely specifyable (subject to the axisymmetry assumption) position, mass, linear momentum, and angular momentum. It should be emphasised that the time evolution of these spaces has not yet been attempted. There are two significant innovations in this work: the use of a new boundary condition for the surfaces of the black holes, and the use of multiple coordinate patches in the numerical solution. The new boundary condition studied herein requires the inner boundary of the numerical grid to be a marginally trapped surface. This is in contrast to the approach used in much previous work on this problem area, which requires the constructed spaces to be conformally isometric under a "reflection mapping" which interchanges the interior of a specified black hole with the remainder of the space. The new boundary condition is found to be easy to implement, even for multiple black holes. It may also prove useful in time evolution problems. The coordinate choice scheme introduced in this thesis uses multiple coordinate iii patches in the numerical solution, each with a coordinate system suited to the local physical symmetries of the region of space it covers. Because each patch need only cover part of the space, the metrics on the individual patches can be kept simple, while the overall patch system still covers a complicated topology. The patches are linked together by interpolation across the interpatch boundaries. Bilinear interpolation suffices to give accuracy comparable with that of common second order difference schemes used in numerical GR. This use of multiple coordinate patches is found to work very well in both one and two black hole models, and should generalise to a wide variety of other numerical GR problems. Patches are also found to be a useful (if somewhat over-general) way of in-troducing spatially varying grid sizes into the numerical code. However, problems may arise when trying to use multiple patches in time evolution problems, in that the in-terpatch boundaries must not become spurious generators or reflectors of gravitational radiation, due to the interpolation errors. These problems have not yet been studied. The code described in this thesis is tested against Schwarzschild models and against previously published work using the Bowen and York formalism, reproducing the latter within the limits of error of the codes involved. A number of new spaces containing one and two black holes with linear or angular momentum are also constructed to demonstrate the code, although little analysis of these spaces has yet been done. iv Table o f Contents A b s t r a c t i i Table o f Contents iv L is t o f Tables v L is t o f Figures v i i Acknowledgements . x Ded ica t ion x i I n t r o d u c t i o n 1 Theoret ica l Background 4 B o u n d a r y Cond i t ions 15 Choice o f coordinates 22 F in i te Di f ferencing the Equat ions 26 Coord ina te Patches - I 36 Coord ina te Patches - I I 42 The Ex t r ins ic Curva tu re 44 Choice o f C o n f o n n a l Func t ion 48 Solv ing the Algebra ic Equat ions 52 Measur ing the Masses o f the Mode ls 56 Test ing the Code 59 D e m o n s t r a t i n g the Code 67 Conclusions and Di rect ions for Fur ther Research . 77 References 81 A p p e n d i x 1 84 A p p e n d i x 2 . . . 255 V L is t o f Tables 1 Comparison of Different Grid Sizes 60 2 Comparison of Different Patch Types 61 3 Comparison of Different Conformal Functions 61 4 Comparison of 6ty with Choptuik's Results 65 5 Model index for the Schwarzschild test series 85 6 Model index for the Choptuik comparison test series 86 7 Model index for the J test series 87 8 Model index for the RSP test series 87 9 Model index for the RSM test series 88 10 Model index for the MTO test series 88 11 Model index for the PP test series 89 12 Schwarzschild test series, lOplolOO selected ty values 93 13 Schwarzschild test series, 20plol00 selected ty values 97 14 Schwarzschild test series, 40plol00 selected ty values 101 15 Schwarzschild test series, c2 selected ty values 105 16 Schwarzschild test series, cOi selected ty values 109 17 Schwarzschild test series, c 2 i selected ty values 113 18 Schwarzschild test series, poo selected ty values 117 19 Schwarzschild test series, opo selected ty values 121 20 Schwarzschild test series, oop selected ty values . 125 21 J test series, JO selected ty values 171 22 RSP test series, pO selected ty values 186 23 RSM test series, pO selected ty values 201 24 MTO test series, pO selected ty values 216 vi 25 PP test series, mlOO selected * values 231 26 PP test series, mlO selected values 233 27 PP test series, ml selected * values 235 28 PP test series, mxl selected ¥ values 237 29 PP test series, mxOl selected ¥ values 239 30 PP test series, 0 selected ¥ values 241 31 PP test series, pxOl selected $ values 243 32 PP test series, pzl selected V values 245 33 PP test series, pi selected \P values 247 34 PP test series, plO selected 9 values 249 35 PP test series, plOO selected ^ values 251 36 Directories where the code resides 256 37 File index for the main directory 257 38 File index for the f ortran directory 258 39 File index for the pat chut i l directory 259 40 File index for the u t i l directory 260 vii Lis t o f Figures 1 "Square" vs. "Triangle" Interpolation 39 2 Bilinear Interpolation Formulae 40 3 Baseline patch system for table 2 62 4 Augmented patch system for table 2 63 5 J Test Series Solutions 69 6 RSP Test Series Solutions 70 7 RSM Test Series Solutions 71 8 MTO Test Series Solutions 72 9 Patch System for the PP Test Series 74 10 PP Test Series Solutions (P > 0) 75 11 PP Test Series Solutions (P < 0) 76 12 Choptuik comparison test series, ppxOOl quantitative results 127 13 Choptuik comparison test series, ppxOl quantitative results 129 14 Choptuik comparison test series, ppxl quantitative results 131 15 Choptuik comparison test series, ppl quantitative results 133 16 Choptuik comparison test series, pp2z5 quantitative results 135 17 Choptuik comparison test series, pp7x5 quantitative results 137 18 Choptuik comparison test series, ppl2x5 quantitative results 139 19 Choptuik comparison test series, mpxOOl quantitative results 141 20 Choptuik comparison test series, mpxOi quantitative results 143 21 Choptuik comparison test series, mpxl quantitative results 145 22 Choptuik comparison test series, mpi quantitative results 147 23 Choptuik comparison test series, mp2x5 quantitative results 149 24 Choptuik comparison test series, mp7x5 quantitative results 151 viii 25 Choptuik comparison test series, mpl2i5 quantitative results 153 26 Choptuik comparison test series, jxCOl quantitative results 155 27 Choptuik comparison test series, JxOl quantitative results 157 28 Choptuik comparison test series, j x l quantitative results 159 29 Choptuik comparison test series, j 1 quantitative results 161 30 Choptuik comparison test series, j 10 quantitative results 163 31 Choptuik comparison test series, j 100 quantitative results 165 32 Choptuik comparison test series, j 1000 quantitative results 167 33 J test series, jxOl quantitative results 173 34 J test series, Jxl quantitative results 175 35 J test series, j 1 quantitative results 177 36 J test series, j 10 quantitative results 179 37 J test series, j 100 quantitative results 181 38 RSP test series, pxOl quantitative results 188 39 RSP test series, pxl quantitative results 190 40 RSP test series, p i quantitative results 192 41 RSP test series, plO quantitative results 194 42 RSP test series, plOO quantitative results 196 43 RSM test series, pxOl quantitative results 203 44 RSM test series, pxl quantitative results 205 45 RSM test series, p i quantitative results 207 46 RSM test series, plO quantitative results 209 47 RSM test series, plOO quantitative results 211 48 MTO test series, pxOl quantitative results 218 49 MTO test series, pxl quantitative results 220 ix 50 MTO test series, pi quantitative results 222 51 MTO test series, plO quantitative results 224 52 MTO test series, plOO quantitative results 226 X Acknowledgements First and foremost, I must acknowledge the many contributions of W. G. Unruh to this thesis. In addition to many stimulating conversations, he provided one of the two key ideas of this thesis (the marginally trapped surface boundary condition), as well as many other helpful suggestions. The exposition of this thesis has also benefited greatly from his comments. F. Chen gave invaluable help with the TjjjX typesetting system used to prepare this thesis. M . Choptuik kindly reexamined the results from his own GR code and did a new perturbation analysis of them to provide me with comparison values to test out my code. My choice of topic for this thesis was helped by early discussions with M. Choptuik, T . Piran and J. York. U. Ascher, M. Choptuik, and M. Yedlin provided valuable "physics" suggestions, and L. Brewin, G. Grieve, and T. Nicol helped me with a variety of computer problems. I thank The University of British Columbia for financial support. The computer facility used to do the calculations of this thesis was funded by the Natural Sciences and Engineering Research Council. xi Dedication This thesis is dedicated to all of my professors, who together have shaped my mind and inspired me to learn. In particular, Hans Thorn first interested me in physics, Ken Lyall nurtured that interest, Leigh Hunt Palmer first interested me in general relativity by giving me a copy of Price (1982), and Michael Ovenden gently guided me in the direction of Bill Unruh. There are certain common Privileges of a Writer, the Benefit whereof, I hope, there will be no Reason to doubt; Particularly, that where I am not understood, it shall be concluded, that something very useful and profound is coucht underneath. — Jonathan Swift, "Tale of a Tub", Preface (1704) 1 Introduction Due to their complexity, the Einstein equations of general relativity (hereinafter "GR") are very, hard to solve analytically. Indeed, such solutions have been found only for systems with either a high degree of symmetry, or for systems in which the non-linearity of the equations can be taken to be "small". Such restrictions exclude many interesting systems, for example the collision and subsequent merger of two black holes. One way of examining systems not meeting these restrictions, is to numerically solve the Einstein equations, using the methods developed for other nonlinear PDE problems such as the Navier-Stokes equations. This approach, known as "numerical GR", has seen substantial use in the past few decades. Most commonly, the "finite difference" technique is used to discretise the equations prior to solving them on a digital computer, although the alternative "finite elements" method has seen some limited use. This thesis studies the problem of constructing spaces containing multiple moving and/or spinning black holes, and involves the construction of a numerical GR code to do this. This problem was selected for three main reasons. First, the time evolution of such spaces (which has not yet been performed) would be of great interest. Second, previous work has established a general theoretical framework for the solution of this problem. Third, and perhaps most important, it seems to provide a good "test-bed" problem for trying out various coordinates and boundary conditions. The main results of this thesis are the introduction of a new and more general scheme for choosing coordinate systems, and of a new and physically well-motivated 2 boundary condition for black hole surfaces. Together, these should allow the above-mentioned theoretical framework to be more easily applied to a wider variety of prob-lems, including the two black hole collision problem mentioned above. In general, the emphasis in this thesis is more on the techniques used than on the results obtained. However, as well as replicating earlier work involving single black holes, some new spaces are constructed. In particular, the new boundary condition is used in the construction of a series of spaces containing moving single black holes. A series of spaces containing single spinning black holes are also constructed, although here the new boundary condition turns out to be equivalent to that used in previous work. Finally, both the new boundary condition and the new coordinate choice scheme are used in the construction of a series of spaces containing two black holes with equal and opposite momenta. The latter have not been numerically studied before. The remainder of this thesis will now be outlined. Successive chapters discuss the theoretical backround to the work, the various boundary conditions (both old and new), involved, and the coordinate choice problem. The general technique of finite differenc-ing is then discussed, and applied to the problem of this thesis. The following chapters give more details of the code used in this thesis, including the internal representation of patch systems, the "human-readable" patch description language used to specify them, the detailed means by which the contents (for example °2 black holes with such-and-such positions, masses, momenta, and spins") of the spaces are specified, and some final details of just how the equations are set up and solved. The various "mass func-tional" used to measure the mass-energy of the black holes and spaces constructed are then discussed, followed by the means used to test the code. The new spaces used to demonstrate the code are described, followed by some conclusions and directions for 3 further research. Two appendices give the detailed input parameters to and quantita-tive graphs of the results of each model described in the thesis, and the source listings for the code itself. For the most part, the chapters are organized so that they may be read indepen-dently. To this end, all notational conventions are defined near the beginning of the "Theoretical Background" chapter. Also, for the benefit of anyone wishing to repli-cate the results of this thesis, the main equations used in the code are all (with one exception described in the text) given in the body of the thesis as well, even if their derivations are merely tedious excercises in algebra. This should spare the reader the task of trying to "unprogram" the equations from the code listings. 4 Theoretical Background As usually written, the Einstein equations refer to spacetime as a whole, without reference to any one coordinate being singled out as a "global time". In contrast, many other physical theories (for example classical electromagnetism as described by the Maxwell equations) can be phrased in terms of the time evolution of various quantities. By analogy, we suspect that such a formulation of G R (as a dynamical theory) would be useful. Such a formulation does indeed exist, under suitable technical assumptions to guarantee the "non-pathological* nature of spacetime. However, the details of how this is set up are beyond the scope of this thesis, and will not be discussed here. The interested reader is referred to Choptuik (1982), Misner, Thorne, and Wheeler (1973 (herinafter cited as " M T W " ) , chapter 21), Wald (1984, chapter 10 and appendix E), York (1979), York (1983), and York and Piran (1982) for further discussions of this topic. In particular, the cited works by York et al contain excellent discussions of how G R can be formulated as a dynamical theory in which the notion of "time evolution" is well defined. These works all build on the basic theoretical framework of the classic paper of Arnowitt, Deser, and Misner (1962). We now discuss the theoretical foundations of this approach to GR, as well as the particular theoretical framework used in this thesis. Our discussion gives only a brief overview of the results used in this thesis, and will be kept to the least technical level possible. Tensor calculus will be used, but only in its coordinate form, i.e. the modern "coordinate-free" language and techniques of differential geometry will not be used. More advanced and comprehensive discussions can be found in the cited references. The basic idea of the " A D M " framework is to view 4-dimensional spacetime as being composed of a 1-dimensionally infinite "stack" of 3-dimensional spacelike hyper-5 surfaces (hereinafter "spaces" or "slices"), each labeled with a "time" coordinate. This decomposition of spacetime will often be referred to as "slicing" it. To give a dynamical interpretation to GR, we choose "initial data" defined on a single slice, and then try to "time evolve" it with the Einstein equations. This " 3 + 1 " approach to the dynamics of GR is often referred to as (solving) the "Cauchy problem". However, there are two interrelated difficulties which arise when we try to do this. First, not all the initial data can be freely specified on the initial slice. This is because of the Bianchi identities, which reduce by four the number of independent metric components. A useful analogy here is the specification in electromagnetism of E and B at a single moment in time—Gauss's law and its magnetic analog prevent these from being completely freely specifyable. Such initial data as can be freely specified on the initial slice, presumably represent the true degrees of freedom of our problem. Recent work by York and others on the problem of defining freely specifyable GR initial data has yielded a general theoretical framework for dealing with this problem, which we adopt for this thesis. Second, how do we remove the coordinate freedom inherent in the Einstein equa-tions? The problem here is that a "solution" to a GR dynamical problem will presum-ably consist of a specification of all components of the metric over some time interval. This (together with the ranges of the coordinates) implicitly specifies the coordinate system in use throughout that interval, which clearly is not a true dynamical feature of the spacetime. Thus there can not and must not be enough Einstein equations to determine the evolution of all the metric components—some additional information must be supplied (thus defining the choice of coordinates). This must be done prior to obtaining the spacetime, so there is clearly a risk of choosing coordinates which are 6 inappropriate for the symmetries of the spacetime. Worse still, the chosen coordinates may fail to cover the whole spacetime, or they may cover undesired areas of it, for example the immediate neighborhoods of singularities. This problem still lacks a fully satisfactory solution, although considerable progress has been made. This thesis deals only with the construction of initial data, so this difficulty will not be further discussed. Corresponding to the slicing of spacetime, the 3 + 1 approach to GR splits the 1 0 Einstein equations into 4 "constraint" equations for the initial data, and 6 "evolution" equations which specify how this data evolves with time. This thesis deals solely with the former, i.e. with the construction of spaces which satisfy the constraint equations. The theoretical background for this construction will now be discussed, beginning with the 3 + 1 slicing process itself. Our notation generally follows that of MTW, with units chosen such that G = c = 1 and the metric having signature (—, +, +, +). We shall sometimes use "<" as a synonym for the coordinate x°. Indices a, b, c,... range from 0 to 3 , while indices k,... have the restricted range of 1 to 3 . The usual summation convention is assumed for both types of indices. Greek letters will not be used for indices. da denotes the partial derivative operator with respect to the coordinate xa} while V a denotes the covariant derivative operator with respect to the same coordinate. Where ambiguity exists, quantities defined with respect to the full 4-dimensional spacetime are prefixed with a (4\ as in (4lR, while quantities defined with respect to a 3-dimensional space are prefixed with a <3>, as in Non-italic bold letters denote mathematical objects which do not transform as tensors, such as vectors and matrices (for which the index range conventions given above do not apply). Typewriter font identifies objects (for example names of models 7 or individual functions) known to or defined in the computer code itself. We shall adopt one other important notational convention—the Penrose "abstract index" notation. This involves (almost) always writing tensors with the number of indices appropriate to their rank, even if the tensor as a whole is being referred to. Thus, we refer to the 4-metric (viewed as a single object) by the symbol ^gaj>, rather than (4)<7 as is sometimes done. The latter symbol is used to deonote a (presumably related) scalar (rank zero) object. Another way to look at this notation is to just view all tensor equations as component equations with an implied "for all free (not summed over) indices" appended. We begin the slicing process by considering the full 4-dimensional metric ^gab- We view (4)<7o* as the partitioned matrix [<4W <4W <4W = <4W <3W = ( 4W, (1) and define the (covariant) "3-metric" ^gtj to be the spatial components of the 4-metric (2) so it denotes the lower right submatrix of (1). It can be shown that the ^gij so defined is indeed the (covariant) metric induced on the hypersurface t = constant by the 4-•metric ^gab' Thus Wga is (as the notation implies) a (symmetric) 3-tensor. Given (3)J7,J, we define the contravariant 3-metric Wg*3 in the usual way as the matrix inverse of <3W. We now define a scalar a and a 3-vector known as the "lapse" and "shift" functions respectively, by (4W = -(* 2-A-/n : (3) ( 4 W = <%o = ft, 8 where the index on /?' is raised with the 3-metric. The timelike nature of t can be shown to guarantee that a comes out real and positive. The lapse and shift functions defined above are the means by which the time evo-lution of our coordinate system itself is defined—they must be given as inputs to the Einstein evolution equations. They can be given an elegant geometric interpretation as the time and space components of a "time step" 4-vector (see for example, York (1979), p. 89). However, this is beyond the scope of this thesis; their only use herein is as a vehicle in the definition of the variables of our problem. Finally, we define the "extrinsic curvature" Kij by = -2aKi3- + <3> + <»> Vyft. (4) So defined, Kij can be shown to transform as a (symmetric) 3-tensor under 3-coordinate transformations, and should perhaps be written ^Kij, but no confusion will arise from the simpler form Kij. As defined, Kij is essentially a "generalized velocity" conjugate to the "generalized position" ^gij. Indeed, the natural choice \ (5) (frequently referred to as "Gaussian Normal" or "harmonic" coordinates) leads to Kij can also be interpreted as specifying just how the hypersurface t = constant is em-bedded into spacetime—this is why it's called the "extrinsic curvature" tensor. How-ever, both of these interpretations are beyond the scope of this thesis, which uses Kij only in specifying the contents of the spaces. 9 Having defined the 3-metric and the (3-)extrinsic curvature, we now consider the "initial data" problem of constructing suitable initial data to be time evolved. (This problem is sometimes referred to as the "initial value" problem, but the author feels that this usage invites confusion with the latter term's well established meaning in a number of other fields, notably the study of numerical solutions of both ODEs and PDEs.) As described in the cited references, this amounts to constructing suitable 3-metrics and extrinsic curvatures at a single moment in time. This is the overall problem addressed by this thesis. By "suitable", we mean both consistent with the Einstein constraint equations, and containing the desired physical objects. In this thesis, the latter are multiple moving and/or spinning black holes. The theoretical framework used in this thesis is that of Bowen and York (1980), which we will now discuss. We begin by writing the Einstein constraint equations for the initial data as V>' ( j f y - l%3Tr(K)) = Sir;,- (7) and (3)£ _ ( » y ™ Wgi»Ki,-Kmn + (Tr{K))2 = 16TT/>, (8) where p and are the time and space components of the energy-momentum 4-vector of sources, (3lff is the Reimann curvature scalar of the 3-metric, Tr(if) is the trace of Kij defined by Tr{K) = Wgij (9) and indices are raised and lowered with the 3-metric. We now make two simplifying assumptions. The first is that our initial slice satisfies Tr{K) = 0. (10) 10 This condition, which is widely used in numerical GR, can be interpreted (see, for ex-ample, York and Piran (1982), pp. 157-158) as requiring our space to be of maximal volume as embedded into spacetime, and is thus often referred to as the "maximal slic-ing" condition. It is known that many "interesting" spacetimes admit slicings satisfying this condition. York and Piran (1982) give as examples the Schwarzschild, Kerr, and Minkowski (flat) spacetimes as well as those "sufficiently close" (in a suitable norm) to them. They also state that "every stationary, axisymmetric, and asymptotically flat spactime that is topologically R 4 has maximal spacelike slices." 6 Murchadha and Seifert (1982) have shown that the requirement of axisymmetry may be removed in this statement. Nonetheless, this condition probably excludes some physically interesting spacetimes. It should be noted that much of the present work relies only on Tr(K) be-ing a constant, although York and Piran suggest non-zero values as being appropriate for asymptotically null spaces, rather than the asymptotically strictly spacelike ones studied in this thesis. The second simplifying assumption is that the space is 3-conformally flat, (3W = **/</, ( ii) where fa is a flat 3-metric and ¥ is an unknown (positive) "conformal factor". The use of the fourth power here is for later convienence, and is of no fundamental sig-nificance. This assumption is perhaps the most serious limitation of this approach to the initial data problem. An arbitrary spacetime, even one known to posess maximal slices, in general does not posess any slicing satisfying this condition.. However, the Schwarzschild solution does satisfy this assumption in any coordinate system which uses the usual Schwarzschild time coordinate, so we know that the existence of black holes isn't ruled out. 11 The conformal factor can be interpreted as an isotropic "local stretching" of space, in that the transformation ( 3 fe - <3W (12) leaves angles locally invariant, but isotropically multiplies local distances by a factor of ty2. Wald (1984, appendix D) discusses conformal transformations in more detail. We now subject the other variables in the Einstein constraint equations (7) and (8) to the transformation J , = * - 6 * • (13) Ktj = ty-Qki„ t where "hatted" quantities refer to the "hat-means-flat" transformed (flat) space with 3-metric /,y. This results in (the Einstein constraint equations) (7) and (8) simplifying to V'kij = Sir;,- (14) and V 2 * + \ k i j k i j t y - 7 = 2npty~3, (15) o where V 2 is the standard flat-space Laplacian operator. (Strictly speaking, it should have a "hat", but no confusion should arise from the omission.) We restrict our attention to vacuum spaces (outside black holes), so we take ji = p = 0. All of the following discussion takes place in the transformed flat space; "hats" and ^prefixes are often omitted in the interests of typographical clarity. Indices are raised and lowered with the flat 3-metric /,y. We observe that (14) does not involve ty and hence is effectively decoupled from (15). In fact, this would still happen even if the maximal slicing assumption (10) were 12 replaced by any other slicing satisfying diTr(K) = 0. (16) Failure to satisfy this latter condition would result in our having to solve (14) and (15) simultaneously, rather than sequentially as we do in this thesis. Bowen and York show that (14) may be solved analytically through the use of a vector potential. Their general solution is not needed herein; we shall use only two of their specific solutions, namely those representing single black holes with either specified (linear) momentum or specified spin (angular momentum). For a single black hole with linear momentum P* (and no spin), Bowen and York give the extrinsic curvature as (the following solution to (14)) where n* is the outward pointing unit normal to the 2-sphere of radius r centered on the black hole, a is an arbitrary parameter (later to be interpreted as one half the mass of the black hole), and K = ± 1 . The significance of /c, as well as possible reasons for taking it equal to zero instead of ± 1 (thus dropping the second term of (17) entirely), will be discussed in the next chapter. For a single black hole with spin J* (and no momentum), they give the solution K*i = Tl iPin3 + P3ni ~ ~ *,-ny)P*nfc] 3a2 - K — ^ [P.ny + Pjrii + (fa - 5n,ny)Pfcnfc], (17) Kij = -^«/'nfc(efc.7nj + €kjin%), (18) where n* and r are as before and r+ i if (ijk) is an even permutation of (123) if (ijk) is an odd permutation of (123) otherwise e«yfc -1 (19) 13 is the usual completely antisymmetric unit alternating Levi-Civita symbol. The only remaining point to be made here about the solution of (14) is that, since it's a linear equation, we may add solutions together to obtain Kij (and hence Kij by (13), once (15) has been solved) for spaces containing an arbitrary number of black holes, each with arbitrary and freely specifyable mass, position (obtained by translating the origin of the solutions given above), momentum, and spin. Given a suitable solution to (14), we define a "source function" S by S = (20) If we view (15), which we rewrite as V2ty + Sty~7 = 0, (21) as a nonlinear Poisson equation, Sty~7 plays the role (modulo a factor of 4TT) of a charge density. This analogy with classical electrostatics will prove helpful in our discussion of the solution of (21). It is the (numerical) solution of this equation which is the main topic of this thesis. We now make one additional simplifying assumption, namely that our spaces are axisymmetric. This assumption is in no way implicit in the Bowen and York formalism, but is made purely to simplify our numerical solution of (21). It does this by allowing us to neglect one space dimension (cooresponding to rotation about the symmetry axis) in the numerical solution, so we need only consider 2 space dimensions. Obviously, this greatly reduces the computational difficulty of numerically solving (21). There is, however, another advantage to considering only 2 space dimensions. This is that we can obtain a global "bird's eye" view of a function (for example S or ty) 14 defined on our space, with a single plot of the function vs. (2-dimensional) position, viewed in perspective. No comparable technique is available for spaces of 3 or more dimensions—one must resort to the piecemeal examination of "slices" of the space. This lack of an easy means of viewing a function over the whole space is perhaps a more serious impediment to the treatment of fully 3-dimensional spaces than the greater computational difficulties, since the latter are diminishing with time as available computers increase in speed and memory capacity. 15 Boundary Conditions We now consider what boundary conditions should be imposed on ty to specify a unique and physically meaningful solution to (21), and hence a space containing the desired objects. The following discussion takes place in the "hat-means-flat" space with with the axis of symmetry chosen as the z axis and <f> the angle of rotation about it. We introduce the usual polar spherical coordinates (r,$,<f>), with the line element ds2 = dr2 + r2d02 + r2 sin2 6 d<f>2. We also introduce cylindrical coordinates (p, z, <f>), with the line element ds2 = dp2 + dz2 + p2 d<f>2. We first consider the "outer" boundary. Since the physical "unhatted" space is asymptotically fiat, we have However, our numerical "grid" will terminate at some finite radius r, so we must choose a boundary condition there which will best approximate the true boundary condition We could of course just take ty = 1 on our outer boundary, but this would not give very accurate results. Instead, York and Piran (1982) suggest exploiting more of the physics of the problem by observing that if E is the total energy of the space, the asymptotic behavior of ty as r —• oo will be (3-)metric ^3Vt'y = fij- As mentioned above, we take this space to be axisymmetric, lim ty = 1. (22) (22). (23) Thus (24) 16 We now neglect the right hand side of this latter equation to obtain a fairly accurate "Robin" outer boundary condition, + = 0. 25 or r v ' We next consider the problem of choosing an "inner" boundary condition for the "surfaces" of the black holes, assuming that we don't want to extend our numerical grid inside the black holes. We first review the approach taken by Bowen and York (1980), which begins by considering the case of a single black hole only. They suggest requiring that the space be conformally isometric under the "reflec-tion" mapping r - - , (26) where both a and r are as defined in their choice (17) for the extrinsic curvature (which does indeed satisfy this requirement, as does their choice (18)). They then interpret the resulting space as the union of two distinct asymptotically flat spaces, joined at r = a by an Einstein-Rosen bridge which they take as a model for the black hole. They observe that it suffices to solve (21) on only one of these spaces, the "outside" one defined by r > a, provided that an inner boundary condition enforcing the conformal isometry of the two spaces under (26) is chosen. They derive — + - = 0 (at r = a) (27) as the desired "reflection symmetric" boundary condition for enforcing this. We now digress to explain the significance of the parameter K in (17), as promised in the previous chapter: the momentum P* enters (21) quadratically (through S), so the "inner" space may possess either equal (if K = +1 in (17)) or equal and opposite 17 (if K = — 1) momentum to the outer one. Bowen and York point out that the only reason for the second term in (17) is to satisfy their reflection symmetric boundary condition—taking K = 0 in (17) (thus dropping the second term entirely) still yields a valid solution to (14). Thus if (as is done later in this thesis) Bowen and York's inner boundary condition is abandoned, there seems no particular reason not to choose the simplest form of (17), namely that with K = 0. We now return to our discussion of the Bowen and York reflection symmetric inner boundary condition (27). To this author, it seems to suffer from several flaws. It may place the numerical boundary inside the actual black hole event horizon, which seems rather a waste of grid points (as was pointed out to the author by W. G. Unruh) if we are concerned only with the outside world. More serious difficulties may arise in time evolution problems: the grid points inside the horizon may encounter a singularity, and some care is needed to ensure that the numerical scheme remains well-behaved across the apparent horizon despite the change in the causal structure of spacetime which occurs there. However, these latter effects should be fairly minor, because the reflection sym-metric boundary condition seems (York and Piran (1982)) to result in the apparent horizon being only a small distance outside the inner grid boundary. When applied to the Schwarzschild solution, the two are found to coincide. A more serious difficulty with the reflection symmetric inner boundary condition is that applying it to spaces containing multiple black holes is rather messy, involving (see, for example, Kulkarni, Shepley, and York (1983), Kulkarni (1984a), York (1984), Bowen, Rauber, and York (1984), and Kulkarni (1984b)) the summation of infinite series of "image charges" needed to enforce the isometry condition on reflection through 18 any of the a,s. This author also finds somewhat unnatural the modelling of a black hole by a vacuum region of spacetime, possesing a non-Euclidian topology which is a "mirror image" of the rest of the universe. In particular, why should the way a given black hole is modeled depend on the contents of the outside world? As an alternative inner boundary condition, W. G. Unruh has suggested requiring that the inner boundary be a marginally trapped surface. This appears to avoid most of the difficulties mentioned above. In particular, the grid is kept outside the (apparent) event horizon and the generalization to multiple black holes is straightforward. The author also finds the physical significance of this boundary condition much clearer. It allows us to exclude the interiors of the trapped surfaces from our space, so we need not deal with such difficulties as how to model the actual (non-vacuum) singularaties therein and how to treat them numerically. It should be noted however, that there is no guarantee that the marginally trapped surface in question will be an outer trapped surface (apparent horizon). In particular, as Cadei (1974) showed, if we have two black holes close enough together, a third (outer) marginally trapped surface forms, enclosing them both. This latter surface is the desired inner grid boundary. One solution to this difficulty is to use the marginally trapped boundary condition on the "inner" grid boundary surrounding each black hole, then search the resulting space for additional marginally trapped surfaces. However, this has not yet been done for the spaces constructed in the present thesis. The actual boundary condition on ty which results from the marginally trapped surface boundary condition will now be derived. Bowen and York (1980, equation 19 (44)) find that the equation for a marginally trapped surface (in the "hat-means-flat" space) is V , . ' + 4s'V,(ln *) + = 0, (28) where s* is the outward pointing unit normal to the surface. The first term, being just the 3-divergence of the vector field s*, can be rewritten (see for example, M T W page 222, equation (8.51c)) as V,s< = -JL dt (v^5 «'') , (29) '(3)$ where denotes the determinant of the matrix ^gtj. The second term can be rewritten as 4s'V,(ln ty) = 4s*c9,(ln ty) (since ty is a scalar) _ 4 8 % * ( 3 0 ) ~ ty ' Hence (28) becomes ^ . • ( ^ , ) + l f ^ + ^ £ i . o . ( 3 1 ) We must now find the coordinate version of (31) in whatever coordinate system will be used immediately surrounding black holes. Taking this to be polar spherical coordinates centered on the black hole in question and taking the marginally trapped surface to be the 2-sphere r = constant, we have \/(3)g = r 2sin0 and s* = (1,0,0). (31) then becomes 1 3 . 4dty Krr n ( ^ 0 ) + - — + - — = 0, (32) r2sinc?3rv ' ty dr ty4 or dty ty lkrr n — + — + - V r = °- (33) dr 2r 4 ty3 v ' This is the marginally trapped surface boundary condition used in the present work. 20 bi h Robin +± _i r 0 Reflection Symmetric +h 0 0 Marginally Trapped 0 It is desirable to use the same computer code to handle as many as possible of the boundary conditions, so we merge (25), (27) and (33) into a single "generic" boundary condition _ + M / + 62 + J L = 0 , (34) where the coefficients 62, and 63 are defined by (35) A with both r and Krr interpreted in a polar spherical coordinate system centered on either a "global origin" (for the "Robin" entries) or on the black hole in question (for the "Reflection Symmetric" and "Marginally Trapped" entries). Note that if multiple black holes are present, some care is needed to compute the correct Krr values for the latter case; this will be discussed in detail later. We shall frequently find that our spaces have a mirror image symmetry about the 2 = 0 plane (hereinafter the "equator") which can be exploited by solving our problem only on (say) the z > 0 half-space and imposing a suitable boundary condition on the equator. To derive this boundary condition, we observe that mirror image symmetry about the equator implies that $ must be an even function across it. Hence -z— = 0 (on the equator) (36) az for cylindrical coordinates, and 86 for polar spherical coordinates — = 0 (on the equator) (37) 21 We have now discussed boundary conditions for all the boundaries of our spaces. However, both polar spherical and cylindrical coordinates have the z axis as a boundary of their coordinate systems. We thus require a boundary condition there, which we now derive. We assume that "9 itself remains smooth across the z axis, in particular that all ty's directional derivatives are continuous there. But if I denotes a vector perpendicular to this axis, then the directional derivative operator in the £ direction switches from being (in cylindrical coordinates) a — p derivative to a +p derivative as we cross the axis in the I direction, so we must have 5* dp = 0 (on the z axis) . (38) For polar spherical coordinates, the same argument yields (on the z axis) . (39) 22 Choice of coordinates We now discuss the problem of choosing a suitable set of coordinates for spaces containing multiple (say two) black holes. The numerical treatment of boundary conditions is much simpler if they occur only at constant coordinate surfaces, so we desire each black hole to have its surface be a constant coordinate surface of our coordinate system. Indeed, we would ideally like our coordinates to approach polar spherical (centered on the black hole's "center") as we approach each black hole, to reflect its approximate spherical symmetry. As mentioned earlier, our space is asymptotically flat, so we again desire our coor-dinates to reflect the asymptotic spherical symmetry this implies by approaching polar spherical coordinates at large distances from the strong field region containing the black holes. Of course our actual numerical grid will only be of finite size, but it is still rea-sonable to require that its outer boundary resemble a sphere as much as possible. In particular, this boundary should be a constant coordinate surface (for the same reasons as the black hole surfaces), and its outward directed normal should be fairly close to a radial one, to minimise errors in computing surface integrals over this outer boundary. Because ty depends only weakly on 9 near the outer boundary, this condition helps keep its radial and angular dependence decoupled. This allows anisotropic coordinate grids with (for example) very low angular resolution yet fairly high radial resolution. Finally, it is certainly a reasonable requirement that our coordinate system be free of singularities, at least exterior to the black holes. This is important for numerical reasons, since a coordinate singularity would probably cause severe rounding errors, or even floating point over/underflow problems. 23 Unfortunately, the three conditions given above cannot be satisfied by any single coordinate system. This is because there are by assumption two black hole surfaces, each topologically a sphere, but only one outer grid boundary, also topologically a sphere. Clearly no coordinate system can make a continuous transition from having two spheres as constant coordinate surfaces, to only one. Thus one or more of the conditions given must be sacrificed. Past work on this and similar problems, notably that of Smarr (1975), Eppley (1975), and Cadez (1971), (who studied the head-on collision of two black holes by time evolving analytically obtained initial data) has usually chosen to sacrifice the reqirement that the coordinate system be free of singularities. Coordinates related to the equipotentials of electric charges placed at the black hole positions have often been used; these have saddle point singularities in between the black holes. In a prototype of the code described in this thesis, bispherical coordinates were used, which placed a coordinate singularity at spatial infinity. One result of this was that the outer grid boundary was no longer a single constant coordinate surface, but was instead the union of three such surfaces. This proved inconvienent in a number of ways, including difficulty in varying the grid spacings in a local manner and problems with joining the two outer boundary surfaces. Physical insight into the numerical solutions was made more difficult by the same coordinate playing the dual role of "radius" near a black hole, and "angle" near the outer grid boundary. Also, these coordinates fail badly to approach polar spherical at large distances from the black holes. Most such "global analytic" solutions to the coordinate choice problem yield co-ordinates which give rise to algebraically "messy" and complicated 3-metrics (3^,y, even for the fiat case /,y. For non-flat 3-metrics (as would probably be used in a time 24 evolution calculation) this difficulty would be much more serious. This thesis describes an alternative solution to the problem, namely the use of multiple coordinate patches in the numerical solution. Thus each black hole can be surrounded with a polar spherical patch centered on it. A polar spherical patch centered on some convenient origin can be used for the outer region of the numerical grid, and the volume in between can be filled with (for example) a rectangular coordinate patch. Given that the boundaries between the patches can be dealt with, this scheme offers several advantages: It is not specialized to a fixed number of black holes, so the same computer code can deal with a wider variety of physical systems. Because each patch may have its own coordinate system, there is a great deal of flexibility in locally adapting the coordinates to the physics of the system, while still retaining a simple 3-metric in each patch. In this thesis, the scheme mentioned above of using polar spherical coordinates both for the neighborhoods of black holes and for the outer regions of the numerical grid is used. For single black hole models, no other coordinate types are needed. For multiple (2 in this thesis) black hole models, cylindrical coordinates are used to fill the volume in between the neighborhoods of the black holes and the outer part of the grid. (These are preferred over the rectangular coordinates mentioned above because of the axisymmetry of our spaces.) Other types of coordinate systems have thus far been neither needed nor tried, but it would be easy to incorporate them into the computer code described herein. Another advantage offered by the use of patches is that any remaining coordinate singularaties (for example the one at the origin of polar spherical coordinates) can be 25 easily avoided by placing a nonsingular coordinate patch at the offending location. One place in this work where this might have been needed is the z axis, but the singularaties there are sufficiently mild that it proved easy to deal with them analytically. None of the polar spherical coordinate patches used herein contain their origins, so the singularaties occuring there are not a problem. Another important issue in coordinate system selection is the need for varying and/or anisotropic resolution in the numerical grid. In the present work, this is dealt with by introducing new patches, while keeping the grid size constant (although possibly anisotropic) within each patch. The full generality of the patch structure used in this thesis is not really needed for this function, but the overhead of introducing new patches is small. A detailed discussion of just how coordinate patches are used in the actual solution of our problem will be delayed until after the manner of discretizing the equations is discussed in the next chapter. 26 Finite Differencing the Equations The previous chapters have shown that we must solve the nonlinear elliptic PDE V 2 * + Sty~7 = 0 (40) on the region of space exterior to the black holes, using both polar spherical and cylindrical coordinates. We must do so subject to the boundary conditions dty 63 37 + M> + 62 + ^ = 0 (41) on both the inner boundary of the patch surrounding each black hole and the outer boundary of the outermost patch, and dty = 0 (cylindrical coordinates, on the z axis) dp dty —— = 0 (cylindrical coordinates, on the equator) dz dty = 0 (polar spherical coordinates, on the z axis) dty - — — 0 (polar spherical coordinates, on the equator) dd on the given boundaries. The techniques by which these equations are converted into a set of coupled nonlinear algebraic equations will now be discussed. Only those aspects of finite differencing used in this thesis will be discussed; see Mitchell and Griffiths (1980) for a more detailed discussion and further references on the topic. The basic idea is to consider the functions (eg. ty) to be defined on a finite "grid" of points (typically uniformly spaced), and to approximate the differential operators by suitable differences of grid-function values (thus the name "finite differences" for this technique). The resulting finite difference operators are then substituted for the differential operators to yield an algebraic equation, which must hold at each grid point. The boundary conditions are treated in a similar manner, as will be discussed later. (42) 27 To illustrate the technique, consider first a single function / of a single variable z, and suppose that z has been discretized to a uniform grid z,- = XQ + i A z . (Within this chapter we will use subscripts mainly to denote evaluation at the corresponding grid point.) Taylor expanding f(x) about z,-, we find that and that ,, / . - H - 2 / . + /.-1 . . h (Az) 2 ' l 4 4 J where we have made the approximation of neglecting 0((Az) 2) and higher terms in the Taylor series. These two "centered second order" finite difference formulas are very widely used. The letter h is often used as a "generic" grid spacing A z ; these formulas are then refered to as being aO{h?) accurate". Note that this "accuracy" (more properly known as "local truncation error") refers only to the degree to which the difference equations locally approximate the differential equation. Whether or not the solution of the difference equations globally approximates the solution of the differential equation (assuming both to exist) to the same extent is in general a rather difficult question to answer. Fortunately, this latter property turns out to hold for all difference schemes discussed in this thesis, so this problem will not be further considered. Continuing with our example, suppose that / satisfies the differential equation /"(z) + z = 0. (45) We finite difference this by substituting the approximation (44) for / " at a typical grid point z,-, to give the algebraic equation 28 which we require to be satisfied at each grid point, i.e. for each value of t. We now consider boundary conditions for our example problem (45). Suppose we have that /(0) = 0 (47) and /'(0) -1 = 0. (48) Suppose also that we have a grid starting at io = 0 (it is usual in finite differencing to choose the grid so that all boundaries occur at grid points, as we have done here) and extending in the positive x direction (we ignore the right hand boundary of the grid for this example). The boundary condition (47) is easily dealt with—just set /o = 0. However, bound-ary condition (48) requires that we have a finite difference approximation to /'(0). Using the difference scheme (43) given above, this requires a value / _ i for f(x) at the nonexistant grid point x_i, as does the finite difference form (46) of the differential equation when evaluated at the grid point x0. One solution to this difficulty lies in using the boundary condition to extrapolate a value for / _ l t which can then be substituted in the finite difference form (46) of the differential equation for the grid point Xo. This substitution can be done either analytically (resulting in a modified finite difference form of the differential equation at the boundary point, which implicitly incorporates the boundary conditions), or numerically, by actually including the extrapolated function value as an extra variable in the algebraic equations. The latter technique is used in this thesis, so our example 29 boundary condition (48) becomes This completes the finite differencing of our example; we now have one algebraic equa-tion for each unknown function value. We now return to our main problem, namely the finite differencing of (40) subject to the boundary conditions (41) and (42). We will need to do this for each coordi-nate system type used, namely cylindrical (p,z,<f>) and polar spherical (r, 9, <f>). Finite differencing in a general curvilinear coordinate system is not quite as trivial as the one-dimensional case considered above, so we now discuss the finite difference approx-imation to V 2 ¥ for use in (40) above. The <f> terms in the V 2 operator can be omitted due to the axisymmetry of our problem. In cylindrical coordinates, assuming for the moment that p ^  0. While the two forms (50) and (51) are certainly equal, the straighforward applica-tion of the approximations (43) and (44) to them will not necessarily give the same finite difference equations. This is symptomatic of a general problem in finite differencing— the finite difference form of a given (continuum) equation is not unique. The different forms may vary greatly in accuracy. We shall defer consideration of the form (50) until later in this chapter, and proceed now with the finite differencing of (51). We do this (still assuming that p ^  0) by substituting the standard 0(h?) centered . (50) (51) 30 approximations (43) and (44) for the partial derivatives. This gives ( V •)«W I ( A ^ J + p"y" I 2Ap" I (A*) 2 J where we have defined the coefficients 1 1 _ C l " (Ap) 2 2p Ap - 1 1 °2 ~ {EpJ + 2p~A~p C 3 = C 4 = ( A ^ C5 = ~ ( C l + C 2 + C 3 + C 4 ) , at the (»,;)th grid point. It is common to write (52) as the convolution (52) (53) (V2¥),-,y = c4 C\ C$ C 2 (54) of the "molecule" with coefficients {c,} with the matrix of ty values centered on the point (i,i). In this notation, the molecule coefficients are always assumed to be evaluated at the central grid point (t,j), so for example "p" denotes pf)y. This difference scheme must be modified on the z axis, since the second term of (51) becomes singular there. The Neumann boundary conditions (42) allow us to apply L'Hopital's rule in its "0/0" form to the offending term of (51), to obtain „ 2 t nd 2ty d 2ty (55) We finite difference this in the same manner as before, to give the molecule with coefficients d = c 2 = c3 = c 4 = (Ap) 2 1 (Az) 2 c& = -(ci + c2 + c3 + c4). (56) 31 We now consider the finite differencing of V 2 $ in polar spherical coordinates. We have „ 2 t 1 3 / 2 3 ¥ \ 1 3 ( . ndV\ v * = ^ F r r ^ j + ^ i n 7 ^ r ^ j a (. a * ' . „ r r I sint9——-sin 0 3 0 V ae a 2* 2 3 * i a 2* cost? ay + — r - + + (57) (58) Sr 2 r dr r 2 302 r 2sin0 30' assuming that 9 ^ 0 or ic. We again defer consideration of the first of these forms (57), and proceed to finite difference (58). Using the same procedure as before, we obtain the molecule with coefficients 1 1 c3 = c 3 = c4 = {Ary r A r 1 1 + (Ar) 2 1 r A r cost? r 2(A0) 2 2r 2sin0A0 1 cost? + (59) r 2(A0) 2 2r2sin0 A0 Co = ~ ( C l +C2 + C3 + c 4 ) , still assuming that 0 ^ 0 or ir. If this latter assumption does not hold, we can again apply L'Hopital's rule to the offending term (the last one) in (58) to obtain V 2 * = a 2* 2 a* 2 a 2* + - + ar 2 r dr r 2 302 {9 = 0 or TT). (60) Finite differencing this in the same manner as before gives the molecule with coefficients 1 1 C l = c2 = (Ar)' r A r 1 1 + (Ar) 2 " r A r _ 2 °z ~ °4 " 'r^Aly C5 = - ( c i + c2 + c 3 + c4). 4 (61) We now return to consider the finite differencing of (57). If we were to apply the approximation (43) to each of the partial derivatives in (57), we would obtain a molecule 32 with nonzero entries farther away from the central point than we have previously seen (2 grid points rather than 1). This would greatly complicate the treatement of boundary points. As an alternative to this use of (43), we introduce the concept of a "staggered" grid. We first consider this in the context of our example problem (45). We define the staggered grid by z t + i = z 0 + (» + |) A z . We Taylor expand f{x) about z , + i to obtain the approximation K ( 6 2 ) where we have again dropped the second order and higher terms in the Taylor expan-sion. Having defined / ' on the staggered grid, we can now use it to derive an approx-imation for / " on the original grid by Taylor expanding the function /'(z) about z,-and dropping the second and higher order terms. This gives / " = i n « \ x 3 - (63) For our example problem (45), this doesn't get us anywhere, since substituting (62) into (63) just gives the approximation (44) again. However, the technique used here is directly applicable to the finite differencing of (57), to which we now return. We apply the staggered grid technique to the finite differencing of (57) by first ap-plying the approximation (63) to the "outer" derivatives, then using the approximation (62) to evaluate the "inner" derivatives on the staggered grid points where they are 33 needed. We have (V 2*).-,, r 2 -+ A r 1 [ ( ^ 0 | f ) , y + x - ( s i n 0 | | ) , y _ , ; r2ysint?,-,y At? r? • A r + V A r ;  T*-i>>\ A r , / J which gives the molecule with coefficients c 2 1 / A r V (Ar) 2 V 2r / C3 = c 4 = 1 8 i n g . - ,y-f r 2(A0) 2 8m$ij 1 sinc?,iy+i (65) r 2(A0) 2 s i n ^ -Cs = ~ ( C i +C2 + C3+ c 4). J Finally, if 0 = 0 or JT, we can again apply L'Hopital's rule to the offending term in (57) to obtain „ 2 t 1 3 / 2 3 ¥ \ 2 a 2 * which gives the molecule with coefficients — f i - - V ( A r ) 2 V 2 r | {Krf 0+ 2r) > (67) 2 c 3 = c 4 = 2 \ Ci = c 2 r^Ae?)2 C5 = - ( c i + c 2 + c 3 + c 4 ) . J 34 The application of the staggered grid differencing technique to the finite differencing of the form (50) turns out to give the same molecule (53) as was obtained by finite differencing (51) in the usual way, so we shall not consider this case further. It can be shown that finite differencing V 2 (using the staggered grid differencing technique) in the form (50) or (57), results in the solution to the (linear) PDE V 2 ^ = 0 obeying a local finite difference form of Gauss's law. Such finite difference schemes (as (65)) are thus known as "locally conservative". Their properties (in contrast with the "independent terms" difference schemes such as (53) or (59)) are beyond the scope of this thesis, but they are often more accurate. Eppley (1977, pp. 1610-1612) discusses them in more detail, and gives further examples. We now consider the boundary conditions (41) and (42). These are treated in the same manner as the example (48) above, i.e. the first derivatives are approximated using the standard 0{h?) form (43), which is used to extrapolate a value for ty one grid spacing beyond the boundary. This value is then available for use with the V 2 molecules derived above; its substitution in the appropriate molecule is done numerically. Thus, if the actual boundary occurs at the "end" grid point tye (we supress the coordinate running parallel to the boundary line), we extrapolate an "exterior" value tye±i one grid spacing beyond the boundary (which may be in the direction either of increasing or decreasing grid coordinate) based on tye and the "interior" value tye-pi defined one grid spacing inside the boundary. For the boundary condition (41), we thus have (68) 35 where , _ J +2 A r bi (for an "inner" boundary) . * »' ~ [ - 2 A r 6,- (for the "outer" boundary) I 6 > and the 6,- are defined by (35). The Neumann boundary conditions (42) are treated the same way, and reduce to the simple expression * e ± l « ^ T l . ( 7 0 ) 36 Coordinate Patches — I Now that we have discussed the finite differencing of our problem, the requirements on a patch system (i.e. the questions that the patch data structures must be able to answer) can be defined, and the means chosen to implement patch systems can be discussed in more detail. The key problem here is how to handle the interpatch boundaries. We must also be able to describe the geometry of the patch system, i.e. how the patches fit together to cover our space. We now discuss the basic principles of the patch system used, and the means by which it adresses these problems. Each patch uses either polar spherical or cylindrical coordinates. The latter are also used as a "global" coordinate system to refer to positions in our space without reference to any particular patch. The coordinate system of any single patch need not be centered on the global origin, although in practice only polar spherical patches will be centered elsewhere, and these must always be centered somewhere on the z axis to preserve axisymmetry. In order to keep the discussion applicable to both patch types, we introduce generic (2-dimensional) patch coordinates (z, y), corresponding to (p, z) and (r, 6) in cylindrical and polar spherical patches respectively. Given the axisymmetry of our spaces, we will supress the <f> coordinate in the following discussion. Each patch is then most simply described by first looking at it in its own (z, y) coor-dinate system, i.e. we view cylindrical patches in (p, z) coordinates and polar spherical patches in (r, 6) coordinates. We take the grid spacings to be uniform within each patch, so the coordinate grid becomes a uniform rectangular "mesh" of straight (coordinate) lines overlaying the patch. We label these lines with integer coordinates with 37 unit grid spacing in both directions. For the present work, the origins of the (x, y) and the systems are taken to coincide. This is in no way essential to the development, but the extra generality of allowing them to be distinct has not been needed. We now discuss in more detail just how the "geometry" of the patch is described. It suffices to describe the intersection of each (coordinate grid) line with the patch. A patch is said to be "manhattan convex" if and only if each such intersection is a finite line segment. All patches are taken to satisfy this constraint, which has not in practice proved onerous. (At worst, a region of our space which is logically a single patch but is not manhattan convex, must be split into two or more manhattan convex patches. This occurs, for example, in the patch system shown in figure 9.) Given this constraint, it suffices to describe the two ends of each line. In particular, the shape of a patch is described by giving the value of t or j (as appropriate) at each line end. This information is stored as part of a "line end descriptor" for each separate line end. There remains the problem of how to describe the way the different patches fit together to cover the whole space. Truly "global" information (eg. "patch #4 is sur-rounded by patches #2, #5, and #9") is very hard to describe in a useful way, but fortunately is not really needed. What is needed, though, is a means to describe "lo-cally" how the patches fit together. In particular, as well as describing where each line in a patch ends, a description is needed of how it ends. There are two basic possibilities for this: it can end either by "running into" an actual boundary of the overall coordinate system (hereinafter a "true" boundary), or it can end by encountering another patch (hereinafter a "patch" boundary). A flag is kept (in the line end descriptor) for each line end, telling which of these cases holds. An indication of which patch was "run into" or what type of 38 boundary condition (Neumann, Robin, Marginally Trapped, etc.) is in effect at the boundary is also encoded into the same flag value. If the line ends in a true boundary, the appropriate choice of boundary condition (70) or of (68), (69), and (35), can then be made. The necessary coefficients di, c^, and dz for the latter case are also stored in the line end descriptor. If, on the other hand, the line ends by encountering another patch, then we must somehow obtain a * e ± i (in the notation of the previous chapter) value for the "exterior" point which lies one grid step beyond the end of this line. We require that the exterior point lie within the other patch. This amounts to requiring that any gaps between patches can't exceed the minimum of the grid sizes of the patches in question, which turns out to be fairly easy to arrange. (It usually shows up when switching between polar spherical and rectangular patches, where the effect is to sometimes require an extra polar spherical patch whose only purpose is to match up the grid sizes before the switch is made. An example of this is patch #2 of the patch system shown in figure 4.) Since it's grid point lies within the other patch, we can derive \ f e ±i by interpolating ty from its values in the other patch. Since we are only approximating V 2 * to 0(/i2), it suffices to use bilinear interpolation, whose error term is also 0(h?). As shown in figure 1, there are essentially two cases to this interpolation: either we are interpolating into a square (of points in the other patch), or we are interpolating into a triangle. The coefficients for the interpolation must be derived in a different manner (from the position of the interpolation point) in each case, with the triangle case further broken down into four subcases depending on the triangle's orientation. However, as shown in figure 2, the net result in all cases is that the interpolated tye±i value is a Figure 1 - "Square" vs. "Triangle" Interpolation 39 This figure shows interpolation of values from a rectangular coordinate patch into a polar spherical coordinate patch. The dotted lines and the points at the ends of them show the exterior points of the polar spherical coordinate patch, where the interpolation is done. Those points labelled with "•" lie within a square of the rectangular coordinate patch's grid points; those labelled with " A * lie within a triangle of such points, the "outer" side of which is shown with a dashed line. linear combination * c ± i = d 0 0 *oo + doitfcn + d 1 0 * 10 + d u ¥ u (71) of the other patch's ty values on the four corners of a square (of side one) in the other patch's (t, j) coordinate system. (The triangle cases all have the "weight" of the "missing corner" set to zero.) The (t, j) coordinates of the lower left corner of that square, and the four interpolation coefficients, are all stored in the line end descriptor. There is one more detail to be discussed before the description of the patch system is complete. This concerns adjacent patches which have the same coordinate system type. (These can arise either as the result of splitting a "logical" patch into two or Figure 2 — Bilinear Interpolation Formulae 40 d 0 0 = (1 --x)(l doi = (1 --x)y dio = x{l -y) d n = xy doo = 1 - x - y d 0 i = y dio = x d n =0 doo = 1 doi = y dio = 0 d u = X doo = 1 doi = 0 dio = X d u = y y X i - X = x - y doo = 0 doi = 1 - X dio = i - y d u = x + y-1 (72) (73) (74) (75) (76) Interpolation coefficients for the different possible cases of bilinear interpolation. For this figure only, (x, y) is the position of the interpolation point in the interpolation region, the latter being taken to run from 0 through 1 in both x and y. 41 more manhattan convex patches, or they can be the result of using extra patches to allow local variation in the grid spacing.) It would be possible to "butt joint" such patches, since the interpatch interpolation would then reduce to a simple transfer of ty values. However, due to finite differencing errors, the ty values obtained at the points common to both patches would not exactly match. It is thus simpler to always leave a gap between such patches, of width equal to the minimum of the two grid spacings perpendicular to their common boundary. This has been done in all patch systems used in this thesis. 42 Coordinate Patches — II The previous chapter has discussed the type of coordinate patch system (also known as "grid") used in this thesis. This system, although well-suited for "internal" computer use, is far too low-level a representation to be used for human input of any non-trivial patch system. Thus, a higher-level "patch description language" is needed, to describe the overall geometry of the patch system. This can then be "compiled" into the appropriate arrays of patch descriptors and line end descriptors. This chapter gives a brief overview of this language. It's detailed syntax and semantics are fully defined only by the programs (listed in appendix 2) which process it, but an overview should be of interest to anyone trying to use coordinate patches in the numerical solution of PDEs. Numerous examples of patch description language input files may be found in appendix 1. The key idea of the language is the means used to describe the geometry of each patch. This is done by describing all the different ways the patch's grid lines can end, for each of the four "sides" of the patch—minimum z, maximum z, minimum y, and maximum y. Each such description takes the form of a series of "boundary definition terms", each of which either says that the grid lines end at a (given) constant value of z or y (as appropriate), or says that they end by encountering such a boundary of some other patch. The actual shape of a patch is determined by the union of all its terms, i.e. a grid line ends as soon as it "hits" any term. The compilation algorithm has two main phases: the determination of the shapes of the patches, and the determination of the precise boundary conditions in effect at each line end. The first phase is trivial for "regular" patches, defined as those whose definitions contain only "constant" terms. For "irregular" patches (all others), 43 we require the specification of rectangular (in the patch's own coordinate systems) "bounding boxes" completely enclosing the patches. These provide starting points for finding patch boundaries by sweeping along grid lines until a term that "hits" is found. Once the patch shapes have all been determined, each line end of each patch is checked to see which of the available terms it hit. This allows the nature of the bound-ary conditions in effect at the line end to be determined, so the various flags and coef-ficients described in previous chapters can be calculated and stored in the appropriate descriptors. This patch description language has proven adequate for the uses made of it in this thesis, but further enhancements might well be in order. For example, the current language lacks any facilities for parameterizing patch definitions. Defining non-trivial patch systems (such as those used for the two-black hole models of this thesis) is in practice a rather tedious and error-prone task, typically requiring several attempts before the "compilation" is error-free and produces the desired result. Part of this problem may be due to the fairly crude nature of the compilation algorithm and it's present implementation. The basic problem is that almost all "computational geome-try" is conceptually simple but complicated in practice. This certainly applies to the compilation code, which runs to about 2000 lines of code, and was very hard to debug. 44 The Ext r ins ic Curva tu re The previous chapters have shown how our problem is discretized to obtain a set of coupled nonlinear algebraic equations. These depend on the particular black hole configuration chosen through the conformally scaled extrinsic curvature tensor Kij. We now discuss just how this latter object is obtained, starting with the Bowen and York solutions to (14) given by (17) and (18). These solutions are most simply evaluated in polar spherical coordinates centered on a black hole. Choptuik (1982, pp. 56-57) gives the only non-zero components of Kij in these coordinates as A Keg = Kjxj, = 3Psin0 2r~~ 3Fsint9 3P cos e sin2 6 * 3Pcos0 / a?\ ("4) HS)I (77) for a black hole with momentum P in the positive z direction, and (correcting 2 typo-graphical errors in the cited source) Kr<t> = 3Jsin 20 (78) for a black hole with spin vector J in the positive z direction. For our problem, we in general have multiple black holes, each at a different position, and each possibly having both momentum and spin. Thus we need to transform (77) and (78) for each black hole into a common coordinate system, then sum over all black holes. We take cylindrical coordinates for this common system. The necessary partial 45 derivatives of {r,0} with respect to {p,z} are dr _ p - pBH dp r dr _ z — zBH dz r dd _ Z-ZBH dp ~ r 3 P - PBH (79) d6_ dz '' where we take the black hole coordinates to be (pBH,zBH). In practice, we must always have pBH = 0 due to the assumed axisymmetry of our space. Observing that a black hole with both momentum and spin will in general have all A A its polar spherical coordinate Kij components non-zero except for K94 and recalling the symmetry of Kij in any coordinate system, we find the cylindrical coordinate Kij components to be k p 0 = Krr(^-) +2Krg \°pj » » drdr * Kpz = Krr ~Q~p Q—^ + Kr0 }?L?L + k „ (-\ 'dp dp 0e\dp) drd£ d£dr] ^ dpdz dpdz] 1 d£dl dp dz Kp<f> — Kr dr dp * (dr\ * drdO * I d e \ K z z = Krr{dz) +2Kr6dzTz + Ke9\Tz) A A Kz<p = Kr<t> dr dz (80) K^tj, = Ktp^f where the right hand sides are found (in polar spherical coordinates) from (77) and (78). A Having obtained Kij in the global cylindrical coordinate system, there are two ways in which we shall use it. First, we must compute the source function 5 = -KuK". (81) 46 Since this is a scalar (rank zero) object defined by a tensor equation, it is invariant under coordinate transformation. We thus may choose a coordinate system to compute it in solely on the basis of convienence. Since we have all Kij components available in the global cylindrical coordinate system, we choose to compute S also in this system. Since < V = 1 1 .-2 (82) in cylindrical coordinates, we have (again recalling the symmetry of both and K*3') 2 (83) This latter expression can be evaluated as it stands, except on the z axis, where p = 0. However, this difficulty is only apparent, since the Ki$ components involved all contain cancelling factors of p. Since p — r sin 6 for polar spherical coordinates centered on (a black hole on) the z axis, the solution is to divide out a factor of sin 2 6 from K^ in (77) and a factor of sin 8 from Kr<? in (78), then divide out a factor of r from Kp<p and Kzf, and a factor of r 2 from K^ in (80). We then compute The second way the global cylindrical coordinate components of Kij are used, is in computing Krr for use in the marginally trapped surface boundary condition (33). A We must thus transform Kij from the global cylindrical coordinates back to the local polar spherical coordinates of each black hole that uses the boundary condition (33). We find that *"=MS2+2*<'£I+*"G3°' (85) 47 where the necessary partial derivatives are given by VM „ > < 8 6 > — = COS0. dr 48 Choice of Conformal Function As mentioned earlier, our basic equation (21) can be viewed as a nonlinear Poisson equation, with the source function S determining the magnitude of the nonlinearity. To the extent that we can ignore this nonlinearity, our solutions to (21) should thus be superpositions of Schwarzschild solutions. In isotropic coordinates (required by our assumption of 3-conformal flatness), the Schwarzschild solution is * S C H W = 1 + (87) r where m is the black hole mass and r is the usual polar spherical radial coordinate in the "hat-means-flat" space. Thus we expect the "monopole sum" where the sum is over all black holes, {A,} is a set of "monopole strengths" which we set to one half the black hole masses, and r,- is the distance from the ith black hole, to be an approximate solution to (21). Because the boundary conditions play such a crucial role in determining the solution of (21), it is desirable that they be finite differenced as accurately as possible. In particular, this applies to our "generic" boundary condition (34) and its finite difference form (68). When this is applied at an inner (black hole surface) boundary, a single term in the sum of (88) will usually dominate. Likewise, when this is applied at the outer boundary, the asymptotic form (23) is again of the form of (88) with only a single term in the sum. Thus any mechanism by which we can improve the accuracy of our finite differencing of the boundary condition (34) for solutions of the general form * = 1 + ^ , (89) 49 where A is an unknown constant, should also improve our accuracy in more general problems. In particular, we want a good finite difference approximation to ^ for such solutions. This leads to the idea of working with some function il(ty) which linearizes this radial derivative. We adopt the function « ( * ) = (9°) for this purpose. This gives ft as a linear function of r for the solution (89), so our finite difference approximation (68) to the boundary condition (34) is exact for this case. An alternative way of improving the accuracy to which the boundary conditions (both inner and outer) are approximated was tried by Choptuik (1982), who replaced the r coordinate of polar spherical coordinates with the new coordinate s = l - - . (91) r This has the advantage of not putting any constraints on the range of ty, whereas (90) requires that ty be everywhere greater than unity (or everywhere less than it). On a few occasions when very poor initial guesses are used, the author's code produces extrapolated ty values which violate this requirement, with generally disastrous results. Another advantage to Choptuik's s coordinate is that grid points evenly spaced in s are bunched up near the black hole. This is useful since closely spaced grid points are needed to resolve the rapid variation of ty in this region. (The author's code uses multiple patches to perform this function.) However, the definition (91) is closely tied to the use of polar spherical coordinates, and does not easily generalise to the case of multiple coordinate patches. A possible solution would be to adopt (91) on polar spherical patches around black holes and in the neighborhood of infinity, while retaining 50 more usual coordinates elsewhere. Used in the neighborhood of infinity, (91) allows the direct use of (22) in the form for an outer boundary condition. Choptuik (1985c) has suggested that this will lead to more reliable values for the total mass-energy of the computed spaces than the Robin outer boundary conditions used in this thesis, but this has not been tried. We now turn to a more detailed discussion of the use of (90) in the author's code. It was decided to continue to always store and finite difference ty (to obtain V 2 * ) , but to allow interpatch interpolation and boundary extrapolation to use either ty or ft, the choice being made independently for each patch. To obtain a value tye±i at an interpatch boundary, we use bilinear interpolation in either ty or ft based on the other patch's choice of conformal function, since that's the patch tye±i is in. To obtain tye±i at a true boundary of a patch, we extrapolate either ty or ft based on that patch's choice, since there is no other patch involved in this case. For the interpolation case, (71) is merely replaced by a bilinear interpolation in ft, where the interpolation coefficients are found as before (figure 2). However, the ex-trapolation process at true boundaries isn't quite as simple. If the Neumann boundary conditions (42) apply, the extrapolation formula (70) is easily seen to still hold, so we need not consider this case further. However, the generalised boundary condition (41) requires a new treatment, which we now discuss. From the defining expression (90), we have ty(s = l) = 1 (92) fte±i = dooftoo + doiftoi + dioftio + d u f t i i , (93) (94) so that 3 £ _ l_dQ dr ~ n 2 dr ' Our boundary condition (41) thus becomes 1 ^ L T L fc3 n which we finite difference in the same manner as before to obt with the d{ being defined by (69) and (35) as before. 52 Solving the Algebraic Equations The result of finite differencing the P D E under consideration is, as mentioned above, a large set of nonlinear algebraic equations, one for each grid point. In the interior of a patch, each point is "linked" to its four nearest neighbors only; points on interpatch boundarys are linked to the interpolation points in adjacent patches. In either case, the number of points a given point is linked to is far smaller than the total number of grid points in the patch system, i.e. the system of equations is "sparse". We now discuss the methods used herein to solve these equations. Most past work in numerical G R has used iterative methods to solve such systems of equations, typically without ever explicitly constructing the systems at once. These methods involve iteration even if the equations are linear. This was tried in early versions of the program described in this thesis, but the convergence of these methods (notably the standard "SOR" one) was found to be at best slow, and sometimes nonex-istant. To avoid this, we adopt a global Newton method, where the entire linearized system of equations is solved simultaneously, iteration occuring only due to the nonlinearity. This gives reliable convergence without "tuning parameters", at the expense of very slow execution. Choptuik (1982) found the "multigrid" algorithm of Brandt et al to be very fast in execution. However, he reported that the programming effort to implement it is substantial—at least several person-months of programming over and above that needed to implement SOR. He also found that some tuning of the parameters of the multigrid algorithm was needed to ensure reliable convergence. We will now discuss the global Newton method used in this thesis. We begin by 53 imposing a linear ordering on the grid points, say from 1 to n. (For the present work, the natural ordering of the 3-tuples (p,t, j) is used, where p denotes the patch number and ( t , ; ) the integer patch coordinates of the grid point.) The system of equations can then be written as the single vector equation F(x) = 0, where x denotes the vector of n ty values, and F is a suitable vector-valued function. We now linearize F about our current solution estimate x, F(x + 5x) « F(x) + J • 5x, (98) where J is the n by n "Jacobian" matrix (in general dependent on x) defined by J " « = ^ <") to be matrix multiplied by the column vector fe. Finally, we solve for the "step" fe which would make F(x + fe) zero if the linear approximation (98) were exact, finding that we must have J - f e = -F(x). (100) In this case, we interpret F as the vector of residuals, so 3ki represents the partial derivative of the fc-th residual with respect to the /-th ty value. Note that this must take into account the indirect influence of values in other patches through interpatch inter-polation at line ends, as well as the effects of boundary conditions. Given that either or both of these may be done using either ty or fi, the actual calculation of the com-ponents of the Jacobian is a rather messy task, although conceptually straightforward. The detailed equations used may be found in the listing of the function jacobian.c in appendix 2; they have too many subcases to justify writing them out here. Like the usual single-variable Newton iteration which it generalizes, this iteration may fail to converge if the initial guess is sufficiently bad, but when it does converge 54 it does so quadratically, roughly squaring the relative error (doubling the number of correct digits) each iteration. (This latter property provides a useful check that all components of the Jacobian have been calculated correctly.) Because of these two properties, there is a premium placed on having a fairly good initial guess. The strategy adopted to provide this is twofold. First, we use the monopole sum (88), which corresponds to a linear superposition of Schwarzschild solutions. As dis-cussed in the previous chapter, this provides a good initial guess when the source func-tion S is small. Second, when computing a series of models differing only in black hole momenta or spins (i.e. in S), the ty values from previously computed models are used as initial guesses for new ones. This latter technique is known as using a "continuation method", and was suggested by M . Yedlin. Our problem is now reduced to that of solving a large sparse system of linear equations. This is a standard problem in numerical linear algebra, and many algorithms are available for solving it. For the present work, the "ILUCG" algorithm of Kernsaaw (1978) was used, as embodied in a subroutine package written by P. Madderom and supplied by T. Nicol, both of the UBC Computing Center. This was used "as is" except for a minor modification in its internal convergence criteria, as described in the code listing in appendix 2. However, one further problem arises in the numerical solution. The Jacobian entries are (ignoring boundary conditions) just the "molecule" components defined earlier, and these all depend on the grid spacing asl/h?. Thus, when using a patch system in which different patches have very different grid spacings, the Jacobian will have entries which differ greatly in magnitude. This usually results in the matrix being numerically ill-conditioned. To try to avoid this, we scale the Jacobian so that the entries on each row 55 are approximately the same in size. We also scale the right hand side vector —F(x) by the same amounts, so the solution Sx. to the system ( 1 0 0 ) remains unchanged. 56 M e a s u r i n g t h e M a s s e s o f t h e M o d e l s It will prove useful to be able to measure the total energy of the spaces we construct. Also, to the extent that any proper subspace can be said to have a mass associated with it, we would like to measure the masses of the individual black holes which populate our spaces. We now discuss the means by which these measurements are made. The first useful "mass functional" we shall consider is that associated with the area of the event horizon of a black hole. This quantity (summed over all black holes) always increases (second law of black hole dynamics) in any process involving black holes. Unfortunately, the event horizon of a black hole is a global property of spacetime as a whole, and can't be found until the complete time evolution of the spacetime is known. However, every (outer) marginally trapped surface must lie within an event horizon, so we can place a lower bound on the "horizon area mass" of a black hole by calculating the mass associated with a marginally trapped surface surrounding it. We find the latter simply by specifying marginally trapped surface inner boundary conditions, so our inner grid boundary becomes the desired surface. The mass Mu associated with any given horizon area Ah is Jo where we have exploited the axisymmetry to do the <f> integral analytically. We now consider means of computing estimates of the total energy of a model. Defining the total energy of a space is a somewhat difficult matter in GR, and is in any ( 1 0 1 ) This area is found by integrating over the marginally trapped surface, ( 1 0 2 ) 57 case beyond the scope of this thesis. Wald (1984, section 11.2) discusses this topic in more detail. For our purposes it will suffice to consider the mass functional (see Eppley (1977, p. 1610) for a variety of different formulations) - i ^ V t f d S , (103) 27T S where the integral is taken over the 2-sphere of infinite radius S. We approximate this by taking S as the outer grid boundary. Since we are integrating over all angles, only the radial derivative of ty contributes towards the integral, and the Robin outer boundary condition (25) gives this "for free" as dty ty-1 , s - m - — . (104) Hence (again using the axisymmetry to do the <f> integral analytically) f ty — 1 4 « r2s'm9d6. (105) Jo r Unfortunately, most previous studies have found that such "surface integral" energy functionals are numerically rather inaccurate, due to finite differencing errors. By applying Gauss's theorem to the volume occupied by the model, the bulk of the surface integral (103) can be replaced by a volume integral of V2ty, which is known analytically by virtue of our basic equation-(21). The remaining surface terms are also available "for free" through our inner boundary condition (34). This procedure, although it would almost certainly lead to more accurate energy values, is not used in the present thesis. This is due to the difficulty of doing a volume integral over the model in the presence of multiple coordinate patches with (small) gaps between them. This difficulty can probably be overcome by using information on the global geometry of the patch system, but this has not yet been tried. 58 Both (102) and (105) involve integrating a function which typically varies little with 0, weighted by r 2sin0. Although this can be done directly, numerical accuracy is considerably improved if a "representative" value of the function is subtracted off the numerical integral and it's (weighted) integral is done analytically and added back. This is particularly useful for (105), since the patch systems used in this thesis tend to have low resolution in 0 near the outer grid boundary. The actual numerical integrations involved in (102) and (105) are done by fitting a cubic spline (using the Neumann boundary conditions (37) and (39) for the endpoints) and integrating this analytically (via the spline coefficients). We choose this method over the usual choice of Simpson's rule because it does not constrain the number of integration points (angular grid points) to be an odd number. 59 Testing the Code We use two main types of models to test out the code described in this thesis: Schwarzschild models with a variety of different patch systems, and both moving and spinning single black holes with parameters chosen to match those of Choptuik (1982, 1985a). Recall that detailed information about all models mentioned in this thesis is given in appendix 1. We need to assess the accuracy of various Schwarzschild models. We will do this by comparing three quantities. The first of these is the mass M M T S associated via (101) with the area of the marginally trapped surface at our inner grid boundary, as calculated by (102). The second is the total energy "at infinity" Eoo, as calculated by (105). The third (and most reliable) is the maximum deviation max I* — ¥ S C H w | between the calculated ty and the exact Schwarzschild solution (87). The first main result of the Schwarzschild tests is that the independent terms finite difference scheme given by (59) and (61) turns out to be exact (ignoring rounding errors) for the approximate solution (89). In other words, when (89) is substituted into the algebraic equations resulting from this difference scheme, they are satisfied to within the rounding errors, rather than just to 0(h?). Because of this, the independent terms form is used in most of the models run in this thesis. The locally conservative finite difference scheme given by (65) and (67), in contrast, exhibits the expected 0{h?) dependence of errors on grid size. Table 1 gives the results of a test series of models run to verify this dependence; note that each time the grid resolution is doubled, the errors are (approximately) divided by four. The second main result of the Schwarzschild tests is that good results are (still) 60 Table 1 - Comparison of Different Grid Sizes Model lOplolOO 20plol00 40plol00 Resolution 10 20 40 1.00613 1.01808 1.00147 1.00429 1.00036 1.00105 max | * - * S C H W 6.125 x 10~3 1.474 x 10~3 3.621 x 10"4 Results of running unit mass Schwarzschild models with different grids. "Resolution" is the value of Ar/ r on the inner boundary of each patch. This is also the approximate number of angular grid points used in the inner patches. Observe that the errors go down by approximately a factor of four each time the resolution is doubled. obtained when polar spherical and cylindrical patches are intermixed. Table 2 gives the results of two test series of models run to verify this, one each for locally conservative and independent terms finite differencing schemes. Each test series consists of a baseline model using only polar spherical patches, followed by a model in which one of the patches has been augmented with a cylindrical coordinate patch. The same patch systems were used in both test series; the relevant portions of those patch systems are shown in figures 3 and 4. The table shows that inserting a cylindrical coordinate patch into the (otherwise spherically symmetric) model does not greatly increase the errors. We conclude that the accuracy of our solutions is probably not greatly degraded by the interpatch interpolation process. The third main result of the Schwarzschild tests is that the use of ft as a conformal function does indeed linearize the boundary condition (34), at both the inner and outer boundaries. It also helps to linearize the interpatch interpolation done across patch boundaries. Table 3 gives the results of a test series of models run to demonstrate the effects of using ft compared to using ty as a conformal function. The series consists of a baseline case using ft everywhere, followed by 3 models which succesively substitute ty on the innermost patch, all the "middle" patches, and the the outermost patch. All 61 Table 2 - Comparison of Different Patch Types Locally Conservative Finite Difference Schemes Model M M T S Ego max I* — * SCHW| Notes 20plol00 1.00147 1.00429 1.474 x 10~3 (1) c2 0.99884 0.99985 1.169 x IO" 3 (2) Independent Terms Finite Difference Schemes Model M M T S Eoo max I* — * S O Hw| Notes cOi 1.00000 1.00000 0.0 (1) c2i 0.99767 0.99611 2.344 x I O - 3 (2) Notes (1) : Baseline patch system, as shown in figure 3. All patches are polar spherical. (2) : Baseline patch system with patch #2 augmented with a cylindrical coordinate patch, as shown in figure 4. Results of running unit mass Schwarzschild models with different grids. Observe that the model results change only slightly when cylindrical coordinate patches are intro-duced into otherwise spherically symmetric grids. This holds true for both types of finite difference schemes. of these show larger errors than the baseline model, with the worst being the "inner* case where ty is being used to approximate the inner boundary condition. The overall conclusion to be drawn from this test series is that the best accuracy is obtained by using ft everywhere. Table 3 — Comparison of Different Conformal Functions Model 20plol00 poo opo oop A / M T S 1.00147 0.99648 1.00196 1.00148 Eoo 1.00429 0.99929 1.00899 1.00493 m a x | $ - * s c „ w | 1.474 x 10~3 3.519 x IO" 3 1.963 x 10~3 1.480 x I O - 3 Description ft used for all patches ty used for innermost patch ty used for "middle" patches ^' used for outermost patch Results of running unit mass Schwarzschild models with different choices of conformal function. Observe that the smallest errors occur when ft is used for all patches. The "middle" patches are those which are neither innermost nor outermost. Figure S — Baseline pa tch system for tab le 2 62 Only the inner section of the patch system is shown (patches #1, #2, and #3, num-bering from the inside out). The p axis runs horizontally at the bottom, and the z axis runs vertically at the left. The range of r shown is from 0.5 (at the inner boundary of patch #1) to 4.9 (at the outer boundary of patch #3). Figure 4 — Augmen ted pa tch system for table 2 63 This should be compared to the patch system shown in figure 3 (previous page). The axes and coordinate ranges given there also apply here. The previous patch #3 is now # 4 , and a new cylindrical coordinate patch #3 has been inserted. Patch #2 (the "thin" polar spherical one) is used to change to the larger grid size before the polar spherical—cylindrical patch transition. 64 The other main way we test the code is by comparing its calculated results with those of Choptuik (1982, 1985a), who studied moving and spinning single black holes using the same Bowen and York formalism as this thesis. It should be noted that Choptuik'8 results are independent of those of this thesis, in that he used both a different coordinate system and two completely different techniques for solving (21). Choptuik (1982) did a full numerical .solution of (21) using a different algorithm to solve the finite differenced equations, while Choptuik (1985a) numerically integrated a perturbation solution to (21) valid for small nonlinearities (5 values). Since he in both cases used the Bowen and York reflection symmetric inner boundary condition (27), we also use it in constructing models meant for comparison with his. We now discuss the results of these comparisons. There are three main series of models used, with results given in table 4. These series are moving black hole models with a range of momentum (i.e. P in (77)) values and K = +1, moving black holes with the same range of momentum values but K = — 1, and spinning black holes with a range of angular momentum (i.e. J in (78)) values. For these models, the differences Sty = *(north pole) - ^(equator) (106) between the calculated ty at the "north pole" (8 = 0) and on the equator {9 = ir/2) are compared with Choptuik's values. (A direct check of ty itself with his plots was also made, with satisfactory results.) These comparisons are made at the black hole surfaces (r = a = 1), where he gave his results. As can be seen from the table, the results agree with his (1985a) perturbation analysis whenever the nonlinearities are small, and generally agree with his (1982) full numerical solution in the nonlinear regime. The moving black hole models with P = 7.5 and P = 12.5 for K = —1, however, 65 Table 4 - Comparison of 6% with Choptuik's Results Model p K J W(Model) 5¥(Choptuik) Notes. ppxOOl 0.001 + 1 0 +7.985 x 10~9 +8.0 x IO" 9 (1) ppxOl 0.01 + 1 0 +7.985 x 10*"7 +8.0 x 10~7 (1) ppxl 0.1 + 1 0 +7.966 x 10~6 +8.0 x 10~5 (1) ppl 1.0 + 1 0 +6.550 x IO" 3 +8.0 x IO" 3 (1) (2) pp2x5 2.5 + 1 0 +2.335 x IO" 2 — (3) pp7x5 7.5 + 1 0 +5.586 x 10~3 — (3) ppl2x5 12.5 + 1 0 +7.209 x 10~2 — (3) mpxOOl 0.001 -1 0 -1.375 x IO" 9 -1.4 x 10~9 (1) mpxOl 0.01 -1 0 -1.375 x 10~7 -1.4 x 10~7 (1) mpxl 0.1 -1 0 -1.372 X IO" 5 -1.4 x IO" 5 (1) mpl 1.0 -1 0 -1.152 x 10~3 -1.4 x IO" 3 (1) (2) mp2x5 2.5 -1 0 -4.240 x I O - 3 -4.2 x 10~3 (4) (5) mp7x5 7.5 -1 0 -1.030 x I O - 2 -8.0 x 10~3 (4) (5) (6) mpl2x5 12.5 -1 0 -1.328 x IO" 2 -1.1 x 10~2 (4) (5) (6) jxOOl 0 0 0.001 -2.340 x IO" 9 -2.3 x 10~9 (1) (7) jxOl 0 0 0.01 -2.340 x 10~7 -2.3 x IO" 7 (1) (7) jx l 0 0 0.1 -2.338 x IO" 5 -2.3 x 10~5 (1) (7) JI 0 0 1.0 -2.210 x I O - 3 -2.3 x I O - 3 (1) (2) (7) 310 0 0 10.0 -0.05451 -0.05 (7) (8) J100 0 0 100.0 -0.1799 -0.18 (7) (8) J1000 0 0 1000.0 -0.3622 -0.36 (7) (8) Notes (1) : Comparison made with Choptuik (1985a) perturbation analysis. (2) : Discrepancy presumably due to nonlinearities invalidating assumptions of Chop-tuik (1985a) perturbation analysis. (3) : No data available in Choptuik (1982) for this case. (4) : Comparison made with values read graphically from Choptuik (1982, figure 12, page 113) full numerical solution. (5) : Choptuik (1985d) confirms that K = — 1 is correct here, rather than K = +1 as stated in Choptuik (1982). (6) : See text for discussion of discrepancy. (7) : Since P = 0, the value of K is irrelevant here. (8) : Comparison made with values read graphically from Choptuik (1982, figure 16, page 118) full numerical solution. 66 show disagreement at the 20% level. This corresponds to errors at the 10 - 3 level in ty itself. Choptuik (1985b) has said that he does not consider such disagreements to be significant, given the uncertainties (mostly truncation errors) of both his (1982) full numerical solution and the present one. Thus the overall conclusion of these test series is that the results of this thesis agree with those of Choptuik (1982, 1985a). 67 Demonstrating the Code Although the main results of this thesis are the techniques developed, a number of test series of models were run to demonstrate the numerical GR code's capabilities. We now discuss these, beginning with the four single black hole test series. All of the black holes involved have unit nominal mass, in comparison to the unit nominal radia (hence nominal mass of two) used by York and Piran (1982) and Choptuik (1982, 1985a) in similar studies. The first test series (hereinafter known as the "J" series) consists of models with zero linear momentum P (as defined by (17)) and varying (zero, then from 0.01 to 100 in decade steps) angular momentum J (as defined by (18)). The sign convention is that the angular momentum 3-vector of the black holes is directed along the positive z axis. Since for a single spinning black hole (78) shows Krr = 0, the marginally trapped surface inner boundary condition (33) used in this test series is identical to the Bowen and York reflection symmetric boundary condition (27) used in the previous studies cited above. The remaining three test series all consist of models with zero angular momentum J and varying (zero, then from 0.01 to 100 in decade steps) linear momentum P. The sign convention is that the momentum 3-vector of the black holes is directed along the positive z axis. These test series differ in their choice of inner boundary condition, with one (hereinafter the "RSP" series) using the Bowen and York reflection symmetric condition (27) with K = +1, one (hereinafter the "RSM" series) with K = — 1, and one (hereinafter the aMT0" series) using the marginally trapped surface condition (33) with K = 0. 68 The J, RSP, and RSM models all have a mirror image symmetry about the equator, so ty is only numerically solved for on the the half space z > 0 for these models. The A MTO models lack this symmetry due to the nonlinear Krr term in (33), so they require that ty be numerically solved for on the whole space. All of the single black hole models used the same patch system, with all polar spherical patches. The solutions (ty shown as a function of position in the space) are shown in figures 5, 6, 7, and 8 for the J, RSP, RSM, and MTO test series respectively. All of these figures show orthographic (perspective as seen from an "infinite" distance) views of the inner two patches (r from 0.5 to 1.95) of the numerical solution. The first thing one notices on viewing these plots is the near spherical symmetry of the J, RSP, and RSM test series solutions. Although a detailed multipole analysis of the solutions has not been done, the perturbation analysis of Choptuik (1985a) found the dipole asymmetry to be dominant for small S (i.e. for small J or P). We now consider the extent to which the different boundary conditions used in the three varying momentum test series just described, effect the solutions obtained. It is clear from examining figure 8 that the marginally trapped surface boundary condition gives models which differ noticably from the two reflection symmetric cases. This is perhaps to be expected, since the former lack the mirror image symmetry of the latter, and the extra nonlinear Krr term in (33) changes sign across the equator (see (77)). This seems to be the cause of the "tilt" which shows up in the high P models of this test series. In contrast to the substantial difference the marginally trapped surface boundary condition makes, the two cases K = ± 1 of the reflection symmetric boundary condition produce very similar results, as can be seen by comparing figures 6 and 7. However, 69 Figure 5 — J Test Series Solutions J=10 J=100 9 is plotted vertically from 0 to 6, p forward from 0 to 1.95, z to the right from 0 to 1.95. The lower set of (p,z) axes are at * = 0, the upper set at ¥ = 1. The J - 0.01 and J = 0.1 models are visually indistinguishable from the J = 0 one at this scale, and are hence not plotted. 70 Figure 6 - RSP Test Series Solut ions P=10 P=100 ty is plotted vertically from 0 to 6, p forward from 0 to 1.95, z to the right from 0 to 1.95. The lower set of (p,z) axes are at ty = 0, the upper set at ty = 1. The P = 0.01 and P = 0.1 models are visually indistinguishable from the P = 0 one at this scale, and are hence not plotted. 71 Figure 7 — RSM Test Series Solut ions P=10 P=10Q ty is plotted vertically from 0 to 6, p forward from 0 to 1.95, z to the right from 0 to 1.95. The lower set of (p,z) axes are at ty = 0, the upper set at ty = 1. The P = 0.01 and P = 0.1 models are visually indistinguishable from the P = 0 one at this scale, and are hence not plotted. Figure 8 - MTO Test Series Solutions 72 P=10 P=1Q0 ty is plotted vertically from 0 to 6, p forward from 0 to 1.95, z to the right from —1.95 to +1.95. The lower set of (p,z) axes are at ty — 0, the upper set at ty = 1. The black holes are all moving in the positive z direction. The P = 0.01 and P = 0.1 models are visually indistinguishable from the P = 0 one at this scale, and are hence not plotted. 73 they do produce rather different radial variations of the (small) nonspherical component of ty, as shown by the quantitative graphs in appendix 1. We now consider models with two black holes. Recall that, due to our assumption of axisymmetry, the black holes must both lie on the z axis, as must their linear and angular momentum vectors. Due to computer memory limitations, only one series of two black hole models has been run so far. This "PP" series has two unit mass black holes with equal and opposite momenta (and no spin). These momenta vary from —100 to —0.01 in decade steps, then zero, then from +0.01 to +100 in decade steps. The sign convention is that positive momenta indicate the black holes are approaching each other. The two black holes lie at positions z = ± 1 . 5 . The patch system used for this test series is shown in figure 9. The solutions for this test series are shown in figures 10 and 11, plotted in the same way as the other solutions (although at a different scale, as given in the figure caption). These models again have a mirror image symmetry about the equator, which is treated in the same manner as before. However, note that the contributions of both A black holes must be taken into account in determining Krr for the marginally trapped surface boundary condition (33) as well as in determining 5 itself. Figure 0 - Patch System for the PP Test Series 74 Only the inner 5 patches are shown. The p axis runs horizontally at the bottom, and the z axis runs vertically at the left. Both axes range from 0 to 4.9. Note the splitting of the cylindrical coordinate region into two patches so that each patch will be manhattan convex, and the use of a "thin" polar spherical patch to change to a larger grid size before the polar spherical—cylindrical patch transition. 75 Figure 10 - PP Test Series Solutions (P > 0) P = *1Q P=*100 * is plotted vertically from 0 to 6, p forward from 0 to 4.9, z to the right from 0 to 4.9. The lower set of (p,z) axes are at * = 0, the upper set at * = 1. The black holes are approaching one another. The P = +0.01 and P = +0.1 models are visuaUy indistinguishable from the P = 0 one at this scale, and are hence not plotted. P=-iO P=-100 ty is plotted vertically from 0 to 6, p forward from 0 to 4.9, z to the right from 0 to 4.9. The lower set of (p, z) axes are at ty = 0, the upper set at ty = 1. The black holes are receding from one another. The P = —0.01 and P = —0.1 models are visually indistinguishable from the P = 0 one at this scale, and are hence not plotted. 77 Conclusions and Directions for Farther Research The two main innovations of this thesis (multiple coordinate patches and the marginally trapped surface boundary condition) both proved highly successful. To-gether, they should allow the Bowen and York formalism for the initial data problem to be used in a wide range of physical situations. The difficulty of implementing the marginally trapped surface boundary condition seems to be no greater than that of the reflection symmetric one. The former generalizes easily to spaces containing multiple black holes, without the infinite series of "image charges" the latter seems to require. The marginally trapped surface condition also possesses a straightforward physical interpretation. It does, however, place a restriction on one's freedom to choose spatial coordinates, both on the initial slice and on future slices in a time evolution problem. There is another possible problem with using the marginally trapped surface condi-tion in a time evolution GR code. In order to realise the advantages mentioned above, each marginally trapped surface used as an inner grid boundary should be the outer-most such one surrounding its black hole. If the spatial geometry of the slices changes smoothly, this isn't difficult to ensure. However, if a black hole suddenly gains some mass, or (say) two black holes merge, the outer marginally trapped surface will discon-tinuously move outwards, and the code may well "loose track" of it. A possible solution to this problem is to search the space for further marginally trapped surfaces each time step. This has not yet been done, but should pose no major difficulty. However, the cost of doing this search at each time step may prove prohibitive. Further investigation of this problem would be useful. 78 Multiple coordinate patches seem to work very well in providing spatial coordinates for spaces containing multiple black holes. At least for the initial data problem, the required interpolation across the interpatch boundaries is easy to implement and does not significantly degrade the accuracy of the numerical solution. These conclusions should extend to other elliptic PDE problems involving topologies which do not admit simple "analytic" coordinate systems. However, if multiple coordinate patches are to be used for parabolic or hyperbolic PDE problems (such as time evolving GR initial data), further investigation is needed. The potential problems arise from the errors induced by the interpatch interpolation— they could introduce either instabilities at the interpatch boundaries, or spurious waves which will then propagate forward in time. Since the interpolation errors can be (and are, in this thesis) made of the same order as those incurred in finite differencing the PDE itself, these difficulties should be soluble, but the means needed have yet to be studied. This thesis also used multiple coordinate patches as a means of spatially varying the grid resolution. This should probably be done automatically by an adaptive mechanism. Choptuik (1982) found such a scheme to be very effective in placing extra grid points just where they were needed, but his code only did adaptive gridding in one space dimension—the grid size in the other dimension was fixed. In multiple black hole systems, a full n-dimensional adaptive gridding system is probably needed. The use of 0 to linearize the boundary conditions proved rather awkward. Given the desire to do some linearizing transformation, it seems that doing so with the domain (via Choptuik (1982)'s s coordinate or some similar device) is preferable to linearizing in the range (with 0). The former can, if properly chosen, linearize a number of 79 different functions at once (useful for vector problems), and places no restrictions on the values of the functions being linearized. The use of a global Newton method for solving the finite difference equations seems to be useful for "testbed" type codes such as the one constructed in this thesis. It offers reliable convergence, but the cost in run time and memory consumption probably precludes its use in a "production* code. Like previous studies, this thesis found surface integral total energy formulas some-what inaccurate. Volume integrals should be better, but means to do volume integrals in the presence of multiple coordinate patches (with gaps in between them) have yet to be developed. Any means of relaxing either of the two main assumptions (maximal slicing and 3-conformal flatness) of this thesis would be of considerable significance. If 3, Tr(Jf) ^ 0, the Bowen and York formalism requires the solution of a vector elliptic equation, rather than the scalar one solved herein. An investigation of the difficulty of this would be very useful. Given that the vector equation is soluble, the 3-conformal flatness assumption could probably also be dropped; further investigation of this possibility is certainly warranted. The new coordinates and boundary, conditions could also be applied to the time evolution of these spaces, as well as to a wide variety of other problems. In particular, the work of Smarr (1975), Eppley (1975), and Cadei (1971) on the head-on collision of two black holes could be replicated and extended. Studies of the collision of spinning black holes would be of special interest, since they should show the effects of the GR spin-spin interaction. It would also be of interest to see if the amount of radiation 80 emitted in such collisions could be increased by "throwing" the two black holes together with initial linear momentum. In the more distant future, the decay and subsequent merger of black hole binary systems would be of great interest, as would be a study of black hole-black hole scatter-ing in general. Such studies (by numerical GR means) are probably some years away, since they require time evolution of 3 (space) dimensional data. Even assuming the required computational capability to be available (which it almost is today, and soon will be), the techniques involved in constructing suitable numerical GR codes are not yet fully understood. 81 References Arnowitt, R., Deser, S., and Misner, C. W. (1962): "The Dynamics of General Relativity", pp. 227-265 in Witten (1962). Bowen, J. M. , Rauber, J., and York, J. W. (1984): "Two Black Holes with Ax-isymmetric Parallel Spins: Initial Data", Classical and Quantum Gravity 1, 591-610. Bowen, J. M. , and York, J. W. (1980): "Time-Asymmetric Initial Data for Black Holes and Black Hole Collisions", Physical Review D 21(8), 2047-2056. Cadez, A (1971): "Colliding Black Holes", University of North Carolina at Chapel Hill Ph.D. Thesis. Cade2, A (1974): "Apparent Horizons in the Two-Black-Hole Problem", Annals of Physics 83, 449-457. Choptuik, M. (1982): "A Study of Numerical Techniques for the Initial Value Problem of General Relativity", University of British Columbia M.Sc. Thesis. Choptuik, M. (1985a): Personal communication. Choptuik, M . (1985b): Personal communication. Choptuik, M . (1985c): Personal communication. Choptuik, M . (1985d): Personal communication. Deruelle, N., and Piran, T., eds. (1983): "Rayonnement Gravitationnel", North-Holland, Amsterdam. Eppley, K. R. (1975): "The Numerical Evolution of the Collision of Two Black Holes", Princeton University Ph.D. Thesis. Eppley, K. R. (1977): "Evolution of Time-Symmetric Gravitational Waves: Initial Data and Apparent Horizons", Physical Review D 16(6), 1609-1614. Kernighan, B. W., and Ritchie, D. M . (1978): "The C Programming Language", Prentice-Hall, Englewood Cliffs. 82 Kernshaw, D. S. (1978): "The Incomplete Cholesky—Conjugate Gradient Method for the Iterative Solution of Systems of Linear Equations", Journal of Compu-tational Physics 26, 43-65. Kulkarni, A. D. (1984a): "Time-Asymmetric Initial Data for the N Black Hole problem in General Relativity", Journal of Mathematical Physics 25(4), 1028-1034. Kulkarni, A. D. (1984b): "Extrinsic Curvature for the Two-Black-Hole Problem", Preprint. Kulkarni, A. D., Shepley, L. C , and York, J. W. (1983): "Initial Data for N Black Holes", Physics Letters 96A(5), 228-230. Matzner, R. A., and Shepley, L. C. (1982): "Spacetime and Geometry: The Alfred Schild Lectures", University of Texas Press, Austin. Misner, C. W., Thorne, K. S., and Wheeler, J. A. (1973): "Gravitation", W. H. Freeman and Company, San Francisco. Mitchell, A. R., and Griffiths, D. F. (1980): "The Finite Difference Method In Partial Differential Equations", Wiley, Chichester. MTW: Alternate citation for Misner, Thorne, and Wheeler (1973). 6 Murchadha, N., and Seifert, H. J. (1982): personal communication. Price, R. H. (1982): "General Relativity Primer", American Journal of Physics 50(4), 300-329; see also Tryon (1984) for errata. Smarr, L. L. (1975): "The Structure of General Relativity With A Numerical Illustration: The Collision of Two Black Holes", University of Texas at Austin Ph.D. Thesis. Smarr, L. L., ed. (1979): "Sources of Gravitational Radiation", Cambridge Uni-versity Press, Cambridge. Tryon, E. P. (1984): "Comment on 'General Relativity Primer'", American Journal of Physics 52(4), 366-367. Wald, R. M . (1984): "General Relativity", University of Chicago Press, Chicago. 83 Witten, L., ed. (1962): "Gravitation—An Introduction to Current Research", Wiley, New York. York, J. W. (1979): "Kinematics and Dynamics of General Relativity", pp. 83-126 in Smarr (1979). York, J. W. (1983): "The Initial Value Problem and Dynamics", pp. 175-201 in Deruelle and Piran (1983). York, J. W. (1984): "Initial Data for N Black Holes", Physica 124A, 629-638. York, J. W., and Piran, T. (1982): "The Initial Value Problem and Beyond", pp. 147-176 in Matzner and Shepley (1982). 84 Appendix 1 This appendix contains listings of the input parameter files for each model discussed in this thesis. As described in the header file pat chut i l : pat ch.h (listed in appendix 2), the input parameters to a model modelname reside in two files, a modelname .par file describing the physical situation being modeled, and a gridname .pat file describing the patch system being used. The latter is typically shared between a number of models. In addition, this appendix also contains quantitative graphs of both ty and Sty as functions of s for all the non-Schwarzschild single black hole models, and tables of selected values of ty for the Schwarzschild and double black hole models. These should prove useful to the reader desiring specific numeric values to check against some other GR code's results. The modelname .par files typically end with a sequence of comment lines (any-thing after a semicolon is a comment), which log all programs that modified the modelname. gfn data file. The next 5 pages give indices to the listings and graphs/tables, giving the page numbers on which each model's information starts. The listings and graphs/tables themselves follow. When all the models of a test series share a common .pat file (as they do for all but the Schwarzschild models), this is listed after all the other information for that series. 85 Table 5 - Model index for the Schwarzschild test series lOplolOO 90 20plol00 94 40plol00 98 c2 102 cOi 106 c2i 110 poo 114 opo 118 oop 122 86 Table 6 - Model index for the Choptuik comparison test series ppxOOl .126 ppxOl 128 ppxl 130 ppl .132 pp2x5 134 pp7x5 136 ppl2x5 138 mpxOOl 140 mpxOl .142 mpxl 144 mpl 146 mp2x5 148 mp7x5 150 mpl2x5 152 jxOOl .154 jxOl 156 j x l 158 j l 160 jlO 162 J100 164 J1000 166 matt, pat 168 87 Table 7 — Model index for the J test series JO .170 jxOl 172 j x l 174 j l 176 j l O 178 jlOO 180 mt20.pat 182 Table 8 - Model index for the RSP test series pO 185 pxOl .' .187 p x l .189 p i , 191 plO 193 plOO 195 rs20.pat 197 88 Table 0 - Model index for the RSM test series pO 200 pxOi 202 pxl 204 p i 206 plO 208 plOO 210 rs20.pat 212 Table 10 - Model index for the MTO test series pO 215 pxOl 217 pxl 219 p i 221 plO 223 plOO 225 mt20big.pat 227 89 Table 11 - Model index for the PP test series mlOO 230 mlO 232 ml 234 mxl 236 mxOl 238 0 240 pxOl 242 pxl 244 pi 246 plO 248 plOO '. 250 ml. pat 252 Schwarzschild test series 10PL0100.PAR;2 18-OCT-1985 06:37 Page 1 title-"Schwarzschild Solution" N_blaci_hole-l grid-"10plolOO" i black_hole=l rho-0 2-0 mass-1 surroundlng_patch_flag-l momentum-0 refleotion_term_sign-0 reflection_radius-0.5 spin=0 mkgfn lOplolOO.. directcg lOploioo 1.0e-10 (224.78 cpu seconds) Schwarzschild test series 10PL0100.PAT;3 18-0CT-1985 06:37 Page Each patch approximately 10 z 10 A l l patches polar spherical A l l patches using l o c a l l y conservative differenoing A l l patches using omega for conformal function Outer boundary at r - 100 N_patch-7 Now describe each coordinate patch: patch-1 coord_type-"polar spherical" difference_scheme-"locally conservative" conformal_fn_type-"omega(psi) rho_center-0 z_center-0 r_min="constant=0.50" r_max-"constant-0.95" theta_min-"const ant-0" theta_max-"constant-90" delta_r-0.05 delta_theta-10 bndry_oond-"Reflection Symmetric" bndry_cond-"patch-2" bndry_oond-"Neumann" bndry_oond-"Neumann" patch-2 ooord_type-"polar spherical" difference_scheme-"locally conservative" conformal_fn_type-"omega(psi)" rho_center-0 z_center=0 delta_r-0.1 r_min-"constant-1.0" bndry_cond-' r_max-"oonstant-l.9" bndry_cond-' theta_min-"constant-O" bndry_cond-' theta_max-"constant-90" delta_theta-10 patch-1" patch-3" Neumann" bndry_oond-"Neumann" patch-3 coord_type-"polar spherical" differenoe_scheme-"locally conservative conformal_fn_type-"omegaCpsi) rho_center-0 z_center-0 r_min-"constant-2.0" r_max-"const ant-4.8" theta_min-"constant-0" theta_max-"oonstant-90" delta_r-0.2 delta_theta-10 bndry_cond-"patch-2" bndry_cond-"patch-4" bndry_cond-"Neumann" bndry_cond-"Neumann" patch-4 coord_type-"polar spherical" difference_scheme-"locally conservative" conformal_fn_type-"omega(psi)" rho_center-0 z_center-0 r_min-"constant-5.0" r_max-"oonstant-9.5" thet a_mln-"const ant-0" theta_max-"constant-90" delta_r-0.8 delta_theta-10 bndry_cond-"patch-3" bndry_oond-"patch-5" bndry_cond-"Neumann" bndry_cond-"Neumann" patch-5 coord_type-"polar spherical" difference_scheme-"locally conservative" conformal_fn_type-"omegaCpsi)" rho_center-0 z_center-0 delta _ r - l delta_theta-15 Schwarzschild test series 10PL0100.PAT;3 18-OCT-1985 06:37 Page r_min-"constant-10" r_max-"const ant-19" tneta_min-"constant-0" theta_max-"constant-90" bndry_cond-"patch-4" bndry_cond-"patch-6" bndry_cond-"Neumann" bndry_oond-"Neumann" patch-6 coord_type-"polar spherical" difference_scheme-"locally conservative" conformal_fn_type-"omega(psl)" rho_center-0 z_center-0 delta_r-2 r_min-"constant-20" bndry_cond-r_max-"constant-48" bndry_oond-theta_min-"constant-0" bndry_cond= theta_max-"constant-90" bndry_oond-» patch-7 coord_type-"polar spherloal" difference_scheme-"locally conservative" conformal_fn_type-"omega(psi)" rho_center-0 z_center-0 delta_r-5 r_min-"constant-50" bndry_cond= r_max-"constant-100" bndry_cond= theta_min-"constant-0" bndry_cond= theta_max-"constant-90" bndry_cond= delta_theta-•patch-5" "patch-7" "Neumann" "Neumann" 15 delta. 'patch-6" •Robin" 'Neumann" 'Neumann" .theta-15 93 Table 12 - Schwarzschild test series, lOplolOO selected ty values Patch Number 2 2 2 2 2 2 2 2 3 3 3 3 3 3 3 3 4 4 4 4 4 4 4 4 5 5 5 5 5 5 5 5 i i P s i 10 0 2 .006125 10 3 2 .006125 10 6 2 .006125 10 9 2 .006125 19 0 1 .530515 19 3 1 .530515 19 6 1 .530515 19 9 1 .530515 10 0 1 .504070 10 3 1 .504070 10 6 1 .504070 10 9 1 .504070 19 0 1 .265771 19 3 1 .265771 19 6 1 .265771 19 9 1 .265771 10 0 1 .252521 10 3 1 .252521 10 6 1 .252521 10 9 1 .252521 24 0 1 .105459 24 3 1 .105459 24 6 1 .105459 24 9 1 .105459 10 0 1 .101253 10 3 1 .101253 10 6 1 .101253 10 9 1 .101253 19 0 1 .053382 19 3 1 .053382 19 6 1 .053382 19 9 1 .053382 10 0 1 .050721 10 2 1 .050721 10 4 1 .050721 10 6 1 .050721 19 0 1 .026736 19 2 1 .026736 19 4 1 .026736 19 6 1 .026736 rho t h e t a 0.5000 0.5000 0.5000 0.5000 0.9500 0.9500 0.9500 0.9500 1.0000 1.0000 1.0000 1.0000 1.9000 1.9000 1.9000 1.9000 2.0000 2.0000 2.0000 2.0000 4.8000 4.8000 4.8000 4.8000 5.0000 5.0000 5.0000 5.0000 9.5000 9.5000 9.5000 9.5000 10.0000 10.0000 10.0000 10.0000 19.0000 19.0000 19.0000 19.0000 0.0 30.0 60. 90. 0. 30. 60. 90, 0, 30. 60, 90. 0. 30. 60. 90. 0. 30. 60.0 90.0 0, 30, 60, 90, 0.0 30.0 60.0 90.0 0, 0 0 0 0 ,0 ,0 ,0 ,0 .0 ,0 ,0 .0 .0 .0 .0 0 0 0 0 0 ,0 .0 ,0 ,0 ,0 30, 60, 90. 0. 30.0 60.0 90.0 0.0 30.0 60.0 90.0 This table gives values of ty at selected points in the space. These points are identified by triples (patch number,tf j), where (t,j) are the generic integer patch coordinates defined in the text. Depending on the patch type, either (p,z) or (r, 6) are also shown. Schwarzschild test series 20PL0100.PAR;4 12-NOV-1985 21:25 Page 1 title-"Schwarzschild Solution" N_black_hole-l grid-"20plol00" » black_hole-l rho-0 z-0 mass-1 surroundlng_patch_flag-1 momentum-0 reflection_term_slgn-0 reflection_radius=0.5 spin-0 mkgfn 20plol00 directcg 20plol00 1.0e-10 (2480.11 cpu seconds) Schwarzschild test series 20PL0100.PAT;3 18-0CT-1985 06:37 Pag Each patch approximately 20 x 20 A l l patches p o l a r s p h e r i c a l A l l patches u s i n g l o c a l l y c o n s e r v a t i v e d i f f e r e n c i n g A l l patches u s i n g omega f o r conformal f u n c t i o n Outer boundary at r - 100 N_patoh-7 Now d e s c r i b e each c o o r d i n a t e patch: patch-1 coord_type-"polar s p h e r i c a l " d i f f e r e n c e _ s c h e m e - " l o c a l l y c o n s e r v a t i v e " conformal_fn_type-"omega(psi) rho_center-0 z_center-0 r_mln-"constant-0.500" r_max-"constant-0.975" theta_min-"oonstant-0" theta_max-"oonstant-90" delta_r-0.025 d e l t a _ t h e t a - 5 b n d r y _ c o n d - " R e f l e c t i o n Symmetric" bndry_cond-"patch-2" bndry_cond-"Neumann" bndry_oond-"Neumann" patoh-2 coord_type-"polar s p h e r i c a l " d i f f e r e n c e _ s c h e m e - " l o c a l l y c o n s e r v a t i v e conformal_fn_type-"omegaCpsi) rho_center-0 z_center-0 r_min-"oonstant-1.00" r_max-"oonstant-1.95" theta_mln-"oonstant-0" theta_max-"constant-90" d e l t a _ r - 0 . 0 5 d e l t a _ t h e t a - 5 bndry_cond-"patch-1" bndry_oond-"patch-3" bndry_cond-"Neumann" bndry_cond-"Neumann" patch-3 coord_type-"polar s p h e r i c a l " d i f f e r e n o e _ s o h e m e - " l o o a l l y o o n s e r v a t i v e " conformal_fn_type-"omegaCpsi)" rho_center-0 z_center-0 r_min-"oonstant-2.0" r_max-"oonst ant-4.9" theta_min-°constant-0" theta_max-"oonstant-90" d e l t a _ r - 0 . 1 d e l t a _ t h e t a - 5 bndry_oond-"patch-2" bndry_oond-"patoh-4" bndry_oond-"Neumann" bndry_oond-"Neumann" patch-4 coord_type-"polar s p h e r i c a l " d i f f e r e n c e _ s c h e m e - " l o c a l l y c o n s e r v a t i v e conformal_fn_type-"omegaCpsi) rho_center-0 z_center-0 r_mln-"constant-5.00" r_max-"constant-9.75" thet a_min-"oonst ant-0" theta_max-"constant-90" d e l t a _ r - 0 . 2 5 d e l t a _ t h e t a - 5 bndry_oond-"pat ch-3" bndry_cond-"patch-5" bndry_oond-"Neumann" bndry_oond-"Neumann" patch-5 coord_type-"polar s p h e r l o a l " d i f f e r e n o e _ s c h e m e - " l o o a l l y c o n s e r v a t i v e " conformal_fn_type-"omegaCpsi)" rho_center-0 z_oenter-0 d e l t a _ r - 0 . 5 d e l t a _ t h e t a - 7 . 5 96 Schwarzschild test series 20PL0100.PAT;3 18-OCT-1985 06:37 Page 2 r_mln-"constant-10.0" ,r_max-"oonstant-19.5" theta_min-"oonstant-0" theta_max-"oonstant-90" bndry_oond-bndry_cond-bndry_oond-•patch-4" 'patch-6" 'Neumann" bndry_oond-"Neumann" patoh-6 coord_type-"polar spherical" difference_scheme-"locally conservative" conformal_fn_type-"omega(psl)" rho_center-0 z_center-0 delta _ r - l r_min-"oonstant-20" bndry_cond-r_max-"constant-49" bndry_cond» thet a_min-"constant =0" bndry_cond-theta_max-"constant-90" bndry_cond-delta_theta-7.5 "patoh-5" "patch-7" "Neumann" "Neumann" patch-7 coord_type-"polar spherical" difference_scheme-"locally conservative" conformal_fn_type-"omega(psl)" rho_center-0 z_center-0 delta_r-2.5 r_min-"constant=50" bndry_cond=' r_max-"constant-100" bndry_cond-' theta_min-"constant-0" bndry_cond=' theta_max-"constant=90" bndry_cond-' delta_theta-patch-6" Robin" Neumann" Neumann" 7.5 97 Table 13 — Schwarzschild test series, 20plol00 selected ¥ values Patch Number 2 2 2 2 2 2 2 2 3 3 3 3 3 3 3 3 4 4 4 4 4 4 4 4 5 5 5 5 5 5 5 5 i J P s i 20 0 2 .001474 20 6 2 .001474 20 12 2 .001474 20 18 2 .001474 39 0 1 .513811 39 6 1 .513811 39 12 1 .513811 39 18 1 .513811 20 0 1 .500975 20 6 1 .500975 20 12 1 .500975 20 18 1 .500975 39 0 1 .257023 39 6 1 .257023 39 12 1 .257023 39 18 1 .257023 20 0 1 .250602 20 6 1 .250602 20 12 1 .250602 20 18 1 .250602 49 0 1 .102344 49 6 1 .102344 49 12 1 .102344 49 18 1 .102344 20 0 1 .100298 20 6 1 .100298 20 12 1 .100298 20 18 1 .100298 39 0 1 .051457 39 6 1 .051457 39 12 1 .051457 39 18 1 .051457 20 0 1 .050171 20 4 1 .050171 20 8 1 .050171 20 12 1 .050171 39 0 1 .025739 39 4 1 .025739 39 8 1 .025739 39 12 1 .025739 rho theta 0.5000 0.5000 0.5000 0.5000 0.9750 0.9750 0;9750 0.9750 1.0000 1.0000 1.0000 1.0000 1.9500 1.9500 1.9500 1. 2. 2. 2. 2. 4. 4. 4. 9500 0000 0000 0000 0000 9000 9000 9000 4.9000 5.0000 5.0000 5.0000 5.0000 9.7500 9.7500 9.7500 9.7500 10.0000 10.0000 10.0000 10.0000 19.5000 19.5000 19.5000 19.5000 0. 30. 60. 90. 0. 30. 60. 90. 0. 30. 60. 90. 0. 30. 60, 90.0 0.0 30. 60, 90, 0, .0 .0 ,0 ,0 ,0 0 ,0 ,0 ,0 .0 ,0 ,0 ,0 ,0 ,0 ,0 .0 ,0 ,0 30.0 60.0 90.0 0.0 30, 60. 90, 0. 30, 60, 90, 0 0 0 0 0 0 0 0.0 30.0 60.0 90.0 0.0 30.0 60.0 90.0 This table gives values of ¥ at selected points in the space. These points are identified by triples (patch number, where (t,j) are the generic integer patch coordinates defined in the text. Depending on the patch type, either (p,z) or (r, 6) are also shown. Schwarzschild test series 40PLO100.PAR;2 18-OCT-1985 06:37 Page 1 title-"Schwarzschild Solution" N_black_hole-l grid-"40plol00" » black_hole-l rho=0 z-0 mass-1 surrounding_patch_flag-l momentum-0 reflection_term_sign-0 reflection_radius-0.5 spin-0 mkgfn 40plol00 directcg 40plolOO l.Oe-10 (60372.99 cpu seconds) Schwarzschild test series 40PL0100.PAT;6 18-0CT-1986 06:37 Page Each patch approximately 40 z 40 A l l patches polar spherical A l l patches using l o c a l l y conservative differencing A l l patches using omega for conformal function Outer boundary at r - 100 N_patch-7 Now describe each coordinate patch: patch-1 coord_type-"polar spherical" difference_scheme-"locally conservative" conformal_fn_type-"omega(psi) rho_center-0 z_center-0 r_min-"constant-0.5000" r_max-"constant-0.9875" theta_min-"constant-0" theta_max-"oonstant-90" delta_r-0.0125 delta_theta-2.5 bndry_cond-"Reflection Symmetric" bndry_cond-"patch-2" bndry_cond-"Neumann" bndry_oond-"Neumann" patch-2 coord_type-"polar spherical" difference_scheme-"locally conservative conformal_fn_type-"omega(psi) rho_center-0 z_center-0 r_min-"constant-l.000" r_max-"constant-l.975" theta_min-"constant-0" theta_max-"constant-90" delta_r-0 .^ 025 delta_theta-2.5 bndry_oond-"pat ch-1" bndry_oond-"patch-3" bndry_oond-"Neumann" bndry_oond-"Neumann" patch-3 coord_type-"polar spherical" difference_scheme-"locally conservative conformal_fn_type-"omega(psi) rho_center-0 z_oenter-0 r_min-"constant-2.00" r_max-"constant-4.95" theta_min-"constant-0" theta_maac-"constant-90" delta_r-0.05 delta_theta-2.5 bndry_cond-"patch-2" bndry_cond-"patch-4" bndry_cond-"Neumann" bndry_cond-"Neumann" patch-4 coord_type-"polar spherical" difference_scheme-"locally conservative conformal_fn_type-"omega(psl) rho_center-0 z_center-0 r_mln-"constant-5.000" r_max-"constant-9.875" thet a_min-"const ant-0" thetamax-"constant-90" delta_r-0.125 delta_theta-bndry_oond-"patch-3" bndry_oond-"patch-5" bndry_cond-"Neumann" bndry_cond-"Neumann" 2.5 patch-5 coord_type-"polar spherical" difference_scheme-"locally conservative" conformal_fn_type-"omega(psl)" rho_center-0 z_oenter-0 delta_r-0.25 delta_theta-3.75 Schwarzschild test series 40PL0100.PAT;6 18-0CT-1985 06:37 Page r_min-"oonstant-10.00" r_max-"oonstant-19.75" thet a_mln-"oonst ant-0" theta_max-"constant-90" bndry_cond-"patch-4" bndry_cond-"patch-6" bndry_cond-"Neumann" bndry_cond-"Neumann" patch-6 coord_type-"polar spherical" dlfference_scheme-"locally conservative conformal_fn_type-"omega(psi) rho_center=0 z_center-0 r_min-"constant-20.0" r_max-"constant-49.5" theta_min-"constant-0" theta_max-"constant-90" delta_r-0.5 delta_theta-3.75 bndry_cond-"patch-5" bndry_cond-"patch-7" bndry_cond-"Neumann" bndry_cond-"Neumann" patch-7 coord_type-"polar spherical" difference_scheme-"locally conservative" conformal_fn_type-"omegaCpsi) rho_center-0 z_center-0 r_mln="constant-50" r_max-"constant-100" theta_mln-"constant-0" theta_max-"constant-90" delta_r-1.25 delta_theta=3.75 bndry_cond-"patch-6" bndry_cond-"Robin" bndry_cond="Neumann" bndry_oond-"Neumann" 101 Table 14 — Schwarzschild test series, 40plol00 selected ty values Patch Number 2 2 2 2 2 2 2 2 3 3 3 3 3 3 3 3 4 4 4 4 4 4 4 4 5 5 5 5 5 5 5 5 i J P s i 40 0 2 .000362 40 12 2 .000362 40 24 2 .000362 40 36 2 .000362 79 0 1 .506570 79 12 1 .506570 79 24 1 .506570 79 36 1 .506570 40 0 1 .500239 40 12 1 .500239 40 24 1 .500239 40 36 1 .500239 79 0 1 .253313 79 12 1 .253313 79 24 1 .253313 79 36 1 .253313 40 0 1 .250147 40 12 1 .250147 40 24 1 .250147 40 36 1 .250147 99 0 1 .101084 99 12 1 .101084 99 24 1 .101084 99 36 1 .101084 40 0 1 .100073 40 12 1 .100073 40 24 1 .100073 40 36 1 .100073 79 0 1 .050675 79 12 1 .050675 79 24 1 .050675 79 36 1 .050675 40 0 1 .050042 40 4 1 .050042 40 8 1 .050042 40 24 1 .050042 79 0 1 .025340 79 4 1 .025340 79 8 1 .025340 79 24 1 .025340 rho 5000 5000 5000 5000 9875 0.9875 0.9875 0.9875 1.0000 1. 1. 1. 1. 1. 1. 1. 2. 2. ,0000 ,0000 ,0000 ,9750 .9750 .9750 .9750 .0000 0000 2.0000 2.0000 4.9500 4.9500 4.9500 4.9500 5.0000 5.0000 5.0000 5.0000 9.8750 9.8750 9.8750 9.8750 10.0000 10.0000 10.0000 10.0000 19.7500 19.7500 19.7500 19.7500 ,0 ,0 ,0 .0 t h e t a 0.0 30.0 60.0 90.0 0.0 30.0 60; 90. 0. 30. 60.0 90.0 0.0 30.0 60.0 90.0 0.0 30.0 60.0 90.0 0.0 30.0 60.0 90.0 0.0 30.0 60.0 90.0 0, 30, 60, 90, 0, 15, 30, 90, 0, 15, 30, 90. ,0 ,0 ,0 ,0 ,0 ,0 ,0 ,0 .0 ,0 .0 .0 This table gives values of ty at selected points in the space. These points are identified by triples (patch number, where (t,;) are the generic integer patch coordinates defined in the text. Depending on the patch type, either {p,z) or (r ,0 ) are also shown. 102 Schwarzschild test series C2.PAR;3 18-OCT-1985 06:40 Page 1 title-"Scnwarzschlld Solution" N_black_hole-l grld-"c2" black_hole-l rho-0 z=0 mass-1 surrounding_patch_flag-1 momentum=0 reflection_term_sign-0 reflection_radius-0.5 spin=0 mkgfn c2 directcg 02 l.Oe-10 (4989.19 cpu seconds) SchwarxschUd test series C2.PAT;14 18-OCT-198S 08:40 Page 1 Eaoh patch approximately 20 x 20 A l l patches polar spherical, except (original) patch *2 i s augmented by a c y l i n d r i c a l one A l l patches using l o c a l l y conservative differenolng A l l patches using omega for conformal funotion Outer boundary at r - 100 N_patch-8 Nov describe each coordinate patch: patch-1 coord_type-"polar spherical" difference_scheme-"locally conservative" conformal_fn_type-"omega(psl) rho_center-0 z_center-0 r_min-"oonst ant-0.500" r_max-"constant-0.975" theta_min-"constant-0" theta_max-"constant-90" delta_r-0.025 delta_theta-5 bndry_cond-"Reflection Symmetric" bndry_cond-"patch-2" bndry_cond-"Neumann" bndry_oond-"Neumann" patch-2 coord_type-"polar spherical" difference_scheme- Mlocally conservative" conformal_fn_type-"omega(psi) rho_center-0 z_center-0 r_min-"const ant-1.00" r_max-"oonstant-l.05" thet a_mln-"const ant-0" thet a_max-"const ant-90" delta_r-0.05 delta_theta-5 bndry_cond-"patch-1" bndry_cond-"pat ch-3" bndry_cond-"Neumann" bndry_oond-"Neumann" patch-3 coord_type-"cylindrical* difference_scheme-"locally conservative conformal_fn_type-"omega(psi)" rho_center-0 z_oenter-0 rho_min_bound-0 z_min_bound-0 rho_min-"patch-2 bndry-r_max" rho_min-"constant-0" rho_max-"patch-4 bndry-r_min" z_min-"patch-2 bndry-r_max" z_mln-"constant-0" z_max-"patch-4 bndry-r_min" delta_rho-0.08 rho_max_bound-2 z_max_bound-2 delta_z-0.05 bndry_cond-"Neumann" bndry_oond-"Neumann" patch-4 coord_type-"polar spherioal" difference_scheme-"locally conservative conformal_fn_type-"omega(psi) rhoJcenter-0 z_oenter-0 r_min-"constant-2.0" r_max-"oonstant-4.9" theta_min-"constant-0" theta_max-"oonstant-90" delta_r-0.1 delta_theta-5 bndry_cond-"patch-3" bndry_oond-"patoh-5" bndry_oond-"Neumann" bndry_oond-"Neumann" 104 Schwarzschild test series C2.PAT;14 18-OCT-1985 06:40 Page 2 patch-5 coord_type-"polar spherical" difference_scheme-"locally conservative conformal_fn_type-"omega(psi) rho_center=0 z_center-0 r_min-"const ant-5.00" r_max-"constant-9.75" theta_min-"constant-0" thet a_max-"const ant-90" delta_r-0.25 delta_theta=5 bndry_cond-"pat ch-4" bndry_cond-"patch-6" bndry_cond-"Neumann" bndry_cond-"Neumann" patch-6 coord_type-"polar spherical" difference_scheme-"locally conservative conformal_fn_type-"omega(psi) rho_center-0 z_center-0 r_min-"constant-10.0" r_maz-"constant=19.5" theta_mln-"constant-0" theta_max-"constant-90" delta_r=0.5 delta_theta=7.5 bndry_oond-"patch=5" bndry_cond-"patch-7" bndry_cond-"Neumann" bndry_oond-"Neumann" patch-7 coord_type-"polar spherical" difference_scheme-"locally conservative" conformal_fn_type-"omega(psi)" rho_center-0 z_center=0 r_min-"constant-20" r_max-"constant-49" theta_mln-"constant-0" theta_max-"constant-90" delta_ r - l bndry_cond bndry_cond bndry_cond-"Neumann" bndry_cond-"Neumann" delta_theta-patch-6" patch-8' 7.5 patch-8 coord_type-"polar spherical" difference_scheme-"locally conservative conformal_fn_type-"omega(psi) rho_center-0 z_oenter-0 r_min-"constant-50" r_max-"constant-100" theta_min-"constant-0" thet a_max-"const ant-90" delta_r-2.5 bndry_cond-bndry_oond-bndry_cond-"Neumann bndry_cond-"Neumann delta_theta-patch-7" Robin" 7.5 105 Table 15 - Scb.warzBcb.i ld test s e r i e s , c2 s e l e c t e d ty v a l u e s Number • 1 J P s i rho z r t h e t a 1 20 0 1.998832 0.5000 0.0 1 20 6 1.998831 0.5000 30.0 1 20 12 1.998838 0.5000 60.0 1 20 18 1.998850 0.5000 90.0 1 39 0 1.511860 0.9750 0.0 1 39 6 1.511819 0.9750 30.0 1 39 12 1.511813 0.9750 60.0 1 39 18 1.511882 0.9750 90.0 2 20 0 1.499052 1.0000 0.0 2 20 9 1.498959 1.0000 45.0 2 20 18 1.499073 1.0000 90.0 2 21 0 1.475277 1.0500 0.0 2 21 9 1.475134 1.0500 45.0 2 21 18 1.475290 1.0500 90.0 3 30 0 1.332687 1.50 0. 00 3 20 10 1.446284 1.00 0. 50 3 30 10 1.315592 1.50 0. 50 3 10 20 1.446303 0.50 1. 00 3 20 20 1.352806 1.00 1. 00 3 30 20 1.276777 1.50 1. 00 3 0 30 1.332711 0.00 1. 50 3 10 30 1.315612 0.50 1. 50 3 20 30 1.276784 1.00 1. 50 4 20 0 1.249510 2.0000 0.0 4 20 6 1.249498 2.0000 30.0 4 20 12 1.249493 2.0000 60.0 4 20 18 1.249502 2.0000 90.0 4 49 0 1.101891 4.9000 0.0 4 49 6 1.101891 4.9000 30.0 4 49 12 1.101890 4.9000 60.0 4 49 18 1.101891 4.9000 90.0 5 20 0 1.099854 5.0000 0.0 5 20 6 1.099854 5.0000 30.0 5 20 12 1.099854 5.0000 60.0 5 20 18 1.099854 5.0000 90.0 5 39 0 1.051229 9.7500 0.0 5 39 6 1.051229 9.7500 30.0 5 39 12 1.051229 9.7500 60.0 5 39 18 1.051229 9.7500 90.0 6 20 0 1.049949 10.0000 0.0 6 20 6 1.049949 10.0000 45.0 6 20 12 1.049949 10.0000 90.0 6 39 0 1.025625 19.5000 0.0 6 39 6 1.025625 19.5000 45.0 6 39 12 1.025625 19.5000 90.0 This table gives values of ty at selected points in the space. These points are identified by triples (patch number, t,j), where are the generic integer patch coordinates defined in the text. Depending on the patch type, either (p,z) or (r, 9) are also shown. 106 Schwarzschild test series C0I.PAR.-2 18-OCT-1985 06:40 Page 1 title-"Schwarzschild Solution" N_black_hole-l grid-"cOi" black_hole-l rho-0 z-0 mass-1 surroundlng_patoh_flag-l momentum-0 reflectlon_term_sign-0 refleotion_radlus-0.5 spin-0 mkgfn cOl directcg cOl l.Oe-10 Schwarzschild test series C0I.PAT;2 18-OCT-1985 06:40 20 Page Each patch approximately 20 x A l l patches polar spherical A l l patches using independent terms differencing • o mega for conformal funotlon r - 100 A l l patches using Outer boundary at N_patch-7 Now describe each coordinate patoh: patoh-1 coord_type-"polar spherioal" difference_scheme-"independent terms" conformal_fn_type-"omegaCpsi)" rho_center-0 z_center-0 r_min-"constant-0.500" r_max-"constant-0.975" theta_min-"constant-0" theta_max-"constant-90" delta_r-0.025 delta_theta-5 bndry_cond-"Refleotion Symmetric" bndry_cond-"patch-2" bndry_oond-"Neumann" bndry_oond-"Neumann" patch-2 coord_type-"polar spherical" difference_scheme-"independent conformal_fn_type-"omegaCpsi)" rho_center-0 z_oenter-0 r_mln-"constant-1.00" r_max-"constant-l.95" theta_min-"constant-0" theta_max-"constant-90" > patch-3 coord_type-"polar spherical" difference_scheme-"independent conformal_fn_type-"omegaCpsi)" rho_center-0 z_center-0 r_min-"const ant-2.0" r_max-"oonstant-4.9" theta_min-"oonstant-0" theta_max-"constant-90" i patch-4 coord_type-"polar spherical" difference_scheme-"independent conformal_fn_type-"omegaCpsi)" rho_oenter-0 z_oenter-0 r_mln-"oonstant-5.00" r_max-"constant-9.75" theta_mln-"constant-0" theta_max-"constant-90" terms" delta_r-0.05 delta_theta-5 bndry_cond-"patch-1" bndry_oond-"patch-3" bndry_oond-"Neumann" bndry_oond-"Neumann" terms" delta_r-0.1 delta_theta-5 bndry_oond-"patoh-2" bndry_cond-"patch-4" bndry_oond-"Neumann" bndry_oond-"Neumann" terms" delta_r-0.25 delta_theta-5 bndry_oond-"patoh-3" bndry_cond-"patoh-5" bndry_oond-"Neumann" bndry_oond-"Neumann" patch-5 coord_type-"polar spherioal" difference_scheme-"independent terms" oonformal_fn_type-"omegaC psi)" rho_center-0 z_center-0 delta_r-0.5 delta_theta-7.5 1 0 8 Schwarzschild test series COI.PAT;2 18-OCT-1985 06:40 Page 2 r_min-"constant-10.0" r_max-"constant-19.8" theta_min-"constant-0" theta_max-"constant-90" bndry_cond-"patch-4" bndry_oond-"patch-6" bndry_cond-"Neumann" bndry_cond-"Neumann" patch-6 coord_type-"polar spherical" difference_scheme-"independent terms" conformal_fn_type-"omega(psi)" rho_center-0 z_center=0 delta _ r - l r_min-"constant-20" bndry_cond-r_max-"constant-49" bndry_oond= theta_min-"constant-0" bndry_cond-theta_max-"constant-90" bndry_oond-f patch-7 coord_type-"polar spherical" difference_scheme-"independent terms" conformal_fn_type-"omega(psi)" rho_center-0 z_center-0 r_min-"constant-50" r_max-"const ant-100" theta_min-"constant-0" thet a_max-"const ant-90" delta_theta-7.5 "patch-5" "patch-7" "Neumann" "Neumann" delta_r-2.5 delta_theta-7.5 bndry_cond-"patch-6" bndry_cond-"Robin" bndry_cond="Neumann" bndry_cond-"Neumann" 109 Table 16 — Schwarzschild test series, cOi selected ty values Patch Number 2 2 2 2 2 2 2 2 3 3 3 3 3 3 3 3 4 4 4 4 4 4 4 4 5 5 5 5 5 5 5 5 1 J P s i 20 0 2 .000000 20 6 2 .000000 20 12 2 .000000 20 18 2 .000000 39 0 1 .512821 39 6 1 .512821 39 12 1 .512821 39 18 1 .512821 20 0 1 .500000 20 6 1 .500000 20 12 1 .500000 20 18 1 .500000 39 0 1 .256410 39 6 1 .256410 39 12 1 .256410 39 18 1 .256410 20 0 1 .250000 20 6 1 .250000 20 12 1 .250000 20 18 1 .250000 49 0 1 .102041 49 6 1 .102041 49 12 1 .102041 49 18 1 .102041 20 0 1 .100000 20 6 1 .100000 20 12 1 .100000 20 18 1 .100000 39 0 1 .051282 39 6 1 .051282 39 12 1 .051282 39 18 1 .051282 20 0 1 .050000 20 4 1 .050000 20 8 1 .050000 20 12 1 .050000 39 0 1 .025641 39 4 1 .025641 39 8 1 .025641 39 12 1 .025641 rho t h e t a 0.5000 0.5000 0.5000 0.5000 0.9750 0.9750 0.9750 0.9750 1.0000 1.0000 1. 1. 1. 1. 1. 1. 2. 2. 4. 4. 4. 4. ,0000 ,0000 ,9500 ,9500 ,9500 ,9500 ,0000 ,0000 2.0000 2.0000 9000 9000 9000 9000 5.0000 5.0000 5.0000 5.0000 9.7500 9.7500 9.7500 9.7500 10.0000 10.0000 10.0000 10.0000 19.5000 19.5000 19.5000 19.5000 ,0 0 ,0 ,0 ,0 ,0 ,0 ,0 .0 ,0 .0 0.0 30.0 60 90 0 30 60 90 0 30 60 90 0 30.0 60.0 90.0 0.0 30.0 60.0 90.0 0 30 60 90 0 30 60 90 0 30 60 90 0 30.0 60.0 90.0 0.0 30.0 60.0 90.0 This table gives values of ty at selected points in the space. These points are identified by triples (patch number,t,;), where (», ; ) are the generic integer patch coordinates defined in the text. Depending on the patch type, either (p,z) or (r,0) are also shown. 110 Schwarzschild test series C2I.PAR;2 18-OCT-1985 06:40 Page 1 title-"Schwarzschild Solution" N_black_hole-l grld-"o21" I black_hole-l rho-0 z-0 mass-1 surrounding_patch_flag-1 momentua-0 reflection_term_sign-0 reflection_radius-0.5 spin-0 t ; mkgfn c2i ; directcg c2i 1.0e-10 (4946.00 cpu seconds) Schwarzschild test series C2I.PAT;2 18-0CT-1985 06:40 Page 1 ; Each patch approximately 20 x 20 ; A l l patches polar spherical, except (original) patoh *2 i s augmented by ; a cy l i n d r i c a l one ; A l l patches using independent terms differencing ; A l l patches using omega for conformal function ; Outer boundary at r - 100 N_patch-8 ; Now describe each coordinate patch: patch-1 coord_type-"polar spherical" difference_scheme-"Independent conformal_fn_type-"omega(psi)" rho_oenter-0 z_center-0 r_min-"oonstant-0.500" r_max-"constant-0.975" thet a_mln-"constant-0" theta_max-"constant-90" patch-2 coord_type-"polar spherical" difference_scheme-"Independent terms" conformal_fn_type-"omega(psl)" rho_center-0 z_center-0 delta_r-0.05 delta_theta-5 r_min-"const ant-1.00" bndry_cond-"pat ch-1" r_max-"constant-1.05" bndry_cond-"patch-3" theta_min-"constant-0" bndry_cond-"Neumann" theta_max-"constant-90" bndry_oond-"Neumann" patch-3 coord_type-"cylindrical" difference_scheme-"independent terms" conformal_fn_type-"omega(psl)" rho_center-0 z_center-0 delta_rho-0.05 delta_z-0.05 rho_min_bound-0 rho_max_bound-2 z_min_bound-0 z_max_bound-2 rho_min-"patch-2 bndry-r_max" rho_min-"constant-0" bndry_oond-"Neumann" rho_max-"patch-4 bndry-r_min" z_min-"patch-2 bndry-r_max" z_min-"constant-0" bndry_cond-"Neumann" z_max-"patch-4 bndry-r_min" t patch-4 coord_type-"polar spherloal" difference_soheme-"Independent terms" conformal_fn_type-"omega(psl)" rho_center-0 z_oenter-0 delta_r-0.1 delta_theta-5 r_min-"constant-2.0" bndry_oond-"patoh-3" r_max-"constant-4.9" bndry_oond-"patoh-5" thet a_min-"oonst ant-0" bndry_cond-"Neumann" theta_max-"constant-90" bndry_oond-"Neumann" terms" delta_r-0.025 delta_theta-5 bndry_cond-"Reflection Symmetric" bndry_cond-"pat oh-2" bndry_cond-"Neumann" bndry_cond-"Neumann" 112 Schwarzschild test series C2I.PAT;2 18-0CT-1985 06:40 Page 2 patch-5 ooord_type-"polar spherioal" difference_scheme-"independent terms" conformal_fn_type-"omega(psi)" rho_center-0 z_center-0 r_min-"constant-5.00" r_max-"oonstant-9.75" thet a_min-"const ant-0" theta_max-"oonstant-90" delta_r-0.25 delta_theta-5 bndry_cond-"pat ch-4" bndry_cond-"patch-6" bndry_cond-"Neumann" bndry_cond-"Neumann" patch-6 ooord_type-"polar spherical" difference_scheme-"independent conformal_fn_type-"omegaCpsi)" rho_center-0 z_center-0 r_min-"constant-10.0" r_max-"constant-19.5" theta_min-"oons'tant-0" theta_max-"oonstant-90" patch-7 coord_type-"polar spherical" difference_scheme-"independent conformal_fn_type-"omegaCpsi)" rho_center-0 z_center-0 r_min-"constant-20" r_max-"constant-49" theta_min-"constant-0" theta_max-"oonstant-90" patch-8 coord_type-"polar spherical" difference_scheme-"Independent conformal_fn_type-"omegaCpsi)" rho_center-0 z_center-0 r_min-"const ant-50" r_max-"constant-100" theta_mln-"constant-0" theta_max-"constant-90" terms" delta_r-0.5 delta_theta=7.5 bndry_cond-"patch-5" bndry_cond-"patch-7" bndry_cond-"Neumann" bndry_cond-"Neumann" terms" delta_ r - l delta_theta-7.5 bndry_cond-"patch-6" bndry_cond-"pat oh-8" bndry_cond-"Neumann" bndry_oond-"Neumann" terms" delta_r-2.5 delta_theta-7.5 bndry_oond-"patch-7" bndry_oond-"Robin" bndry_cond-"Neumann" bndry_cond-"Neumann" 113 Table 17 - Schwarzschild test series, c2i selected ty values Number i J Psi rho z r theta 1 20 0 1.997657 0.5000 0.0 1 20 6 1.997656 0.5000 30.0 1 20 12 1.997663 0.. 5000 60.0 1 20 18 1.997675 0.5000 90.0 1 39 0 1.511095 0.9750 0.0 1 39 6 1.511054 Q.9750 30.0 1 39 12 1.511048 0.9750 60.0 1 39 18 1.511117 0.9750 90.0 2 20 0 1.498301 1.0000 0.0 2 20 9 1.498208 1.0000 45.0 2 20 18 1.498322 1.0000 90.0 2 21 0 1.474552 1.0500 0.0 2 21 9 1.474409 1.0500 45.0 2 21 18 1.474566 1.0500 90.0 3 30 0 1.332126 1.50 0. 00 3 20 10 1.445593 1.00 0. 50 3 30 10 1.315052 1.50 0. 50 3 10 20 1.445612 0.50 1. 00 3 20 20 1.352222 1.00 1. 00 3 30 20 1.276281 1.50 1. 00 3 0 30 1.332151 0.00 1. 50 3 10 30 1.315072 0.50 1. 50 3 20 30 1.276288 1.00 1. 50 4 20 0 1.249046 2.0000 0.0 4 20 6 1.249034 2.0000 30.0 4 20 12 1.249028 2.0000 60.0 4 20 18 1.249037 2.0000 90.0 4 49 0 1.101644 4.9000 0.0 4 49 6 1.101644 4.9000 30.0 4 49 12 1.101644 4.9000 60.0 4 49 18 1.101644 4.9000 90.0 5 20 0 1.099611 5.0000 0.0 5 20 6 1.099611 5.0000 30.0 5 20 12 1.099611 5.0000 60.0 5 20 18 1.099611 5.0000 90.0 5 39 0 1.051083 9.7500 0.0 5 39 6 1.051083 9.7500 30.0 5 39 12 1.051083 9.7500 60.0 5 39 18 1.051083 9.7500 90.0 6 20 0 1.049806 10.0000 0.0 6 20 6 1.049806 10.0000 45.0 6 20 12 1.049806 10.0000 90.0 6 39 0 1.025541 19.5000 0.0 6 39 6 1.025541 19.5000 45.0 6 39 12 1.025541 19.5000 90.0 This table gives values of ty at selected points in the space. These points are identified by triples (patch number,t',;'), where (»',;') are the generic integer patch coordinates defined in the text. Depending on the patch type, either (p,z) or (r,0) are also shown. Schwarzschild test series POO.PAR;2 18-OCT-1985 06:41 Page 1 title-"Schwarzschild Solution" N_black_hole-l grid-"poo" black_hole-l rho-0 z-0 mass-1 surroundlng_patoh_flag-1 momentum-0 reflection_term_sign-0 reflection_radius=0.5 spin-0 mkgfn poo directcg poo 1.0e-10 (5911.45 opu seoonds) 115 Schwarzschild test series POO.PAT;3 18-0CT-1985 06:41 Page 1 Each patch approximately 20 x 20 A l l patches polar spherical A l l patches using l o c a l l y conservative differencing Outer boundary at r - 100 Conformal function psl / omega / omega N_patch-7 Nov describe each coordinate patch: patch-1 coord_type-"polar spherical" difference_scheme-"locally conservative" conformal_fn_type-"psl" rho_center-0 z_center-0 r_min-"constant-0.500" r_max-"constant-0.975" thet a_min-"constant-0" theta_max-"oonstant-90" delta_r-0.025 delta_theta=5 bndry_cond-"Reflection Symmetric" bndry_cond-"pat oh-2" bndry_cond-"Neumann" bndry_cond-"Neumann" patch-2 coord_type-"polar spherical" difference_scheme-"locally conservative" conformal_fn_type-"omega(psl) rho_center-0 z_oenter-0 r_min-"oonst ant-1.00" r_max-"constant-l.95" theta_min-"constant-0" theta_max-"constant-90" delta_r-0.05 delta_theta-5 bndry_cond-"patch-1" bndry_oond-"patch-3" bndry_cond-"Neumann" bndry_oond-"Neumann" patch-3 coord_type-"polar spherical" difference_scheme-"locally conservative conformal_fn_type-"omegaCpsi) rho_center-0 z_center-0 r_min-"oonstant-2.0" r_max-"constant-4.9" theta_min-"oonstant-0" theta_max-"constant-90" delta_r-0.1 delta_theta-5 bndry_cond-"patch-2" bndry_oond-"pat ch-4" bndry_cond-"Neumann" bndry_oond-"Neumann" patch-4 coord_type-"polar spherical" difference_scheme-"locally conservative conformal_fn_type-"omegaCpsi) rho_oenter-0 z_oenter-0 r_mln-"constant-5.00" r_max-"constant-9.75" thet a_min-"const ant-0" thet a_max-"const ant-90" delta_r-0.25 delta_theta-5 bndry_oond-"patch-3" bndry_cond-"patch-5" bndry_oond-"Neumann" bndry_oond-"Neumann" patch-5 coord_type-"polar spherical" difference_scheme-"locally conservative" conformal_fn_type-"omegaCpsi)" Scb.warzsch.ild test series POO.PAT;3 18-OCT-1985 06:41 Page 2 rho_eenter-0 z_oenter-0 r_min-"oonstant-10.0" r_max-"oonstant-19.5" theta_min-"constant-0" theta_max-"constant-90" delta_r-0.5 delta_theta-7.5 bndry_oond-"patoh-4" bndry_cond-"patoh-6" bndry_cond-"Neumann" bndry_oond-"Neumann" patch-6 coord_type-"polar spherical" difference_scheme-"locally conservative conformal_fn_type-"omegaC psi) rho_center-0 z_center-0 r_min-"constant-20" r_max-"constant-49" theta_min-"constant-0" theta_max-"constant-90" delta_ r - l delta_theta-7.5 bndry_oond-"pat ch-5" bndry_oond-"patch-7" bndry_oond-"Neumann" bndry_oond-"Neumann" patch-7 coord_type-"polar spherioal" difference_scheme-"locally conservative" conformal_fn_type-"omegaCpsi) rho_center-0 z_center-0 r_min-"oonstant-50" r_max-"constant-100" theta_min-"constant-0" theta_max-"constant-90" delta_r-2.5 delta_theta=7.5 bndry_cond-"patch-6" bndry_cond-"Robin" bndry_oond-"Neumann" bndry_cond-"Neumann" 117 Table 18 - Schwarzschild test series, poo selected ty values Patch Number 2 2 2 2 2 2 2 2 3 3 3 3 3 3 3 3 4 4 4 4 4 4 4 4 5 5 5 5 5 5 5 5 i J P s i 20 0 1 .996481 20 6 1 .996481 20 12 1 .996481 20 18 1 .996481 39 0 1 .511249 39 6 1 .511249 39 12 1 .511249 39 18 1 .511249 20 0 1 .498477 20 6 1 .498477 20 12 1 .498477 20 18 1 .498477 39 0 1 .255742 39 6 1 .255742 39 12 1 .255742 39 18 1 .255742 20 0 1 .249353 20 6 1 .249353 20 12 1 .249353 20 18 1 .249353 49 0 1 .101834 49 6 1 .101834 49 12 1 .101834 49 18 1 .101834 20 0 1 .099798 20 6 1 .099798 20 12 1 .099798 20 18 1 .099798 39 0 1 .051200 39 6 1 .051200 39 12 1 .051200 39 18 1 .051200 20 0 1 .049921 20 4 1 .049921 20 8 1 .049921 20 12 1 .049921 39 0 1 .025610 39 4 1 .025610 39 8 1 .025610 39 12 1 .025610 rho theta 0. 0. 0. 0. 1. 1. 1, 0.5000 0.5000 0.5000 0.5000 9750 9750 9750 9750 0000 0000 ,0000 1.0000 1.9500 1.9500 1.9500 1.9500 2.0000 2.0000 2.0000 2.0000 4.9000 4.9000 4.9000 4.9000 5.0000 5.0000 5.0000 5.0000 9.7500 9.7500 9.7500 9.7500 10.0000 10.0000 10.0000 10.0000 19.5000 19.5000 19.5000 19.5000 0.0 30.0 60, 90, 0, 30, ,0 .0 ,0 ,0 60.0 90.0 0.0 30.0 60.0 90.0 0.0 30.0 60.0 90.0 0.0 30.0 60 90 0 30 60 90 0 30 60 90 0 30 60 90 0 30 60 90 0 30.0 60.0 90.0 This table gives values of ty at selected points in the space. These points are identified by triples (patch number, where (t,;) are the generic integer patch coordinates defined in the text. Depending on the patch type, either (p,z) or (r,0) are also shown. 118 Schwarzschild test series 0P0.PAR;2 18-0CT-1985 06:41 Page 1 title-"Schwarzschild Solution" N_black_hole-l grld-"opo" p black_hole-l rho-0 nass-1 nomentum-0 spln-0 ; mkgfn opo ; directcg opo 1.0e-10 (2737.25 cpu seconds) z-0 surrounding_patoh_flag-1 reflection_term_sign-0 reflection_radius-0.5 Schwarzschild test series OPO.PAT;2 18-0CT-1985 06:41 Page Bach patch approximately 20 x 20 A l l patches polar spherical A l l patches using l o c a l l y conservative differenoing Outer boundary at r - 100 Conformal function omega / psi / omega N_patch-7 Now describe eaoh coordinate patoh: patch-1 coord_type-"polar spherical" difference_scheme-"locally conservative" conformal_fn_type-"omega(psl) rho_center-0 z_center-0 r_min-"constant-0.500" r_max-"constant-0.975" theta_min-"oonst ant-0" theta_max-"constant-90" delta_r-0.025 delta_theta=5 bndry_cond-"Reflection Symmetric" bndry_cond-"patch-2" bndry_cond-"Neumann" bndry^.cond-" Neumann" patch-2 coord_type-"polar spherical" difference_scheme-"locally conservative" conformal_fn_type-"psi" rho_center-0 z_center-0 r_mln-"constant-1.00" r_max-"constant-l.95" theta_min-"constant-0" theta_max-"const ant-90" delta_r-0.05 delta_theta-5 bndry_cond-"patch-1" bndry_cond-"patch-3" bndry_cond-"Neumann" bndry_cond-"Neumann" patch-3 ooord_type-"polar spherical" difference_scheme-"locally conservative" conformal_fn_type-"psi" rho_center-0 z_center-0 r_mln-"const ant-2.0" r_max-"constant-4.9" theta_min-"constant-0" thet a_max-"const ant-90" delta_r-0.1 delta_theta-5 bndry_cond-"patch-2" bndry_cond-"patch-4" bndry_cond-"Neumann" bndry_cond-"Neumann" patch-4 coord_type-"polar spherical" difference_scheme-"locally conservative oonformal_fn_type-"psi" rho_center-0 z_oenter-0 r_mln-"constant-5.00" r_max-"oonstant-9.78" theta_mln-"constant-0" theta_max-"oonstant-90" delta_r-0.25 delta_theta-5 bndry_oond-"patch-3" bndry_oond-"pat ch-5" bndry_cond-"Neumann" bndry_cond-"Neumann" patoh-5 coord_type-"polar spherioal" differenoe_soheme-"locally conservative" conformal_fn_type-"psi" 120 Schwarzschild test series 0P0.PAT;2 18-OCT-1985 06:41 Page 2 rho_center-0 z_center-0 r_min-"constant-10.0" r_max-"constant-19.5" thet a_min-"const ant-0" thet a_max-"const ant- 90" delta_r-0.5 delta_theta-bndry_cond-"pat oh-4" bndry^oond-"pat ch-6" bndry_oond-"Neumann" bndry_cond-"Neumann" 7.5 patch-6 coord_type-°polar spherical" difference_scheme-"looally conservative conformal_fn_type-"psi" rho_center-0 z_center-0 r_min-"constant-20" r_max-"constant-49" theta_min-"const ant-0" theta_max-"oonstant-90" del t a _ r - l delta_theta-7.5 bndry_cond-"patch-5" bndry_cond-"pat ch-7" bndry_cond-"Neumann" bndry_cond-"Neumann" patch-7 coord_type-"polar spherical" difference_scheme-"looally conservative conformal_fn_type-"omegaCpsi) rho_center-0 z_center-0 r_min-"constant-50" r_maz-"constant-100" theta_min-"constant-0" theta_max-"constant-90" delta_r-2.5 delta_theta-7.5 bndry_cond-"patch-6" bndry_cond-"Robin" bndry_cond-"Neumann" bndry_cond-"Neumann" 121 Table 10 — Schwarzschild test series, opo selected ty values Patch Number 2 2 2 2 2 2 2 2 3 3 3 3 3 3 3 3 4 4 4 4 4 4 4 4 5 5 5 5 5 5 5 5 1 J P s i 20 0 2 .001963 20 6 2 .001963 20 12 2 .001963 20 18 2 .001963 39 0 1 .514181 39 6 1 .514181 39 12 1 .514181 39 18 1 .514181 20 0 1 .501342 20 6 1 .501342 20 12 1 .501342 20 18 1 .501342 39 0 1 .257330 39 6 1 .257330 39 12 1 .257330 39 18 1 .257330 20 0 1 .250908 20 6 1 .250908 20 12 1 .250908 20 18 1 .250908 49 0 1 .102613 49 6 1 .102613 49 12 1 .102613 49 18 1 .102613 20 0 1 .100567 20 6 1 .100567 20 12 1 .100567 20 18 1 .100567 39 0 1 .051606 39 6 1 .051606 39 12 1 .051606 39 18 1 .051606 20 0 1 .050317 20 4 1 .050317 20 8 1 .050317 20 12 1 .050317 39 0 1 .025824 39 4 1 .025824 39 8 1 .025824 39 12 1 .025824 rho 0. 0. 0. 0. 0. 0. 0. 0. 1. 5000 5000 5000 5000 9750 9750 9750 9750 0000 1.0000 0000 0000 .9500 .9500 .9500 .9500 .0000 2.0000 2.0000 0000 9000 9000 9000 9000 0000 5.0000 5.0000 5.0000 9.7500 9.7500 9.7500 9.7500 10.0000 10.0000 10.0000 10.0000 19.5000 19.5000 19.5000 19.5000 1. 1. 1, 1. 1, 1, 2, 2. 4. 4. 4. 4. 5. t h e t a 0.0 30.0 60.0 90.0 0.0 30.0 60.0 90.0 0.0 30.0 60.0 90 0 30 60 90 0 30 60 90 0 30 60 90 0.0 30.0 60 90 0 30 60 90 0 30 60 90 0.0 30.0 60.0 90.0 ,0 ,0 .0 .0 .0 ,0 0 0 0 0 This table gives values of ty at selected points in the space. These points are identified by triples (patch number,!,;'), where (t,;) are the generic integer patch coordinates defined in the text. Depending on the patch type, either (p,z) or (r,0) are also shown. 122 Schwarzschild test series OOP.PAR;2 18-OCT-1985 06:41 Page 1 title-"Schwarzschild Solution" N_black_hole-l grid-"oop" I black_hole-l rho-0 z-0 mass-1 surrounding_patch_flag-l momentum-0 refleotlon_term_sign-0 reflection_radius-0.5 spin-0 mkgfn oop directcg oop l.Oe-10 (2685.24 opu seconds) Schwarzschild test series 00P.PAT;2 18-0CT-1985 06:41 Page Each, patch approximately 20 x 20 A l l patches polar spherical A l l patches using l o c a l l y conservative differenoing Outer boundary at r - 100 Conformal funotion omega / omega / psi N_patch-7 Now describe each coordinate patch: patch-1 coord_type-"polar spherical" difference_scheme-"locally conservative" conformal_fn_type-"omega(psi) rho_center-0 z_center-0 r_min-"oonstant-0.500" r_max-"constant-0.975" theta_min-"constant-0" theta_max-"constant-90" delta_r-0.025 delta_theta-5 bndry_cond-"Reflection Symmetric" bndry_cond-"patch-2" bndry_oond-"Neumann" bndry_oond-"Neumann" patch-2 coord_type-"polar spherical" difference_scheme-"locally conservative conformal_fn_type-"omega(psi)" rho_center-0 z_center-0 r_min-"const ant-1.00" r_max-"constant-l.95" theta_min-"constant-0" theta_max-"constant-90" delta_r-0.05 delta_theta-5 bndry_cond-"patch-1" bndry_cond-"patch-3" bndry_oond-"Neumann" bndry_cond-"Neumann" patoh-3 coord_type-"polar spherical" difference_scheme-"locally conservative" conformal_fn_type-"omegaCpsi) rho_center-0 z_center-0 r_min-"constant-2.0" r_max-"oonstant-4.9" theta_min-"oonstant-0" theta_max-"constant-90" delta_r-0.1 delta_theta-5 bndry_cond-"patch-2" bndry_oond-"patch-4" bndry_cond-"Neumann" bndry_cond-"Neumann" patch-4 ooord_type-"polar spherical" difference_scheme-"locally conservative conformal_fn_type-"omegaCpsi) rho_center-0 z_center-0 r_min-"oonst ant-5.00" r_max-"oonstant-9.75" thet a_min-"constant-0" theta_max-"constant-90" delta_r-0.25 delta_theta-5 bndry_oond-"patch-3" bndry_oond-"patoh-3" bndry_cond-"Neumann" bndry_cond-"Neumann" patch-5 coord_type-"polar spherical" differenoe_soheme-"locally conservative" conformal_fn_type-"omegaCpsi)" Schwarzschild test series OOP.PAT;2 18-OCT-1985 06:41 Page rho_center-0 z_oenter-0 r_min-"constant-10.0" r_max-"oonstant-19.5" theta_mln-"const ant-0" theta_max-"oonstant-90" delta_r-0.S delta_theta-7.S bndry_cond-"patch-4" bndry_oond-"patch-6" bndry_cond-"Neumann" bndry_cond-"Neumann" patch-6 coord_type-"polar spherical" difference_scheme-"locally conservative" conformal_fn_type-"omega(psi)" rho_center-0 z_center-0 r_min-"oonstant-20" r_max-"const ant-49" theta_mln-"oonstant-0" theta_max-"constant-90" del t a _ r - l delta_theta-7.5 bndry_cond-"patch-5" bndry_cond-"patch-7" bndry_cond-"Neumann" bndry_cond-"Neumann" patch-7 coord_type-"polar spherical" difference_scheme-"locally conservative" conformal_fn_type-"psi" rho_center-0 z_center-0 delta_r-2.S delta_theta-7. r_min-"constant-50" bndry_cond-"patch-6" r_max-"constant-100" bndry_cond-"Robin" theta_min-"constant-0" bndry_cond-"Neumann" theta_max-"oonstant-90" bndry_cond-"Neumann" 125 Table 20 - Schwarzschild test series, oop selected ty values Patch Number 2 2 2 2 2 2 2 2 3 3 3 3 3 3 3 3 4 4 4 4 4 4 4 4 5 5 5 5 5 5 5 5 i J P s i 20 0 2 .001480 20 6 2 .001480 20 12 2 .001480 20 18 2 .001480 39 0 1 .513816 39 6 1 .513816 39 12 1 .513816 39 18 1 .513816 20 0 1 .500980 20 6 1 .500980 20 12 1 .500980 20 18 1 .500980 39 0 1 .257027 39 6 1 .257027 39 12 1 .257027 39 18 1 .257027 20 0 1 .250606 20 6 1 .250606 20 12 1 .250606 20 18 1 .250606 49 0 1 .102347 49 6 1 .102347 49 12 1 .102347 49 18 1 .102347 20 0 1 .100302 20 6 1 .100302 20 12 1 .100302 20 18 1 .100302 39 0 1 .051460 39 6 1 .051460 39 12 1 .051460 39 18 1 .051460 20 0 1 .050175 20 4 1 .050175 20 8 1 .050175 20 12 1 .050175 39 0 1 .025742 39 4 1 .025742 39 8 1 .025742 39 12 1 .025742 rho 0.5000 0.5000 0.5000 0.5000 0.9750 0.9750 0.9750 0.9750 1.0000 1.0000 1.0000 1.0000 1.9500 1. 1. 1. 2. 2. 2. 2. 4. 9500 9500 9500 0000 0000 0000 0000 9000 4.9000 4.9000 4.9000 5.0000 5.0000 5.0000 5.0000 9.7500 9.7500 9.7500 9.7500 10.0000 10.0000 10.0000 10.0000 19.5000 19.5000 19.5000 19.5000 t h e t a 0.0 30.0 60.0 90.0 0.0 30.0 60.0 90.0 0.0 30.0 60.0 90.0 0.0 30.0 60.0 90.0 0.0 30.0 60.0 90 0 30 60 90 0 30 60 90 0 30 60 90 0 30 60 90 0 30 60 90 This table gives values of ty at selected points in the space. These points are identified by triples (patch number,»,;), where (t,;) are the generic integer patch coordinates defined in the text. Depending on the patch type, either (p,z) or (r,0) are also shown. 126 Choptuik comparison test series PPX001.PAR;3 18-0CT-1985 06=47 Page 1 title-"Replicate Matt's Results (P-0.001)" N_black_hole-l grid-"matt" » black_hole-l rho-0 z-0 mass-2 surroundlng_patch_flag-l momentum-0.001 reflection_term_sign-+l reflection_radius-l spin-0 t ; mkgfn ppzOOl ; directcg ppxOOl l.Oe-10 (1606.50 cpu seconds) I Figure 12 — 127 Choptuik comparison test series, ppzOOl quantitative results This figure shows ^(equator) and Sty = ^(north pole) — *( equ at or), both as functions of s = 1 — a jr. The former shows the general radial trend of ty, while the latter is a measure of the deviation of ty from spherical symmetry. Choptuik comparison test series PPX01.PAR;4 18-OCT-1985 06:47 Page title-"Replicate Matt's Results (P-0.01)" N_black_hole-l grid-"matt" » black_hole-l rho-0 z-0 mass-2 surrounding_patcn_flag-l momentum-0.01 reflectlon_term_slgn-+l reflection_radius-l spin-0 mkgfn ppxOl dlrectcg ppxOl 1.0e-10 (1763.90 cpu seconds) Figure 13 -129 Choptuik comparison test series, ppxOl quantitative results This figure shows ^ (equator) and 69 = ^(north pole) — \t(equator), both as functions of s = 1 — o/r. The former shows the general radial trend of 9, while the latter is a measure of the deviation of 9 from spherical symmetry. 130 Choptuik comparison test series PPX1.PAR;2 18-OCT-1985 06:47 Page 1 title-"Replicate Matt's Results (P-0.1)" N_black_nole-l grid-"matt" black_nole-l rho-0 z-0 mass-2 surroundlng_patch_flag-1 momentum-0.1 reflection_term_slgn-+l reflectlon_radius-l spin-0 mkgfn ppxl cpgfn ppxOl psi ppxl psi dlrectcg ppxl l.Oe-10 (1820.39 cpu seconds) This figure shows ^ (equator) and 69 = ¥(north pole) — ^'(equator), both as functions of s = 1 — a/r. The former shows the general radial trend of 9, while the latter is a measure of the deviation of 9 from spherical symmetry. 132 Choptuik comparison test series PP1.PAR;2 18-0CT-1985 06:47 Page 1 title-"Replioate Matt's Results (P-l)" N_black_hole-l grid-"matt" t black_hole-l rno-0 z-0 mass-2 surrounding_patch_flag-1 momentum-1 refleotlon_term_sign-+l reflection_radius-l spin-0 mkgfn ppl cpgfn ppxl psl ppl psl directcg ppl 1.0e-10 (2620.18 cpu seconds) This figure shows ^(equator) and 69 = ^(north pole) - ^(equator), both as functions of s = 1 — a/r. The former shows the general radial trend of 9, while the latter is a measure of the deviation of 9 from spherical symmetry. Choptuik comparison test series PP2X5.PAR;2 18-0CT-19S5 06:47 Page 1 title-"Replicate Matt*s Results (P-2.5)" N_black_hole-l grid-"matt" black_nole-l rho-0 z-0 mass-2 surroundlng_patoh_flag-1 momentum-2.5 reflection_term_sign—H reflectlon_radius-l spin-0 mfcgfn pp2x5 cpgfn ppl psi pp2x5 psi directcg pp2x5 1.0e-10 (3245.29 cpu seconds) 135 Figure 16 — Choptuik comparison test series, pp2z5 quantitative results S = 1 - A /R • 0 . 2 0 . 4 0 . 6 0 . 8 1 S = 1 - A /R This figure shows ^ (equator) and 69 = ^(north pole) — ^(equator), both as functions of s = 1 — a/r. The former shows the general radial trend of 9, while the latter is a measure of the deviation of 9 from spherical symmetry. 136 Choptuik comparison test series PP7X5.PAR;2 18-OCT-1985 06:47 Page 1 title-"Replicate Matt's Results (P-7.5)" N_black_hole-l grid-"matt" i black_hole-l rho-0 z-0 mass-2 surroundlng_paton_flag-l momentum-7.5 reflectlon_term_slgn—1-1 reflectlon_radius-l spin-0 mkgfn pp7x5 cpgfn pp2x5 psi pp7x5 psi directcg pp7x5 1.0e-10 (4273.96 cpu seconds) Figure 17 -137 Choptuik comparison test series, pp7z5 quantitative results This figure shows ^ (equator) and Sty = $(north pole) — ¥ (equator), both as functions of s = 1 — a/r. The former shows the general radial trend of ty, while the latter is a measure of the deviation of ty from spherical symmetry. 138 Choptuik comparison test series PP12X5.PAR;2 18-0CT-1985 06:47 Page 1 title-"Replicate Matt's Results (P-12.5)" N_black_hole-l grid-"matt" • black_hole-l rho-0 z-0 mass-2 surrounding_patch_flag-l momentum-12.5 refleotion_term_slgn—H reflectlon_radius-l spin-0 mkgfn ppl2x5 cpgfn pp7x5 psi ppl2x5 psi direotcg ppl2x5 1.0e-10 (4141.61 cpu seconds) This figure shows ^(equator) and 59 = ¥(north pole) — ^(equator), both as functions of s = 1 — o/r. The former shows the general radial trend of 9, while the latter is a measure of the deviation of 9 from spherical symmetry. Choptuik comparison test series MPX001.PAR;2 18-0CT-1985 06:47 Page 1 title-"Replicate Matfs Results (P-0.001)" N_black_hole-l grid-"matt" • black_nole-l rho-0 z-0 mass-2 surrounding_patch_flag-l momentum-0.001 refleotion_term_slgn—1 refleotlon_radius-l spin-0 mkgfn mpzOOl directcg mpzOOl l.Oe-10 (1566.28 cpu seconds) This figure shows ^(equator) and 6ty = ¥(north pole) — ^(equator), both as functions of s = 1 — a/r. The former shows the general radial trend of ty, while the latter is a measure of the deviation of ty from spherical symmetry. Choptuik comparison test series MPX01.PAR;2 18-0CT-1985 06:47 Page 1 title-"Replicate Matt's Results (P-0.01)" N_black_hole-l grid-"matt" » black_hole-l rho-0 z-0 mass-2 surrounding_patch_flag-l momentum-0.01 reflection_term_slgn—1 reflection_radlus-l spin-0 mkgfn mpzOl directcg mpzOl 1.0e-10 (1612.97 cpu seconds) Figure 20 — Choptuik comparison test series, mpxOl quantitative results S = 1 - A /R S = 1 - A /R This figure shows ^ (equator) and 69 = ^(north pole) - 9(equator), both as functions of 8 = 1 — a/r. The former shows the general radial trend of 9, while the latter is a measure of the deviation of 9 from spherical symmetry. Choptuik comparison test series MPX1.PAR;2 18-OCT-1985 06:47 Page 1 title-"Replicate Matt's Results (P-0.1)" N_black_hole-l grid-"matt" i black_hole-l rho-0 z-0 mass-2 surroundlng_patch_flag-l momentum-0.1 reflection_term_slgn—1 reflection_radius-l spin-0 mkgfn mpzl cpgfn mpzOl psi mpzl psi directcg mpzl 1.0e-10 (1766.72 cpu seconds) Figure 21 -145 Choptuik comparison test series, mpzl quantitative results This figure shows ^ (equator) and Sty = ¥(north pole) — equator), both as functions of s = 1 - a/r. The former shows the general radial trend of ty, while the latter is a measure of the deviation of ty from spherical symmetry. Choptuik comparison test series MP1.PAB;2 18-0CT-1985 06:46 Page 1 title-"Replicate Matt's Results (P-l)" N_black_hole-l grid-"matt" * black_hole-l rho-0 z-0 mass-2 surroundlng_patoh_flag-1 momentum-1 reflection_term_sign—1 reflection_radius-l spin-0 mkgfn mpl cpgfn mpzl psi mpl psi directcg mpl 1.0e-10 (2552.99 cpu seconds) This figure shows ^(equator) and Sty = ¥(north pole) - ^(equator), both as functions of 8 = 1 — a/r. The former shows the general radial trend of ty, while the latter is a measure of the deviation of ty from spherical symmetry. Choptuik comparison test series MP2X5.PAR;3 18-OCT-1985 06:54 Page 1 title-"Replicate Matt's Results (P-2.5)" N_blacfc_hole-l grid-"matt" > black_hole-l rlio-0 z-0 mass-2 surrounding_patoa_flag-l momentum-2.5 ref lection_term_slgn—1 reflectlon_radius-l spln-0 mkgfn mp2z5 cpgfn mpl psi mp2z5 psi directcg mp2z5 1.0e-10 (2490.73 cpu seoonds) This figure shows ^(equator) and 69 = ^(north pole) - 9 (equ at or), both as functions of s = 1 - o/r. The former shows the general radial trend of 9, while the latter is a measure of the deviation of 9 from spherical symmetry. Choptuik comparison test series MP7X5.PAR;2 18-OCT-1985 06:47 Page 1 title-"Replicate Matt's Results (P-7.5)" N_black_hole-l grid-"matt" t black_hole-l rho-0 z-0 mass-2 surrounding_patch_flag-1 momentum-7.5 reflection_term_sign—1 reflection_radlus-l spin-0 mkgfn mp7z5 cpgfn mp2z5 psi mp7z5 psi directcg mp7z5 1.0e-10 (4260.21 cpu seconds) Figure 24 -151 Choptuik comparison test series, mp7z5 quantitative results This figure shows ^(equator) and Sty = ^(north pole) - ^(equator), both as functions of s = 1 — a/r. The former shows the general radial trend of ty, while the latter is a measure of the deviation of ty from spherical symmetry. Choptuik comparison test series MP12X5.PAR;2 18-OCT-1985 08:46 Page 1 title-"Replicate Matt's Results (P-12.5)" N_black_hole-l grid-"matt" black_hole-l rho-0 z-0 mass-2 surrounding_patch_flag-1 momentum-12.5 reflectlon_term_slgn—-1 refleotion_radlus-l spin-0 mkgfn mpl2z5 cpgfn mp7z5 psi mpl2x5 psi dlrectcg mpl2z5 1.0e-10 (4427.27 cpu seconds) This figure shows \P(equator) and 69 = ^(north pole) — 'it(equator), both as functions of 8 = 1 — a/r. The former shows the general radial trend of while the latter is a measure of the deviation of * from spherical symmetry. Choptuik comparison test series JX001.PAR;3 18-OCT-1985 06:46 Page 1 title-"Replicate Matfs Results (J-0.001)" N_black_hole-l grid-"matt" * black_hole-l rho-0 z-0 mass-2 surrounding_patch_flag-l momentum-0 reflection_term_sign-0 reflection_radius-l spin-0.001 mkgfn JxOOl dlrectcg JxOOl 1.0e-10 (1617.24 cpu seconds) 155 Figure 28 - Choptuik comparison test series, jzOOl quantitative results I I I I I \ J • 0 . 2 0 . 4 0 . 6 0 . 8 1 S = 1 - A /R • 0 . 2 0.4- 0 . 6 0 . 8 1 S = 1 - A /R This figure shows ^ (equator) and 69 = ^(north pole) - ^ (equator), both as functions of 8 = 1 — o/r. The former shows the general radial trend of 9, while the latter is a measure of the deviation of 9 from spherical symmetry. Choptuik comparison test series JX01.PAR;2 18-OCT-1985 06:46 Page 1 tltle-"Replicate Matt's Results (J-0.01)" N_blacfc_hole-l grid-"matt" i black_hole-l rho-0 z-0 mass-2 surrounding_patch_flag-1 momentum-0 reflection_term_sign-0 reflection_radius-l spin-0.01 mkgfn JxOl directcg JxOl 1.0e-10 (1765.37 cpu seconds) 157 Figure 27 - Choptuik comparison test series, jxOl quantitative results This figure shows ^ (equator) and 69 — *(north pole) - ^ (equator), both as functions of s = 1 — a/r. The former shows the general radial trend of 9, while the latter is a measure of the deviation of 9 from spherical symmetry. Choptuik comparison test series JX1.PAR;3 18-OCT-1985 06:46 Page 1 title-"Replicate Matt's Results (J-0.1)" N_black_hole-l grid-"aatt" black_hole-l rho-0 z-0 mass-2 surrounding_patch_flag-l xaomentum-O reflectlon_term_sign-0 reflection_radius-l spin-0.1 mkgfn Jxl cpgfn JxOl psi Jxl psi directcg Jxl 1.0e-10 (1772.80 cpu seconds) This figure shows ^(equator) and 69 = ^(north pole) - ^(equator), both as functions of s = 1 — a/r. The former shows the general radial trend of 9, while the latter is a measure of the deviation of 9 from spherical symmetry. Choptuik comparison test series J1.PAR;2 18-OCT-1985 06:46 Page 1 title-"Repllcate Matt's Results ( J - l ) " N_black_nole-l grid-"matt" » black_hole-l rho-0 z-0 mass-2 surrounding_patcn_flag-1 momentum-0 refleotion_term_sign-0 reflection_radius-l spin-1 mkgfn j l cpgfn Jxl psl J l psl direotcg J l 1.0e-10 (1640.19 cpu seconds) S = 1 - A /R This figure shows ^(equator) and 69 = ^(north pole) — ^(equator), both as functions of s = 1 — a/r. The former shows the general radial trend of 9, while the latter is a measure of the deviation of 9 from spherical symmetry. 162 Choptuik comparison test series J10.PAR.-2 18-OCT-1985 06:46 Page 1 title-"Replicate Matt's Results (J-10)" N_black_nole-l grid-"matt" t black_hole-l rho-0 z-0 mass-2 surrounding_patca_flag-l momentum-0 reflection_term_sign-0 reflection_radius-l spin-10 mkgfn J10 cpgfn J l psi J10 psi directcg J10 1.0e-10 (4633.32 cpu seconds) 163 Figure 30 - Choptuik comparison test series, j 10 quantitative results This figure shows ^ (equator) and 69 = ^(north pole) - ^ (equator), both as functions of s = 1 — o/r. The former shows the general radial trend of 9, while the latter is a measure of the deviation of 9 from spherical symmetry. 164 Choptuik comparison test series J100.PAR;2 18-OCT-1985 06=46 Page 1 title-"Replicate Matt's Results (J-100)" N_black_hole-l grid-"matt" » black_hole-l rho-0 z-0 mass-2 surrounding_patch_flag-l momentum-0 reflection_term_sign-0 reflectlon_radius-l spin-100 mkgfn J100 cpgfn J10 psi J100 psi directcg J100 1.0e-10 (6219.71 cpu seconds) Figure 31 — 165 Choptuik comparison test series, j 100 quantitative results This figure shows ^ (equator) and 69 = ^(north pole) — ^(equator), both as functions of s = 1 — a/r. The former shows the general radial trend of 9, while the latter is a measure of the deviation of 9 from spherical symmetry. 166 Choptuik comparison test series J1000.PAR;2 18-OCT-1985 06:46 Page 1 title-"Replicate Matt's Results (J-1000)" N_blacfc_hole-l grid-"matt" • black_nole-l rho-0 z-0 mass-2 surrounding_patoh_flag-l momentum-0 refleotion_term_sign-0 reflection_radlus-l spin-1000 mkgfn J1000 cpgfn J100 psl J1000 psl directcg J1000 1.0e-10 (6920.95 cpu seconds) This figure shows ^(equator) and 5* = ¥(north pole) - ^(equator), both as functions of s = 1 - a/r. The former shows the general radial trend of 9, while the latter is a measure of the deviation of 9 from spherical symmetry. Choptuik comparison test series MATT.PAT;6 18-OCT-1985 06:45 ; Patch system to reproduce Hatt's results N_patch-6 Now describe each coordinate patch: patch-1 coord_type-"polar spherical" difference_scheme-"locally conservative" conformal_fn_type-"omegaCpsi) rho_center-0 z_center-0 r_min-"oonst ant-1.00" r_max-"constant-1.95" theta_min-"oonstant-0" theta_max-"oonstant-90" Page 1 delta_r-0.05 delta_theta-5 bndry_cond-"Reflection Symmetric" bndry_oond-"patch-2" bndry_oond-"Neumann" bndry_oond-"Neumann" patch-2 coord_type-"polar spherical" dlfference_scheme-"locally conservative" conformal_fn_type-"omegaCpsi) rho_center-0 z_center-0 r_min-"constant-2.0" r_max-"const ant-4.9" theta_min-"constant-0" theta_max-"oonstant-90" delta_r-0.1 delta_theta-5 bndry_cond-"patch-1" bndry_oond-"patch-3" bndry_cond-"Neumann" bndry_cond-"Neumann" patch-3 coord_type-"polar spherical" difference_scheme-"locally conservative" conformal_fn_type-"omegaCpsi)" rho_center-0 z_center-0 r_min-"const ant-5.0" r_max-"constant-9.8" theta_min-"constant-0" theta_max-"constant-90" delta_r-0.2 delta_theta-5 bndry_cond-"patch-2" bndry_oond-"patch-4" bndry_oond-"Neumann" bndry_oond-"Neumann" patch-4 coord_type-"polar spherical" difference_scheme-"locally conservative" conformal_fn_type-"omegaCpsi) rho_center-0 z_center-0 r_min-"constant-10.0" r_max-"constant-19.5" theta_min-"oonstant-0" theta_max-"oonstant-90" delta_r-0.5 bndry_cond-bndry_cond-bndry_cond-"Neumann bndry_oond-"Neumann" delta_theta-10 patch-3" patch-5" patch-5 coord_type-"polar spherical" difference_scheme-"locally conservative" conformal_fn_type-"omegaCpsi) rho_center-0 z_center-0 r_min-"constant-20" r_max-"constant-49" theta_mln-"oonstant-0" theta_max-"constant-90" del t a _ r - l delta_theta-10 bndry_cond-"patoh-4" bndry_oond-"patoh-6" bndry_cond-"Neumann" bndry_oond-"Neumann" 169 Chop tu ik compar ison test series MATT.PAT;6 18-OCT-1985 06:45 Page 2 patch-6 coord_type-"polar spherioal" difference_scheme-"locally conservative conformal_fn_type-"omega(psi) rho_center-0 z_center-0 r_min-"oonstant-50" r_max-"const ant-100" thet a_min-"const ant-0" theta_max-"constant-90" delta_r-2 delta_theta-10 bndry_cond-"patch-5" bndry_oond-"Robin" bndry_oond-"Neumann" bndry_cond-"Neumann" J test series JO.PAR;2 18-OCT-198S 06:68 Page 1 title-"Single Black Hole (J-0)" N_black_hole-l grld-"mt20" » black_hole-l rho-0 z-0 mass-1 surrounding_patch_flag-1 momentum-0 refleotion_term_sign—H reflection_radius-0.5 spin-0 mkgfn JO directcg JO l.Oe-10 171 T a b l e 21 — J t e s t s e r i e s , JO s e l e c t e d 9 v a l u e s Patch Number 2 2 2 2 2 2 2 2 3 3 3 3 3 3 3 3 4 4 4 4 4 4 4 4 5 5 5 5 5 5 5 5 i J P s l 25 0 2. 000000 25 6 2. 000000 25 12 2. 000000 25 18 2. 000000 49 0 1. 510204 49 6 1. 510204 49 12 1. 510204 49 18 1. 510204 20 0 1. 500000 20 6 1. 500000 20 12 1. 500000 20 18 1. 500000 39 0 1. 256410 39 6 1. 256410 39 12 1. 256410 39 18 1. 256410 20 0 1. 250000 20 6 1. 250000 20 12 1. 250000 20 18 1. 250000 49 0 1. 102041 49 6 1. 102041 49 12 1. 102041 49 18 1. 102041 25 0 1. 100000 25 6 1. 100000 25 12 1. 100000 25 18 1. 100000 49 0 1. 051020 49 6 1. 051020 49 12 1. 051020 49 18 1. 051020 20 0 1. 050000 20 4 1. 050000 20 8 1. 050000 20 12 1. 050000 39 0 1. 025641 39 4 1. 025641 39 8 1. 025641 39 12 1. 025641 rho 1. 1. 1. 1. 1. 1. 1, 1, 2, 2, 0.5000 0.5000 0.5000 0.5000 0.9800 0.9800 0.9800 0.9800 0000 0000 ,0000 ,0000 ,9500 ,9500 ,9500 ,9500 ,0000 ,0000 2.0000 2.0000 4.9000 4.9000 4.9000 4.9000 5.0000 5.0000 5.0000 5.0000 9.8000 9.8000 9.8000 9.8000 10.0000 10.0000 10.0000 10.0000 19.5000 19.5000 19.5000 19.5000 t h e t a 0.0 30.0 60.0 90.0 0.0 30.0 60.0 90.0 0.0 30.0 60.0 90.0 0.0 30.0 60.0 90.0 0, 30, 60, 90, 0.0 30.0 60.0 90.0 0.0 30.0 60, 90, 0, 30, 60, 90, 0, 30, 60.0 90.0 0, 30, 60, 90. 0 0 0 0 ,0 ,0 0 0 ,0 ,0 ,0 ,0 .0 0 0 ,0 This table gives values of 9 at selected points in the space. These points are identified by triples (patch number, t , ; ) , where are the generic integer patch coordinates defined in the text. Depending on the patch type, either (p,z) or ( r , 8) are also shown. J test series JX01.PAR:3 18-OCT-1985 06:58 Page 1 title-"Single Black Hole (J-0.01)" N_black_hole-l grld-"mt20" t black_hole-l rho-0 z-0 mass-1 surroundlng_patch_flag-1 momentum-0 reflection_term_sign-+l reflection_radius-0.5 spln-0.01 mkgfn JzOl directcg JxOl l.Oe-10 (4082.52 cpu seconds) 173 Figure 33 - J test series, jxOl quantitative results • 0 . 2 0 . 4 0 . 6 0 . 8 1 S = 1 - A / R S = 1 - A / R This figure shows ^(equator) and 69 = ^(north pole) - ^(equator), both as functions of s = 1 — a/r. The former shows the general radial trend of 9, while the latter is a measure of the deviation of 9 from spherical symmetry. J test series JX1.PAR;3 18-0CT-1985 06:58 Page 1 title-"Single Black Hole (J-0.1)" N_blaok_hole-l grld-"mt20" » black_hole-l rho-0 z-0 mass-1 surrounding_patch_flag-l momentum-0 reflection_term_sign-+l reflection_radius-0.5 spin-0.1 mkgfn J z l cpgfn JxOl psi J z l psi dlrectcg J z l l.Oe-10 (6278.99 cpu seconds) Figure 34 — J test series, j x l quantitative results 1 7 5 ' • 0 . 2 0 . 4 0 . 6 0 . 8 1 S = 1 - A / R This figure shows ^ (equator) and 69 = ¥(north pole) - ^ (equator), both as functions of s = 1 - o/r. The former shows the general radial trend of 9, while the latter is a measure of the deviation of 9 from spherical symmetry. 176 J test series J1.PAR;3 18-0CT-1985 06:58 Page 1 title-"Single Blaok Hole ( J - l ) " N_black_hole-l grid-"mt20" » black_hole-l rho-0 z-0 mass-1 surrounding_patch_flag-l momentum-0 reflection_term_sign-+l reflectlon_radius-0 5 spin-1 mkgfn JI cpgfn Jxl psi JI psi directcg JI 1.0e-10 (8750.83 cpu seconds) 177 Figure 3 5 - J test series, j 1 quantitative results This figure shows ^(equator) and 89 = ^(north pole) — ^(equator), both as functions of s = 1 — a/r. The former shows the general radial trend of 9, while the latter is a measure of the deviation of 9 from spherical symmetry. J test series J10.PAR;4 18-0CT-198S 06:58 Page 1 t i t l e - " S i n g l e B l a c k Hole ( J - 1 0 ) ' N _ b l a c k _ h o l e - l b l a c k _ h o l e - l rho-0 mass-1 momentum-0 spin-10 grid-"mt20" z-0 s u r r ounding_pat c h _ f l a g - 1 r e f l e c t i o n _ t e r m _ s i g n — i - l migfn J10 cpgfn J l p s i J10 p s i d i r e c t c g J10 1.0e-10 r e f l e c t l o n _ r a d i u s = 0 . 5 (11688.20 cpu seconds) 1 7 9 Figure 36 — J test series, j 10 quantitative results 0 0 . 2 0 . 4 0 . 6 0 . 8 1 S = 1 - A / R This figure shows ^ (equator) and 69 = *(north pole) - ^ (equator), both as functions of s = 1 - o/r. The former shows the general radial trend of 9, while the latter is a measure of the deviation of 9 from spherical symmetry. 1 8 0 J test series J100.PAR;4 18-OCT-1985 06:58 Page 1 title-"Single Black Hole (J-100)" N_black_hole-l grld-"mt20" black_hole-l rho-0 z-0 mass-1 surrounding_patoh_flag-l momentum-0 refleotlon_term_sign-+l refleotion_radius-0.5 epin-100 mkgfn J100 cpgfn J10 psi J100 psl directcg J100 1.0e-10 (15128.02 cpu seconds) 181 Figure 37 - J test series, j 100 quantitative results This figure shows ^(equator) and 69 = *(north pole) - ^(equator), both as functions of s = 1 — a/r. The former shows the general radial trend of 9, while the latter is a measure of the deviation of 9 from spherical symmetry. J test series MT20.PAT;6 18-OCT-1985 06:87 Page 1 ; One black hole patch system with: ; - Marginally Trapped inner boundary conditions ; - Delta r / r approximately 20-25 at inner boundary of each patch ; - A l l patches polar spherical ; - A l l patches using Independent terms differencing ; - A l l patches using omega for conformal funotion ; - Outer boundary at r - 1000 N_patch-10 ; Now describe each coordinate patch: patch-1 coord_type-"polar spherical" difference_scheme-"Independent conformal_fn_type-"omega(psl)" rho_center-0 z_center-0 r_min-"oonst ant-0.50" r_max-"oonstant-0.98" theta_mln-"constant-0" theta_max-"oonstant-90" t patch-2 coord_type-"polar spherical" difference_scheme-"independent terms" conformal_fn_type-"omega(psi)" rho_center-0 z_center-0 delta_r-0.05 delta_theta-5 r_mln-"oonst ant-1.00" bndry_cond-"patch-1" r_max-"constant-l.95" bndry_cond-"patch-3" theta_mln-"constant-0" bndry_cond-"Neumann" theta_max-"constant-90" bndry_cond-"Neumann" t patch-3 coord_type-"polar spherical" difference_scheme-"independent terms" conformal_fn_type-"omega(psi)" rho_center-0 z_oenter-0 delta_r-0.1 delta_theta-5 r_min-"constant-2.0" bndry_oond-"patch-2" r_max-"constant-4.9" bndry_oond-"patch-4" theta_min-"constant-0" bndry_cond-"Neumann" theta_max-"constant-90" bndry_oond-"Neumann" t patch-4 coord_type-"polar spherical" difference_scheme-"independent terms" conformal_fn_type-"omega(psl)" rho_center-0 z_oenter-0 delta_r-0.2 delta_theta-5 r_min-"constant-5.0" bndry_oond-"patch-3" r_max-"constant-9.8" bndry_cond-"patch-5" theta_min-"constant-0" bndry_oond-"Neumann" theta_max-"constant-90" bndry_oond-"Neumann" » patch-5 coord_type-"polar spherical" difference_scheme-"independent terms" terms" delta_r-0.02 delta_theta-5 bndry_cond-°Marginally Trapped" bndry_cond-"patch-2" bndry_cond-"Neumann" bndry_cond-"Neumann" 183 J test series MT20.PAT;6 18-OCT-1985 06:57 Page 2 conformal_fn_type-"omegaCpsi)" rho_center-0 z_center-0 r_min-"const ant-10.0" r_max-"constant-19.5" theta_min-"constant-0" theta_max-"constant-90" * patch-6 coord_type-"polar spherical" difference_scheme-"independent conformal_fn_type-"omegaCpsi)" rho_center-0 z_center-0 r_mln-"constant-20" r_max-"const ant-49" theta_mln-"constant-0" theta_max-"constant-90" > patch-7 coord_type-"polar spherical" difference.scheme-"independent conformal_fn_type-"omega(psi)" rho_oenter-0 z_center-0 r_min-"constant-50" r_max-"oonst ant-98" theta_mln-"constant-0" theta_max-"constant-90" delta_r-0.5 delta_theta-7.5 bndry_oond-"patch-4" bndry_cond-"patch-6" bndry_cond-"Neumann" bndry_oond-"Neumann" terms" delta_ r - l delta_theta-7.5 bndry_cond-"pat ch=5" bndry_oond-"patch-7" bndry_cond-"Neumann" bndry_cond-"Neumann" terms" delta_r-2 delta_theta-7.5 bndry_cond-"pat ch-6" bndry_cond-"patch-8" bndry_cond-"Neumann" bndry_oond-"Neumann" patch-8 coord_type-"polar spherical" difference_scheme-"independent terms" conformal_fn_type-"omegaCpsi) rho_oenter-0 z_center-0 r_mln-"oonstant-100" r_max-"constant-195" theta_mln-"constant-0" theta_max-"oonstant-90" delta_r-5 delta_theta-10 bndry_oond-"patoh-7" bndry_cond-"pat ch-9" bndry_cond-"Neumann" bndry_oond-"Neumann" patch-9 coord_type-"polar spherical" difference_scheme-"independent conformal_fn_type-"omegaC psi)" rho_oenter-0 z_center-0 r_min-"constant-200" r_max-"oonst ant-490" theta_min-"oonstant-0" theta_max-"oonstant-90" i patch-10 coord_type-"polar spherioal" difference_scheme-"independent conformal_fn_type-"omegaCpsi)" rho_center-0 z_center-0 r_min-"constant-500" r_max-"constant-1000" theta_min-"constant-0" terms" delta_r-10 delta_theta-10 bndry_oond-"patch-8" bndry_cond-"patoh-10" bndry_cond-"Neumann" bndry_cond-"Neumann" terms" delta_r-20 delta_theta-10 bndry_oond-"patch-9" bndry_oond-"Robin" bndry_cond-"Neumann" J test series MT20.PAT;6 18-OCT-1985 06:57 Page 3 theta_max-"oonstant-90" bndry_oond-"Neumann" RSP test series P0.PAR;12 10-N0V-1985 22:46 Page 1 title-"Single Black Hole (P-0)" N_black_hole-l grld-"rs20" t black_hole-l rho-0 z-0 mass-1 surrounding_patch_flag-l momentum-0 reflection_term_slgn-+l reflection_radlus=0.5 spin-0 mkgfn pO directcg pO l.Oe-10 186 Table 22 - RSP test series, pO selected © values Patch Number 2 2 2 2 2 2 2 2 3 3 3 3 3 3 3 3 4 4 4 4 4 4 4 4 5 5 5 5 5 5 5 5 1 J P s i 25 0 2. 000000 25 6 2. 000000 25 12 2. 000000 25 18 2. 000000 49 0 1. 510204 49 6 1. 510204 49 12 1. 510204 49 18 1. 510204 20 0 1. 500000 20 6 1. 500000 20 12 1. 500000 20 18 1. 500000 39 0 1. 256410 39 6 1. 256410 39 12 1. 256410 39 18 1. 256410 20 0 1. 250000 20 6 1. 250000 20 12 1. 250000 20 18 1. 250000 49 0 1. 102041 49 6 1. 102041 49 12 1. 102041 49 18 1. 102041 25 0 1. 100000 25 6 1. 100000 25 12 1. 100000 25 18 1. 100000 49 0 1. 051020 49 6 1. 051020 49 12 1. 051020 49 18 1. 051020 20 0 1. 050000 20 4 - 1. 050000 20 8 1. 050000 20 12 1. 050000 39 0 1. 025641 39 4 1. 025641 39 8 1. 025641 39 12 1. 025641 rho t h e t a 0.5000 0.5000 0.5000 0.5000 0.9800 0.9800 0.9800 0.9800 1.0000 1.0000 1.0000 1, 1, 1, 1, 1. 2, 2. 2. 0000 9500 9500 9500 9500 0000 0000 0000 2.0000 4. 4. 4. 4. 5, 5. ,9000 ,9000 9000 9000 ,0000 0000 5.0000 5.0000 9.8000 9.8000 9.8000 9.8000 10.0000 10.0000 10.0000 10.0000 19.5000 19.5000 19.5000 19.5000 0 0 ,0 ,0 ,0 ,0 ,0 .0 ,0 ,0 ,0 0. 30. 60. 90. 0. 30, 60. 90. 0. 30. 60. 90.0 0.0 30.0 60.0 90. 0. 30. 60. 90. 0.0 30.0 60.0 90.0 0.0 30, 60, 90, 0, 30, 60, 90, 0, 30. 60.0 90.0 0.0 30.0 60.0 90.0 0 0 0 0 .0 ,0 ,0 ,0 ,0 0 ,0 ,0 ,0 0 This table gives values of © at selected points in the space. These points are identified by triples (patch number,t,;), where ( t , j) are the generic integer patch coordinates defined in the text. Depending on the patch type, either (p,z) or (r, 6) are also shown. RSP test series PX01.PAR;8 10-N0V-1985 22:46 Page 1 title-"Single Black Hole (P-O.Ol)" N_black_hole=l grid-"rs20" t black_hole-l rho-0 z-0 mass-1 surroundlng_patch_flag-1 momentum-O.01 reflection_term_sign=+l reflectlon_radius-0.5 spin-0 mkgfn pzOl directcg pzOl l.Oe-10 (4253.86 cpu seconds) 188 Figure 38 — RSP test series, pzOl quantitative results This figure shows ^ (equator) and 69 = *(north pole) - ^ (equator), both as functions of s = 1 - a/r. The former shows the general radial trend of 9, while the latter is a measure of the deviation of 9 from spherical symmetry. 189 RSP test series PX1.PAR;6 10-NOV-1985 22:46 Page 1 title-"Single Black Hole (P-O.l)" N_black_hole-l grid-"rs20" t black_hole-l rho-0 z-0 mass-1 surrounding_patch_flag-1 momentum-0.1 reflection_term_sign-+l refleotion_radius-0.5 spin-0 mkgfn pzl cpgfn pzOl psi pzl psl directcg pzl l.Oe-10 (4198.79 cpu seconds) 190 Figure 39 - RSP test series, pzl quantitative results This figure shows ©(equator) and 69 — ©(north pole) — ©(equator), both as functions of s = 1 — a/r. The former shows the general radial trend of 9, while the latter is a measure of the deviation of 9 from spherical symmetry. RSP test series PI.PAR;5 10-NOV-1985 28:46 Page 1 title-"Single Black Hole (P-l)" N_black_hole-l grid-"rs20" » black_hole-l rho-0 z-0 mass-1 surrounding_patch_flag-l momentum-1 reflection_term_slgn-+l reflection_radius=0.5 spin-0 mkgfn pi cpgfn pzl psl p i psl dlrectcg pi l.Oe-10 (8308.23 cpu seconds) This figure shows ^(equator) and 69 = ^(north pole) - ^(equator), both as functions of s = 1 — a/r. The former shows the general radial trend of 9, while the latter is a measure of the deviation of 9 from spherical symmetry. 193 RSP test series PlO.PAR;5 10-NOV-1985 22:46 Page 1 title-"Single Blaok Hole (P-10)" N_black_hole-l grid-"rs20" black_hole-l rho-0 z-0 mass-1 surrounding_patch_flag-1 momentum-10 reflection_term_sign-+l reflection_radius=0.5 spin-0 mkgfn plO cpgfn pi psi plO psi directcg plO l.Oe-10 (11212.95 cpu seconds) This figure shows ^(equator) and 69 = \t(north pole) - ^(equator), both as functions of s = 1 — a/r. The former shows the general radial trend of 9, while the latter is a measure of the deviation of 9 from spherical symmetry. RSP test series PlOO.PAR;5 10-NOV-1985 22:46 Page 1 title-"Single Black Hole (P-100)" N_black_hole-l grid-"rs20" black_hole-l rho-0 z-0 mass-1 surrounding_patch_flag-1 momentum-100 refleotlon_term_sign-+l reflection_radius=0.5 spln-0 mkgfn plOO cpgfn plO psi plOO psi directcg plOO l.Oe-10 (10257.00 cpu seconds) 196 Figure 42 - RSP teat series, plOO quantitative results 0 0 . 2 0 . 4 0 . 6 0 . 8 1 S = 1 - A / R OJ o a i 1 1 L_ i I • 0 . 2 0 . 4 0 . 6 0 . 8 1 S = 1 - A / R This figure shows ©(equator) and 5© = ©(north pole) - ©(equator), both as functions of a = 1 - a/r. The former shows the general radial trend of ©, while the latter is a measure of the deviation of © from spherical symmetry. RSP test series RS20.PAT;5 10-NOV-1983 22:46 Page ; One black hole patoh system with: ; - Reflection Symmetric inner boundary conditions ; - Delta r / r approximately 20-25 at inner boundary of each patch ; - A l l patches polar spherical ; - A l l patches using independent terms differencing ; - A l l patches using omega for oonformal function ; - Outer boundary at r - 1000 N_patch-10 ; Now describe each coordinate patch: patch-1 coord_type-"polar spherical" difference_scheme-"Independent terms" conformal_fn_type-"omega(psl)" rho_center-0 z_center-0 delta_r-0.02 delta_theta-5 r_min-"constant-0.50" bndry_cond-"Reflection Symmetric" r_max-"oonstant-0.98" bndry_cond-"patch-2" theta_min-"constant-0" bndry_cond-"Neumann" thet a_max-"const ant-90" bndry_oond-"Neumann" t patch-2 coord_type-"polar spherical" difference_scheme-"independent terms" conformal_fn_type-"omega(psl)" rho_center-0 z_center-0 delta_r-0.05 delta_theta-5 r_min-"constant-1.00" bndry_oond-"patoh-1" r_max-"constant-1.95" bndry_oond-"patch-3" theta_min-"constant-0" bndry_cond-"Neumann" theta_max-"const ant-90" bndry_oond-"Neumann" t patch-3 coord_type-"polar spherical" difference_scheme-"Independent terms" conformal_fn_type-"omega(psl)" rho_center-0 z_center-0 delta_r-0.1 delta_theta-5 r_min-"constant-2.0" bndry_cond-"patch-2" r_max-"constant-4.9" bndry_cond-"patch-4" theta_min-"constant-0" bndry_cond-"Neumann" theta_max-"constant-90" bndry_oond-"Neumann" * patch-4 coord_type-"polar spherical" difference_scheme-"Independent terms" conformal_fn_type-"omega(psi)" rho_center-0 z_center-0 delta_r-0.2 delta_theta-5 r_min-"const ant-5.0" bndry_cond-"pat ch-3" r_max-"oonstant-9.8" bndry_cond-"patch-5" thet'a_min-" oonst ant -0" bndry_oond-" Neumann" theta_max-"constant-90" bndry_cond-"Neumann" t patch-5 coord_type-"polar spherical" differenoe_scheme-"independent terms" 198 RSP test series RS20.PAT;5 10-N0V-1985 22:46 Page 2 conformal_fn_type-"omegaCpsl)" rho_center-0 z_center-0 delta_r-0.5 delta_theta-7.5 r_min-"const ant-10.0" bndry_cond-"patch-4" r_max-"oonstant-19.5" bndry_cond-"patch-6" theta_min-"constant-0" bndry_cond-"Neumann" theta_max-"constant-90" bndry_oond-"Neumann" t patch-6 coord_type-"polar spherical" dlfference_scheme-"Independent terms" conformal_fn_type-"omega(psi)" rho_oenter-0 z_center-0 d e l t a _ r - l delta_theta-7.5 r_min-"constant-20" bndry_cond-"patch-5" r_maz-"const ant-49" bndry_cond-"patch-7" theta_min-"constant-0" bndry_cond-"Neumann" theta_maz-"oonstant-90" bndry_oond-"Neumann" patch-7 coord_type-"polar spherical" difference_scheme-"independent terms" conformal_fn_type-"omega(psi)" rho_center-0 z_center-0 delta_r-2 delta_theta-7.5 r_min-"constant-50" bndry_cond-"patch=6" r_maz-"constant-98" bndry_oond-"patch-8" theta_min-"oonstant-0" bndry_cond-"Neumann" thet a_max-"const ant-90" bndry_cond-"Neumann" » patch-8 coord_type-"polar spherical" difference_scheme-"independent terms" conformal_fn_type-"omegaCpsi)" rho_center-0 z_center-0 delta_r-5 delta_theta=10 r_mln-"constant-100" bndry_cond-"patch-7" r_max-"constant-195" bndry_cond-"patch-9" theta_mln-"constant-0" bndry_cond-"Neumann" theta_max-"oonstant-90" bndry_cond-"Neumann" patch-9 coord_type-"polar spherioal" difference_scheme-"independent terms" conformal_fn_type-"omega(psi)" rho_center-0 z_center-0 delta_r-10 delta_theta-10 r_mln-"constant-200" bndry_oond-"patch-8" r_mar-"constant-490" bndry_cond-"patch-10" theta_min-"constant-0" bndry_oond-"Neumann" theta_max-"oonstant-90" bndry_cond-"Neumann" * patch-10 coord_type-"polar spherical" difference_scheme-"independent terms" conformal_fn_type-"omegaCpsi)" rho_center-0 z_center-0 delta_r-20 delta_theta-10 r_min-"constant-500" bndry_cond-"patoh-9" r_max-"const ant-1000" bndry_cond-"Robin" theta_min-"oonstant-0" bndry_oond-"Neumann" 199 RSP test series RS20.PAT;5 10-N0V-1985 22:46 Page 3 theta_max-"constant-90" bndry_cond>"Neumann" 200 RSM test series P0.PAR;13 10-NOV-1985 22:42 Page 1 tltle-"Slngle Blaok Hole (P-O)" N_black_hole-l grid-"rs20" » black_hole-l rho-0 z-0 mass-1 surroundlng_patch_flag-1 momentum-0 reflection_term_slgn—1 reflection_radius-0.5 spin-0 mkgfn pO dlrectog pO 1.0e-10 201 Table 23 - RSM test series, pO selected ¥ values Patch Number 2 2 2 2 2 2 2 2 3 3 3 3 3 3 3 3 4 4 4 4 4 4 4 4 5 5 5 5 5 5 5 5 i - J P s i 25 0 2 .000000 25 6 2 .000000 25 12 2 .000000 25 18 2 .000000 49 0 1 .510204 49 6 1 .510204 49 12 1 .510204 49 18 1 .510204 20 0 1 .500000 20 6 1 .500000 20 12 1 .500000 20 18 1 .500000 39 0 1 .256410 39 6 1 .256410 39 12 1 .256410 39 18 1 .256410 20 0 1 .250000 20 6 1 .250000 20 12 1 .250000 20 18 1 .250000 49 0 1 .102041 49 6 1 .102041 49 12 1 .102041 49 18 1 .102041 25 0 1 .100000 25 6 1 .100000 25 12 1 .100000 25 18 1 .100000 49 0 1 .051020 49 6 1 .051020 49 12 1 .051020 49 18 1 .051020 20 0 1 .050000 20 4 • 1 .050000 20 8 1 .050000 20 12 1 .050000 39 0 1 .025641 39 4 1 .025641 39 8 1 .025641 39 12 1 .025641 rho t h e t a 0.5000 0.5000 0.5000 0.5000 0.9800 0.9800 0.9800 0.9800 1.0000 1.0000 1.0000 1.0000 9500 9500 9500 9500 0000 2.0000 2.0000 2.0000 4. 4. 4. 4. 9000 9000 9000 9000 5.0000 5.0000 5.0000 5.0000 9.8000 9.8000 9.8000 9.8000 10.0000 10.0000 10.0000 10.0000 19.5000 19.5000 19.5000 19.5000 0 .0 .0 .0 .0 .0 .0 0 0 0 0 ,0 0 ,0 ,0 ,0 0, 30, 60. 90. 0. 30. 60. 90. 0. 30, 60, 90, 0, 30, 60, 90, 0.0 30.0 60.0 90.0 0.0 30, 60, 90, 0, 30, 60.0 90.0 0.0 30.0 60.0 90.0 0. 30. 60. 90. 0. 30. 60, 0 0 ,0 0 0 ,0 ,0 ,0 ,0 ,0 ,0 ,0 90.0 This table gives values of 9 at selected points in the space. These points are identified by triples (patch number,»*,;'), where are the generic integer patch coordinates defined in the text. Depending on the patch type, either (p, z) or (r, 0) are also shown. 202 RSM test series PX01.PAP.;9 10-NOV-1985 82:42 Page 1 title-"Single Black Hole (P-O.Ol)" N_black_nole-l grid-"rs20" f black_hole-l rho-0 z-0 mass-1 surrounding_patch_flag-l momentum-O.01 reflection_term_slgn—1 reflectioh_radius=0.5 spln-0 mkgfn pxOl directcg pxOl l.Oe-10 (4310.60 cpu seconds) Figure 43 - RSM test series, pxOl quantitative results 203 This figure shows ©(equator) and t5© = ©(north pole) - ©(equator), both as functions of s = 1 — a/r. The former shows the general radial trend of ©, while the latter is a measure of the deviation of © from spherical symmetry. 204 RSM test series PX1.PAR;6 10-NOV-1985 22:42 Page 1 title-"Single Black Hole (P-0.1)" N_black_hole-l grid-"rs20" » black_hole-l rho-0 z-0 mass-1 surrounding_patch_flag-1 momentum-0.1 reflection_term_sign—1 reflection_radius-0.5 spln-0 mkgfn pzl cpgfn pzOl psi pzl psi dlrectcg pzl l.Oe-10 (4164.68 cpu seconds) 205 Figure 44 - RSM test series, pzl quantitative results This figure shows ©(equator) and t5© = ©(north pole) - ©(equator), both as functions of s = 1 — a/r. The former shows the general radial trend of ©, while the latter is a measure of the deviation of © from spherical symmetry. 206 RSM test series PI.PAR;3 10-KOV-198S 22:42 Page 1 title-"Single Black Hole (P-l ) " N_black_hole-l grld-"rs20" i black_hole-l rho-0 z-0 mass-1 surrounding_patch_flag-1 momentum-1 reflectlon_term_slgn—1 reflection_radius-0.5 spin-0 mkgfn pi cpgfn pxl psi pi psi dlrectcg pi 1.0e-10 (7422.40 cpu seconds) Figure 45 - RSM test series, p i quantitative results 207 This figure shows ©(equator) and tS© = ©(north pole) — ©(equator), both as functions of s = 1 — a/r. The former shows the general radial trend of ©, while the latter is a measure of the deviation of © from spherical symmetry. 208 RSM test series PlO.PAR;5 10-NOV-1985 22:42 Page 1 title-"Single Black Hole (P-10)" N_black_hole-l grid-"rs20" i black_hole-l rho-0 z-0 mass-1 surrounding_patch_flag-l momentum-10 reflectlon_term_sign—1 reflection_radius-0.5 spin-0 mkgfn plO cpgfn pi psi plO psi dlrectcg plO 1.0e-10 (11970.08 cpu seconds) 209 Figure 40 - RSM test series, plO quantitative results ° 0 0 . 2 0 . 4 0 . 6 0 . 8 1 S = 1 - A / R This figure shows ^(equator) and 69 = (north pole) - ^(equator), both as functions of s = 1 — a/r. The former shows the general radial trend of 9, while the latter is a measure of the deviation of 9 from spherical symmetry. 210 RSM test series P100.PAR;S 10-NOV-198S 22:42 Page 1 title-"Single Black Hole (P-100)" N_black_hole-l grid-",rs20" t black_hole-l rho-0 z-0 mass-1 surroundlng_patch_flag-1 momentum-100 ref leotion_term_sign—1 refleotion_radius-0.5 spin-0 mkgfn plOO cpgfn plO psi plOO psi directcg plOO l.Oe-10 (10439.14 cpu seconds) This figure shows ^ (equator) and 69 = ¥(north pole) - ^ (equator), both as functions of s = 1 — a/r. The former shows the general radial trend of 9, while the latter is a measure of the deviation of 9 from spherical symmetry. 212 RSM test series RS20.PAT;5 10-NOV-1985 22:42 Page 1 One black bole patch system with: - Reflection Symmetric inner boundary conditions - Delta r / r approximately 20-25 at inner boundary of each patch - A l l patches polar spherical - A l l patches using independent terms differencing - A l l patches using omega for oonformal function - Outer boundary at r - 1000 N_patch-10 Now describe each coordinate patch: patch-1 coord_type-"polar spherical" difference_scheme-"independent terms" conformal_fn_type-"omega(psi)" rho_center-0 z_center-0 delta_r-0.02 delta_theta-5 r_min-"constant-0.50" bndry_oond-"Reflection Symmetric" r_max-"oonstant-0.98" bndry_oond-"patch-2" thet a_mln-"constant-0" bndry_cond-"Neumann" theta_max-"oonstant-90" bndry_cond-"Neumann" patch-2 coord_type-"polar spherical" difference_scheme-"Independent conformal_fn_type-"omega(psi)" rho_center-0 z_center-0 r_mln-"constant-1.00" r_max-"constant-l.95" thet a_min-"constant-0" theta_max-"oonstant-90" i patch-3 coord_type-"polar spherical" difference_scheme-"independent conformal_fn_type-"omega(psi)" rho_oenter-0 z_center-0 r_min-"constant-2.0" r_max-"const ant-4.9" theta_min-"oonstant-0" theta_max-"constant-90" * patch-4 coord_type-"polar spherioal" difference_6Cheme-"independent conformal_fn_type-"omega(psl)" rho_center-0 z_oenter-0 r_mln-"constant-5.0" r_max-"const ant-9.8" theta_mln-"constant-0" theta_max-"constant-90" terms" delta_r-0.05 delta_theta-5 bndry_cond-"patch-1" bndry_cond-"pat ch-3" bndry_cond-"Neumann" bndry_cond-"Neumann" terms" delta_r-0.1 bndry_cond' bndry_cond' bndry_cond' delta_theta-5 'patch-2" •patch-4" 'Neumann" bndry_oond-"Neumann" terms" delta_r-0.2 delta_theta-5 bndry_oond-"patch-3" bndry_cond-"patoh-5" bndry_cond-"Neumann" bndry_oond-"Neumann" patoh-5 coord_type-"polar spherioal" difference_soheme-"independent terms" 213 RSM test series RS20.PAT;5 10-N0V-1985 22:42 Page 2 conformal_fn_type-"omega(psi)" rho_center-0 z_center-0 delta_r-O.S delta_theta-7.5 r_min-"oonstant-10.0" bndry_cond-"patch-4" r_max-"constant-19.8" bndry_cond-"patch-6" theta_mln-"oonstant-0" bndry_cond-"Neumann" theta_max-"oonstant-90" bndry_oond-"Neumann" » patch-6 coord_type-"polar spherical" dlfference_scheme-"Independent terms" conformal_fn_type-"omega(psi)" rho_center-0 z_center-0 d e l t a _ r - l delta_theta-7.5 r_min-"const ant-20" bndry_cond-"patch-5" r_max-"constant-49" bndry_cond-"patch-7" theta_min-"constant-0" bndry_cond-"Neumann" theta_max-"constant-90" bndry_cond-"Neumann" » patch-7 coord_type-"polar spherical" difference_scheme-"independent terms" conformal_fn_type-"omega(psl)" rho_center-0 z_center-0 delta_r-2 delta_theta-7.5 r_min-"constant-50" bndry_oond-"patch-6" r_max-"constant-98" bndry_cond-"patch-8" theta_mln-"oonstant-0" bndry_oond-"Neumann" theta_max-"oonstant-90" bndry_cond-"Neumann" t patch-8 coord_type-"polar spherical" difference_scheme-"independent terms" conformal_fn_type-"omega(psi)" rho_center-0 z_center-0 delta_r-5 delta_theta=10 r_min-"oonst ant-100" bndry_cond-"pat ch-7" r_max-"constant-195" bndry_cond-"patch-9" thet a_min-"constant-0" bndry_oond-"Neumann" theta_max-"oonstant-90" bndry_oond-"Neumann" » patch-9 ooord_type-"polar spherical" difference_scheme-"independent terms" conformal_fn_type-"omega(psi)" rho_center-0 z_center-0 delta_r-10 delta_theta-10 r_min-"constant-200" bndry_oond-"patch-8" r_max-"oonst ant-490" bndry_oond-"pat ch-10" theta_min-"oonstant-0" bndry_cond-"Neumann" theta_max-"oonst ant-90" bndry_oond-"Neumann" t patch-10 coord_type-"polar spherical" difference_scheme-"independent terms" conformal_fn_type-"omega(psi)" rho_center-0 z_center-0 delta_r-20 delta_theta-10 r_min-"const ant-500" bndry_cond-"pat ch-9" r_max-"constant-1000" bndry_oond-"Robin" thet a_mln-"oonst ant-0" bndry_cond-"Neumann" RSM test series RS20.PAT;5 10-N0V-1985 22:42 Page 3 theta_max-"oonstant-90" bndry_oond-"Neumann" MTO test series P0.PAR;9 10-NOV-1985 22:35 Page 1 title-"Single Black Hole (P-O)' N_black_nole-l grid-"mt20big" black_hole-l rho=0 mass-1 momentum-0 spin-0 z-0 surr ounding_patch_flag-1 reflection_term_sign-0 mkgfn pO directcg pO l.Oe-10 reflection_radius-0.5 216 Table 24 - MTO test series, pO selected 9 values P a t c h Number 2 2 2 2 2 2 2 2 2 2 3 3 3 3 3 3 3 3 3 3 4 4 4 4 4 4 4 4 4 4 5 5 5 5 5 i J P s l 25 0 2 000000 25 9 2 000000 25 18 2 000000 25 27 2 .000000 25 36 2 .000000 49 0 1 .510204 49 9 1 .510204 49 18 1 .510204 49 27 1 .510204 49 36 1 .510204 20 0 1 .500000 20 9 1 .500000 20 18 1 .500000 20 27 1 .500000 20 36 1 .500000 39 0 1 .256410 39 9 1 .256410 39 18 1 .256410 39 27 1 .256410 39 36 1 .256410 20 0 1 .250000 20 9 1 .250000 20 18 1 .250000 20 27 1 .250000 20 36 1 .250000 49 0 1 .102041 49 9 1 .102041 49 18 1 .102041 49 27 1 .102041 49 36 1 .102041 25 0 1 .100000 25 9 1 .100000 25 18 1 .100000 25 27 1 .100000 25 36 1 .100000 49 0 1 .051020 49 9 1 .051020 49 18 1 .051020 49 27 1 .051020 49 36 1 .051020 20 0 1 .050000 20 6 1 .050000 20 12 1 .050000 20 18 1 .050000 20 24 1 .050000 r h o 0.5000 0.5000 0.5000 0.5000 0.5000 0.9800 0.9800 0.9800 9800 9800 0000 0000 0000 ,0000 ,0000 ,9500 ,9500 ,9500 ,9500 ,9500 ,0000 ,0000 ,0000 ,0000 .0000 4.9000 4.9000 4.9000 4.9000 4.9000 5.0000 5.0000 5.0000 5.0000 5.0000 9.8000 9.8000 9.8000 9.8000 9.8000 10.0000 10.0000 10.0000 10.0000 10.0000 0. 0. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 2. 2. 2. 2. 2. .0 ,0 .0 ,0 .0 .0 ,0 ,0 ,0 t h e t a 0.0 45.0 90.0 135.0 180.0 0.0 45.0 90.0 135.0 180. 0, 45 90 135, 180, 0, 45. 90. 135.0 180.0 0.0 45.0 90.0 135 180 0 45 90 135 180 0.0 45.0 90.0 135.0 180.0 0.0 45.0 90.0 135.0 180.0 0.0 45.0 90.0 135.0 180.0 .0 0 ,0 ,0 ,0 ,0 ,0 This table gives values of 9 at selected points in the space. These points are identified by triples (patch number,*,;'), where (», ; ) are the generic integer patch coordinates defined in the text. Depending on the patch type, either (p,z) or (r,0) are also shown. MTO test series PX01.PAR;6 10-NOV-1985 22:35 Page 1 t i t l e - " S i n g l e Black Hole (P-O.Ol)' N_black_hole-l f b l a c k _ h o l e - l rho-0 mass-1 momentum-0.01 spin-0 grid-"mt20big" z-0 surrounding_patch_flag-l r e f l e c t l o n _ t e r m _ s i g n - 0 mkgfn pxOl d i r e c t c g pxOl 1.0e-10 r e f l e c t i o n _ r a d i u s - 0 . 5 (28784.57 opu seoonds) Figure 48 — MTO test series, pxOl quantitative results 218 • 0 . 2 0 . 4 0 . 6 0 . 8 1 S = 1 - A / R This figure shows ©(equator) and 69 = ©(north pole) - ©(equator), both as functions of s = 1 - a/r. The former shows the general radial trend of ©, while the latter is a measure of the deviation of © from spherical symmetry. 219 MTO test series PX1.PAR;4 10-NOV-1985 22:35 Page 1 title-"Single Black Hole (P-O.l)" N_black_hole-l » black_hole-l rho-0 mass-1 momentum-O.1 spin-0 grid-"mt20big" z-0 surrounding_patch_flag-1 refleotion_term_sign-0 mkgfn pzl cpgfn pzOl psi pzl psi directcg pzl l.Oe-10 reflection_radlus=0.5 (36840.61 cpu seconds) 220 Figure 40 — MTO test series, pzl quantitative resnlts S = 1 - A / R S = 1 - A / R This figure shows ©(equator) and t5© = ©(north pole) - ©(equator), both as functions of s = 1 - a/r. The former shows the general radial trend of ©, while the latter is a measure of the deviation of © from spherical symmetry. 221 MTO test series PI.PAR;3 10-NOV-1985 22:35 Page 1 title-"Single Black Hole (P-l)" N_black_hole-l grld-"mt20big" black_hole-l rho-0 z-0 mass-1 surrounding_patch_flag-1 momentum-1 reflection_term_sign-0 reflectlon_radius=0.5 spin-0 mkgfn pi cpgfn pzl psi p i psi directcg pi l.Oe-10 (41402.16 cpu seconds) 222 This figure shows ©(equator) and t5© = ©(north pole) - ©(equator), both as functions of s = 1 — a/r. The former shows the general radial trend of ©, while the latter is a measure of the deviation of © from spherical symmetry. 223 MTO test series P10.PAR;3 10-NOV-1985 22:35 Page 1 t i t l e - " S l n g l e Black Hole (P-10)' N_black_hole-l b l a c k _ h o l e - l rho=0 mass-1 momentum-10 spin-0 grld-"mt20blg" 2-0 surrounding_patcn_flag-l r e f l e c t i o n _ t e r m _ s i g n - 0 mkgfn plO cpgfn p i p s i plO p s i d i r e c t c g plO l.Oe-10 reflection_radius=0.5 (47072.84 cpu seconds) Figure 51 - MTO test series, plO quantitative results 224 This figure shows ©(equator) and t5© = ©(north pole) - ©(equator), both as functions of s = 1 - a/r. The former shows the general radial trend of ©, while the latter is a measure of the deviation of © from spherical symmetry. MTO test series PlOO.PAR;3 10-NOV-1985 28:35 Page 1 t i t l e - " S i n g l e Black Hole (P-lOO)" N_black_hole-l grld-"mt80big" b l a c k _ h o l e - l rho-0 z-0 mass-1 surrounding_patch_flag-l momentum-100 re f l e c t i o n _ t e r m _ s i g n - 0 r e f l e c t i o n _ r a d i u s = 0 . 5 spin-0 mkgfn plOO cpgfn plO p s i plOO p s i d i r e c t c g plOO l.Oe-10 (46894.18 cpu seconds) 226 Figure 52 - MTO test series, plOO quantitative results • 0 . 2 0 . 4 0 . 6 0 . 8 1 S = 1 - A / R This figure shows ©(equator) and c5© = ©(north pole) - ©(equator), both as functions of s = 1 — a/r. The former shows the general radial trend of ©, while the latter is a measure of the deviation of © from spherical symmetry. MTO test series MT20BIG.PAT;4 10-N0V-1985 22:35 Page One black hole patch system with: - Marginally Trapped inner boundary conditions - Delta r / r approximately 20-25 at inner boundary of each patch - A l l patohes polar spherical - A l l patches using independent terms differenoing - A l l patches using omega for conformal function - Outer boundary at r - 1000 N_patch-10 Now describe each coordinate patch: patch-1 coord_type-"polar spherical" difference_soheme-"Independent terms" conformal_fn_type-"omega(psi) rho_center-0 z_center-0 r_min-"oonstant-0.50" r_max-"constant-0.98" theta_mln-"constant-0" theta_max-"constant-180" delta_r-0.02 delta_theta-5 bndry_cond-"Marginally Trapped" bndry_cond-"patch-2" bndry_cond-"Neumann" bndry_cond-"Neumann" patch-2 coord_type-"polar spherical" difference_scheme-"Independent terms" conformal_fn_type-"omega(psi)" rho_center-0 z_center-0 r_min-"constant-l.00" r_max-"constant-1.95" theta_mln-"constant-0" theta_max-"oonstant-180" delta_r-0.05 delta_theta-5 bndry_cond-"patch-1" bndry_cond-"patoh-3" bndry_cond-"Neumann" bndry_cond-"Neumann" patch-3 coord_type-"polar spherical" difference_scheme-"independent terms" conformal_fn_type-"omega(psi) rho_center-0 z_center-0 r_mln-"constant-2.0" r_max-"oonst ant-4.9" theta_min-"constant-0" theta_max-"constant-180" delta_r-0.1 delta_theta-5 bndry_oond-"patch-2" bndry_cond-"patoh-4" bndry_cond-"Neumann" bndry_cond-"Neumann" patch-4 coord_type-"polar spherical" difference_scheme-"independent terms conformal_fn_type-"omega(psl)" rho_center-0 z_center-0 r_min-"oonstant-5.0" r_max-"oonst ant-9.8" theta_min-"constant-0" theta_max-"constant-180" delta_r-0.2 delta_theta-5 bndry_cond-"patoh-3" bndry_oond-"patch-5" bndry_cond-"Neumann" bndry_cond-"Neumann" patch-5 coord_type-"polar spherical" difference_soheme-"independent terms" 228 MTO test series MT20BIG.PAT;4 10-NOV-1985 22:35 Page 2 conformal_fn_type-"omegaCpsi)" rho_center-0 z_center-0 delta_r-0.5 delta_theta-7.5 r_min-"constant-10.0" bndry_cond-"patch-4" r_max-"constant-19.5" bndry_cond-"patch-6" theta_mln-"constant-0" bndry_cond-"Neumann" theta_max-"constant-180" bndry_oond-"Neumann" patch-6 coord_type-"polar spherical" difference_scheme-"independent terms" conformal_fn_type-"omegaCpsi)" rho_center-0 z_center-0 de l t a _ r - l delta_theta=7.5 r_min-"constant-20" bndry_cond-"patch-5" r_max-"oonstant-49" bndry_cond-"patch-7" theta_min-"oonstant-0" bndry_cond-"Neumann" theta_maz-"oonstant-180" bndry_oond-"Neumann" * patch-7 coord_type-"polar spherioal" difference_scheme-"Independent terms" conformal_fn_type-"omegaCpsi)" rho_center-0 z_center-0 delta_r-2 delta_theta-7.5 r_min-"constant-50" bndry_cond-"patch-6" r_max-"constant-98" bndry_cond-"patch-8" theta_min-"constant-0" bndry_cond-"Neumann" thet a_max-"constant-180" bndry_cond-"Neumann" > patch-8 coord_type-"polar spherical" difference_scheme-"independent terms" conformal_fn_type-"omegaCpsi)" rho_center-0 z_oenter-0 delta_r-5 delta_theta-10 r_mln-"const ant-100" bndry_cond-"pat ch-7" r_max-"const ant-195" bndry_cond-"patch-9" theta_min-"constant-0" bndry_oond-"Neumann" thet a_max-"constant-180" bndry_oond-"Neumann" » patch-9 coord_type-"polar spherical" difference_scheme-"Independent terms" conformal_fn_type-"omegaCpsi)" rho_center-0 z_center-0 delta_r-10 delta_theta-10 r_min-"constant-200" bndry_oond-"patoh-8" r_max-"constant-490" bndry_cond-"patch-10" theta_min-"const ant-0" bndry_cond-"Neumann" theta_mar-"oonstant-180" bndry_cond-"Neumann" t patch-10 coord_type-"polar spherioal" difference_scheme-"independent conformal_fn_type-"omegaCpsi)" rho_center-0 z_center-0 r_min-"oonstant-500" r_max-"oonstant-1000" theta_min-"constant-0" terms" delta_r-20 delta_theta-10 bndry_oond-"patch-9" bndry_cond-"Robin" bndry_oond-"Neumann" 229 MTO test series MT20BIG.PAT;4 10-NOV-1985 22:35 Page 3 thet a_max-"oonstant-180" bndry_oond-"Neumann" 230 PP test series MlOO.PAR;1 18-OCT-198S 07:22 Page 1 title-"Two Receding Black Holes (P-100)' N_black_hole-2 I black_hole-l rho-0 mass-1 momentum-+100 spin-0 black_hole-2 rho-0 mass-1 momentum—100 spln-0 grid-"ml" Z-+1.8 surrounding_patch_flag-+l refleotion_term_sign-0 z—1.5 surrounding_patch_flag—1 reflection_term_sign-0 mkgfn mlOO cpgfn mlO psi mlOO psi dlrectcg mlOO l.Oe-10 reflection_radius-0.5 reflection_radius-0.5 (63406.59 cpu seconds) ! 231 Table 25 — PP test series, mlOO selected 9 values Number 1- 0 P s l rho z r t h e t a 1 25 0 6.006155 0.5000 0.0 1 25 9 5.889163 0.5000 45.0 1 25 18 5.630431 0.5000 90.0 1 25 27 5.426208 0.5000 135.0 1 25 36 5.366942 0.5000 180.0 1 49 0 4.240542 0.9800 0.0 1 49 9 4.202186 0.9800 45.0 1 49 18 4.184557 0.9800 90.0 1 49 27 4.325007 0.9800 135.0 1 49 36 4.472483 0.9800 180.0 2 20 0 4.203141 1.0000 0.0 2 20 18 4.151684 1.0000 90.0 2 20 36 4.454380 1.0000 180.0 2 21 0 4.115249 1.0500 0.0 2 21 18 4.074012 1.0500 90.0 2 21 36 4.413143 1.0500 180.0 3 0 0 4.251956 0.00 0. 00 3 20 0 3.857759 1.00 0. 00 3 40 0 3.264515 2.00 0. 00 3 60 0 2.830528 3.00 0. 00 3 20 20 4.065191 1.00 1. 00 3 40 20 3.253724 2.00 1. 00 3 60 20 2.807309 3.00 1. 00 4 20 40 3.960098 1.00 2. 00 4 40 40 3.143068 2.00 2. 00 4 0 60 3.559160 0.00 3. 00 4 20 60 3.300082 1.00 3. 00 5 35 0 3.190235 3.5000 0.0 5 35 10 2.990383 3.5000 30.0 5 35 20 2.745623 3.5000 60.0 5 35 30 2.667309 3.5000 90.0 5 49 0 2.623991 4.9000 0.0 5 49 10 2.525446 4.9000 30.0 5 49 20 2.382282 4.9000 60.0 5 49 30 2.332927 4.9000 90.0 6 25 0 2.596496 5.0000 0.0 6 25 9 2.423789 5.0000 45.0 6 25 18 2.314035 5.0000 90.0 6 49 0 1.897579 9.8000 0.0 6 49 9 1.829939 9.8000 45.0 6 49 18 1.783860 9.8000 90.0 This table gives values of 9 at selected points in the space. These points are identified by triples (patch number, t , ; ) , where (t*,j) are the generic integer patch coordinates defined in the text. Depending on the patch type, either (p,z) or (r,0) are also shown. 232 PP tes t series M10.PAR;3 18-OCT-1985 07=22 Page 1 title-"Two Receding Black Holes (P-10)" N_black_hole-2 > black_hole-l rho-0 mass-1 momentum-+10 spin-0 » black_hole-2 rho-0 mass-1 momentum—10 spin-0 grid-"ml" Z-+1.5 surrounding_patch_f lag—1-1 reflection_term_sign=0 z—1.8 surroundlng_patch_f l a g — 1 reflection_term_slgn-0 reflection_radius-0.5 reflection_radius=0.5 mkgfn mlO cpgfn ml psi mlO psi directcg mlO l.Oe-10 (53590.01 cpu seconds) 233 Table 2 6 — PP test series, mlO selected © values Number 1 J P s i rho z r t h e t a ! 25 0 3.511156 0.5000 0.0 1 25 9 3.456947 0.5000 45.0 1 25 18 3.338895 0.5000 90.0 1 25 27 3.249710 0.5000 135.0 1 25 36 3.226276 0.5000 180.0 1 49 0 2.503289 0.9800 0.0 1 49 9 2.490086 0.9800 45.0 1 49 18 2.491959 0.9800 90.0 1 49 27 2.568467 0.9800 135.0 1 49 36 2.646260 0.9800 180.0 2 20 0 2.482042 1.0000 0.0 2 20 18 2.473143 1.0000 90.0 2 20 36 2.635094 1.0000 180.0 2 21 0 2.432203 1.0500 0.0 2 21 18 2.428829 1.0500 90.0 2 21 36 2.609735 1.0500 180.0 3 0 0 2.511518 0.00 0.00 3 20 0 2.296484 1.00 0.00 3 40 0 1.981559 2.00 0.00 3 60 0 1.760077 3.00 0.00 3 20 20 2.422029 1.00 1.00 3 40 20 1.977030 2.00 1.00 3 60 20 1.747980 3.00 1.00 4 20 40 2.359027 1.00 2.00 4 40 40 1.916064 2.00 2.00 4 0 60 2.120753 0.00 3.00 4 20 60 1.985254 1.00 3.00 5 35 0 1.920234 3.5000 0.0 5 35 10 1.827226 3.5000 30.0 5 35 20 1.715477 3.5000 60.0 5 35 30 1.679407 3.5000 90.0 5 49 0 1.629380 4.9000 0.0 5 49 10 1.592270 4.9000 30.0 5 49 20 1.538970 4.9000 60.0 5 49 30 1.519926 4.9000 90.0 6 25 0 1.615920 5.0000 0.0 6 25 9 1.552232 5.0000 45.0 6 25 18 1.511187 5.0000 90.0 6 49 0 1.304326 9.8000 0.0 6 49 9 1.290242 9.8000 45.0 6 49 18 1.280085 9.8000 90.0 This table gives values of © at selected points in the space. These points are identified by triples (patch number,!,;), where are the generic integer patch coordinates defined in the text. Depending on the patch type, either (/>, z) or (r, 6) are also shown. 234 PP test series M1.PAR;2 18-0CT-1985 07:22 Page 1 title-"Two Receding Black Holes (P-l)' N_black_hole-2 black_hole-l rho-0 mass-1 momentum—rl spin-0 black_hole-2 rho-0 mass-1 momentum—1 spln-0 grid-"ml" Z-+1.5 surrounding_pat ch_flag—r 1 refleotion_term_sign-0 z—1.5 surrounding_patch_flag—1 reflection_term_sign-0 reflection_radius-0.5 reflection_radius=0.5 mkgfn ml cpgfn mzl psi ml psi dlrectcg ml l.Oe-10 (47018.38 cpu seconds) 235 Table 27 - PP test series, ml selected ¥ values Number 1 J P s i rho z r t h e t a 1 25 0 2.476853 0.5000 0.0 1 25 9 2.470882 0.5000 45.0 1 25 18 2.464894 0.5000 90.0 1 25 27 2.477059 0.5000 135.0 1 25 36 2.490642 0.5000 180.0 1 49 0 1.821982 0.9800 0.0 1 49 9 1.827481 0.9800 45.0 1 49 18 1.852638 0.9800 90.0 1 49 27 1.911104 0.9800 135.0 1 49 36 1.961148 0.9800 180.0 2 20 0 1.808130 1.0000 0.0 2 20 18 1.839552 1.0000 90.0 2 20 36 1.951830 1.0000 180.0 2 21 0 1.775717 1.0500 0.0 2 21 18 1.808897 1.0500 90.0 2 21 36 1.930789 1.0500 180.0 3 0 0 1.850764 0.00 0.00 3 20 0 1.710494 1.00 0.00 3 40 0 1.515366 2.00 0.00 3 60 0 1.385855 3.00 0.00 3 20 20 1.806741 1.00 1.00 3 40 20 1.513728 2.00 1.00 3 60 20 1.378632 3.00 1.00 4 20 40 1.750647 1.00 2.00 4 40 40 1.473670 2.00 2.00 4 0 60 1.577118 0.00 3.00 4 20 60 1.500688 1.00 3.00 5 35 0 1.455685 3.5000 0.0 5 35 10 1.412833 3.5000 30.0 5 35 20 1.358943 3.5000 60.0 5 35 30 1.340448 3.5000 90.0 5 49 0 1.294193 4.9000 0.0 5 49 10 1.281592 4.9000 30.0 5 49 20 1.261733 4.9000 60.0 5 49 30 1.253732 4.9000 90.0 6 25 0 1.287189 5.0000 0.0 6 25 9 1.265370 5.0000 45.0 6 25 18 1.249105 5.0000 90.0 6 49 0 1.136699 9.8000 0.0 6 49 9 1.133951 9.8000 45.0 6 49 18 1.131489 9.8000 90.0 This table gives values of 9 at selected points in the space. These points are identified by triples (patch number, i,j), where (»,j) are the generic integer patch coordinates defined in the text. Depending on the patch type, either (p,z) or (r, 8) are also shown. PP test series MX1.PAR;2 18-0CT-1983 07:22 Page 1 title-"Two Receding Black Holes (P-O.l)' N_black_hole-2 i black_hole-l rho-0 mass-1 momentum-+0.1 spin-0 f black_hole-2 rbo-0 mass-1 momentum—0.1 spin-0 grid-"ml" Z-+1.5 surr ounding_pat ch_flag-+1 reflection_term_slgn-0 z—1.5 surrounding_patch_flag—1 reflection_term_sign-0 mkgfn mzl cpgfn mzOl psi mzl psi dlreotcg mxl l.Oe-10 reflection_radius-0.5 reflection_radius=0.5 (68193.69 cpu seconds) 237 Table 28 - PP test series, mil selected © values Number i J P s i rho z r t h e t a I 25 0 2.356239 0.5000 0.0 1 25 9 2.367343 0.5000 45.0 1 25 18 2.401762 0.5000 90.0 1 25 27 2.452931 0.5000 135.0 1 25 36 2.482240 0.5000 180.0 1 49 0 1.761109 0.9800 0.0 1 49 9 1.771717 0.9800 45.0 1 49 18 1.807236 0.9800 90;0 1 49 27 1.872953 0.9800 135.0 1 49 36 1.924833 0.9800 180.0 2 20 0 1.748296 1.0000 0.0 2 20 18 1.794592 1.0000 90.0 2 20 36 1.915251 1.0000 180.0 2 21 0 1.718290 1.0500 0.0 2 21 18 1.764988 1.0500 90.0 2 21 36 1.893645 1.0500 180.0 3 0 0 1.811867 0.00 0. 00 3 20 0 1.673609 1.00 0. 00 3 40 0 1.464595 2.00 0. 00 3 60 0 1.360992 3.00 0. 00 3 20 20 1.767419 1.00 1. 00 3 40 20 1.482569 2.00 1. 00 3 60 20 1.353941 3.00 1. 00 4 20 40 1.703457 1.00 2. 00 4 40 40 1.442725 2.00 2. 00 4 0 60 1.533857 0.00 3. 00 4 20 60 1.464282 1.00 3. 00 5 35 0 1.420980 3.5000 0.0 5 35 10 1.383382 3.5000 30.0 5 35 20 1.334922 3.5000 60.0 5 35 30 1.317976 3.5000 90.0 5 49 0 1.271404 4.9000 0.0 5 49 10 1.260719 4.9000 30.0 5 49 20 1.243413 4.9000 60.0 5 49 30 1.236270 4.9000 90.0 6 25 0 1.264936 5.0000 0.0 6 25 9 1.246307 5.0000 45.0 6 25 18 1.231928 5.0000 90.0 6 49 0 1.126269 9.8000 0.0 6 49 9 1.124065 9.8000 45.0 6 49 18 1.122008 9.8000 90.0 This table gives values of © at selected points in the space. These points are identified by triples (patch number, t , j ) , where are the generic integer patch coordinates defined in the text. Depending on the patch type, either (p, z) or (r, 6) are also shown. PP test series MXOl.PAR;! 18-OCT-1985 07:22 Page 1 title-"Two Receding Black Holes (P-0.01)" N_black_hole-2 t black_hole-l rho-0 mass-1 momentum—1-0.01 spin-0 I black_hole-2 rho-0 mass-1 momentum—0.01 spin-0 grid-"ml* Z-+1.5 surr oundlng_pat ch_flag-+1 refleotlon_term_sign-0 z—1.5 surrounding_patch_flag-reflection_term_sign-0 mkgfn mzOl cpgfn 0 psi mzOl psi directcg mxOl l.Oe-10 reflection_radius-0.5 reflection_radius-0.5 (35585.18 cpu seconds) 239 Table 29 - PP test series, mxOl selected \P values Number 1 J P s i rho z r t h e t a I 25 0 2.348612 0.5000 0.0 1 25 9 2.361687 0,5000 45.0 1 25 18 2.400759 0.5000 90.0 1 25 27 2.456440 0.5000 135.0 1 25 36 2.487596 0.5000 180.0 1 49- 0 1.758715 0.9800 0.0 1 49 9 1.769840 0.9800 45.0 1 49 18 1.806580 0.9800 90,0 1 49 27 1.873518 0.9800 135.0 1 49 36 1.925954 0.9800 180.0 2 20 0 1.745978 1.0000 0.0 2 20 18 1.793944 1.0000 90.0 2 20 36 1.916320 1.0000 180.0 2 21 0 1.716144 1.0500 0.0 2 21 18 1.764359 1.0500 90.0 2 21 36 1.894600 1.0500 180.0 3 0 0 1.812425 0.00 0. 00 3 20 0 1.673693 1.00 0. 00 3 40 0 1.484351 2.00 0. 00 3 60 0 1.360696 3.00 0. 00 3 20 20 1.767408 1.00 1. 00 3 40 20 1.482236 2.00 1. 00 3 60 20 1.353621 3.00 1. 00 4 20 40 1.702260 1.00 2. 00 4 40 40 1.442211 2.00 2. 00 4 0 60 1.532598 0.00 3. 00 4 20 60 1.463397 1.00 3. 00 5 35 0 1.420130 3.5000 0.0 5 35 10 1.382791 3.5000 30.0 5 35 20 1.334570 3.5000 60.0 5 35 30 1.317686 3.5000 90.0 5 49 0 1.270959 4.9000 0.0 5 49 10 1.260343 4.9000 30.0 5 49 20 1.243130 4.9000 60.0 5 49 30 1.236019 4.9000 90.0 6 25 0 1.264505 5.0000 0.0 6 25 9 1.245990 5.0000 45.0 6 25 18 1.231680 5.0000 90.0 6 49 0 1.126096 9.8000 0.0 6 49 9 1.123906 9.8000 45.0 6 49 18 1.121861 9.8000 90.0 / This table gives values of 9 at selected points in the space. These points are identified by triples (patch number,t,;), where (», ; ) are the generic integer patch coordinates defined in the text. Depending on the patch type, either (p,z) or (r, 0) are also shown. 240 PP test series 0.PAR;13 18-OCT-1985 07:22 Page 1 title-"Two S t a t i o n a r y Black Holes" N_black_hole-2 t b l a c k _ h o l e - l rho-0 mass-1 momentum-0 spin-0 black_hole-2 rho-0 mass-1 momentum-0 spin-0 grid-"ml" Z-+1.8 surrounding_patoh_flag—H refleotion_term_sign-0 z—1.5 surrounding_patch_flag—1 r e f l e c t i o n _ t e r m _ s i g n - 0 mkgfn 0 direotog 0 1.0e-10 r e f l e c t i o n _ r a d l u s - 0 . 5 r e f l e c t i o n _ r a d i u s = 0 . 5 (44591.88 cpu seconds) V 241 Table 30 - FP test series, 0 selected © values Number i J P s i rho z r t h e t a 1 25 0 2.347831 0.5000 0.0 1 25 9 2.361127 0.5000 45.0 1 25 18 2.400718 0.5000 90.0 1 25 27 2.456905 0.5000 135.0 1 25 36 2.488268 0.5000 180.0 1 49 0 1.758501 0.9800 0.0 1 49 9 1.769682 0.9800 45.0 1 49 18 1.806559 0.9800 90.0 1 49 27 1.873638 0.9800 135.0 1 49 36 1.926140 0.9800 180.0 2 20 0 1.745772 1.0000 0.0 2 20 18 1.793923 1.0000 90.0 2 20 36 1.916500 1.0000 180.0 2 21 0 1.715956 1.0500 0.0 2 21 18 1.764340 1.0500 90.0 2 21 36 1.894766 1.0500 180.0 3 0 0 1.812545 0.00 0. 00 3 20 0 1.673752 1.00 0. 00 3 40 0 1.484362 2.00 0. 00 3 60 0 1.360692 3.00 0. 00 3 20 20 1.767458 1.00 1. 00 3 40 20 1.482237 2.00 1. 00 3 60 20 1.353614 3.00 1. 00 4 20 40 1.702174 1.00 2. 00 • 4 40 40 1.442188 2.00 2. 00 4 0 60 1.532500 0.00 3. 00 4 20 60 1.463336 1.00 3. 00 5 35 0 1.420071 3.5000 0.0 5 35 10 1.382757 3.5000 30.0 5 35 20 1.334559 3.5000 60.0 5 35 30 1.317680 3.5000 90.0 5 49 0 1.270934 4.9000 0.0 5 49 10 1.260324 4.9000 30.0 5 49 20 1.243120 4.9000 60.0 5 49 30 1.236012 4.9000 90.0 6 25 0 1.264481 5.0000 0.0 6 25 9 1.245976 5.0000 45.0 6 25 18 1.231672 5.0000 90.0 6 49 0 1.126088 9.8000 0.0 6 49 9 1.123900 9.8000 45.0 6 49 18 1.121856 9.8000 90.0 This table gives values of © at selected points in the space. These points are identified by triples (patch number,*',;), where (»',j) are the generic integer patch coordinates defined in the text. Depending on the patch type, either {p,z) or (r,0) are also shown. 242 PP test series PX01.PAR;4 18-OCT-1985 07:28 Page 1 title-"Two Approaching Black Holes (P-0.01)' N_black_hole-2 black_hole-l rho-0 mass-1 momentum—0.01 spln-0 • black_hole-2 rho-0 mass-1 momentum—1-0.01 spln-0 grld-"ml" Z-+1.5 surrounding_patch_flag — r 1 reflectlon_term_slgn-0 z—1.5 surr ounding_patch_f l a g — 1 reflection_term_slgn=0 mkgfn pzOl cpgfn 0 psi pzOl psi directcg pzOl l.Oe-10 reflectlon_radlus-0.5 reflection_radius-0.5 (35406.68 cpu seconds) 243 Table 31 - PP test series, pxOl selected 9 values Number 1 J P s i rho z r t h e t a I 25 0 2.347064 0.5000 0.0 1 25 9 2.360580 0.5000 45.0 1 25 18 2.400692 0.5000 90.0 1 25 27 2.457385 0.5000 135.0 1 25 36 2.488955 0.5000 180.0 1 49 0 1.758297 0.9800 0.0 1 49 9 1.769535 0.9800 45.0 1 49 18 1.806549 0.9800 90.0 1 49 27 1.873769 0.9800 135.0 1 49 36 •1.926339 0.9800 180.0 2 20 0 1.745576 1.0000 0.0 2 20 18 1.793913 1.0000 90.0 2 20 36 1.916693 1.0000 180.0 2 21 0 1.715777 1.0500 0.0 2 21 18 1.764330 1.0500 90.0 2 21 36 1.894945 1.0500 180.0 3 0 0 1.812677 0.00 0. 00 3 20 0 1.673821 1.00 0. 00 3 40 0 1.484380 2.00 0. 00 3 60 0 1.360694 3.00 0. 00 3 20 20 1.767519 1.00 1. 00 3 40 20 1.482244 2.00 1. 00 3 60 20 1.353613 3.00 1. 00 4 20 40 1.702099 1.00 2. 00 4 40 40 1.442173 2.00 2. 00 4 0 60 1.532411 0.00 3. 00 4 20 60 1.463283 1.00 3. 00 5 35 0 1.420020 3.5000 0.0 5 35 10 1.382730 3.5000 30.0 5 35 20 1.334552 3.5000 60.0 5 35 30 1.317679 3.5000 90.0 5 49 0 1.270914 4.9000 0.0 5 49 10 1.260310 4.9000 30.0 5 49 20 1.243113 4.9000 60.0 5 49 30 1.236008 4.9000 90.0 6 25 0 1.264462 5.0000 0.0 6 25 9 1.245966 5.0000 45.0 6 25 18 1.231668 5.0000 90.0 6 49 0 1.126083 9.8000 0.0 6 49 9 1.123895 9.8000 45.0 6 49 18 ,1.121852 9.8000 90.0 This table gives values of 9 at selected points in the space. These points are identified by triples (patch number, where (»,/) are the generic integer patch coordinates defined in the text. Depending on the patch type, either (p, z) or (r, 6) are also shown. PP test series PX1.PAR;3 18-OCT-1985 07:28 Page 1 t i t l e - " T w o Approaching B l a c k Holes ( P - O . l ) ' N_blaok_hole-2 > b l a c k _ h o l e - l rho-0 mass-1 momentum—0.1 spin-0 t black_hole-2 rho-0 mass-1 momentum—1-0.1 spin-0 g r i d - " m l " Z-+1.5 su r r o u n d l n g _ p a t c h _ f l a g — t - i r e f l e c t l o n _ t e r m _ s i g n - 0 z—1.8 surrounding_patch_f l a g — 1 r e f l e c t i o n _ t e r m _ s l g n - 0 mkgfn p z l cpgfn pzOl p s i p z l p s i d i r e c t c g p z l l.Oe-10 r e f l e c t i o n _ r a d i u s - 0 . 5 r e f l e o t l o n _ r a d i u s - 0 . 5 (48170.14 cpu seconds) 245 Table 32 - PP test series, pzl selected © values Number 1 0 P s i rho z r t h e t a 1 25 0 2.340766 0.5000 0.0 1 25 9 2.356280 0.5000 45.0 1 25 18 2.401102 0.5000 90.0 1 25 27 2.462366 0.5000 135.0 1 25 36 2.495811 0.5000 180.0 1 49 0 1.756930 0.9800 0.0 1 49 9 1.768673 0.9800 45.0 1 49 18 1.806924 0.9800 90.0 1 49 27 1.875466 0.9800 135.0 1 49 36 1.928674 0.9800 180.0 2 20 0 1.744276 1.0000 0.0 2 20 18 1.794287 1.0000 90.0 2 20 36 1.918971 1.0000 180.0 2 21 0 1.714628 1.0500 0.0 2 21 18 1.764700 1.0500 90.0 2 21 36 1.897096 1.0500 180.0 3 0 0 1.814382 0.00 0.00 3 20 0 1.674888 1.00 0.00 3 40 0 1.484881 2.00 0.00 3 60 0 1.360975 3.00 0.00 3 20 20 1.768532 1.00 1.00 3 40 20 1.482647 2.00 1.00 3 60 20 1.353860 3.00 1.00 4 20 40 1.701852 1.00 2.00 4 40 40 1.442344 2.00 2.00 4 0 60 1.531987 0.00 3.00 4 20 60 1.463140 1.00 3.00 5 35 0 1.419875 3.5000 0.0 5 35 10 1.382767 3.5000 30.0 5 35 20 1.334743 3.5000 60.0 5 35 30 1.317905 3.5000 90.0 5 49 0 1.270956 4.9000 0.0 5 49 10 1.260388 4.9000 30.0 5 49 20 1.243240 4.9000 60.0 5 49 30 1.236151 4.9000 90.0 6 25 0 1.264508 5.0000 0.0 6 25 9 1.246070 5.0000 45.0 6 25 18 1.231808 5.0000 90.0 6 49 0 1.126139 9.8000 0.0 6 49 9 1.123956 9.8000 45.0 6 49 18 1.121917 9.8000 90.0 This table gives values of © at selected points in the space. These points are identified by triples (patch number,*.',;), where are the generic integer patch coordinates defined in the text. Depending on the patch type, either (p, z) or (r, 6) are also shown. 246 PP test series PI.PAR;3 18-OCT-198S 07:22 Page 1 tltle-"Tvo Approaching Blaok Holes (P-l)' N_black_hole-2 black_hole-l rho-0 mass-1 momentum—1 spin-0 » black_hole-2 rho-0 mass-1 momentum—1-1 spin-0 grid-"ml" Z-+1.S surrounding_patch_flag—H refleotion_term_sign-0 z—1.8 surroundlng_patch_f l a g — 1 refleotion_term_sign-0 mkgfn pi cpgfn pzl psi p i psi directcg pi l.Oe-10 reflection_radius-0.S reflection_radius-0.5 (38466.47 cpu seconds) 247 Table 33 - PP test series, pi selected $ values Number i 0 P s i rho z r t h e t a 1 25 0 2.334259 0.5000 0.0 1 25 9 2.369034 0.5000 45.0 1 25 18 2.459010 0.5000 90.0 1 25 27 2.564154 0.5000 135.0 1 25 36 2.615783 0.5000 180.0 1 49 0 1.784179 0.9800 0.0 1 49 9 1.799919 0.9800 45.0 1 49 18 1.849937 0.9800 90.0 1 49 27 1.934115 0.9800 135.0 1 49 36 1.996160 0.9800 180.0 2 20 0 1.771787 1.0000 0.0 2 20 18 1.836919 1.0000 90.0 2 20 36 1.985722 1.0000 180.0 2 21 0 1.742668 1.0500 0.0 2 21 18 1.806419 1.0500 90.0 2 21 36 1.962210 1.0500 180.0 3 0 0 1.873554 0.00 0.00 3 20 0 1.722127 1.00 0.00 3 40 0 1.518051 2.00 0.00 3 60 0 1.385800 3.00 0.00 3 20 20 1.816994 1.00 1.00 3 40 20 1.514541 2.00 1.00 3 60 20 1.377993 3.00 1.00 4 20 40 1.736197 1.00 2.00 4 40 40 1.470350 2.00 2.00 4 0 60 1.560439 0.00 3.00 4 20 60 1.490559 1.00 3.00 5 35 0 1.445917 3.5000 0.0 5 35 10 1.407431 3.5000 30.0 5 35 20 1.357425 3.5000 60.0 5 35 30 1.339889 3.5000 90.0 5 49 0 1.290289 4.9000 0.0 5 49 10 1.278718 4.9000 30.0 5 49 20 1.260251 4.9000 60.0 5 49 30 1.252731 4.9000 90.0 6 25 0 1.283461 5.0000 0.0 6 25 9 1.263329 5.0000 45.0 6 25 18 1.248098 5.0000 90.0 6 49 0 1.135581 9.8000 0.0 6 49 9 1.133012 9.8000 45.0 6 49 18 1.130708 9.8000 90.0 This table gives values of 9 at selected points in the space. These points are identified by triples (patch number,!, j), where are the generic integer patch coordinates defined in the text. Depending on the patch type, either (p,z) or (r, 9) are also shown. PP test series PlO.PAR;3 13-OCT-1985 07:22 Page 1 tltle-"Two Approaching Black Holes (P-10)" N_black_hole-2 » black_hole-l rho-0 mass-1 momentum—10 spln-0 • black_hole-2 rho-0 mass-1 momentum-+10 spin-0 grld-"ml" Z-+1.5 surroundlng_patch_flag—r l refleotlon_term_sign-0 z—1.5 surrounding_patch_flag—1 reflection_term_sign-0 mkgfn plO cpgfn pi psi plO psi direotcg plO l.Oe-10 reflectlon_radlus-0.5 reflectlon_radius=0.5 (67574.98 opu seoonds) 249 Table 34 - PP test series, plO selected © values Number i . J P s i rho z r t h e t a I 25 0 2.965542 0.5000 0.0 1 25 9 3.069733 0.5000 45.0 1 25 18 3.321834 0.5000 90.0 1 25 27 3.587860 0.5000 135.0 1 25 36 3.708586 0.5000 180.0 1 49 0 2.377784 0.9800 0.0 1 49 9 2.398004 0.9800 45.0 1 49 18 2.486178 0.9800 90.0 1 49 27 2.652415 0.9800 135.0 1 49 36 2.770211 0.9800 180.0 2 20 0 2.362016 1.0000 0.0 2 20 18 2.467595 1.0000 90.0 2 20 36 2.754718 1.0000 180.0 2 21 0 2.324464 1.0500 0.0 2 21 18 2.423815 1.0500 90.0 2 21 36 2.719835 1.0500 180.0 3 0 0 2.588565 0.00 0.00 3 20 0 2.336737 1.00 0.00 3 40 0 1.992679 2.00 0.00 3 60 0 1.762283 3.00 0.00 3 20 20 2.460842 1.00 1.00 3 40 20 1.982404 2.00 1.00 3 60 20 1.748400 3.00 1.00 4 20 40 2.312972 1.00 2.00 4 40 40 1.908432 2.00 2.00 4 0 60 2.071845 0.00 3.00 4 20 60 1.957137 1.00 3.00 5 35 0 1.694204 3.5000 0.0 5 35 10 1.813647 3.5000 30.0 5 35 20 1.713200 3.5000 60.0 5 35 30 1.679913 3.5000 90.0 5 49 0 1.620723 4.9000 0.0 5 49 10 1.586126 4.9000 30.0 5 49 20 1.536458 4.9000 60.0 5 49 30 1.518728 4.9000 90.0 6 25 0 1.607733 5.0000 0.0 6 25 9 1.548220 5.0000 45.0 6 25 18 1.509946 5.0000 90.0 6 49 0 1.302333 9.8000 0.0 6 49 9 1.288613 9.8000 45.0 6 49 18 1.278820 9.8000 90.0 This table gives values of © at selected points in the space. These points are identified by triples (patch number,*,;), where (»,;) are the generic integer patch coordinates defined in the text. Depending on the patch type, either (p,z) or ( r , 0 ) are also shown. PP test series PlOO.PAR;1 18-OCT-1985 07:22 Page 1 tltle-"Two Approaohlng Black Holes (P-100)' N_black_hole-2 bl a c k _ h o l e - l rho-0 mass-1 momentum—100 spin-0 black_hole-2 rho-0 mass-1 momentum—f 100 spin-0 grid-"ml' Z-+1.5 surrounding_patch_flag—H reflection_term_sign=0 z—1.5 surrounding_patch_flag—1 reflection_term_sign=0 mkgfn plOO cpgfn plO p s i plOO p s i d i r e c t c g plOO 1.0e-10 refl e c t i o n _ r a d i u s = 0 . 5 r e f l e c t i o n _ r a d i u s - 0 . 5 (66746.36 cpu seconds) 2 5 1 Table 35 - PP test series, plOO selected 9 values Number i J P s l rho z r t h e t a 1 25 0 4.901730 0.5000 0.0 1 25 9 5.106945 0.5000 45.0 1 25 18 5.600149 0.5000 90.0 1 25 27 6.115628 0.5000 135.0 1 25 36 6.347410 0.5000 180.0 1 49 0 4.004863 0.9800 0.0 1 49 9 4.028501 0.9800 45.0 1 49 18 4.176307 0.9800 90.0 1 49 27 4.489573 0.9800 135.0 1 49 36 4.712551 0.9800 180.0 2 20 0 3.978409 1.0000 0.0 2 20 18 4.143881 1.0000 90.0 2 20 36 4.685657 1.0000 180.0 2 21 0 3.915004 1.0500 0.0 2 21 18 4.067229 1.0500 90.0 2 21 36 4.625083 1.0500 180.0 3 0 0 4.397018 0.00 0.00 3 20 0 3.933659 1.00 0.00 3 40 0 3.286599 2.00 0.00 3 60 0 2.836516 3.00 0.00 3 20 20 4.142018 1.00 1.00 3 40 20 3.265734 2.00 1.00 3 60 20 2.810220 3.00 1.00 4 20 40 3.875294 1.00 2.00 4 40 40 3.131921 2.00 2.00 4 0 60 3.474133 0.00 3.00 4 20 60 3.253143 1.00 3.00 5 35 0 3.148182 3.5000 0.0 5 35 10 2.969486 3.5000 30.0 5 35 20 2.743901 3.5000 60.0 5 35 30 2.670249 3.5000 90.0 5 49 0 2.612543 4.9000 0.0 5 49 10 2.517660 4.9000 30.0 5 49 20 2.380019 4.9000 60.0 5 49 30 2.332729 4.9000 90.0 6 25 0 2.585816 5.0000 0.0 6 25 9 2.419215 5.0000 45.0 6 25 18 2.313751 5.0000 90.0 6 49 0 1.895961 9.8000 0.0 6 49 9 1.828647 9.8000 45.0 6 49 18 1.782991 9.8000 90.0 This table gives values of 9 at selected points in the space. These points are identified by triples (patch number,t,;), where (»,;') are the generic integer patch coordinates defined in the text. Depending on the patch type, either (p,z) or (r, 6) are also shown. PP test series Ml.PAT;4 18-0CT-1988 07:29 Page 1 ; Two black hole patoh system with: ; - Mirror image symmetry about equator ; - Mar g i n a l l y Trapped inner boundary co n d i t i o n s ; - D e l t a r / r approximately 20-25 at inner boundary ; - A l l patches using independent terms d i f f e r e n c i n g ; - A l l patches using omega f o r oonformal f u n c t i o n ; - Outer boundary at r - 1000 N_patch-12 ; Now describe each coordinate patch: patch-1 coord_type-"polar s p h e r i c a l " difference_scheme-"Independent terms" conformal_fn_type-"omega(psi)" rho_center-0 z_center-1.5 delta_r-0.02 delta_theta-5 r_min-"constant-0.50" bndry_cond-"Marginally Trapped" r_max-"constant-0.98" bndry_cond-"patch-2" theta_min-"const ant-0" bndry_cond-"Neumann" theta_max-"const ant-180" bndry_cond-"Neumann" patch-2 coord_type-"polar s p h e r i c a l " difference_scheme-"independent terms" conformal_fn_type-"omega(psl)" rho_oenter-0 z_center-1.5 delta_r-0.05 delta_theta-5 r_mln-"constant-l.00" bndry_cond-"patch-l" r_max-"constant-l.05" bndry_cond-"patch-3" r_max-"oonstant-l.05" bndry_cond-"patch-4" thet a_min-"const ant-0" bndry_cond-"Neumann" theta_max-"constant-180" bndry_oond-"Neumann" * patch-3 c o o r d _ t y p e - " c y l i n d r i c a l " ; lower one difference_scheme-"independent terms" conformal_fn_type-"omega(psi)" rho_center-0 z_center-0 delta_rho-0.05 delta_z-0.05 rho_min_bound-0.00 rho_max_bound-3.50 z_min_bound-0.00 z_max_bound-l.45 rho_min-"patch-2 bndry-r_max" rho_min-"constant-0.00" bndry_cond-"Neumann" rho_max-"patch-5 bndry-r_min" z_mln-"constant-0.00" bndry_oond-"Neumann" z_max-"patch-2 bndry-r_max" z_max-"patch-5 bndry-r_mln" z_max-"oonstant-l.45" bndry_cond-"patch-4" t patch-4 c p o r d _ t y p e - " c y l i n d r i c a l " ; upper one difference_scheme-"independent terms" conformal_fn_type-"omega(psi)" rho_oenter-0 z_center-0 delta_rho-0.05 delta_z-0.05 rho_min_bound-0.00 rho_max_bound-3.50 z min bound-1.30 z max bound-3.50 PP test series M1.PAT;4 18-0CT-1985 07:29 Page 2 rho_mln-"patch-2 bndry-r_max" rho_min-"const ant-0.00" rho_max-"patoh-5 bndry-r_min" z_min-"patch-2 bndry-r_max" z_min-"oonstant-1.50" z_max-"patch-5 bndry-r_min" patch-5 coord_type-"polar s p h e r i c a l " difference_scheme-"independent oonformal_fn_type-"omega(psi)" rho_center-0 z_center-0 r_min-"constant-3.5" r_mln-"oonstant-3.5" r_max-"constant-4.9" theta_min-"constant-0" theta_max-"constant-90" , bndry_oond-"Neumann" bndry_oond-"patoh-3" terms" delta_r-0.1 d e l t a _ t h e t a -bndry_cond-"patch-3" bndry_cond-"patch-4" bndry_cond-"patch-6" bndry_cond-"Neumann" bndry_cond-"Neumann" patch-6 coord_type-"polar s p h e r i o a l " difference_scheme-"independent terms" oonformal_fn_type-"omega(psl) rho_center=0 z_oenter-0 r_mln-"const ant-5.0" r_max-"constant-9.8" theta_min-"constant-0" theta_max-"constant-90" delta_r-0.2 delta_theta-5 bndry_cond-"patch-5" bndry_cond-"patoh-7" bndry_oond-"Neumann" bndry_oond-"Neumann" patch-7 coord_type-"polar s p h e r i o a l " difference_scheme-"Independent terms" conformal_fn_type-"omega(psi) rho_center-0 z_oenter-0 r_mln-"constant-10.0" r_max-"oonstant-19.5" theta_mln-"constant-0" theta_maz-"constant-90" delta_r-0.5 delta_theta-5 bndry_oond-"pat oh-6" bndry_cond-"patch-8" bndry_cond-"Neumann" bndry_cond-"Neumann" patoh-8 coord_type-"polar s p h e r i c a l " difference_scheme-"independent terms oonformal_fn_type-"omega(psi)" rho_center-0 z_center-0 r_min-"constant-20" r_max-"oonst ant-49" theta_mln-"oonstant-0" theta_max-"oonstant-90" d e l t a _ r - l delta_theta-7.5 bndry_oond-"pat ch-7" bndry_cond-"patoh-9" bndry_cond-"Neumann" bndry_cond-"Neumann" patch-9 ooord_type-"polar s p h e r i o a l " difference_scheme-"independent terms oonformal_fn_type-"omega(psi) rho_oenter-0 z_center-0 r_min-"const ant-50" r_max-"oonst ant-98" d e l t a _ r - 2 delta_theta-7.5 bndry_oond-"patch-8" bndry_oond-"pat oh-10" 254 PP test series Ml.FAT;4 18-0CT-1985 07:29 Page 3 theta_min-theta_max- "oonstant-0" "oonstant-90" patch-10 coord_type-"polar spherical" difference_soheme-"independent conformal_fn_type-"omegaCpsl)" rho_center-0 z_center-0 r_min-"constant-100" r_max-"oonstant-195" theta_min-"oonstant-0" theta_max-"oonstant-90" f patoh-11 coord_type-"polar spherical" difference_scheme-"independent conformal_fn_type-"omegaCpsi)" rho_center-0 z_center-0 r_min-"constant-200" r_max-"const ant-490" theta_min-"constant-0" theta_max-"constant-90" t patoh-12 coord_type-"polar spherical" difference_scheme-"independent conformal_fn_type-"omegaCpsi)" rho_center-0 z_oenter-0 r_min-"constant-500" r_max-"const ant-1000" theta_min-"constant-0" theta_max-"constant-90" bndry_cond-bndry_oond-terms" delta_r-5 bndry_cond-bndry_cond-bndry_oond-bndry_cond-terms" delta_r-10 bndry_oond-bndry_oond-bndry_cond-bndry_cond-terms" delta_r-20 bndry_cond-bndry_cond-bndry_cond-bndry_cond-"Neumann" "Neumann" delta_theta-7.5 'patch-9" * p a t o h - l l " 'Neumann" "Neumann" delta_theta-10 "patch-10" "patch-12" "Neumann" "Neumann" delta_theta-10 " patch-11" "Robin" "Neumann" "Neumann" 255 Appendix 2 This appendix contains the source listings of the numerical GR code described in this thesis. The bulk of the code is written in the C programming language (Kernighan and Ritchie (1978)). The "ILUCG* sparse matrix subroutine package used to solve the linearized algebraic equations is written in FORTRAN. There is one short assembler routine, used to support the passing of variable numbers of arguments to C functions. The code is written for (and runs on) a VAX/750 with floating point accelera-tor, running the VMS operating system, version 3.2. Double precision arithmetic is used throughout, giving about 17 decimal digits (56 bits) of precision in floating point quantities. The time for a floating point add/multiply pair is about 20 microseconds. The C dialect used extends the Kernighan and Ritchie standard in only one sig-nificant way—enumerated data types are allowed, with semantics similar to those of (for example) PASCAL. The author uses a number of private "language extensions", via the header file "utilrstdc.h" . The most significant of these are the definition of "new" data types void and boolean, and the definition of a then keyword for use in the C if -else statement. Most of the source files begin with a list of the external objects (functions and variables) they contain. Those items preceded by a single asterisk are "public" (visible outside the file), while those preceded by a double asterisk are declared as static and hence have scope limited to the file. The code resides in 4 distinct directories, which have been given "logical names" so files in them may be easily referred to from other subdirectories. The syntax of such a reference is that the logical name precedes the filename, separated by a colon. The 256 Table 36 Directories where the code resides Logical Name main fortran patchutil u t i l Contents Routines to set up and solve equation (21) "ILUCG" Sparse Matrix package Patch utility routines General purpose utility routines directories and their contents are listed in table 36. The next 4 pages give indices to the listings for each of these directories, giving the page numbers on which each file's listing starts. The listings themselves follow. Within each directory, header files are listed first, then "normal" source code files. Within these groupings, the files are ordered alphabetically. In general, the name of an executable program is the same as that of the file holding it's main function. The sole exception to this is the executable program directcg, derived from the main function in the file direct. c, both in the main directory (the name comes from "DIRECT solver via Conjugate Gradient method"). The reader wishing a general understanding of how the code works is advised to start by reading the header files in the patchutil directory, especially patch.h. After this, the mkgf n. c and direct. c files, together with the functions they call, are probably the next place to look. The directcg executable program derived from direct. c was used to obtain all the model solutions in this thesis. 257 Table 37 — File index for the main directory solve.h 261 conformal.c 262 cpgfn.c 265 curvature, c 267 direct, c 273 dopsor.c 277 dumpgrd.c 279 extrap.c 280 info.c 283 jacobian. c 286 mkgfn.c 292 mkgrd.c 297 monopole. c 298 physics, c 302 psor.c 308 setextrap.c 311 solve, c .' 314 solvecg.c 319 258 Table 38 — F i l e index for the f o r t ran directory mydilucg.for 329 mysilucg.for 339 259 Table 39 - File index for the patchutil directory blackhole.h 349 cvt.h • • . , 350 inout.h 351 patch, h 352 tempbndry.h 356 allocgfna.c 357 binaryio.c 358 coord, c 362 cvt.c 365 dump.c 371 inout.c 377 inputpar.c 379 inputpat.c 382 ipartest.c 384 ipattest.c 385 ngridpts.c 386 parlog.c 387 readpat.c 388 setbndry.c 398 setpatch.c 4 0 5 260 Table 40 - File index for the u t i l directory bandmat.h 419 keyword, h 420 stdc.h 421 arrayio.c 422 bgecl.c 423 calltrail.mar 425 dumparray.c 427 errorexit.c 430 fixname.c 431 fuzz.c 432 keyword, c 435 miscfp.c 440 round, c 441 spline, c 442 time.c 447 261 main directory SOLVE.H;15 21-SEP-1985 19:16 Page 1 /• * This d e f i n e s the mapping from ( p . l . J ) Into equation number (note that the * range of the mapping i s from 0 to neqn-1): */ •define l n d e x ( p _ , i _ , J _ ) (plj_mapping[p_]Ci_] + ( J _ ) ) •define INDEX(p_,1_,J_) (lndex(p_,1_.J_) + 1) /* f o r FORTRAN */ extern l n t **plj_mapping; extern i n t neqn; extern f l o a t * f _ r h s , * f _ s o l u t i o n ; extern double *d_rhs, * d _ s o l u t l o n ; extern enum p r e c i s i o n { FLOAT, DOUBLE } mode; 262 main directory CONFORMAL.C;9 21-SEP-1985 19:18 Page 1 /* This f i l e contains conformal f u n c t i o n conversion r o u t i n e s . */ /* * The f o l l o w i n g f u n c t i o n s are a v a i l a b l e : * c v t _ p s i _ t o _ c f n - Converts p s i to conformal f u n c t i o n of a given patch * c v t _ c f n _ t o _ p s l - Converts conformal f u n c t i o n of a given patch back to p s i * cvt_psi_to_omega - (obviousI) * cvt_omega_to_psi - (obviousI) V •Include " u t l l : s t d c . h " •include "patchutil:patch.h" / » * * * * * » * * * * * * * * * * * * * * * * * * * * * * * « * * * * » * « * » « * * * * * * » * * * * * * * * * * * * * * * * » * * * * * » * « * * * * / /* * This f u n c t i o n converts ' p s i ' , the 'true' conformal f a c t o r , to the conformal * f u n c t i o n type used i n a given patch, * * Arguments: « p t r —> The coordinate patch d e s c r i p t o r f o r the conformal f u n c t i o n to be * converted. * p s l - The p s i value to be converted. * * The r e s u l t i n g conformal f u n c t i o n value i s returned as the f u n c t i o n value. »/ double c v t _ p s i _ t o _ c f n ( p t r , p s i ) r e g i s t e r s t r u c t coord_patch_dscr *ptr; double p s i ; { void e r r o r _ e x i t ( ) ; double cvt_psi_to_omega(); •define WHATSIT ptr->oonformal_fn_type switch (WHATSIT) { case PSI: r e t u r n ( p s i ) ; case OMEGA_OF_PSI: return(cvt_psi_to_omega(psi)); d e f a u l t : error_exlt(OK_EXIT, »••»•» c v t _ p s i _ t o _ c f n : unknown conformal f n type code %d\n", WHATSIT); /* DOES NOT RETURN */ } } / » * * « * * * * * » « * * » » * « » * » * * * * * » « * * » » * * « * » » » * » » * * « » » « * « » » » * * » * » * * » * * » * * * * » * * * * * * * * * / * This f u n c t i o n converts the conformal f u n c t i o n type used i n a given patch, * back to ' p s i ' , the 'true' conformal f a c t o r . * * Arguments: 263 main directory C0NF0RMAL.C;9 21-SEP-1985 19:18 Page 2 » p t r —> The coordinate patch d e s c r i p t o r f o r the conformal f u n c t i o n to be * converted. * ofn - The conformal f u n c t i o n value. * * The r e s u l t i n g p s i value i s returned as the f u n c t i o n value. */ double c v t _ c f n _ t o _ p s i ( p t r , cfn) r e g i s t e r s t r u c t coord_patch_dscr *ptr; double c f n ; { void e r r o r _ e x i t ( ) ; double cvt_omega_to_psi(); •define WHATSIT ptr->conformal_fn_type switch (WHATSIT) { case PSI: r e t u r n ( c f n ) ; case OMEGA_OF_PSI: return(cvt_omega_to_psl(cfn)); d e f a u l t : error_exlt(OK_EXIT, "»**** c v t _ c f n _ t o _ p s i : unknown conformal f n type code %d\n", WHATSIT); /* DOES NOT RETURN »/ } } / * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * t * * * * * * * * * * « * * * > « » * « / /* * This f u n c t i o n converts p s i to omega. * * Arguments: « p s i - The p s i value t o be oonverted. * * The r e s u l t i n g omega value i s returned as the f u n c t i o n value. V double cvt_psl_to_omega(psi) double p s i ; return(1.0 / ( p s i - 1.0)); } / s o * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * / /* * This f u n c t i o n converts omega to p s i . * * Arguments: * omega - The omega value to be converted. * * The r e s u l t i n g p s i value i s returned as the f u n c t i o n value. 264 main directory CONFORMAL.C;9 21-SEP-198S 19:18 Page 3 double cvt_omega_to_psi(omega) double omega; { return(1.0 + 1.0/omega); } main directory CPGFN.C;15 21-SEP-1985 19:18 Page 1 •include " u t i l : s t d c . h " •Include "patchutil:patch.h" •include " p a t c h u t l l : b l a c k h o l e . h " •include " p a t c h u t i l : c v t . h " main(argc,argv) /* cpgfn - copy g r i d functions from one model t o another */ i n t argc; char * argv t ] ; s t a t i c v o i d copy_gfn(); void e r r o r _ e x l t ( ) ; char *fixname(); void i n p u t _ p a t ( ) , input_output_grd(), input_output_gfn(), p a r _ l o g ( ) ; i n t cvt_grid_fn_name_to_offset(); s t r u c t g r i d _ d s c r sro_gd, dst_gd; str u c t bhs_dscr src_bhsd, dst_bhsd; char * s r o _ t i t l e , * d s t _ t i t l e ; char * s r c _ g r i d , * d s t _ g r i d ; i n t s r c _ o f f s e t , d s t _ o f f s e t ; /« decode argument l i s t : */ i f (argc I- 5) then error_exlt(OK_EXIT, "usage: %s src_model_name src_grid_fn_name dst_model_name dst_grid_fn_name\n", fixname(argv[0])); •define SRC_NAME a r g v [ l ] •define SRC_GFN_NAME argv[2] •define DST_NAME argv[3] •define DST_GFN_NAME argv[4] s r o _ o f f s e t - cvt_grid_fn_name_to_offset(SRC_GFN_NAME); i f ( s r c _ o f f s e t < 0) then error_exit(OK_EXIT, -»**** unknown or i l l e g a l g r i d f u n c t i o n name > r*s'\n", SRC_GFN_NAME); /* DOES NOT RETURN */ d s t _ o f f s e t - ovt_grld_fn_name_to_offset(DST_GFN_NAME); i f ( d s t _ o f f s e t < 0) then error_exit(OK_EXIT, -«**«* unknown or i l l e g a l g r i d f u n c t i o n name "*s'\n", DST_GFN_NAME); /« DOES NOT RETURN */ /* read both source and d e s t i n a t i o n arrays i n t o memory: */ input_par(SRC_NAME, 8 f s r o _ t i t l e , ffsrc_grld, 4fsrc_bhsd); input_output_grd(src_grld, "read", 8fsro_gd); input_output_gfn(SRC_NAME, "read", »src_gd); input_par(DST_NAMB, »dst_title, S d s t _ g r l d , «fdst_bhsd); input_output_grd(dst_grld, "read", «dst_gd); input.output_gfn(DST_NAME, "read", »dst_gd); /» update the in-memory copy of the d e s t i n a t i o n array •/• i f (strcmp(sro_grid, d s t _ g r i d ) I- 0) then error_exit(OK_EXIT, "««»•• copying between d i f f e r e n t g r i d s not yet supported — e x i t i n g *»***\n" ); /* DOES NOT RETURN */ 266 main directory CPGFN.C;15 21-SEP-1985 19:18 Page 2 copy_gfn(srsrc_gd, s r o _ o f f s e t . «fdst_gd, d s t _ o f f s e t ) ; /• copy data over */ /* write updated d e s t i n a t i o n array back out */ input_output_gfn(DST_NAME, "write". 0dst_gd); nar_log(DST_NAME, argo, argv, 0.0); /* * This f u n c t i o n copies a g r i d f u n c t i o n from one g r i d to another. The g r i d s * must have the same s t r u c t u r e (EZACTLYI). * * Arguments: * (src_pgd,dst_pgd) —> The source and d e s t i n a t i o n g r i d d e s c r i p t o r s . * ( s r o _ o f f s e t , d s t _ o f f s e t ) - The o f f s e t s , i n 'double's, of the source and * d e s t i n a t i o n g r i d f unctions i n a ' s t r u c t g r i d _ f n ' . V s t a t i c v o i d copy_gfn(sro_pgd, s r c _ o f f s e t , dst_pgd, d s t _ o f f s e t ) r e g i s t e r s t r u c t grld_dsor *src_pgd, *dst_pgd; i n t s r c _ o f f s e t , d s t _ o f f s e t ; { r e g i s t e r i n t p, 1, J ; double * s r c _ p t r , *dst_ptr; f o r (p - 1 ; p <- dst_pgd->N_patch ; ++p) { f o r ( i - dst_pgd->patch[p].i_min ; i <- dst_pgd->patchtp].i_max ; ++i) { f o r ( J - dst_pgd->patch[p].line_end[J_MIN][i].end_ij ; J <- dst_pgd->patchip].llne_end[J_MAX][i].end_ij ++J) { s r o _ p t r - (double *) GRID_FNS(»src_pgd->patch[p],i,J),• d s t _ p t r - (double *) GRID_FNS(8dst_pgd->patch[p],i,J); d s t _ p t r [ d s t _ o f f s e t ] - s r c _ p t r [ s r c _ o f f s e t ] ; } 267 main directory CURVATURE.C;41 21-SEP-1985 19:19 Page 1 /* This f i l e contains f u n c t i o n s t o oompute the e x t r l n s l o curvature tensor: */ I* * The f o l l o w i n g r o u t i n e s are oontained i n t h i s f i l e : ** momentum_K_hat_sub_iJ - oomputes K-hat-sub-iJ f o r a black hole with momentum ** spin_K_hat_sub_iJ - computes K-hat-sub-lJ f o r a black hole with s p i n * K_hat_sub_iJ - computes K-hat-sub-lJ ( t o t a l ) f o r a l l black holes * K_hat_sub_rr - oomputes K-hat-sub-r-r ( t o t a l ) i n polar s p h e r i c a l coords «/ •define DEBUG 0 •include " u t i l : s t d o . h " •include " p a t c h u t i l : b l a c k h o l e . h " •include "patchutil:patch.h" / » « » » » « » » » » » » » * * * * » » * * * * « * « * » « » » » « * * * * * * * * * * * » * » » » « « » » « » » » « » » * * » * « » » » * * * * » » » » » / This f u n c t i o n computes a l l non-vanishing e x t r i n s i c curvature components f o r a black hole with a given momentum (but no s p i n ) , i n a polar s p h e r i c a l coordinate system centered on that black hole. Arguments: momentum - The l i n e a r momentum of the black hole, assumed to be i n the ( p o s i t i v e ) z - d i r e c t i o n . r e f l e c t i o n _ t e r m _ s i g n - The s i g n (+1, 0, or -1) f o r the 2nd ( " r e f l e c t i o n symmetry") term i n the K l J ' s . r e f l e c t i o n _ r a d i u s - The radius 'a' ( u s u a l l y 1/2 the black hole mass) f o r the 2nd ( " r e f l e c t i o n symmetry") term i n the K i J ' s . This i s ignored i f ' r e f l e c t l o n _ t e r m _ s i g n ' (above) i s zero, (r,theta) - The coordinates of the point t o compute the K i J ' s a t. pK_r_r —> Where K-hat-sub-r-r w i l l be stored, or NULL to s k i p t h i s . pK_r_theta —> Where K-hat-sub-r-theta (same as K-hat-sub-theta-r) w i l l be stored, or NULL to skip t h i s . pK_theta_theta —> Where K-hat-sub-theta-theta w i l l be stored, or NULL to sk i p t h i s . pK_phi_phi —> Where (K-hat-sub-phi-phi / sin-squared-theta) w i l l be stored, or NULL t o s k i p t h i s . Note 1: The formulas are taken verbatum from Matt Choptuik's M.Sc. t h e s i s , p. 56. Note 2: The reason f o r the missing sin-squared-theta f a c t o r i s to keep everything f i n i t e and non-zero on the z-axis. >/ s t a t l o v o i d momentum_K_hat_sub_lJ ( momentum, r e f l e o t l o n _ t e r m _ s i g n , r e f l e o t i o n _ r a d l u s , r, theta, nK_r_r, pK_r_theta, pK_theta_theta, pK_phi_phi double momentum; i n t r e f l e o t i o n _ t e r m _ s l g n ; double r e f l e c t i o n _ r a d i u s ; main directory 268 CURVATURE.C;41 21-SEP-1985 19:19 Page 2 double r, theta; double *pK_r_r, *pK_r_theta. "pK_theta_theta, *pK_phl_phi; double s l n ( ) , oos(); double square(); double temp, fa c t o r _ p , faotor_m; temp - r e f l e c t i o n _ t e r m _ s i g n * s q u a r e C r e f l e c t l o n _ r a d i u s / r ) ; factor_p - 1.0 + temp; factor_m - 1.0 - temp; temp - 3.0 * momentum * c o s ( t h e t a ) ; i f (pK_r_r I- NULL) then *pK_r_r - f a c t o r _ p * (temp) / square(r); i f (pK_r_theta I- NULL) then *pK_r_theta - factor_m * (-3.0 * momentum * s i n ( t h e t a ) ) / (2.0 * r ) ; i f (pK_theta_theta I- NULL) then *pK_theta_theta - f a c t o r _ p * (-temp) / 2.0; i f (pK_phl_phl I- NULL) then *pK_phl_phi - f a c t o r _ p * (-temp) / 2.0; /* * Note missing f a c t o r of * sin-squared-thetaI I I */ } This f u n c t i o n computes the only non-vanishing e x t r i n s i c curvature component f o r a black hole with a given spi n (but no momentum), i n a p o l a r s p h e r i c a l coordinate system centered on that blaok hole. Arguments: spin - The angular momentum of the black hole, assumed to be i n the p o s i t i v e z - d i r e o t l o n . ( r , t h e t a ) - The coordinates of the point to compute at. pK_r_phi —> Where (K-hat-sub-r-phi / s i n - t h e t a ) w i l l be stored, or NULL to s k i p t h i s . Note 1: The formulas are taken verbatum from Matt Choptuik's M.Sc. t h e s i s , p. 57. (Note there are 2 m i s p r i n t s i n the top equation on t h i s page, as can be v e r i f i e d by checking against Matt's a c t u a l code on p. 237. This i s a l s o what i s needed to make the next equation, (3.27) come out c o r r e c t — i t ' s the one which Matt's oode a c t u a l l y uses.) Note 2: The reason f o r the missing s i n - t h e t a f a c t o r i s to keep things f i n i t e and non-zero on the z-axis. '/ s t a t i o v o i d s p i n _K_hat_sub_ij(spin, r, theta, pK_r_phi) double spin, r, theta; double *pK_r_phi; 269 main directory CURVATURE.C;41 21-SEP-1985 19:19 Page 3 double s i n ( ) ; double square(); i f (pK_r_phi I- NULL) then *pK_r_phi - -3.0 * s p i n * s i n ( t h e t a ) / square(r); /*********••*********************«>*«****«*»*****«**< ***********•*************> This f u n c t i o n computes a l l components of the e x t r i n s i c curvature tensor 'K-hat-sub-iJ' (summed over a l l black holes) i n the g l o b a l reference coordinate system ( c y l i n d r i c a l ) . Arguments: pbhsd —> The black hole system d e s c r i p t o r , (rho.z) - Where t o evaluate the tensor at. pK_rho_rho —> Where K-hat-sub-rho-rho i s to be stored, or NULL to skip t h i s . pK_rho_z —> Where K-hat-sub-rho-z i s to be stored, or NULL t o skip t h i s . pK_rho_phi —> Where (K-hat-sub-rho-phl / rho) i s to be stored, or NULL to skip t h i s . pK_z_z —> Where K-hat-sub-z-z i s to be stored, or NULL t o s k i p t h i s . pK_z_phi —> Where (K-hat-sub-z-phi / rho) i s to be stored, or NULL to skip t h i s . pK_phl_phi —> Where (K-hat-sub-phl-phl / (rho-squared) w i l l be stored, or NULL t o s k i p t h i s . Note: The reason f o r the e x t r a f a c t o r s of rho i s to keep everything f i n i t e and non-zero on the z-axis. '/ void K_hat_sub_iJ(pbhsd, rho, z, pK_rho_rho, pK_rho_z, pK_rho_phi, pK_z_z, pK_z_phi, pK_phi_phl) r e g i s t e r s t r u c t bhs_dscr *pbhsd; double rho, z; double *pK_rho_rho, *pK_rho_z, *pK_rho_phi, *pK_z_z, *pK_z_phi, *pK_phi_phl; double squareO, hypot(), atan2(); /* use l a t t e r as 'atan2(y, x ) ' */ s t a t l o v o i d momentum_K_hat_sub_iJ(); s t a t l o v o i d spin_K_hat_sub_iJ(); i n t bh; double delta_rho, d e l t a _ z , r , theta; double temp_r_r, temp_r_theta, temp_r_phi, temp_theta_theta, temp_phl_phi; double K_rho_rho, K_rho_z, K_rho_phl, K_z_z, K_z_phi, K_phi_phl; double d_r_d_rho, d_r_d_z, d_theta_d_rho, d_theta_d_z; /* p a r t i a l d e r i v ' s */ /* make sure we have someplace to accumulate our r e s u l t s : */ i f CpK_rho_rho — NULL) then pK_rho_rho - ar K_rho_rho; i f (pK_rho_z — NULL) then pK_rho_z - 8f K_rho_z; i f (pK_rho_phl -- NULL) then pK_rho_phl - tt K_rho_phi; i f (pK_z_z « NULL) then pK_z_z - 9 K_z_z; i f (pK_z_phi — NULL) then pK_z_phi - Sf K_z_phi; i f (pK_phl_phi — NULL) then pK_phi_phi - » K_phi_phi; 270 main directory CURVATURE.C;41 21-SEP-1985 19:19 Page 4 /* i n i t i a l i z e sums: */ *pK_rho_rho - *pK_rho_z - *pK_rho_phi -*pK_z_z - *pK_z_phi - *pK_phl_phl - 0.0; /» accumulate r e s u l t s f o r each black hole: */ fo r (bh - 1 ; bh <- pbhsd->N_black_hole ; ++bh) /* how f a r from the black hole are we: */ delta_rho - rho - pbhsd->black_holefbh].rho; d e l t a _ z - z - pbhsd->black_holetbh].z; r - hypot(delta_rho, d e l t a _ z ) ; /* black hole's l o c a l coords */ theta - atan2(delta_rho, d e l t a _ z ) ; /* f i n d curvature components i n black hole's l o c a l coordinates: */ momentum_K_hat_sub_ij(pbhsd->black_hole[bh].momentum, pbhsd->black_holetbh].reflectlon_term_sign, pbhsd->black_holetbh].reflection_radius, r, theta, «ftemp_r_r, «ftemp_r_theta, tftemp_theta_theta, 8ftemp_phi_phi); spin_K_hat_sub_iJ(pbhsd->black_hole[bh].spin, r , theta, 8ftemp_r_phi); /* evaluate p a r t i a l d e r i v a t i v e s : (my notes, p. 143) */ d_r_d_rho - delta_rho / r; d_r_d_z - d e l t a _ z / r; d_theta_d_rho - d e l t a _ z / square(r); d_theta_d_z - - delta_rho / square(r); / Note: R e c a l l that, i n order to keep things f i n i t e and non-zero on the z-axis, we are ret u r n i n g the values of the KIJ's d i v i d e d by one 'rho' f o r each 'phi' appearing i n Indices ( i . J ) . But rho - r * s i n ( t h e t a ) , and only the s i n ( t h e t a ) has been d i v i d e d out by the 'momentum' and 'spin' KIJ rou t i n e s . Thus we must d i v i d e by an ex t r a f a c t o r of ' r ' f o r each 'phi' i n the i n d i c e s . /* sum curvature components i n g l o b a l coordinates: (p. 144-146) */ *pK_rho_rho +- temp_r_r * square(d_r_d_rho) + temp_r_theta * 2.0 * d_r_d_rho * d_theta_d_rho + temp_theta_theta * square(d_theta_d_rho); *pK_rho_z +- temp_r_r * d_r_d_rho * d_r_d_z + temp_r_theta * ( d_r_d_rho * d_theta_d_z + d_theta_d_rho * d_r_d_z ) + temp_theta_theta * d_theta_d_rho * d_theta_d_z; *pK_rho_phl +- (temp_r_phi / r ) * d_r_d_rho; /• o.f. Note above */ *pK_z_z +- temp_r_r * square(d_r_d_z) + temp_r_theta * 2.0 * d_r_d_z * d_theta_d_z + temp_theta_theta * square(d_theta_d_z); 271 main directory CURVATURB.C;41 21-SEP-1985 19:19 Page 5 *pK_z_phl +- (temp_r_phl / r ) * d_r_d_z; /* c f . Note above */ *pK_phl_phi +- (temp_phi_phi / sq u a r e ( r ) ) ; /* o.f. Note above */ } /tt***************************************************************************/ /• * This f u n c t i o n computes the K-hat-sub-r-r curvature oomponent, summed over * a l l black holes, i n the po l a r s p h e r i c a l coordinate system of a seleoted « patch. * * Arguments: * pga. —> T ne g r i d d e s c r i p t o r d e s c r i b i n g the coordinate patch system. » pbhsd —> The black hole d e s c r i p t o r d e s c r i b i n g the black hole system. » p t r —> The coordinate patch d e s c r i p t o r . ptr->type must be POLAR_SPHERICAL. * (r,theta) - Polar s p h e r i c a l coordinates to compute the curvature component * at. * * The curvature component i s returned as the f u n c t i o n value. •/ double K_hat_sub_rr(pgd, pbhsd, p t r , r , theta) r e g i s t e r s t r u c t grid_dsor *pgd; r e g i s t e r s t r u o t bhs_dscr *pbhsd; r e g i s t e r s t r u o t coord_patoh_dscr *ptr ; double r , theta; { double s i n ( ) , c o s ( ) ; double square O ; void cvt_xy_to_xy(); void K_hat_sub_lJ(); /* i n (rho.z) g l o b a l c y l i n d r i c a l coordinates */ double rho, z; double K_rho_rho, K_rho_z, K_z_z; /* a l l 'phi' terms are i r r e l e v a n t ! ! ! */ double d_rho_d_r, d_z_d_r; double sum; /» compute g l o b a l coordinates: */ cvt_xy_to_xy(ptr, r , theta, 8fpgd->patch[GLOBAL_REF], tfrho, » z ) ; /* f i n d a l l relevant K-hat-sub-lJ i n g l o b a l coordinates: */ K_hat_sub_lJ(pbhsd, rho, z, SfK_rho_rho, »K_rho_z, NULL, SK_z_z, NULL, NULL); /* transform t o l o c a l coordinates: */ d_rho_d_r - s l n ( t h e t a ) ; d_z_d_r - oos(theta); sum - K_rho_rho * square(d_rho_d_r) + 2.0 * K_rho_z * d_rho_d_r * d_z_d_r + K_z_z * square(d_z_d_r); main directory CURVATURE.C;41 21-SEP-1985 19:19 Page 6 return(sum); } 273 main directory DIRECT.C;82 21-SEP-1985 19:20 Page 1 •include " u t i l : s t d c . h " •include "util:keyword.h" •include "patchutil:patoh.h" •include " p a t c h u t l l : b l a c k h o l e . h " / t t * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * / maln(argc, argv) /* d i r e c t - d r i v e r f o r d i r e c t s o l v e r */ i n t argc; char *argv[]; { double compute_resldual(); void s e t u p _ d i r e c t _ s o l v e ( ) ; double d i r e c t _ s o l v e ( ) ; i n t keyword_scan(); double squareO; void i n p u t _ p a r ( ) , input_output_grd(), input_output_gfn(); void s e t _ e x t r a p o l a t i o n _ c o e f f ( ) ; void p a r _ l o g ( ) ; double cpu_time(); void e r r o r _ e x l t ( ) ; char *flxname(); s t r u c t g r i d _ d s c r gd; str u c t bhs_dscr bhsd; char * m o d e l _ t l t l e ; char *grid_name; double t i n e ; enum { ITERATIONS, RESIDUAL } termination_test_type; double eps, omega; i n t max_lteratlons; •define BUPSIZE 100 char i t e r a t l o n _ l l m l t [ B U P S I Z E ] ; double max_residual; i n t l t e r a t l o n _ c o u n t ; double r e s i d u a l ; /• * Keyword scanner v a r i a b l e s and t a b l e : «/ s t a t i c boolean s o l v e _ e x a o t l y _ e a o h _ l t e r a t l o n - FALSE; s t a t i c ohar *char_omega - "1.0"; s t a t l o char *dump_file_name - NULL; /* * I f non-NULL, t h i s i s f i l e name to * dump Jacobian/rhs to each i t e r a t i o n «/ s t a t i c s t r u c t var_dsor omd_table[] -{ { "-exact", »solve_exactly_each_iteration. "%d" }, /* r e a l l y 'boolean' */ { "omega", 8fchar_omega. "»s" }, { "dump". «/dump_flle_name, "«s" } /* var i s "extern" */ 274 main directory \ DIRECT.C;82 21-SEP-1985 19:20 Page 2 •define CMD_TABLE_SI2E ( sizeof(cmd_table) / s i z e o f ( s t r u c t var_dscr) ) I* check f o r proper usage: */ i f ((argo >- 2) SW ( s t r c m p ( a r g v t l ] , "-help") — 0)) then error_exit(OK_EXIT, "\ Options: \n\ -exact Forces each Newton step to be c a l c u l a t e d t o f u l l (double\n\ p r e c i s i o n ) accuracy. Default i s only to c a l c u l a t e to 0.1%\n\ of the expected r e s i d u a l a f t e r the step.\n\ omega-value Causes 'SOR-style' m u l t i p l i c a t i o n of c a l c u l a t e d Newton step\n\ vector by s p e c i f i e d value. Default i s to use f u l l step.\n\ omega-auto S i m i l a r , but a value f o r omega i s 'automatically' chosen (by\n\ t r i a l and e r r o r ) that minimises the r e s u l t i n g r e s i d u a l . \ n \ dump-filename Dumps Jacobian, rhs vectors out to s p e c i f i e d filename each\n\ Newton i t e r a t i o n , j u s t before t r y i n g d i r e c t s o l u t i o n . \ n \ ); /* DOES NOT RETURN V i f (argo < 3) then error_exlt(OK_EXIT,"\ usage: %s model_name •it_count/max_resldual t options ... ]\n\ ("*s -help' gives more i n f o ) \ n " , flxname(argv[0]), flxname(argvtO])); /* DOES NOT RETURN */ /* decode ' f i x e d ' arguments: */ •define MODEL_NAME a r g v t l ] i f (argv[2][01 ~ '•') then { termlnatlon_test_type - ITERATIONS; sscanf(argv[2], "•%d", 8fmax_lteratlons); s p r i n t f ( i t e r a t l o n _ l l m i t , "«s", »argv[2][1]); el s e { termination_test_type - RESIDUAL; sscanf (argv [2], " % l f " , &fmax_resldual) ; s p r i n t f ( i t e r a t l o n _ l i m i t , "(max r e s i d u a l % s ) " , argv[2]); /* decode 'options' arguments: */ i n t i , status; f o r (1 - 3 ; i « argo ; ++i) { status - keyword_scan(CMD_TABLE_SIZE, cmd_table, a r g v [ i ] ) ; i f ( s t a t u s < 0) then error_exit(OK_EXIT, "«*«»* bad option "*s' — e x i t i n g *****\n", a r g v t l ] ) ; /» DOES NOT RETURN »/ } } i f (strcmp(ohar_omega, "auto") ~ 0) then error_exlt(OK_EXIT, 'omega-auto' option not yet supported — e x i t i n g **»**\n" ); /* DOES NOT RETURN •/ sscanf(ohar_omega, " % l f " , Somega); 275 main directory DIRECT.C;82 21-SEP-1985 19:20 Page 3 /• get input data: »/ input_par(M0DEL_NAME, ffmodel_tltle, 8fgrld_name, fifbhsd); lnput_output_grd(grid_name, "read", Sgd); set_extrapolation_coef f (Jfgd, Sbhsd); /• update f o r our black bole system */ lnput_output_gfn(MODEL_NAME, "read", 0gd); p r i n t f ( " % s \ n " , m o d e l _ t l t l e ) ; i t e r a t i o n _ c o u n t - 0; time - 0.0; setup_direct_solve(8fgd); /* sets up Jacobian s p a r s i t y s t r u c t u r e */ while (TRUE) { i f ( l t e r a t i o n _ o o u n t — 0) then r e s i d u a l - compute_residual(Sgd); switch (termination_test_type) { case ITERATIONS: i f ( i t e r a t i o n _ c o u n t >- max_iterations) then goto q u i t ; break; case RESIDUAL: i f ( r e s i d u a l < max_residual) then goto q u i t ; break; } /* * Choose allowable r e l a t i v e e r r o r i n Newton step: * * The st r a t e g y used i s to allow a f a i r l y l a r g e (0.1%) r e l a t i v e e r r o r * i n the steps when we are "not near' the s o l u t i o n , but cut t h i s down * when the Newton i t e r a t i o n s t a r t s q u a d r a t i c a l l y 'homing i n ' on the * s o l u t i o n . In t h i s l a t t e r domain, the r e s i d u a l should be roughly * squared each I t e r a t i o n . However, we can never go below the roundoff * f l o o r , and there's no need to go f a r below the d e s i r e d r e s i d u a l . * * In a d d i t i o n , the "-exact" command l i n e argument f o r c e s an "exact" * s o l u t i o n each i t e r a t i o n . ( A c t u a l l y , t h i s i s done by allowing the * l a s t 3 decimal d i g i t s of the s o l u t i o n to be i n e r r o r , but that's * olose enough...) »/ •define OK_RELERR 0.001 eps - OK_RELERR; i f ( r e s i d u a l < 1.0) then eps *- s q u a r e ( r e s l d u a l ) ; i f (eps < OK_RELERR * max_residual) then eps - OK_RELERR * max_residual; i f ( s o l v e _ e x a o t l y _ e a c h _ i t e r a t i o n ) then eps - -1000; /* "exact" */ time — cpu_tlme(); r e s i d u a l - direot_solve(»gd, eps, omega, dump_file_name); time +- cpu_tlme(); ++lteration_oount; main directory DIRECT.C;82 21-SEP-1985 19:20 Page 4 p r l n t f ( " I t e r a t i o n %d of % s : Maximum r e s i d u a l - %.21e\n", i t e r a t i o n _ c o u n t , l t e r a t l o n _ l i m l t , r e s i d u a l ) ; printf("<<<disk update " ) ; input_output_gfn(MODEL_NAME, "write". Sgd); prlntf("done> > >\n"); p r l n t f ( " % d i t e r a t i o n s / %.2f cpu seconds", lteration_count-, time); i f ( l t e r a t l o n _ c o u n t I - 0) then p r l n t f ( " --> %.2f cpu s e o / i t e r a t l o n " , t i m e / i t e r a t i o n _ c o u n t ) ; p r i n t f ( " \ n " ) ; /* f i n a l d i s k update V input_output_gfn(MODEL_NAME, "write". JTgd); /* log to '.par' f i l e : */ par_log(MODEL_NAME, argc, argv, time); q u i t : 277 main directory D0PS0R.C;16 21-SBP-1985 19:21 Page 1 •include " u t i l : s t d o . h " •include "patchutil:patch.h" / « » « » « * » » « « « • « » « * » * * » « » » * « « « « « « « » « » » » « • » » » * * * * * * * » » » » » » » » » » » » * * » « » « » » » » » * » • » » « / double compute_residual(pgd) stru c t g r i d _ d s c r *pgd; { double do_po l n t _ s o r ( ) ; return(do_point_sor(pgd, 0.0)); } / » » » » » » » » * » • » » » » * * « « * » » » » » » * » » * • * * * * » * * * » » » » « » « » * * » * » * * * * * * « * » » « « * » » » » * » « » « « * » / /* * This f u n c t i o n does a s i n g l e point SOR i t e r a t i o n , and returns the i n f i n i t y -* norm of the (updated) dynamic r e s i d u a l . * * Arguments: * pgd —> The g r i d d e s c r i p t o r d e s c r i b i n g the coordinate g r i d . * omega - The o v e r r e l a x a t i o n parameter. »/ double do_point_sor(pgd, omega) r e g i s t e r s t r u c t g r i d _ d s c r *pgd; double omega; double e x t r a p o l a t e ( ) ; r e g i s t e r i n t p, i , J; r e g i s t e r s t r u c t coord_patoh_dsor *ptr; r e g i s t e r s t r u c t g r i d _ f n * p i j ; double r e s i d u a l , d e r i v a t i v e ; double max_residual, temp; r e g i s t e r s t r u c t llne_end_dscr *pled_min, *pled_max; i n t min, max; max_residual - 0.0; f o r (p - 1 ; p <- pgd->N_patch ; ++p) p t r - * pgd->patch[p]; •define PSI(I_.J_) GRID_FNS(ptr,(I_),(J_))->psl_ /* extrap o l a t e the boundary values that w i l l not be l i n e endpoints: •/ f o r (J - ptr->J_min ; J <- ptr->J_max ; ++J) { pled_min - » ptr->llne_end[I_MIN]CJ]; pled_max - 8f ptr->llne_end[I_MAX]tj]; min - pled_min->end_lj; max - pled_max->end_lj; PSI(min-l, J) - extrapolate(pgd, p, pled_min, min.J, mln+l,J); PSI(max+l, J) - extrapolate(pgd, p, pled_max, max,,), max-l.J); } 7* do the point SOR i t e r a t i o n : •/ 278 main directory D0PS0R.C;16 21-SBP-1985 19:21 Page 2 f o r (1 - ptr->±_mln ; 1 <- ptr->l_max ; ++1) /* set up to do t h i s l i n e (of constant '1'): */ pled_mln - ST ptr->llne_end[J_MIN][1]; pled_max - Sf ptr->line_end[J_MAZ][i]; min - pled_min->end_ij; max - pled_max-> end_iJ; P S I ( i , min-1) - extrapolate(pgd, p, pled_min, i.min, i,min+l); P S I ( i . max+l) - extrapolate(pgd, p, pled_max, i.max, i.max-l); /* r e l a x the l i n e : */ f o r (J - min ; J <- max ; ++J) p i j - GRID_PNS(ptr, i . J ) : temp - p l j - > p s l _ * p i j - > p s i _ ; /» p s i ** 2 V temp - temp * temp; /* p s i ** 4 */ temp - temp * temp; /* p s i ** 8 */ temp - piJ->S_ / temp; /* S * ( p s i ** -8) •/ r e s i d u a l - p l J - > o l _ * P S I ( l - l . J ) + plj->c2_ * P S K i + l . J ) + plJ->03_ * P S I ( i . J - l ) + plJ-»o4_ * P S K l . J + l ) + p i j - > p s i _ * (plj->c5_ + temp); d e r i v a t i v e - plj->c5_ - 7.0 * temp; pij->R_ - r e s i d u a l ; p i j - > p s i _ — omega * r e s i d u a l / d e r i v a t i v e ; i f ( r e s i d u a l < 0.0) then r e s i d u a l - - r e s i d u a l ; i f ( r e s i d u a l > max_resldual) then max_residual - r e s i d u a l ; } /* end of t h i s l i n e (of constant '1') •/ } /* end of t h i s patch */ } return(max_residual); } 279 main directory DUMPGRD.C;6 21-SEP-1985 19:21 Page 1 •include "util-.stdo.h" •include "patchutil:patch.h" /*»»«*»«***«*»* .,.,,,,,.,,,.«..,.««« ***** *«*»/ main(argc, argv) /* dumpgrd - dumps out a '.grd' f i l e */ i n t argc; char *argv[]; { void e r r o r _ e x i t ( ) ; char * fixname(); void input_output_grd(); void dump_grid(); s t r u c t g r i d _ d s c r gd; 1 i f (argc I- 2) then error_exit(OK_EXIT, "usage: %s gridname\n", f i x n a m e ( a r g v [ 0 ] ) ) ; I* DOES NOT RETURN */ input_output_grd(argv[1], "read", Sfgd); dump_grid(Sgd); } 280 main directory EXTRAP.C;32 21-SBP-1983 19:21 Page 1 •include " u t i l : s t d c . h " •include "patchutll:patch.h" * This f u n c t i o n e x t r a p o l a t e s p s i values at l i n e ends, taking i n t o account a l l * boundary c o n d i t i o n s e t c Note that i t must be s u p p l i e d with some redundant * arguments — t h i s i s simpler than d e r i v i n g them a l l from a minimal set., and * the information i s e a s i l l y a v a i l a b l e to the c a l l e r , anyway (To be * p r e c i s e , the l a s t 2 arguments are redundant.) * * Arguments: * pga —> >rne g r i d d e s c r i p t o r f o r the coordinate patch system. * p - The patch number. * pled —> The l i n e end d e s c r i p t o r f o r the l i n e end. * (l_end,J_end) - The coordinates of the ' e n d _ i j ' p o i n t . » ( i _ i n t , J _ i n t ) - The coordinates of the point adjacent to the above point, i n * the ' i n t e r i o r ' d l r e o t i o n , i . e . away from the boundary. * * The extrapolated p s i value i s returned as the f u n c t i o n value. */ double extrapolate(pgd, p, pled, i_end,J_end, l _ i n t , J _ i n t ) r e g i s t e r s t r u c t g r l d _ d s c r *pgd; r e g i s t e r i n t p; r e g i s t e r s t r u c t line_end_dscr *pled; i n t l_end,J _end, l _ i n t , J _ i n t ; { double c v t _ p s i _ t o _ c f n ( ) , c v t _ c f n _ t o _ p s i ( ) ; double cvt_psl_to_omega(), cvt_omega_to_psi(); double squareO, oubeQ; r e g i s t e r s t r u c t coord_patch_dscr * p t r ; double sum; ptr - S pgd->patch[p]; i f (pled->flag > 0) then { /» * 'pled->flag' gives the patch number to i n t e r p o l a t e i n t o . »/ r e g i s t e r s t r u c t coord_patch_dscr *other_ptr; other_ptr - 8 pgd->patchtpled->flag]; •define ROOT pled->boundary_info.interpolate •define PSI_AT_OFFSET(delta_l_,delta_J_) \ GRID_FNS(other_ptr, \ ROOT.i_low + d e l t a _ i _ , \ ROOT.J_low + d e l t a _ J _ ) - > p s i _ \ /* end of maoro defn */ /* * Note we do the ( b i l i n e a r ) i n t e r p o l a t i o n i n the conformal f u n c t i o n of * the other patch, then convert the r e s u l t back to p s i . */ 281 main directory EXTRAP.C;32 21-SEP-1989 19:21 Page 2 sum - 0.0; sum +- ROOT.dOO * o v t _ p s i _ t o _ c f n ( o t h e r _ p t r , PSI_AT_OFFSET(0,0)); sum +- ROOT.dOl * o v t _ p s i _ t o _ c f n ( o t h e r _ p t r , PSI_AT_OFFSET(0.1)); sum +- ROOT.dlO • c v t _ p s l _ t o _ c f n ( o t h e r _ p t r , PSI_AT_0FFSET(1,0)); sum +- ROOT.dll * o v t _ p s i _ t o _ c f n ( o t h e r _ p t r , PSI_AT_OFFSET(l,1)); sum - o v t _ c f n _ t o _ p s l ( o t h e r _ p t r , sum); return(sum); } e l s e { /« * 'pled->flag' I s a code value d e s c r i b i n g the type of boundary * c o n d i t i o n ; we must extrapolate. •/ double psl_end, p s l _ l n t ; double omega_end, omega_int; psi_end - GRID_FNS(ptr, i_end, J_end)->psi_; p s i _ l n t - GRID_FNS(ptr, i _ l n t , J_lnt)-»psi_; switch (pled->flag) { case DIRICHLET: r e t u r n ( l . 0 ) ; case NEUMANN: r e t u r n ( p s l _ i n t ) ; case ROBIN: case REFLECTION_SYMMETRIC: case MARGINALLY_TRAPPED: •define ROOT pled->boundary_info.extrapolate sum - ROOT.dl*psi_end + ROOT.d2 + ROOT.d3/cube(psi_end); •define WHATSIT ptr->conformal_fn_type switoh (WHATSIT) { case PSI: /* extrapolate i n 'PSI' v a r i a b l e : */ sum - p s l _ i n t + sum; case 0 M E G A _ 0 F 1 P S I : /• extrapolate l n 'OMEGA' v a r i a b l e : */ omega_end - cvt_psi_to_omega(psl_end); omega_int - ovt_psi_to_omega(psl_int); sum - omega_lnt - square(omega_end) * sum; sum - ovt_omega_to_psi(sum); break; d e f a u l t : e r r o r _ e x i t ( O K _ E X I T , "»»»»* ext r a p o l a t e : unknown conformal f u n c t i o n type code-%d l n patch •%d\n", WHATSIT, p); /« DOES NOT RETURN V > 282 main directory EXTRAP.C;32 21-SEP-1985 19:21 Page 3 return(sum); default: error_exit(OK_EXIT, "»«*«« extrapolate: bad pled->flag-%d i n patch *%d at (%d,%d)\n", pled->flag, P. l_end, J_end); /* DOES NOT RETURN */ /» end of 'switch' on type of boundary condition */ 7* end of pled->flag <- 0 logio */ 283 main directory INFO.C;26 4-N0V-1985 00:14 Page 1 /* This f i l e contains routines f o r the ' i n f o ' program. */ /* * The f o l l o w i n g funotlons l i v e here: * main - main r o u t i n e f o r ' i n f o ' »« maxlmum_abs_psl - f i n d s maximum absolute value of p s i . */ •include " u t i l : s t d o . h " •Include "patchutil:patch.h" •Include " p a t c h u t i l : b l a c k h o l e . h " / » » « « » « * » « « » * * * * « » » * * * * * « » » « » » » « « » » » * » » » * « * * » * * » » » « « * « » « « » « * * « * * * « « * * * » « » » * « » « / mainCargc, argv) /* Info - p r i n t out information about models */ i n t argc; char *argv[]; { void e r r o r _ e x i t ( ) ; char *fixname(); void i n p u t _ p a r ( ) , input_output_grd(), input_output_gfn(); void s e t _ e x t r a p o l a t l o n _ c o e f f ( ) ; i n t N _ g r i d _ p o i n t s Q ; double compute_residual(); double mass_of_mts_bndry(); double s u r f a c e _ t o t a l _ e n e r g y ( ) ; void set_mass_monopoles(), set_psi_mlnus_monopoles(); s t a t i c double maximum_abs_psi(); struot g r i d _ d s c r gd; struc t bhs_dscr bhsd; char * m o d e l _ t l t l e ; char *grid_name; i n t s i z e , t o t a l ; i n t 1, p, bh; struot black_hole_dscr *pbhd; /* check f o r proper usage: «/ i f (Cargo < 2) I I (argo > 3)) then error_exit(OK_EXIT, "usage: %s model_name [ - g r i d ]\n", fixname(argv[0])); /* DOES NOT RETURN «/ •define HODEL_NAHE a r g v t l ] /* get model data: */ input_par(MODEL_NAMB, 8ftnodel_tltle, »grid_name, Sfbhsd); input_output_grd(grld_name, "read", »gd); set_extrapolation_ooeff(»gd, Sbhsd); /* update f o r our black hole system */ input_output_gfn(MODEL_NAMB, "read", »gd); /* general s t u f f on model: */ prlntf("Model - \"%s\"\n", MODBL_NAME); p r l n t f ( " T i t l e - \"%s\"\n", m o d e l _ t i t l e ) ; prlntf("Maximum r e s i d u a l - %g\n", compute_residual(Wgd)); 284 main directory INFO.C;26 4-N0V-1985 00:14 Page 2 /* general s t u f f on g r i d : •/ t o t a l - N_grid_points(4fgd, 0); /* t o t a l # of g r i d p o i n t s */ p r i n t f ( " G r i d - \ " % s \ " (%d patches, %d g r i d p o i n t s ) \ n " , grid_name, gd.N_pat ch, t o t a l ) ; i f (Cargo >- 3) «W (strcmp(argv[2]. "-grid") ~ 0)) then { /* d e t a i l e d g r i d s i z e breakdown i n f o wanted — p r i n t i t : */ f o r (p - 1 ; p <- gd.N_patch ; ++p) s i z e - N_grid_points(4fgd, p); p r i n t f ( " P a t c h *%d has %d g r i d p oints, %4.11f*% of t o t a l \ n " , p, s i z e , 100.0 * s i z e / t o t a l ) ; } } /* "physics' s t u f f on model: */ f o r (bh - 1 ; bh <- bhsd.H_black_hole ; ++bh) { pbhd - ar bhsd.black_hole[bh]; /* --> black hole dscr f o r t h i s b.h. V p - pbhd->surroundlng_patch_flag; i f (p — 0) then error_exit(OK_EXIT, "«««»* Blaok hole *%d has no surrounding patch!\n", bh); /* DOES NOT RETURN */ i f (p < 0) then p - - p; p r i n t f ( " \ Black hole *%d: (rho-%f, z-%f) P-%g(%o), J-%g\n\ nominal mass - %g, 'horizon area' mass - %g\n\ M f bh, pbhd-> rho, pbhd-> z, pbhd->momentum, "-0+"[l + pbhd->reflection_term_sign], pbhd-> spin, pbhd->mass, mass_of_mts_bndry(pbhd, argd) ) > } p r i n t f ( " T o t a l energy V i a surface i n t e g r a l - %g\n", surface_total_energy ( a r gd.patch[gd.N_patch])); /* note f o l l o w i n g computation destroys psiI I I */ set_mass_monopoles (arbhsd); set_psi_mlnus_monopoles (argd, a rbhsd ) ; /* zap! 11 */ printf("Maximum absolute value d e v i a t i o n from nominal monopole sum - %g\n", maximum_abs_psi(argd) ); /********•**•»******«********•****•***************•••**•***************«*>>****/ /* * This f u n c t i o n oomputes the maximum (over a l l g r i d p o i n t s ) of the absolute * value of p s i . I t i s most u s e f u l i f a monopole sum has been subtracted o f f * from p s i before c a l l i n g . main directory INFO.C;26 4-N0V-1985 00:14 Page 3 * Arguments: * pga —> xne g r i d d e s c r i p t o r . * * The maximum i s returned as the funo t i o n r e s u l t . */ s t a t i c double maximum^abs_psl(pgd) r e g i s t e r s t r u c t g r i d _ d s c r *pgd; { r e g i s t e r i n t p, i , J; r e g i s t e r s t r u c t ooord_patch_dscr *ptr; double p s i , max; max - 0.0; f o r (p - 1 ; p <- pgd->N_patch ; ++p) { p t r - » pgd->patch[p]; f o r ( i - ptr->i_min ; i <- ptr->i_max ; ++i) f o r (J - ptr->line_end[J_MIN]Ci].end_ij ; J <- ptr->llne_end[J_MAZl[i].end_ij ; ++J) { p s i - GRID_FNS(ptr. 1, J)->psi_; i f ( p s i < 0) then p s i - - p s i ; i f ( p s i > max) then max - p s i ; > /« end of t h i s patch */ } return(max); } 286 main directory JACOBIAN.C;67 21-SEP-1985 19:22 Page 1 /* This f i l e contains r o u t i n e that set up the Jacobian. */ /« * The f o l l o w i n g f u n c t i o n s l i v e i n t h i s f i l e : * compute_Jacobian - c a l c u l a t e s a l l non-zero Jacobian elements «» handle - helper f u n c t i o n to 'oompute_Jaoobian' ** invoke - helper f u n c t i o n to 'handle' */ •include " u t i l : s t d o . h " •include "patchut11:patch.h" •include " p a t c h u t l l : i n o u t . h " / a * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * / This f u n c t i o n c a l c u l a t e s a l l non-zero Jacobian elements, and sends them to a s p e c i f i e d f u n c t i o n f o r recording. T y p i c a l l y , i t w i l l be Invoked twice, once to record the s p a r s i t y s t r u c t u r e of the Jacobian, and once to a c t u a l l y set the numerical values. Arguments: pgd —> The g r i d d e s c r i p t o r f o r the system. p - The patch number to compute the Jacobian f o r (with a l l other patches 'frozen' and used as D i r i c h l e t boundary c o n d i t i o n s ) , or 0 i f a l l patches are to be allowed to vary at once i n the Jacobian. pfn —> A f u n c t i o n which i s to be c a l l e d once f o r each non-zero Jacobian element. The c a l l w i l l be ' ( * p f n ) ( p l , l l , J l , p2,12,J2, J12)' to say that 'J12' i s the p a r t i a l d e r i v a t i v e of the r e s i d u a l at patch #pl, point (11,Jl), with respect to p s i at patch +P2, point (12,J2). The ordering of the c a l l s w i l l be such that ( p l . i l . J l ) are c y c l e d i n row major order ( i . e . p i v a r i e s slowest, J l v a r i e s f a s t e s t ) . A l l the c a l l s f o r a given value of ( p l . i l . J l ) w i l l be done i n a group, with no other ( p l . i l . J l ) values i n t e r l e a v e d w i t h i n them. Within such a ( p l . i l . J l ) group, any given (p2,i2,J2) value may only occur more than once, with the p a r t i a l d e r i v a t i v e values passed to be added. Such o a l l s may have other (12,J2) c a l l s I n t e rleaved w i t h i n them. Note that i f the 'p' argument i s non-zero, then the ' p i ' and 'p2' arguments to *pfn w i l l both be equal to 'p'. '/ void oompute_Jaoobian(pgd, p, pfn) r e g i s t e r s t r u c t g r l d _ d s c r *pgd; i n t p; void («pfn)(); s t a t i o v o i d handleO; /» helper f u n c t i o n */ double square(); boolean f u l l _ J - (p — 0); /• f u l l Jaooblan wanted??? */ r e g i s t e r s t r u c t coord_patch_dscr *ptr ; i n t l . J ; i n t p_low, p_hl; struot g r l d _ f n *pgfn; double d e r i v ; 287 main directory JACOBIAN.C;67 21-SEP-1985 19:22 Page 2 I f ( f u l l _ J ) then { p _ 1 0 W - 1 ; n_hi - pgd->N_patch; e l s e { p_low - p _ h i - p; /» scan through a l l ' v a l i d ' patches: */ for (p - p_low ; p <- p _ h l ; ++p) { /* scan a l l p o i n t s i n t h i s patch: */ ptr - 9 pgd->patch[p]; /* —> ooord_patoh_dscr f o r patch #p */ f o r (1 - ptr->i_mln ; i <- ptr->i_max ; ++i) { f o r (J - ptr->line_end[J_MIN][i].end_ij ; J <- ptr->line_end[J_MAX]tl].end_ij ; ++J) { /* * T h i s loop body w i l l be executed once f o r each ( p . l . J ) * t r i p l e we want to c a l c u l a t e p a r t i a l d e r i v a t i v e s of the * r e s i d u a l a t. */ /* do the c e n t r a l point (diagonal element of Jacobian): */ pgfn - GRID_FNS(ptr, i , J ) ; d e r i v - pgfn->o5_ - 7.0 * pgfn->S_ / square(square(square(pgfn->psi_))); ( * p f n ) ( p , i , j , p . i . J , d e r i v ) ; /* now do the outer points of the del-squared s t a r : */ •define CONSTANT_PART handle(pfn, f u l l _ J , pgd, p , i , J CONSTANT_PART, pgfn->cl_, -1. 0. » ptr->line_end[I_MIN][J]) CONSTANT_PART, pgfn->c2_, 1, 0, tt ptr->line_end[I_MAX]Cj]) CONSTANT_PART, pgfn->c3_, 0,-1, Sf ptr->line_end[J_MIN][1]) CONSTANT_PART, pgfn->c4_, 0, 1, 9 ptr->line_end[J_MAX][i]) /« end of t h i s ' J ' »/ } /* end of t h i s '1' •/ } I* end of t h i s patch */ } /» a l l done now I II */ } 288 main directory JACOBIAN.C;67 21-SEP-1985 19:22 Page 3 This f u n c t i o n handles the d e t a i l s of checking f o r patch boundaries f o r the o f f - d i a g o n a l Jacobian e n t r i e s . Arguments: pfn —> The f u n c t i o n to c a l l i f we f i n d a non-zero Jacobian (see header oomments to 'compute_Jacobian' above f o r d e t a i l s ) . f u l l _ J - TRUE i f the f u l l (multi-patch) Jacobian i s wanted, FALSE i f only a s i n g l e patch ( p i ) i s wanted. In t h i s l a t t e r case, the remaining patches are t r e a t e d as being 'frozen i n place' to provide D i r i c h l e t boundary c o n d i t i o n s along a l l patch boundarys. pgd —> The g r i d d e s c r i p t o r s t r u c t u r e . ( p l . l l . J l ) - The patch number ( p i ) and point (11,Jl) where the r e s i d u a l i s being evaluated. weight - The weight of (12,J2) i n the del-squared ' s t a r ' centered on • p K i l . J l ) . ( d i . d j ) - The o f f s e t of the second (12,J2) point from the f i r s t ( 1 1 , J l ) . T h i s must be one of (-1,0), (1,0), (0,-1), or (0,1), i . e . i t must be i n the del-squared ' s t a r ' centered on # p l ( l l , J l ) . pled —> The l i n e end d e s c r i p t o r f o r (12,J2), i f i t ' s outside patch #pl. I f (12,J2) i s n ' t outside patch * p l , t h i s argument i s ignored. The f u n c t i o n computes the p a r t i a l d e r i v a t i v e of the r e s i d u a l at ( p l . l l . J l ) with respect to p s i at ( p l , i l + d i , J l + d J ) (where the l a t t e r may be the r e s u l t of boundary e x t r a p o l a t i o n or i n t e r - p a t c h i n t e r p o l a t i o n ) , and passes i t to (*pfn), using the c a l l sequence defined i n the header comments to 'compute_Jacobian' above. •/ s t a t i c v o i d handle(pfn, f u l l _ J , pgd, p l . l l . J l , weight, d i . d J , pled) void (*pfn)(); boolean f u l l _ J ; r e g i s t e r s t r u c t g r l d _ d s c r *pgd; i n t p l . l l . J l ; double weight; i n t d i . d J ; r e g i s t e r s t r u o t llne_end_dsor *pled; double squareO, cubeO, f o u r t h O ; double e x t r a p o l a t e ( ) ; double cvt_psl_to_omega(); void e r r o r _ e x i t ( ) ; enum r e l a t i o n i n o u t _ i J ( ) ; s t a t i c v o i d InvokeO; r e g i s t e r s t r u c t coord_patoh_dscr * p t r l , *ptr2; i n t p2; i n t 12,J2, 12_r,J2_r; double p s i l , p s i 2 , p s i 2 _ r ; double omegal, omega2, omega2_r, omega_other; boolean S_A_flag; p t r l - 0 pgd->patch[pi]; 12 - 11 + d i ; 12_r - 11 - d i ; 289 main directory JACOBIAN.C;67 J2 - J l + d j ; J2_r 21-SEP-1985 19:22 Page 4 I* easy oase??? */ i f ( i n o u t _ i J ( p t r l , i 2 . J 2 ) I- OUTSIDE) then { ( * p f n ) ( p l , l l , J l , p l . i 2 , J 2 . weight); return; } /* we now know that (12,J2) i s OUTSIDE patch * p l —•• p s i l - G R I D _ F N S ( p t r l . i l , J l ) - > p s i _ ; psi2 - e_trapolate(pgd, p i , pled, 1 1 , J l , 12_r,J2_r); i f (pled->flag > 0) then { /* 'patch' boundary */ i f (! f u l l _ J ) then return; hard case: */ p2 - pled->flag; ptr2 - ftf pgd->patch[p2]; /* ski p other patches??? */ /» other patch * */ we must inolude Jacobian e n t r i e s f o r e f f e c t s of p s i i n patch #p2 on the r e s i d u a l at # p l ( i l , J l ) . Since we l n general are i n t e r p o l a t i n g i n t o a square, there are i n general 4 points i n patch #p2 to dea l with. However, we can f i l t e r out those with zero ' d l j ' c o e f f i c i e n t s s i nce they can't e f f e o t the r e s u l t . The i n t e r p o l a t i o n w i l l have been done using the conformal f u n c t i o n of the patch *p2. The f u n c t i o n 'invoke(...)' i s where t h i s i s taken i n t o account. •define ROOT pled->boundary_info.interpolate •define INVO_E(di_, d j _ , d e r i v _ ) lnvoke(pfn. p i , 11, J l , p2, ROOT.i_low+dl_, ROOT.J_low+dJ_, d e r l v _ , ptr2, p s i 2 ) i f (ROOT.dOO 1- 0.0) then INVOKE(0,0, weight * ROOT.dOO); i f (ROOT.dOl I- 0.0) then INVO_E(0,1, weight * ROOT.dOl); i f (ROOT.dlO I- 0.0) then INVOKE(1,0, weight • ROOT.dlO); i f (ROOT.dll I- 0.0) then INVOKE(1.1. weight * ROOT.dll); } el s e { /* 'true' boundary */ switch (pled->flag) /* code f o r boundary c o n d i t i o n type: { case DIRICHLET: break; case NEUMANN: ( " p f n X p l . i l . J l , p l.12_r.J2_r. weight); break; 290 main directory JACOBIAN.C;67 21-SEP-1985 19:22 Page 5 •define ROOT pled->boundary_info.extrapolate •define SUM ( ROOT.dl*psll + ROOT.d2 + ROOT.d3 / c u b e ( p s l l ) ) •define SUM_DER ( ROOT.dl - 3.0 • R00T.d3 / f o u r t h ( p s i l ) ) case ROBIN: case REFLECTION_SYMMETRIC: case MARGINALLY_TRAPPED: •define WHATSIT ptrl->conformal_fn_type switch (WHATSIT) { case PSI: ( • p f n ) ( p l . l l . J l , pl,12_r,J2_r, weight • 1.0); ( • p f n ) ( p l . l l . J l , p l . l l . J l , weight • SUM_DER); break; case 0MEGA_0F_PSI: p s i 2 _ r - GRID_FNS(ptrl, 12_r. J2_r)->psl_; omegal - cvt_psi_to_omega(psil); omega2 - ovt_psi_to_omega(psi2); omega2_r - ovt_psi_to_omega(psi2_r); ( • p f n ) ( p l . l l . J l , pl,12_r,J2_r, weight * square(omega2_r / omega2)); C p f n X p l . i l . J l . p l . i l , J l . weight * square(omegal / omega2) • (SUM_DER - 2.0 • omegal • SUM)); break; d e f a u l t : error_exlt(OK_EXIT, "\ »»•»» compute_Jacobian: unknown conformal f u n c t i o n type code-%d i n patch #%d\n\ WHATSIT, p i ) ; /• DOES NOT RETURN •/ break; d e f a u l t : /• t r o u b l e I •/ error_exit(OK_EXIT, "••••• compute.Jacobian: bad , p l e d - > f l a g ' value-%d at •%d(%d.%d)\n". pled-> f l a g , p i . i l , J l ) ; /• DOES NOT RETURN */ /• end of switch on boundary c o n d i t i o n code */ } /• end of 'true boundary' case •/ > } ^***«*****«******«****»**************************************>****************/ /• • This f u n c t i o n i s used t o compute the p a r t i a l d e r i v a t i v e s due to i n t e r - p a t c h • i n t e r p o l a t i o n . I t i s c a l l e d ONLY from 'handle(...)' above. 291 main directory JACOBIAN.C;67 21-SBP-1985 19:22 Page 6 * Arguments: * (pfn, p l . i l . J l , p2,12,J2) - As i n description of 'pfn' argument to * 'compute_Jacobian(...)' above. * deriv - P a r t i a l derivative i f the conformal function used i n patch #p2 is * 'psi' I t s e l f . * ptr2 —> Coordinate patch descriptor f o r patch #p2. * psi2 - 'psi' returned by 'extrapolateC...)'. */ static void lnvoke(pfn, p l . i l . J l , p2,12,J2, deriv, ptr2, p s i 2 ) void CpfnX); i n t p l . l l . J l , p2.i2.J2; double deriv; register struct coord_patoh_dscr *ptr2; double psl2; double cvt_psi_to_omega(); double squareO; double factor; double p s l _ l j , omega_lJ, omega2; •define WHATSIT ptr2->conformal_fn_type switch (WHATSIT) { case PSI: factor - 1.0; break; case OMEGA_OF_PSI: p s l _ i j - GRID_FNS(ptr2, 12, J2)->psl_; omega_iJ - cvt_psl_to_omega(psi_iJ); omega2 - cvt_psl_to_omega(psl2); factor - square(omega_iJ / omega2); break; default: error_exit(OK_EXIT, "\ »***« compute_Jacobian: unknown conformal function type code-%d i n patch •%d\n\ " WHATSIT • • p2); /*'DOES NOT RETURN */ /* now t e l l 'user' about partial derivative I I I • / (*pfn)(pl.il,Jl, p2,12,j2, deriv * factor); } 292 main directory MKGFN.C;64 21-SEP-1985 19:23 Page 1 /* This f i l e i n c l u d e s the main r o u t i n e f o r 'mkgfn' and her f r i e n d s . */ I* * Routines i n t h i s f i l e are: * main - 'mkgfn' - makes a '.gfn' f i l e *« compute_ci - computes del-squared c o e f f i c i e n t s o l , c2, c3, c4, c5 *» souroe_fn - computes 'source f u n c t i o n ' - 1/8 * e x t r i n s i c curvature squared */ •include " u t i l : s t d o . h * •Include " p a t c h u t i l : b l a c k h o l e . h " •include "patchutil:patch.h" / * * * * * • • * * * * * * * * * • * * * * » • * * * » * * * * * • * * * * * * * * * * * » * * * * * * • * * * * * * * * * * * * * * * * * * * * < ' * * * * / main(argc, argv) /* mkgfn - makes a '.gfn' f i l e */ i n t argc; char *argv[]; { void i n p u t _ p a r ( ) ; void input_output_grd(); void input_output_gfn(); void e r r o r _ e x l t ( ) ; v oid p a r _ l o g ( ) ; void c v t _ i J _ t o _ x y ( ) ; void cvt_xy_to_xyC); i n t fuzzy_EQ(); char *fixname(); void set_mass_monopoles(); double sum_monopoles(); s t a t l o v o i d oompute_cl(); s t a t l o double s o u r c e _ f n ( ) ; char * t l t l e , *gridname; st r u c t bhs_dscr bhsd; st r u c t g r i d _ d s c r gd; i n t p; r e g i s t e r s t r u c t ooord_patch_dscr *ptr; i n t 1, J; double x, y; double rho, z; boolean on_z_axis; r e g i s t e r s t r u c t g r i d _ f n *pgfn; i f Cargo I- 2) then error_exitCOK_EIIT, "usage: »s model_name\n", fixnameCargvtO])); /• DOES NOT RETURN */ •define MODEL_NAME a r g v t l ] /* f e t c h input data: */ input_parCMODEL_NAME, S f t l t l e , Sgridname, »bhsd); input_output_grdCgridname, "read", «fgd); 293 main directory HKGFN.C;64 21-SEP-1985 19:23 Page 2 /• set up '.gfn' f i l e contents: */ set_mass_monopoles(Sfbhsd); for (p - 1 ; p <- gd.N_patch ; ++p) ptr - ar gd.patchtp]; allooate_grid_fn_array(ptr); / • i f not, storage already allocated (above!) */ for (1 - ptr->i_min ; i <- ptr->l_max ; ++1) { for (J - ptr->line_end[(int)J_MlN][1].end_lj ; J <- ptr->line_end[(int)J_MA_][1].end_ij ; { /« compute grid functions for this point: */ pgfn - GRID_FNS(ptr, i , J); cvt_iJ_to_xy(ptr, i . J, «f_, Sy); ovt_xy_to_xy(ptr, x, y, tt gd.patch[GLOBAL_REF] , Sfrho, Sz); on_z_axis - fuzzy_EQ(rho, 0.0); compute_ci(ptr, p, x, y, on_z_axis, (double *) Spgfn->ol_ - 1); pgfn->S_ - source_fn(8bhsd, rho, z); pgfn->psi_ - sum_monopoles(fbhsd, rho, z); ^gfn->R_ - 0.0; } /« end of this patch */ /* create '.gfn' f i l e : «/ input_output_gfn(MODEL_NA_E, "write", tfgd); nar_log(MODEL_NAME, argo, argv, 0.0); /* log i n '.par' f i l e */ / » « » * * » « * » » « » * » » » * * » * » » « * « » » « » « * « » • » « » « « « * « « * * * * * » * » » » « » * » * » « » » » • * * * * « » * * » » » » « / /* * This function computes the del-squared coefficients. * * Arguments: * ptr —> The ooord_patch_dscr for the patch in whioh the coefficients are to * be used. * p- - The patch number (used only to label error messages). * (x.y) - The 'x/y' coordinates of the point where the coefficients are to be * computed, l n the system of patch i n use. * on_z_axis - TRUE i f (x.y) i s on the z-axls, FALSE otherwise. « o —> (1 origin) A S-element array i n which to store the coefficients. */ 294 main d i r e c t o r y H_GFN.C;64 21-SEP-1985 19:23 Page 3 static void compute_oi(ptr, p, x, y, on_z_axis, o) register struot ooord_patch_dscr "ptr; int p; double x, y; boolean on_z_axis; double o[]; { double sin(), oos(); double squareO; void error_exit(); double terml, term2; switch (ptr->coord_type) case CYLINDRICAL: /• « Formulas taken from p. 119 i n my notes, or from p. 157/158 — both * types of difference scheme give the same results. */ •define RHO x •define Z y •define DELTA_RHO ptr->i_step •define DELTA_Z ptr->J_step c[3] - o[4] - 1.0 / square(DELTA_Z); i f (on_z_axls) then c[ l ] - c[2] - 2.0 / square(DELTA_RHO); else { terml - 1.0 / square(DELTA_RH0); term2 - 1.0 / (RHO * 2.0 * DELTA_RH0); o(l] - terml - term2; o[2] - terml + term2; } break; case P0LAR_SPHERICAL: /• « Here, the different difference schemes DO make a differenceI I! (Pun * not Intended.) */ •define R x •define THETA y •define DELTA_R ptr->l_step •define DELTA_THETA ptr->J_step •define WHATSIT ptr->difference_scheme switoh (WHATSIT) { case INDBPENDENT_TERMS: I* formulas taken from p. 117-118 ln my notes */ terml - 1.0 / square(DELTA_R); 295 main directory M_GFN.C;64 21-SEP-1985 19:23 Page 4 ter_2 - 1.0 / (R • DELTA_R); c[l] - terml - term2; o[2] - terml + term2; If (on_z_a_ls) then o[3] - o[4] - 2.0 / square(R * DELTA_THETA); Q I S Q { terml - 1.0 / square(R * DELTA_THETA); term2 - cos(THETA) / (square(R) * sln(THETA) • 2.0 * DELTA_THETA); ct3] - terml - term2; c[4] - terml + term2; } break; case LOCALLY_CONSERVATIVE: /* formulas taken from p. 159-162 i n my notes */ terml - 1.0 / square(DELTA_R); term2 - DELTA_R / (2.0 * R); c[ l ] - terml * squared.0 - term2); o[2] - terml * squared -0 + term2); i f (on_z_a_ls) then o[3] - c[4] - 2.0 / square(R * DELTA_THETA); 6 l S 6 { terml - 1.0 / (square(R « DELTA_THETA) * sin(THETA)); term2 - 0.5 • DELTA_THETA; o[3] - terml * sin(THETA - term2); o[4] - terml * sin(THETA + term2); } break; default: error_e_it(0__EXIT, -««*»« compute_cl: unknown difference scheme type code=%d for patch%d\n", WHATSIT, p); /* DOES NOT RETURN «/ } break; default: error_exit(0K_EXIT, "*««*» compute_cl: unknown coordinate type code-%d for patch %d\n", ptr-> coord_type, p); /• DOES NOT RETURN */ c[5] - - (oU] + o[2] + ot3] + o[4]); /• always I I I * / } / » » * » * * » » » » » » * * * » » * » • » * » » » * * * * « * * » » * * * » * » « * * » * * * » * » » « * » * » • » » » * * * » * » * » * * « * » » * * * / I* * This function computes the 'source function', given by 296 main d i rec tory MKGFN.C;64 21-SEP-1985 19:23 Page 5 * 1 * ~ l j » S K K * 8 i j * Arguments: « pbhsd —> The black hole system descriptor. * (rho.z) - The global c y l i n d r i c a l coordinates of the place where the source * function i s desired. * The resulting source function i s returned as the function result. */ static double source_fn(pbhsd, rho, z) register struct bhs_dscr *pbhsd; double rho, z; { double square(); void K_hat_sub_iJ(); double K_rho_rho, K_rho_z, K_rho_phi, K_z_z, K_z_phl, K_phi_phi; double sum; K_hat_sub_iJ(pbhsd, rho, z, »K_rho_rho, SK_rho_z, SK_rho_phi, tfK_z_z, SK_z_phl, SfK_phi_phi); /* * Note: Recall that, i n order to keep things f i n i t e and non-zero on the « z-axis, the KiJ's returned have already been divided by one * factor of 'rho' for each 'phi' occuring i n the indices ( i . J ) . * This i s exactly what's needed to avoid having to divide by any * more faotors of 'rho' i n forming the scalar invariant K-squared * below. */ sum - 0; sum +- square(K_rho_rho); sum +- 2 0 * square(K_rho_z); sum +- 2 0 * square(K_rho_phi); /« c f. note above «/ sum +- square(K_z_z); sum +- 2 0 * square(K_z_phi); /* o f. note above */ sum +- square(K_phl_phi); /* 0 f. note above sum /- 8 .0; return(sum); } 297 main directory MKGRD.C;6 21-SEP-1985 19:24 Page 1 •Include "util:stdo.h" •include "patchutil:patch.h" / » » « » * » » » » » » » » » » « * * » » * • * » » » » » » » « • * » » « » » » » » « » « » » » « • * * * » * » » * * « « » * » » » » * * * » » » » « » « « / maln(argo.argv) /* mkgrd — makes a '.grd' f i l e from a '.pat' f i l e */ int argc; char *argv[]; { void input_pat(); void lnput_output_grd(); char *fixname(); struct grid_dscr gd; i f (argc 1-2) then error_exit(OK_EXIT, "usage: %s gridname\n", fixname(argvtO])); /• DOES NOT RETURN */ input_pat(argv[l], Sgd); input_output_grd(argv[l], "write", Sfgd); } 298 main directory MONOPOLE.C;28 4-N0V-1988 00:14 Page 1 /* This f i l e contains routines that deal with 'monopoles' l n psi */ /* * Routines i n this f i l e are: * sum_monopoles - Suns current monopoles for specified position * set_mass_monopoles - Sets monopole strengths to one half b.h. masses * set_area_monopoles - Sets monopole strengths to one half horizon areas * normallse_monopoles - normalises monopoles so they sum to specified amount * set_psi_minus_monopoles - computes 'psi — (monopole sum)' «/ •include "utll:stdo.h" •include "patchutil:blac_hole.h" •inolude "patchutil:patch.h" /»*»*» »,,«»..,»«,,. . . ,».. . . , . .».«... . .«..*..«.*».»...«««..*.. .*.«.«»«»«/ This function computes the sun of a l l the monopoles (associated with the black hole system), plus 1.0. Thus this value i s a suitable 'psi' value to associate with the current set of monopoles. Arguments: pbhsd —> The black hole system descriptor. (rho.z) - The global c y l i n d r i c a l coordinates of the place where the 'psi value' i s desired. The 'psi value' i s returned as the function value. ' / double sum_monopoles(pbhsd, rho, z) register struct bhs_dsor *pbhsd; double rho, z; { double hypot(); register int bh; register double sum, r; sum - 1.0; for (bh - 1 ; bh <- pbhsd->N_blaok_hole ; ++bh) { r - hypot(rho - pbhsd->blaok_holetbh].rho, z - pbhsd->black_hole[bh].z); sum +- pbhsd->black_holetbh].lambda / r; } return(sum); } /• • * * • • . . . . . . . . . . . . . . . . . . . . . • . . . . . / /* * This function sets the monopole strength associated with each black hole to * one half that blaok hole's mass. 299 main directory MONOPOLE.C;28 4-N0V-1983 00:14 Page 2 • * Arguments: * pbhsd —> The b l a c k h o l e system d e s c r i p t o r . */ v o i d set_mass_monopoles(pbhsd) r e g i s t e r s t r u o t bhs_dscr 'pbhsd; r e g i s t e r i n t bh; f o r (bh - 1 ; bh <- pbhsd->N_black_hole ; ++bh) ]3bhsd->blaok_hole[bh].lambda - pbhsd->black_hole[bh].mass / 2.0; } / • l I l t l l l l l l l l l l t l l l l l l l t l l l l l t K l t l l t t l l l l t l l t l l t t t l t t / * This f u n c t i o n s e t s the monopole s t r e n g t h a s s o c i a t e d w i t h each b l a c k h o l e t o * one h a l f the mass of t h a t b l a c k h o l e ' s h o r i z o n . s * Arguments: » pgd —> The g r i d d e s c r i p t o r f o r the coo r d i n a t e patch system. * pbhsd —> The b l a c k h o l e system d e s c r i p t o r . */ v o i d set_area_monopoles(pgd, pbhsd) r e g i s t e r s t r u c t g r i d _ d s o r *pgd; r e g i s t e r s t r u c t bhs_dscr *pbhsd; { double mass_of_mts_bndry(); r e g i s t e r i n t bh; double m; f o r (bh - 1 ; bh <- pbhsd->N_black_hole ; ++bh) { m - mass_of_mts_bndry( 9 pbhsd->black_hole[bh], pgd); nbhsd->black_holetbh].lambda - m / 2.0; } / • • I I I K t l l t I l l l t O i l I l l l l l l l l l t H l t t X X I / * T h i s f u n c t i o n n o rmalises the monopole s t r e n g t h s by m u l t i p l y i n g them a l l by * a constant ohosen so they sum t o a s p e c i f i e d amount. * * Arguments: * pbhsd —> The blaok h o l e system d e s c r i p t o r . * desired_sum - The d e s i r e d monopole sum. */ v o i d normalise_monopoles(pbhsd, deslred_sum) r e g i s t e r s t r u c t bhs_dsor *pbhsd; double desired_sum; { 300 main directory MONOPOLE.C;28 4-N0V-1985 00:14 Page 3 int bh; double actual_sum, ratio; actual_sum - 0; for (bh - 1 ; bh <- pbhsd->N_blac__hole ; ++bh) { actual_sum +- pbhsd->blac__holetbh].lambda; } ratio - desired_sum / aotual_sum; for (bh - 1 ; bh <- pbhsd->N_blac__hole ; ++bh) { pbhsd->blao-_hole[bh].lambda *- ratio; } / « » » » * « * » » * » * * » « « » * » * * « « » « » » » » » » » * « » « » » » » « « * * « « » * » * * * « « * » « * » » » » * * « » * « » * » * « « » » » / /* * This function subtracts the monopole sum from psi. * * Arguments: » pgd. —> The grid descriptor. » pbhsd —> The blaok hole descriptor, with a l l 'lambda' f i e l d s already f i l l e d * l n . */ void set_psi_mlnus_monopoles(pgd, pbhsd) register struct grid_dscr *pgd; register struct bhs_dsor *pbhsd; { double sum_monopoles(); void cvt_lj_to_xy(), ovt_xy_to_xy(); register int p, 1, J; register struct coord_patch_dsor *ptr; double z, y, rho, z; for (p - 1 ; p <- pgd->N_patCh ; ++p) ptr - fit pgd->patch[p]; for ( i - ptr->i_min ; i <- ptr->l_max ; ++i) { for (J - ptr->llne_end[J_MIN][1].end_ij ; J <- ptr->line_end[J_MAX][1].end_ij ; ++J) { ovt_ij_to_ry(ptr, i , J, «fcc, Sy); ovt_xy_to_xy(ptr, x, y, fifpgd-> patch[GLOBAL_REF], fifrho, Sz); GRID_PNS(ptr, i , J)->psi_ — sum_monopoles(pbhsd, rho, z); } } 301 main directory MONOPOLE.C;28 4-N0V-1985 00:14 Page 4 /« end of this patch */ } 302 main directory PHYSICS.C;37 21-SBP-1985 19:27 Page 1 /* This f i l e contains routines to calculate 'physics' functionals of models */ /* * The following functions l i v e here: * mass_of_area - Finds mass associated with given horizon area * integrate_r_const - Integrates a specified fn on a 'r - constant' surface * area_r_const - Finds area of 'r - oonstant' surface «* area_fn - Function to be integrate i n finding above area * mass_of_mts_bndry - Finds mass of m.t.s. boundary surrounding given b.h. * surface_total_energy - Finds tot a l energy of model via surface integral ** surface_energy_fn - Funotlon to be integrated for above »/ •include "util:stdo.h" •include "patchutll:patch.h" •Include "patchutil:blackhole.h" / « » » » » * » » » » » * » * * * « » » » » * * * * * * « « * * * * * « « * * » * » * » » * » * « » » * « » * « » « » » » * * » « * * * « * • * « > • * » « « / /* * This function finds the mass associated with a given horizon area. * * Arguments: * area - The horizon area. * * The associated mass i s returned as the function result. •/ double mass_of_area(area) double area; { double sqrt(); return(sqrt(area / (16.0*PI))); / » » » » » » • • » * « » * » » » » » » « * » * * * * » « » « « » * » » * » « » * * * * * * » » » » * » » » • « * » » » * * * * » « » * « » * * » » » » » » / This function integrates a specified function (computed 'on the f l y ' ) over a given 'r - constant' surface l n a patch with coord_type-"polar spherical"). The boundary conditions on theta must be 'Neumann'. The range of theta must be either [O.PI/2], [PI/2,PI], or [O.PI]; i n the former 2 cases, reflection (mirror image) symmetry about theta-PI/2 i s assumed. Optionally, the usual "r-squared-sln-theta" weighting may be done Internal to this function. If the remainder of the integrand i s almost constant, this option yeilds much improved aoouracy. Arguments: pfn —> The function to be integrated. This i s used in the form function - (*pfn)(ptr, 1, J); to evaluate the function at (i.J) i a the specified patch. weight_flag - FALSE to integrate (funotion as given), - TRUE to Integrate square(r)*sin(theta) * (function as given), ptr —> The coordinate patch descriptor for the surface. 1 - The ' i ' integer radial coordinate of the surface. Note that this way of specifying the constant value of r implies that the surface must be a main directory 303 PHYSICS.C;37 21-SBP-1985 19:27 Page 2 * grid line (in 2 dimensions). * * The integral (over theta and phi), i s returned as the funotlon result. */ double integrate_r_oonst(pfn, weight_flag, ptr, 1) double (*pfa)(); boolean weight_flag; register struct coord_patch_dscr *ptr; int i ; { double spline_int(); boolean fuzzy_EQ(); void cvt_iJ_to_xy(); void error_exit(); char *calloc(); void cfreeO; double squareO, sin(), cos(); register struct line_end_dscr *pled_min, *pled_max; int J, J_min, J_max, n_points; i double theta, theta_mln, theta_maz, r; double integral; double *work_ptr, *work; /* make sure a l l our assumptions are va l i d */ i f (ptr->coord_type I- POLAR_SPHERICAlO then error_exit(OK_EXIT. -**««* integrate_r_oonst: Integrating requires a polar spherical patch\n" ); /* DOES NOT RETURN */ pled_min - 9 ptr->line_end[J_MIN][1]; pled_max - tt ptr->line_end[J_MAX][1]; i f (I ((pled_min->flag — NEUMANN) tttt (pled_max->flag ~ NEUMANN)) ) then error_exit(OK_EXIT, "\ ***** lntegrate_r_oonst: integrating requires Neumann bndry conds on theta\n" ); /* DOES NOT RETURN */ /* set up funotion i n array: */ J_mln - pled_mln->end_iJ; J_max - pled_max->end_lj; n_points - J_max - J_min + 1; work_ptr - ALLOC(n_polnts, double); i f (work_ptr — NULL) then error_exit(OK_EXIT, "»»»»« integrate_r_oonst: insufficient memory for %d grid points i n theta\n", n_polnts); /* DOES NOT RETURN */ work - work_ptr - J_mln; /* adjust for non-zero index origin */ for (J - J_min ; J <- J_max ; ++J) { worklj] - (*pfn)(ptr, i . J); } /•do weighting internally? »/ cvt_iJ_to_xy(ptr, 1, J_min, Jfr, «ftheta_min); cvt_iJ_to_xy(ptr, i , J_max, Wr, »theta_max); i f (weight_flag) 304 main directory PHYSICS.C;37 21-SEP-1985 19:27 Page 3 then { /* * Subtract off theta_mln value of function, do that part of integral * analytically: */ double temp; temp .- workCj_mln]; for (J - J_min ; J <- J_max ; ++J) workCj] — temp; cvt_iJ_to_xy(ptr, 1, J, Sr, stheta); workCj] *- square(r) * sin(theta); integral - cos(theta_mln) - oos(theta_max); integral temp * square(r); } else integral - 0; /• integrate: */ integral +- spline_lnt(theta_min, theta_max, n_points-l, work, 1, 0.0, /* Neumann boundary condition at theta_min */ 1, 0.0); /* (ditto at theta_maz) •/ /* find integral over theta range [0, PI] by taking symmetry into account: */ i f (fuzzy_EQ(theta_min, 0.0) 88 fuzzy_EQ(theta_max, PI)) then { } /* theta range i s [0, PI] —> do nothing */ else i f (fuzzy_E<5(theta_min, 0.0) 88 fuzzy_E§(theta_max, PI/2.0)) then integral *- 2.0; /* theta range i s [0, PI/2] —> must double */ else i f (fuzzy_EQ(theta_mln, PI/2.0) 88 fuzzy_ECj(theta_max, PI)) then Integral *- 2.0; /* theta range i s [PI/2, PI] =-> must double */ else error_exit(OK_EXIT, •»»**« lntegrate_r_const: specified theta interval [%.3f,%.3f] i s invalid\n", theta_min, theta_max); /* DOES NOT RETURN */ /* return storage 8 quit: */ cfree(work_ptr); /* must supply original 'calloo(...)' ptr: NO OFFSET */ return(2.0 « PI * integral); /* 2.0*PI i s for phi integration I I I V /tt***************************************************************************/ This function finds the area of a given 'r - constant' surface i n a patch with coord_type-"polar spherioal"). The boundary conditions on theta must be 'Neumann'. The range of theta must be either [0.PI/2], [PI/2.PI], or CO,PI]; i n the former 2 cases, reflection (mirror image) symmetry about theta-PI/2 i s assumed. Arguments: ptr —> The coordinate patoh descriptor for the surface. i - The '1' integer radial coordinate of the surface. Note that this way of specifying the constant value of r implies that the surface must be a grid line (in 2 dimensions). The area i s returned as the function result. 305 main directory PHYSICS.C;37 21-SBP-198S 19:27 Page 4 */ double area_r_const(ptr, 1) register struot ooord_patoh_dsor *ptr; int 1; { double lntegrate_r_oonst(); static double area_fn(); return(integrate_r_const(»area_fn, TRUE, ptr, 1)); } / a * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * / This function i s integrated i n the computation of the area of 'r = constant' surfaces. In particular, i t ' s integral over the sphere, i s that area. Arguments: ptr —> Coordinate patoh descriptor for patch i n which the surface l i e s . This patch i s assumed to have coord_type-"polar spherical". (i.J) - (Integer) coordinates (in the system of this patch) to evaluate the function at. The returned result i s obvious I */ static double area_fn(ptr, 1, J) register struct ooord_patch_dsor *ptr; register int i , J; double fourthO; double psi; psi - GRID_FNS(ptr, i , J)->psi_; return( fourth(psl) ); } / * » » * * » » » » » « » * * * * * * * * * * * « * * * * * * « * « « * * * » » * * * * » « * * * * * * » * * * * * » « » » * * » * * * » » • * « » * * * * / /* * This function oomputes the mass of the marginally trapped surface grid * boundary which i s assumed to surround a given black hole. * * Arguments: * pbhd —> The black hole descriptor. * pgd —> xhe grid descriptor. * * The mass i s returned as the function result. •I • double mass_of_mts_bndry(pbhd, pgd) register struct black_hole_dscr *pbhd; register struot grid_dsor *pgd; { void error_exit(); 306 main directory PHYSICS.C;37 21-SBP-1985 19:27 Page 5 double mass_of_area(), area_r_oonst(); Int p; register struct coord_patoh_dscr *ptr; p - pbhd->surrounding_patch_flag; i f (p — 0) then error_exit(OK_EXIT, "»*««* mass_of mts_bndry: black bole has surrounding patch flag of zero\n" ); /• DOES NOT RETURN */ i f (p < 0) then p - - p; ptr - ST pgd->patch[p]; return(mass_of_area(area_r_const(ptr, ptr->i_min))); } /tt***************************************************************************/ /« * This funotion computes the total energy of a model, using a surface integral * (not very aocurate). Robin outer boundary conditions are assumed. • * Arguments: * ptr —> The coordinate patch descriptor for the model's outermost patch. * * The total energy i s returned as the function result. •/ double surface_total_energy(ptr) register struct coord_patch_dscr *ptr; { double integrate_r_const(); static double surface_energy_fn(); double temp; temp - integrate_r_oonst(4fsurface_energy_fn, TRUE, ptr, ptr->i_max); return(temp / (2.0 * PI)); } / « « « » * * • « » » » » « » » * * » « » » * * « » * * * « * * « * « « * * * « « * * » » * « » » » « « « « « » « • • « * « * » * * * » * * * * * • » » » « / /* * This funotion i s Integrated i n the computation of the total energy of a * model by the surfaoe Integral. * * Arguments: » ptr —> Coordinate patch descriptor for patch i n which the surface l i e s . * This patch i s assumed to have coord_type-"polar spherical". * (i.J) - (Integer) coordinates (in the system of this patch) to evaluate the * funotion at. * * The returned result i s obvious I main directory PHYSICS.C;37 21-SEP-1985 19:27 Page 6 static double surface_energy_fn(ptr, 1, j) register struct coord_patch_dscr *ptr; register int 1, J; { void cvt_lJ_to_xy(); double r, theta, psi; cvt_iJ_to_xy(ptr, i , J, 9r, fftheta); psi - GRID_FNS(ptr, i , J)->psi_; return( (psi - 1.0) / r ); } 308 main directory PS0R.C;38 21-SEP-198S 19:28 Page 1 •inolude "utll:stdo.h" •include "patchutil:patch.h" •Include "patchutil:blackhole.h" / » » » * » * * * * * » » * * * * * * * * * * » * » * » » » * » » * * » » * * * » » * * * » » » * » * * » » * * » * * * * » » * » * » » » * * * » » » * » « / malnCargo, argv) /* psor - driver for point SOR solver */ int argc; char *argv[]; void error_exit(); double do_point_sor(); /* * Does a single point SOR iteration, returns lnfinity-* norm of new dynamic residual. •/ void input_par(), input_output_grd(), input_output_gfn(), par_log(); void set_extrapolation_coeff(); double cpu_tlme(); char * fixname(); struct grid_dscr gd; struct bhs_dscr bhsd; char *model_tltle; char *grid_name; double time; enum { ITERATIONS, RESIDUAL } termlnatlon_test_type; int maz_iterations; •define BUPSIZE 100 char iteratlon_llmlt[BUPSIZE]; double max_resldual; double omega; int print_lnterval, disk_wrlte_lnterval; int lteratlon_couht; double old_residual, residual; /* check for proper usage: V i f (I (Cargo — 5) ii Cargo — 6)) ) then error_ezltCOK_EXIT, "usage: %s model_name •it_cnt/max_residual omega print_int [disk_wrlte_int]\n", fixname(argv[0])); /* DOES NOT RETURN */ /• decode arguments: */ •define MODEL_NAKE argvtl] i f Cargv[2][0] ~ *•') then { termination_test_type - ITERATIONS; ssoanf Cargv[2], "•Std", afmax_lteratlons); sprintfCiteration_limit, "%s", «fargv[2][1]); } else { termlnatlon_test_type - RESIDUAL; main directory PS0R.C;38 21-SEP-198S 19:28 Page 2 sscanf(argv[2], "«lf", *fmax_residual); sprintf(iteration_limit, "(max residual % s ) " , argv[2]); sscanf (argv[3], " % l f " , fifomega); sscanf(argv[4], "%d", ffprint_lnterval); i f (argc ~ 6) then sscanf(argvt5], "%d", 6fdisk_wrlte_interval); else disk_write_interval - 0; /* only at end .*/ I* get input data: */ input_par(MODEL_NAME, «fmodel_title, Sgrid_name. Sbhsd); input_output_grd(grid_name, "read", fifgd); set_extrapolation_coeff(Sfgd, fifbhsd); /* update for our black hole system */ input_output_gfn(MODEL_NAME, "read", Sfgd); /* iterate */ i f (print_interval 1-0) then printf("»s\n", model_title); time - 0.0; iteration_count - 0; while (TRUE) { switch (termination_test_type) { case ITERATIONS: i f (l (iteratlon_count < max_iterations) ) then goto quit; break; case RESIDUAL: i f (lteration_count 1-0) then i f (residual < max_residual) then goto quit; break; } old_residual - (lteration_count — 0) ? 1.0 : residual; time — cpu_time(); residual - do_point_sor(#gd, omega); time +- cpu_time(); ++iteration_count; i f ( (print_lnterval I- 0) 8fif (iteration_count % prlnt_interval -- 0)) then printf("Iteration %d of %s: Max residual - %.21e (old«%.5f)\n", iteration_count, lteratlon_limit, residual, residual/old_residual); i f ( (disk_write_interval 1-0) 5W (lteration_count % dlsk_write_lnterval ~ 0)) then { input_output_gfn(MODEL_NAME, "write", Sgd); i f (print_interval I- 0) then prlntf("<disk update done>\n"); } } quit: 310 main directory PS0R.C;38 21-SEP-1985 19:28 Page 3 i f ((print.Interval 1- 0) 88 (iteration_count 1-0)) then prlntf("%d iterations/*.2f cpu seconds ~> %.2f cpu msec/lteration\n", iteratlon_count, time, 1.0e3 * time/iteration_count); /« f i n a l disk update V lnput_Output_gfn(MODEL_NAME, "write", Sfgd); /* log to '.par' f i l e : V par_log(MODEL_NAME, argc, argv, time); 311 main directory SETEXTRAP.C;27 21-SEP-1985 19:28 Page 1 •include "util:stdo.h" •include "patchutil:patch.h" •include "patchutil:blackhole.h" /tt***************************************************************************/ /* * This function sets the extrapolation, or 'true', boundary coefficients, for * a l l boundaries of a l l patches. * * Arguments: * pgd —> The grld_dscr structure describing the coordinate grid system. * pbhsd —> The bhs_dscr structure describing the black hole system. This i s * needed since 'marginally trapped surface' boundary conditions * Involve the extrinsic curvature. «/ void set_extrapolation_coeff(pgd, pbhsd) register struct grld_dscr *pgd; register struct bhs_dscr *pbhsd; { void cvt_lJ_to_xy(); double K_hat_sub_rr(); int p; register struct coord_patch_dsor *ptr; enum bndry bndry; register struct llne_end_dscr "pled; int 1. J; int *pij_scan, *pij_end, start, oount; double x, y; double b l , b2, b3; double sign; for (p - 1 ; p <- pgd->N_patch ; ++p) ptr - W pgd->patch[p]; i f (ptr->coord_type I- POLAR_SPHERICAL) then continue; /* * Only polar spherical patches have 'true' * boundary conditions of the types that need * * coefficients (note NEUMANN doesn't). •/ /* * get to here --> we must check each boundary point of the patch to * see what, i f anything, needs doing: «/ for (bndry - I_MIN ; bndry <- J_MAX ; ++bndry) { /• f i r s t , decide Just which variable to scan: */ switch (bndry) 312 main directory SETEXTRAP.C;27 21-SEP-1985 19:28 Page 2 { case I_MIN: case I_MAX: pij_scan - » J; start - ptr->J_mln; count - ptr-> J_max - start + 1; plj_end - » 1; break; case J_MIN: case J_MAX: pij_scan - » 1; start - ptr->i_min; count - ptr->i_max - start + 1; pij_end - sr j ; break; } /» now scan tbe points of this boundary: */ for (*plj_scan - start ; count— > 0 ; ++*pij_scan) { pled - tt ptr->line_end[(int)bndry][*plj_scan]; switch (pled->flag) case ROBIN: oase REFLECTION_SYMMETRIC: case MARGINALLY_TRAPPED: break; /* work to do!!! •/ default: continue; /* with next boundary point */ } /* * get to here —> extrapolation coefficients needed!!I * / *plj_end - pled->end_lj; cvt_iJ_to_xy(ptr, i . J. ttx, Sy); •define R z •define THETA y •define DELTA_R ptr->l_step switch (pled->flag) case ROBIN: bl - 1.0 / R; b2 1.0 / R; b3 - 0.0; break; case REFLECTION_SYMMETRIC: bl - 1.0 / (2.0 « R); b2 - 0.0; b3 - 0.0; break; case MARGINALLY_TRAPPED: main directory 313 SETEXTRAP.C;27 21-SEP-1985 19:28 Page 3 bl - 1.0 / (2.0 * R); b2 - 0.0; b3 - 0.2S * K_hat_sub_rr(pgd, pbhsd, ptr, R, THETA); break; } /* set aotual extrapolation coefficients: */ switch (bndry) { case I_MIN: case J_MIN: Sign - 1.0; break; case I_KAX: case J_MAX: sign - - 1.0; break; } •define ROOT pled->boundary_info.extrapolate ROOT.dl - bl * 2.0 * DELTA_R * sign; ROOT.d2 - b2 * 2.0 * DELTA_R * sign; R00T.d3 - b3 * 2.0 * DELTA.R » Sign; /* end of this boundary point V } /» end of this boundary */ } /« end of this patch •/ } } 314 main directory SOLVE.C;96 21-SEP-1985 19:30 Page 1 /* Direct solution stuff which i s independent of Ax-b solution method. */ /» * The following global variables and functions l i v e i n this f i l e : * psi_mapping - Records mapping from (p.i.J) to equation number * neqn - Number of equations * mode - FLOAT or DOUBLE — gives precision to which next step w i l l be taken * (f_rhs,d_rhs) —> Right-hand-side vector * (f_solution,d_solutlon) —> Solution vector * * first_tlme - Helper function: have we been called before with same args??? * setup_dlrect_solve - Sets up rhs, solution, Jacobian sparslty structure * setup_initial_ordering - Sets up i n i t i a l ordering of grid points * setup_rhs_solution - Sets up the rhs/solution vectors for Newton iteration * update_psi - Takes Newton step. */ •define DEBUG 1 •define DEBUG_TRACE 0 •include "util:stdo.h" •include "patchutil:patch.h" •include "solve.h" •define TROUBLE error_exlt(OK_EXIT, \ "\n***»* Insufficient 'oalloo(...)' memory — exiting **»*»\n" \ ) /« DOES NOT RETURN */ / * * « * * * * * * * * * * * * * * * * * • * * * * * » * * * * * * * * * * * * * * * * * * * * * * * * * * * » * * * * * * * * * * * * * * * * * * * * * * / /* * Note that 'plj_mapping' i s only used via the 'index(...)' macro, defined in * the 'solve.h' header f i l e I I I */ int **pij_mapping; /* reoords (p.i.J) —> equation • mapping */ int neqn; /• number of equations */ enum precision mode; float *f_rhs, *f_solution; double *d_rhs, *d_solutlon; / » * » « » » » » » » » * » * » * » * * « » « « » * » * » » * * » * » * • * » » » » » » « « * * * » « » » » » » » * * » » » » * * « » * « « * » » « » » » * / /* * This function returns TRUE i f either (a) this i s the f i r s t c a l l on i t , or * (b) the previous c a l l had any arguments different. Otherwise, the function * returns FALSE. • * Arguments: * (p.i.J) - Arguments to be ohecked. */ ' boolean f i r s t _ t i m e ( p , i , J ) int p . i . J ; { statlo boolean f i r s t _ f l a g - TRUE; B t a t i o int old_p, o l d _ i , old_J; 315 main directory SOLVE.C;96 21-SEP-19S5 19:30 Page 2 boolean return_value; return_value - ( f i r s t _ f l a g i l l((p — old_p) &W (1 — old_l) SSf (J ~ old_J))); f i r s t _ f l a g - FALSE; old_p - p; O l d _ l - 1; O l d _ j - j ; return(return_value); } / « » * » * » » « » » » » » « * * * * * « « » » » * » * * * » » * » * * * * * * * * * * * » » » * « * * * * « « * « « » * * * * « » * * * * * * » » » » » * / /* * This function sets up the rhs and solution vectors, and the sparslty * structure for the Jacobian. • * Arguments: » pgd —> xhe grid descriptor for the system. »/ void setup_dlrect_solve(pgd) struct grid_dscr *pgd; { char *calloo(); void compute_Jacoblan(); void setup_lnltial_orderingO; void record_sparsity_structure(); /* called via 'oompute_Jacobian' */ void allocate_Jacobian_etorage(); setup_initial_ordering(pgd); • i f DEBUG prlntf("setup_direot_solve: neqn-%d\n", neqn); •endlf /* allocate r h s t l , solution!] storage: •/ f_rhs - ALLOC(neqn, flo a t ) ; f_solution - ALLOC(neqn, float); d_rhs - ALLOC(neqn, double); d_solution - ALLOCCneqn, double); i f ( (f_rhs -- NULL) I I (f_solutlon -- NULL) II (d_rhs — NULL) II (d_SOlution — NULL)) then TROUBLE; compute_Jacobian(pgd, 0, fifreoord_sparslty_structure); • i f DEBUG prlntf("setup_direot_solve: a l l sparslty structure recorded\n"); •endlf allocate_Jacobian_storage(); } / * » * » » » » * » » » * * » * » » » » » » * * » * * * * * * * * « * * * * * » * » * * » * » » » * » * * * * * » * * * » * » » * * * * * « * » * * » * » * / 316 main directory SOLVE.C;98 21-SEP-1985 19:30 Page 3 /* * This function sets up the i n i t i a l ordering (i.e. (p,l,J) <—> p l j mapping) * for the system. Aotually, only the '—>' mapping i s stored, since we never * need to map from p i j back to (p.i.J). This mapping i s stored i n 'callocO' * storage, pointed to by the statlo variable 'piJ.mapping'. * * Arguments: » pgd —> xhe grid descriptor for the system. »/ void setup_inltial_ordering(pgd) register struct grid_dscr *pgd; { char *calloc(); void error_exit(); int posn; int p, i j register struct coord_patoh_dscr *ptr; pij_mapping - ALLOC(pgd->N_patch, int * ) ; i f (pij_mapping — NULL) then TROUBLE; —plj_mapping; /* allow for orlgln-1 array indexing with patch • */ posn - 0; for (p - 1 ; p <- pgd->N_patch ; ++p) ptr - Sf pgd->patch[p]; •define SIZE (ptr->l_max - ptr->l_min +1) pij_mapplng[p] - ALLOC(SIZE, i n t ) ; i f (plj_mapplng[p] ~ NULL) then TROUBLE; plj_mappingtp] — ptr->i_min; /* allow for non-zero origin */ for ( i - ptr->l_min ; i <- ptr->l_max ; ++i) pij_mapping[p][1] - posn - ptr->llne_end[J_MIN][1].end_ij; • i f (DEBUG_TRACE >- 2) printfCpij_mapping[p-%d]ti-%d] - %d (posn-%d)\n", p, 1, plj_mapplng[p][1], posn); •endlf posn +- ptr->llne_end[J_MAX]ti].end_ij - ptr->line_end[J_MIN]ti].end_ij + 1; } /* end of this patch •/ > neqn - posn; / » « » « » » • * » * » • » « « * « » * « • • » » » » * * » » » « » « • » « * * * » » • » » * * » « * * » » « » « » * « * « * » • « * » » » » » * » * » » * / 317 main directory SOLVE.C;96 21-SEP-1985 19:30 Page 4 /• * This function sets up the rhs vector for a nev Newton Iteration. It assumes * that the Jacobian has been multiplied throughout by -1 to make l t positive * definite, so the rhs veotor can Just be the residual i t s e l f . It also sets * up the solution vector to be the current value of psi, as an i n i t i a l guess. * * Arguments: (expliolt) * pgd —> Grid descriptor for system. * * Arguments: (Implicit, as global variables) * plj_mapping - (p.i.J) —> p i j mapping vector. Used via macro 'index(...)'. * mode - FLOAT or DOUBLE to specify the precision to use. * (f_rhs[],d_rhs[]) - RHS vector. (MODIFIED) » (f_solution[],d_solution[]) - Solution vector. (MODIFIED) */ void setup_rhs_solution(pgd) register struct grid_dscr *pgd; double compute_resldual(); /* computes them in grid function array */ Int p. 1, J; register struct coord_patch_dscr *ptr; struct grid_fn *gfp; compute_residual(pgd); for (p - 1 ; p <- pgd->N_patch ; ++p) { ptr - fir pgd->patoh[p]; for (1 - ptr->l_mln ; 1 <- ptr->l_max ; ++1) { for (J - ptr->llne_end[J_MIN][i].end_lj ; J <- ptr->line_end[J_MAI][1].end_lj ; ++J) { gfp - GRID_FNS(ptr, 1, J); i f (mode -- FLOAT) then { f_rhs[index(p,i,J)] - gfp->R_; f_solution[index(p,i,J)] - gfp->psl_; } 0 l S 6 { d_rhs[index(p,i,J)] - gfp->R_; d_solutlon[index(p,l,J)] - gfp->psl_; } } } /» end of this patch */ } } / * » * * * * * » » » » » » * * * * * * » * » * « » » « * * * « * * * « * * * » * » » » * * * » » * * » » * * * » * » * * * * » * * * * * * * * * * * * * * / 318 main directory SOLVE.C;96 21-SEP-1985 19:30 Page 5 * This function uses the computed solution to the linear system (with negated * Jacobian) to update psi l n the grid function array by the Newton step size. • * Arguments ( e x p l i c i t ) : * pgd —> The grid descriptor for the system. * omega - Fraotion of the computed step to take. Standard Newton iteration i s » omega-1.0. * * Arguments (implicit, as global variables): « mode - Either FLOAT or DOUBLE as appropriate. * (f_solution[],d_solutiont]) - The vector giving the Newton step amount. * pij_mapping - (p.i.J) —> p i j mapping vector. Used via macro 'lndex(...)'. */ void update_psi(pgd, omega) register struct grid_dscr *pgd; double omega; { register int p, i , J; register struct coord_patch_dscr *ptr; double calc_step; for (p - 1 ; p <- pgd->N_patch ; ++p) ptr - Sf pgd->patch[p]; for ( i - ptr->l_mln ; 1 <- ptr->l_max ; ++1) for (J - ptr->llne_end[J_MIN][i].end_ij ; J <- ptr->llne_end[J_MAX][1],end_ij ; { oalo_step - (mode FLOAT) ? f_solution[lndex(p,i,j)] : d_solution[index(p,i,j)] ; GRID_FNS(«f pgd->patch[p], l,J)->psl_ +- omega * calc_step; > } } } 319 main directory S0LVECG.C;64 21-SEP-1985 19:31 Page 1 /* Direot solution stuff for Incomplete LU - Congugate Gradient solver: *l /* * The following functions l i v e i n this f i l e : * <global variables> - Storage for Jacobian. * record_sparslty_structure - Records where 'compute_Jacoblan' has non-zeros * allocate_Jacobian_storage - Allocates storage for the Jacobian * direot_solve - Does a single Newton iteration on the system ** inlt_Jacobian_storage - Sets Jacobian to a l l zeros ** setup_Jacobian - Sets up sparslty structure and Jacobian numerical values ** scale_Jacobian_rhs - Rescales Jacobian/rhs to improve numerical conditioning *« dump_Jacobian_rhs_solutioh - Dumps out Jacobian/rhs/solution to a f i l e */ •define DEBUG 1 •define DEBUG_TRACE 0 •include <stdio.h> •include "util:stdo.h" •include "patchutil:patoh.h" •Include "solve.h" / o a * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * . /* * These variables hold the Jacobian, i n the format defined by the 'SILUCG'/ * 'DILUCG' FORTRAN subroutines used to do the actual sparse matrix solution. * * Note that the 'storage' arrays are subscripted in origin 1 and the 'INDEX' * macro i s used i n preference to the 'index' one, since l t too i s set up for * origin 1 indexing. This i s i n deference to FORTRAN. */ /* name i n 'SILUCG'/'DILUCG' documentation: */ statlo int non_zero_count - 0; /* 'MAX' V statlo int *row_INDEX; /* 'IA' •/ S t a t l o int *COl_INDEX; /* 'JA' */ statlo float . »f_JACOBIAN; /* 'A' for SILUCG */ static double *d_JACOBIAN; /* 'A' for DILUCG */ statlo int »itemp; /* 'ITEMP' (SILUCG/DILUCG scratch storage) */ 6 t a t i o float *f_temp; /* 'RTEMP' (SILUCG scratch storage) */ static double *d_temp; /* 'RTEMP' (DILUCG scratch storage) •/ / » » » » » » » » » » » * * * » * » « » » » » » » » » • » • * » » * * * » * * * » » • * » • • » * * « » * » * » * * • » » * * * » » * » » * » « * » : > » » » / I* * This function i s called once for each non-zero element i n the Jacobian. It « records information about the sparslty structure for later use i n storage * allocation. * * Arguments ( e x p l i c i t ) : » ( p l . l l . J l ) - 'Source' grid point. * (p2.12.J2) - 'Destination* grid point. * J12 - Partial derivative of residual at 'source' grid point w.r.t. psi at » 'destination' grid point. This argument i s ignored. » * Arguments (implicit, as global variables): 320 main directory S0LVECG.C;64 21-SEP-1985 19:31 Page 2 * non_zero_count - (Incremented as appropriate) »/ void record_sparsity_structure(pl,il, j l , p2,12,J2, J12) int p l . l l . j l , p2.12.J2; double J12; /* IGNORED */ { boolean first_tlme(); void error_exit(); /* * To count tbe number of non-zeros l n the Jacobian before storage i s allocated * for i t , we must buffer tbe indioes of non-zero elements already seen i n tbe * current row to avoid duplication i f they are incremented again. */ •define BUFSIZE 25 static int buffer[BUFSIZE]; static int bufptr; /* index of highest valid entry i n buffer */ int 1, INDEX2; If ( f i r s t _ t i m e ( p l , i l , j l ) ) then { bufptr 1; /* i n i t i a l i z e buffer */ INDEX2 - INDEZ(p2,i2,J2); • i f (DEBUG_TRACE >- 2) printf("record_sparsity_structure: •%d(»d,%d) •%d(%d,%d)-%d l n i t bufptr=%d\n", p l . i l . J l , p2,12,J2, INDEX2, bufptr); •endlf /* search to see i f *2 grid point i s already i n buffer for this row: */ • i f (DEBUG_TRACE >- 2) printf("searching"); •endlf for (1 - 0 ; i <- bufptr ; ++i) { • i f (DEBUG_TRACE >- 2) printf(" %d". buff e r [ i ] ) ; •endlf i f (buffer[1] ~ INDEX2) then { I* found It! */ • i f (DEBUG_TRACE >- 2) printf("\n"); •endlf return; /* already present --> already recorded */ } } • i f (DBBUG_TRACE >- 2) . printf(" (insert)\n"); •endlf /* not present --> record and buffer i t : */ main directory S0LVECG.C;64 21-SEP-1985 19:31 Page 3 If (bufptr >- BUFSIZE-1) then error_exit(OK_EXIT,"\ •**»* record_sparBity_structure: row buffer overflow at src •%d(%d,%d)=%d,\n\ «***« dst •%d(%d.%d)-%d — exlting\n", p l . i l . J l . INDEX(pl.il.Jl). p2,i2,J2, INDEX2 ); /* DOES NOT RETURN */ buffer[++bufptr] - INDEX2; ++non_zero_count; } / • u t ) t i i i i i i i i i i i i x u i t t t i i i i i n i t i t i i i i i n i t t t i i i / /* * This routine allocates storage for the Jacobian, i n the format required by * the 'SILUCGVDILUCG' subroutines. * * Arguments: (lmplioit, as global variables:) * neqn - Number of equations. * non_zero_count - Number of non-zero entries in the Jacobian. » (row_INDEX,col_INDEX,F_JACOBIAN,D_JACOBIAN,itemp,f_temp,d_temp) * - Set as appropriate. •/ void allocate_Jaooblan_storage() { char *calloc(); void error_exit(); row_INDEX - ALLOC(neqn+1, i n t ) ; col_INDEX - ALLOC(non_zero_COunt, i n t ) ; itemp - ALLOC( 3*(neqn+non_zero_count)+2 , int ); f_JACOBIAN - ALLOC(non_zero_oount, fl o a t ) ; f_temp - ALLOC( 4*neqn + non_zero_count , float ); d_JACOBIAN - ALLOC(non_zero_count, double); d_temp - ALLOC( 4*neqn + non_zero_oount , double ); i f ( (row_INDEX — NULL) I I (col_INDEX — NULL) I I (itemp ~ NULL) I I (f_JACOBIAN — NULL) I I (f_temp — NULL) I I (d_JACOBIAN — NULL) I I (d_temp — NULL) ) then error_exlt(OK_EXIT, -\n*»»»» insufficient , c a l l o c ( . . . ) ' storage for Jacobian — exiting »»»*«\n" ); /» DOES NOT RETURN */ /« use origin 1 Indexing for FORTRAN-style arrays: •/ —row_INDEX; —COl_INDEX; —f_JACOBIAN; —d_JACOBIAN; • i f DEBUG printf("allocate_Jaoobian_storage: ok with neqn-%d non_zero_count-%d\n". neqn, non_zero_oount ); •endlf } 322 main directory S0LVECG.C;64 21-SEP-1985 19:31 Page 4 / > > • • > * * • > • « • > > « * * * > • > > • » • * * • > * > * > > • • * • * • < • * * * * < * > > • • • • « • > > * > * * • * > > » * > * > > < > > > > / This funotion does a single 'direot solution' Newton Iteration. Arguments: (explicit) pgd —> The grid desorlptor for the system. eps - Permitted relative error i n Newton step. This can be used to set a convergence c r i t e r i a i f an iterative method i s used i n an inner iteration to calculate the Newton step, omega - Fraotion of oalculated Newton step to take. Normal Newton iteration i s omega-1.0. dump_flle_name - (Pointer to standard C character string) f i l e name to dump Jacobian and rhs veotor to, or NULL to skip this. The updated residual i s returned as the function result. »/ double direct_solve(pgd, eps, omega, dump_flle_name) register struct grid_dscr *pgd; double eps, omega; char *dump_file_name; void compute_Jacobian(); void setup_rhs_solutlon(); unsigned SILUCGO, DILUCGO; /* FORTRAN codes to solve sparse A"x-b */ void update_psl(); double compute_resldual(); static void inlt_Jacobian_storage(); static void setup_Jacoblan(); /* called via 'compute_Jacoblan(...)' */ statlo void scale_Jacobian_rhs(); statlo void dump_Jacobian_rhs_solution(); float f_eps - eps; char *subname; int iterations, max_iterations; unsigned status; boolean ILUCG_suooess; i f (eps < 0) then mode - DOUBLE; /* want high-accuracy */ else { /• variable-accuracy —> possibly FLOAT? */ float test; test - 1.0; test +- eps/1000; /* « Allow 3 digits room between roundoff floor « and precision — i f i t f i t s , FLOAT; i f not, • DOUBLE. */ mode - (test — 1.0) ? DOUBLE : FLOAT; } subname - (mode — FLOAT) ? "SILUCG" : "DILUCG"; setup_rhs_solution(pgd); inlt_Jacobian_storage(); compute_Jacobian(pgd, 0, 8fsetup_Jacobian); 323 main directory S0LVECG.C;64 21-SEP-1985 19:31 Page 5 scale_Jaoobian_rhs(); i f (dump_file_nanie I - NULL) then dump_Jacoblan_rhs_solutlon(dump_flle_name); • i f DEBUG printf("dlreot_solve: about to try "*s(...)' with eps-%g\n", subname, eps); •endlf max_iterations - neqn; /* should converge i n much less than this */ status - (mode -- FLOAT) ? SILUCG(ffneqn, Jfrow_INDEX[l] , «fCOl_INDEXCl] , fiff_JACOBIAN[ 1] , f_rhs, f_solution, itemp, f_temp, Sf_eps, «fmax_lterations, Alterations) : DILUCG(&fneqn, Srow_INDEX[1], Scol_INDEX[l], «W_JACOBIAN[1], d_rhs, d_solution, itemp, d_temp, Seps, &fmax_iterations, Alterations) ; ILUCG_success - (status » 01) ? TRUE : FALSE; /» * FORTRAN only uses low bit to * store booleans. */ i f (I ILUCG_success) then error_exit(OK_EXIT, "dlrect_solve: "*s(...)' error return — row %d l n error — exltlng\n", subname, iterations ); /* DOES NOT RETURN */ i f (iterations < 0) then printf( "dlrect_solve: "*s(...)' convergence failure after %d lteratlonsXn", subname, -iterations ); • i f DEBUG printf("direot_solve: back from , % s ( . . . ) ' after %d/%d iteratlons\n", subname, iterations, max_iteratlons); •endlf update_psl(pgd, omega); return(compute_residual(pgd)); / * « » * « » » * * * * * « « « * » * * • * » * * * * • » » » » » » * » » « » » » * « * * * * « * » » » » » » « » » » * * » * * * * * * * » » * » * « « « » / /* * This funotion sets the Jacobian to a l l zeros, and does other i n i t i a l i z a t i o n * on the sparsity structure arrays. * * Arguments (implicit, as global variables): * mode - FLOAT or DOUBLE — t e l l s what precision to use. * non_zero_count - Gives size of following array arguments. * (f_JACOBIAN[],d_JACOBIAN[]) - Set as appropriate. * row_INDEX - Set as appropriate. */ statlo void lnit_Jaoobian_storage() { int i ; 324 main directory S0LVECG.C;64 21-SEP-198S 19:31 Page 6 for (1 - 1 ; 1 <- non_zero_oount ; ++i) { If (mode « FLOAT) then f_JACOBIAN[i] - 0.0; else d_JAC0BIAN[i] - 0.0; } row_INDEX[l] - 1; /* where f i r s t row w i l l start */ } /********«*(*••*******•*********************•*•>•************************•>>>>/ /* * This function sets up the actual numeric values of the Jacobian and i t s * associated pointer arrays. It i s called at least once for each non-zero » Jacobian value, with the passed 'J12' values additive. * * Note that the negative of the passed values are actually stored, so that the * diagonal w i l l be a l l positive rather than a l l negative. * * Arguments ( e x p l i c i t ) : * ( p l . i l . J l ) - 'Source' grid point. * (p2,i2,J2) - 'Destination' grid point. * J12 - Partial derivative of residual at 'source' grid point w.r.t. psi at * 'destination' grid point. This argument i s ignored. * * Arguments (Implicit, as global variables): * (non_zero_count,neqn) - These give sizes to check for buffer overflow etc. « mode - FLOAT or DOUBLE — t e l l s what precision to use. * (row_INDEX,col_INDEX,f_JACOBIAN,d_JACOBIAN) - Set to appropriate values. «/ statlo void setup_Jaooblan(pl,il,Jl, p2,12,J2, J12) int p l . i l . J l , p2,12,J2; double J12; { boolean flrst_time(); void error_exlt(); S t a t i c int EQN; int COL; int 1; i f ( f i r s t _ t i m e ( p l , i l , J l ) ) then { EQN - INDEX(pl,il.Jl); row_INDEX[EQN+l] - row_INDEX[EQN]; /* INDEX of next free slot */ • i f (DEBUG_TRACE >- 2) prlntf("setup_Jaoobian: starting new row at •%d(%d,%d), INDEX-%d\n", p l . l l . J l , EQN); •endlf } COL - INDEX(p2,i2,J2); 325 main directory S0LVECG.C;64 21-SEP-1985 19:31 Page 7 •If (DEBUG_TRACB >- 3) printf("... dst is •%d(%d,%d), INDEX-%d: searching", p2.12.J2, COL); •endif /* search to see i f there already i s an entry for this (p2,i2,J2) i n row: */ for (1 - rOW_INDEX [ EQN ] ; 1 < row_INDEX[E(}N+l] ; ++1) { • i f (DEBUG_TRACB >- 3) printf(" %d". i ) ; •endif i f (col_INDEX[i] — COL) then { • i f (DEBUG_TRACE >- 3) printf("\n"); •endlf g^ oto store; } • i f (DEBUG_TRACE >- 3) printf(" (not found)\n"); •endif /* not found —> create new entry: */ 1 - row_INDEX[EQN+l] ++; If (1 > non_zero_count) then error_exit(OK_EXIT, » setup_Jacobian: array overflow at INDEX-%d/MAX=%d ~ exiting ****«\n", i , non_zero_count ); /• DOES NOT RETURN */ • i f (DEBUG_TRACE >- 2) printf("inserting into posn %d\n", i ) ; •endlf COlIlNDEXti] - COL; i f (mode — FLOAT) then f_JACOBIAN[i] +- -1.0 * J12; /* store negated */ else d_JACOBIAN[i] + 1.0 * J12; /* store negated V } / » « « * » » » * * » * * « « « » » » « » » » * « * » * « « » « » « « « « • « * * « * * * * * » « » » » * » » » » « » » * « « * « » * * * » * « * « « » » « / /* * This function does row scaling on the Jacobian and the rhs to improve the * numerical conditioning of the system. In particular, each row i s divided by * i t s (original) diagonal element, so a l l the diagonal elements of the scaled * Jacobian are +1.0. Note that this scaling does NOT effect the solution to * the system (ln the absence of rounding errors), since the rhs vector i s also * scaled as needed. * * Arguments: (lmplioit) * mode - Tells which Jacobian/rhs pair to scale. * neqn - Number of equations i n system to scale. * (row_INDEX,col_INDEX,f_JACOBIAN,d_JACOBIAN) - (modified) Give the Jacobian 326 main directory S0LVECG.C;64 21-SEP-1985 19:31 Page 8 * to be scaled. * (f_rhs,d_rhs) - (modified) Give the rhs vector, which must also be scaled by * the same amounts the Jacobian i s scaled by. */ statio void soale_Jaooblan_rhs() { int EQN; int POSN; double diagonal; for (EQN - 1 ; EQN <- neqn ; ++EQN) { I* find diagonal: */ for (POSN - row_INDEX[EQN] ; POSN < row_INDEX[EQN+l] ; ++POSN) { i f (col_INDEX[POSN] ~ EQN) then goto found; } error_exit(OK_EXIT, "»**** scale_Jacobian_rhs: no diagonal element found for EQN-%d\n", EQN); /» DOES NOT RETURN */ found: diagonal - (mode — FLOAT) ? f_JACOBIAN[POSN] : d_JACOBIAN[POSN]; /« rescale: V i f (diagonal ~ 0.0) then error_exit(OK_EXIT, -«*»*» scale_Jacobian_rhs: zero diagonal found for EQN=%d\n", EQN); /* DOES NOT RETURN */ for (POSN - r0W_INDEXCEQN] ; POSN < row_INDEX[EQN+l] ; + + P0SN) { i f (mode -- FLOAT) then f_JACOBIAN[POSN] /- diagonal; else d_JAC0BIAN[P0SN] /- diagonal; i f (mode — FLOAT) then f_rhstEQN-l] /- diagonal; else d_rhs[EQN-l] /- diagonal; /* end of this equation */ } / • « » « » * * » » * * » * * * » » » » » » * * * * * » « * * » » » « * * * * » * » » * * « « * * » » » * » * * * « * « » » » * « » « » » » « « » « » » » » / /« * This funotion dumps out the Jacoblan/rhs/solutlon to a specified f i l e . The * format Is a oompromlse between (a) not making the f i l e too huge for big * problems, (b) making i t human-readable for ease of debugging, (c) making i t * an accurate dump so other programs can read the results back in 4/ try their * hands at matters, and (d) making l t fixed-format for the sake of FORTRAN * programs whioh are too stupid to read nioe-format input. * * Arguments: (explioit) * filename - (A pointer to) a standard C character string giving the filename * to dump the Jacobian/rhs/solution out to. main directory S0LVECG.C;64 21-SEP-1985 19:31 Page 9 * * Arguments: (lmpllolt) * mode - Tells which Jaooblan/rhs/solution pair to dump. * neqn - Number of equations i n system to dump. * non_zero_oount - Number of non-zeros i n Jacobian to dump. * (row_INDEX.ool_INDEX,f_JACOBIAN,d_JACOBIAN) - Gives the Jacobian to be « dumped. * (f_rhs,d_rhs) - Gives the rhs vector to be dumped. * (f_solution,d_solution) - Gives the solution vector ( I n i t i a l guess) to be * dumped. */ static void dump_Jacobian_rhs_solution(filename) char 'filename; { FILE «fopen(); void fprintfQ, foloseO; void error_exit(); void dump_int_array(), dump_float_array(), dump_double_array(); FILE *fp; int I, EQN; char cmode - (mode FLOAT) ? ' f : 'd'; fp - fopen(filename, "w"); i f (fp — NULL) then error_exit(OK_EXIT, "***•• dump_Jacoblan: f a i l e d to open '%s' for writeing\n", filename); /* DOES NOT RETURN «/ •define IDUMP(N.A) \ dump_int_array(fp, (A).l.(N), 10. l."%6d:" p "%6d", 0,"\n") •define FDUMP(N.A) \ dump_float_array(fp. (A).l.(N). B. l,"%6d:", "%25.17e", 0,"\n") •define DDUMP(N.A) \ dump_double_array(fp, (A).l.(N). 5, l."%6d:", "%25.17e", 0,"\n") fprint f(fp, "neqn-%6d\n", neqn); fprintf(fp, "non_zero_oount-%6d\n", non_zero_count); fprintf(fp. "mode-%s\n", (mode — FLOAT) ? "FLOAT" : "DOUBLE"); fprlntf(fp, "\n"); fprlntf(fp, " Dump of 'row_INDEX[1...%d]' follows \n". neqn+1); IDUMP(neqn+l, row_INDEX); fprintf(fp, "\n"); fprlntf(fp, " Dump of "ool_INDEX[1...Std]* follows \n", non_zero_oount); IDUMP(non_zero_oount, ool_INDEX); fprintf(fp. "\n"); fprintf(fp, " Dump of '%o_JACOBIAN[1...%d]' follows \n", omode, non_zero_oount); i f (mode — FLOAT) then FDUMP(non_zero_count, f_JACOBIAN); main directory S0LVECG.C;64 21-SEP-198S 19:31 Page 10 else DDUMP(non_zero_oount, d_JAC0BIAN); fprintf(fp, "\n") ; fprintf(fp, " Dump Of "*o_RHS[l...%d]' follows \n", cmode, neqn); i f (mode — FLOAT) then FDUMP(neqn, f_ r h s - l ) ; else DDUMP(neqn, d_rhs-l); fprintf(fp, "\n") ; fprlntf(fp, " Dump of 'Sc.SOLUTIONtl...%d]' follows — \n", cmode, neqn); i f (mode — FLOAT) then FDUMP(neqn, f_solution-l); else DDUMP(neqn, d_solution-l); fclose(fp); 329 f ortran directory MYDILUCG.F0R;13 21-SEP-198S 19:47 Page 1 LOGICAL FUNCTION DILUCG(N,IA,JA,A,B,X.ITEMP.RTEMP.EPS,ITER,IE) IMPLICIT REAL*8(A-H,0-Z) C C INCOMPLETE LU DECOMPOSITION-CONJUGATE GRADIENT C - — - -C WHERE: C INI IS THE NUMBER OF EQUATIONS. IF N < 0. ITEMP AND C RTEMP CONTAIN THE ILU FROM A PREVIOUS CALL AND C B AND X ARE THE NEW RHS AND INITIAL GUESS. C IA IS AN INTEGER ARRAY DIMENSIONED INI+1. IA(I) IS THE C INDEX INTO ARRAYS JA AND A OF THE FIRST NON-ZERO C ELEMENT IN ROW I. LET MAX-IACINI+1)-IA(1). C JA IS AN INTEGER ARRAY DIMENSIONED MAX. JA(K) GIVES C THE COLUMN NUMBER OF A(K). C A IS A REAL*8 ARRAY DIMENSIONED MAX. IT CONTAINS THE C NONZERO ELEMENTS OF THE MATRIX STORED BY ROW. C B CONTAINS THE RHS VECTOR. C X IS A REAL*8 ARRAY DIMENSIONED INI. ON ENTRY, IT CONTAINS C AN INITIAL ESTIMATE; ON EXIT, THE SOLUTION. C ITEMP IS AN INTEGER SCRATCH ARRAY DIMENSIONED 3*(INI+MAX)+2. C RTEMP IS A REAL*8 SCRATCH ARRAY DIMENSIONED 4*INI+MAX. C EPS IS THE CONVERGENCE CRITERIA. IT SPECIFIES THE RELATIVE C ERROR ALLOWED IN THE SOLUTION. TO BE PRECISE, CONVERGENCE C IS DEEMED TO HAVE OCCURED WHEN THE INFINITY-NORM OF THE C CHANGE IN THE SOLUTION IN ONE ITERATION IS .LT. EPS * THE C INFINITY-NORM OF THE CURRENT SOLUTION. HOWEVER, IF EPS C .LT. 0.0D0, IT IS INTERNALLY SCALED BY THE MACHINE PRECISION, C SO THAT, FOR EXAMPLE, EPS - -256.0 WILL ALLOW THE LAST TWO C HEXADECIMAL DIGITS OF THE SOLUTION TO BE IN ERROR. C ITER GIVES THE REQUESTED NUMBER OF ITERATIONS. C IE IS AN INTEGER VARIABLE. FOR NORMAL RETURN, IT GIVES C THE NUMBER OF ITERATIONS DONE (NEGATIVE IS NO CONVERGENCE). C ON ERROR RETURN, THE ROW IN ERROR. C C (MODIFIED TO RETURN LOGICAL VALUE, J. THORNBURG, 13/MAY/85.) C (MODIFIED TO ADD CONVERGENCE CRITERIA, J. THORNBURG, 17/MAY/85.) C THE FUNCTION RETURNS .TRUE. ON A NORMAL RETURN, .FALSE. ON AN ERROR RETURN. C C REFERENCE: C D.S.KERSHAW,"THE INCOMPLETE CHOLESKY-CONJUGATE GRADIENT C METHOD FOR INTERATIVE SOLUTION OF LINEAR EQUATIONS", C J.COMPUT.PHYS. JAN 1978 PP 43-65 C DIMENSION IA(1),JA(1),A(1),B(1),X(1),ITEMP(1),RTEMP(1) NP-IABS(N) IE-0 IF (NP.EQ.O) GO TO 20 C CALCULATE INDICES FOR BREAKING UP TEMPORARY ARRAYS. Nl-NP+1 ' MAX-IA(Nl)-IAU) ILU-1 JLU-ILU+N1 ID-JLU+MAX IC-ID+NP JC-IC+N1 f o r t ran directory MYDILUCG.F0R.-13 21-SBP-1985 19:47 Page 2 JCI-JC+MAX IR-1 IP-IR+NP 151- IP+NP 152- IS1+NP IALU-IS2+NP IP (N.LT.O) GO TO 10 C DO INCOMPLETE LU DECOMPOSITION CALL DLU_(NP,IA,JA,A,ITEMP(IC),ITEMP(JC),ITEMP(JCI),RTEMP(IALU), « ITEMP(ILU),ITEMP(JLU),ITEMP(ID),RTEMP(IR),IE,820) C AND DO CONJUGATE GRADIENT ITERATIONS C CALL MODIFIED TO ADD ADJUSTABLE CONVERGENCE CRITERIA EPS C - J. THORNBURG, 17/MAY/85. 10 CALL DNCG_(NP,IA,JA,A,B,X,ITEMP(ILU),ITEMP(JLU),ITEMP(ID), * RTEMP(IALU),RTEMP(IR),RTEMP(IP),RTEMP(IS1),RTEMP(IS2), * EPS,ITER,IE) DILUCG - .TRUE. RETURN 20 DILUCG - .FALSE. RETURN END SUBROUTINE DLU_(N,IA,JA,A,IC,JC,JCI,ALU,ILU,JLU,ID,V,IE,*) IMPLICIT REAL»8(A-H,0-Z) DIMENSION IA(1).JA(1),A(l),IC(1),JC(1),JCI(l), « ALU(1),ILU(1),JLU(1),ID(N),V(N) LOGICAL NODIAG COMMON /ICBD / ICBAD C INCOMPLETE LU DECOMPOSITION C WHERE: C N.IA.JA, AND A ARE DESCRIBED IN SUBROUTINE ILUCG C IC IS AN INTEGER ARRAY DIMENSIONED N+l, IC(J) GIVES THE C INDEX OF THE FIRST NONZERO ELEMENT IN COLMN J IN C ARRAY JC. C JC IS AN INTEGER ARRAY WITH THE SAME DIMENSION AS A. C JC(K) GIVES THE ROW NUMBER OF THE K'TH ELEMENT IN C THE COLUMN STRUCTURE. C JCI IS AN INTEGER ARRAY WITH THE SAME DIMENSION AS A. C JCI(K) GIVES THE INDEX INTO ARRAY A OF THE K'TH ELEMENT C OF THE COLUMN STRUCTURE. C ALU HAS THE SAME DIMENSION AS A. ON EXIT, IT WILL C CONTAIN THE INCOMPLETE LU DECOMPOSITION OF A WITH THE C RECIPROCALS OF THE DIAGONAL ELEMENTS OF U. C ILU AND JLU CORRESPONDS TO IA AND JA BUT FOR ALU. C ID IS AN INTEGER ARRAY DIMENSIONED N. IT CONTAINS C INDICES TO THE DIAGONAL ELEMENTS OF U. C V IS A REAL SCRATCH VECTOR OF LENGTH N. C IE GIVES THE ROW NUMBER IN ERROR. C NOTE: DLU_ SETS ARGUMENTS IC THROUGH V. C ICBAD-0 C ZERO COUNT OF ZERO DIAGONAL ELEMENTS IN U. C C FIRST CHECK STRUCTURE OF A AND BUILD COLUMN STRUCTURE DO 10 I-l.H IC(I)-0 f ortran directory MYDILUCG.FOR;13 21-SEP-1985 19:47 Page 3 10 CONTINUE DO 30 I-l.N KS-IA(I) KE-IA(I+1)-1 NODIAG-.TRUE. DO 20 K-KS.KE J-JA(K) IP (J.LT.l.OR.J.GT.N) GO TO 210 IC(J)-IC(J)+1 IP (J.EQ.I) NODIAG-.FALSE. 20 CONTINUE IF (NODIAG) GO TO 210 30 CONTINUE C MAKE IC INTO INDICES KOLD-IC(l) IC(1)-1 DO 40 I-l.N-KNEW-IC(I+1) IF (KOLD.EQ.O) GO TO 210 IC(I+l)-IC(I)+KOLD KOLD-KNEW 40 CONTINUE C SET JC AND JCI FOR COLUMN STRUCTURE DO 60 I-l.N KS-IA(I) KE-IA(I+1)-1 DO 50 K-KS.KE J-JA(K) L-IC(J) IC(J)-L+1 JC(L)-I J C K D - K 50 CONTINUE 60 CONTINUE C FIX UP IC KOLD-IC(l) IC(1)-1 DO 70 I-l.N KNEW-IC(I+1) IC(I+l)-KOLD KOLD-KNEW 70 CONTINUE C FIND SORTED ROW STRUCTURE FROM SORTED COLUMN STRUCTURE NP-N+1 DO 80 I-l.NP ILU(I)-IA(I) 80 CONTINUE C MOVE ELEMENTS, SET JLU AND ID DO 100 J-l.N KS-IC(J) KB-IC(J+1)-1 DO 90 K-KS.KB I-JC(K) L-ILU(I) ILU(I)-L+1 f o r t ran directory MYDILUCG.F0R;13 21-SEP-1985 19:47 Page 4 JLU(L)-J KK-JCI(K) ALU(L)-A(KK) IP (I.EQ.J) ID(J)-L 90 CONTINUE 100 CONTINUE C RESET ILU (COULD JUST USE IA) DO 110 I-l.NP ILU(I)-IA(I) 110 CONTINUE C FINISHED WITH SORTED COLUMN AND ROW STRUCTURE C C DO LU DECOMPOSITION USING GAUSSIAN ELIMINATION DO 120 I-l.N V(I)-0.0D0 120 CONTINUE DO 200 IROW-l.N I-ID(IROW) PIVOT-ALU(I) IF (PIVOT.NB.0.0D0) GO TO 140 C THIS CASE MAKES THB ILU LESS ACCURATE ICBAD-ICBAD+1 KS-ILU(IROW) KE-ILU(IROW+l)-l DO 130 K-KS.KE PIVOT-PIVOT+DABS(ALU(K)) 130 CONTINUE IF (PIVOT.EQ.0.0D0) GO TO 220 140 PIVOT-1.0D0/PIVOT ALU(I)-PIVOT KKS-I+1 KKE-ILU(IROW+l)-l IF (KKS.GT.KKE) GO TO 160 DO 150 K-KKS.KKE J-JLU(K) V(J)-ALU(K) 150 CONTINUE C FIX L IN COLUMN IROW AND DO PARTIAL LU IN SUBMATRIX 160 KS-IC(IROW) KE-IC(IROW+l)-l DO 190 K-KS.KE I-JC(K) IF (I.LE.IROW) GO TO 190 LS-ILU(I) LE-ILU(I+1)-1 DO 180 L-LS.LE J-JLU(L) IF (J.LT.IROW) GO TO 180 IF (J.GT.IROW) GO TO 170 AMULT-ALU(L)'PIVOT ALU(L)-AMULT IF (AMULT.EQ.0.0) GO TO 190 GO TO 180 170 IF (V(J).EQ.O.ODO) GO TO 180 ALU(L)-ALU(L)-AMULT*V(J) 333 fo r t ran directory MYDILUCG.F0R;13 21-SEP-1985 19:47' Page 5 180 CONTINUE 190 CONTINUE C RESET V IF (KKS.GT.KKE) GO TO 200 DO 195 K-KKS.KKE J-JLU(K) V(J)-0.0D0 195 CONTINUE 200 CONTINUE RETURN 210 IE-I RETURN 1 220 IB-IROW RETURN 1 END SUBROUTINE DNCG_(N,IA,JA,A,B,X,ILU,JLU,ID,ALU,R,P,SI,S2, • EPS,ITER,IE) IMPLICIT REAL*8(A-H,0-Z) DIMENSION IA(1),JA(1),A(1).B(N),X(N),ILU(1),JLU(1),ALU(1).ID(N), * R(N),P(N),S1(N),S2(N) C NONSYMMETRIC CONJUGATE GRADIENT C WHERE: C N.IA.JA.A.B, AND X ARE DESCRIBED IN SUBROUTINE DILUCG. C ILU GIVES INDEX OF FIRST NONZERO ELEMENT IN ROW OF LU. C JLU GIVES COLUMN NUMBER. C ID GIVES INDEX OF DIAGONAL ELEMENT OF U. C ALU HAS NONZERO ELEMENTS OF LU MATRIX STORED BY ROW C WITH RECIPROCALS OF DIAGONAL ELEMENTS OF U. C R,P,S1, AND S2 ARE VECTORS OF LENGTH N USED IN THE C ITERATIONS. C FOLLOWING PARAMETER ADDED BY J. THORNBURG, 17/MAY/85. C EPS IS CONVERGENCE CRITERIA. (DESCRIBED IN SUBROUTINE C DILUCG). C ITER IS MAX NUMBER OF ITERATIONS. C IE GIVES ACTUAL NUMBER OF ITERATIONS, NEGATIVE IF C NO CONVERGENCE. C C R0-"B—A*X0 CALL DMUL1_(N,IA,JA,A,X.R) DO 10 I-l.N R(I)-B(I)-R(I) 10 CONTINUE C P0-(UT*U)(-1)*AT«(L«LT)(-1)*R0 C FIRST SOLVE L»LT*S1-R0 CALL DSUBL_(N,ILU,JLU,ID,ALU,R,SI) C TIMES TRANSPOSE OF A CALL DMUL2_(N,IA,JA,A,S1,S2) C THEN SOLVE UT«U*P-S2 CALL DSUBU_(N,ILU, JLU, ID, ALU, S2, P) IE-0 C INPROD IS DOT PRODUCT ROUTINE IN 'LIBRARY (UBC MATRIX P 28) C ALL CALLS ON IT COMMENTED OUT AND REPLACED WITH CALLS TO NEW C ROUTINE DGVV(...); SOURCE CODE FOR LATTER ADDED TO END OF C THIS FILE. - J. THORNBURG, 10/MAY/85. C CALL INPROD(R,Sl,EDOT,RDOT.N) 334 fort ran directory MYDILUCG.F0R;13 21-SEP-1985 19:47 Page 6 ROOT - DGW(R,S1,N) C LOOP BEGINS HERE 20 CALL DMUL3_(N,ILU,JLU,ID,ALU,P,S2) C CALL INPR0D(P,S2,ED0T.PD0T.N) . PDOT - DGVV(P,S2,N) C IF (PDOT.EQ.O.ODO) RETURN C ALPHA-RDOT/PDOT C EQUATION 9PA ALPHA-(R,LINV*R)/(P,UT*U*P) XMAX-1.0D0 XDIF-0.0D0 DO 30 I-l.N AP-ALPHA"P(I) X(I)-X(I)+AP C EQUATION 9PB X-X+ALPHA*P AP-DABS(AP) XX-DABS(X(I)) IF (AP.GT.XDIF) XDIF-AP IF (XX.GT.XKAX) XMAX-XX 30 CONTINUE IE-IB+1 C C CONVERGENCE TEST (CHANGED BY J. THORNBURG, 17/MAY/85) C IF ((EPS .GT. 0.0D0) .AND. (XDIF .LT. EPS * XMAX)) RETURN IF ((EPS .LT. 0.0D0) .AND. (XMAX + XDIF/DABS(EPS) .EQ. XMAX)) » RETURN C IF (IE.GE.ITER) GO TO 60 CALL DMUL1_(N,IA,JA,A,P,S2) DO 40 I-l.N R(I)-R(I)-ALPHA*S2(I) C EQUATION 9PC R-R-ALPHA*A*P 40 CONTINUE CALL DSUBL_(N,ILU,JLU,ID,ALU,R,SI) C CALL INPROD(R,Sl,EDOT,RRDOT,N) RRDOT - DGVV(R.Sl.N) BETA—RRDOT/RDOT C EQUATION 9PD BETA-(R+,LINV*R+)/(R,LINV*R) RDOT—RRDOT CALL DMUL2_(N,IA,JA.A.S1.S2) CALL DSUBU_(N,ILU,JLU,ID,ALU,S2,SI) DO 50 I-l.N P(I)-S1(I)+BETA*P(I) C EQUATION 9PE P-(UT«U)(-1)'AT*(L*LT)(-1)*R+BETA*P 50 CONTINUE GO TO 20 60 I E — I E RETURN END SUBROUTINE DMUL1_(N,IA,JA,A,B,X) IMPLICIT REAL*8(A-H,0-Z) DIMENSION IA(1),JA(1),A(1),B(N),X(N) C MULTIPLY A TIMES B TO GET X fort ran directory MYDILUCG.F0R;13 21-SEP-1985 19:47 Page 7 C WHERE: C N IS THE ORDER OF THE MATRIX C IA GIVES INDEX OF FIRST NONZERO ELEMENT IN ROW C JA GIVBS COLUMN NUMBER C A CONTAINS THE NONZERO ELEMENTS OF THE NONSYMMETRIC C MATRIX STORED BY ROW C B IS THE VBCTOR C X IS THE PRODUCT (MUST BE DIFFERENT FROM B) . C DO 20 I-l.N KS-IA(I) KE-IA(I+1)-1 SUM-0.0D0 DO 10 K-KS.KE J-JA(K) SUM-SUM+A(K)*B(J) 10 CONTINUE X(I)-SUM 20 CONTINUE RETURN END SUBROUTINE DMUL2_(N,IA,JA.A.B.X) IMPLICIT REAL*8(A-H,0-Z) DIMENSION IA(1),JA(1),A(1),B(N),X(N) C MULTIPLY TRANSPOSE OF A TIMES B TO GET X C WHERE: C N IS THE ORDER OF THE MATRIX C IA GIVES INDEX OF FIRST NONZERO ELEMENT IN ROW C JA GIVES COLUMN NUMBER C A CONTAINS THE NONZERO ELEMENTS OF THE NONSYMMETRIC C MATRIX STORED BY ROW C B IS THE VECTOR C X IS THE PRODUCT (MUST BE DIFFERENT FROM B) C DO 10 I-l.H X(I)-0.0D0 10 CONTINUE DO 30 I-l.H KS-IA(I) KE-IA(I+1)-1 BB-B(I) DO 20 K-KS.KE J-JA(K) X(J)-X(J)+A(K)»BB 20 CONTINUE 30 CONTINUE RETURN END SUBROUTINE DMUL3_(N,ILU,JLU,ID,ALU,B.X) • IMPLICIT REAL«8(A-H,0-Z) DIMENSION iLU(l),JLU(l).ID(l),ALU(l).B(N).X(N) C MULTIPLY TRANSPOSE OF U TIMES U TIMES B TO GET X C WHERB: C H IS THB ORDER OF THE MATRIX C ILU GIVES INDEX OF FIRST NONZBRO ELEMENT IN ROW OF LU f ortran directory MYDILUCG.F0R;13 21-SEP-1985 19:47 Page 8 C JLU GIVES COLUMN NUMBER C ID GIVES INDEX OP DIAGONAL ELEMENT OF U C ALU HAS NONZERO ELEMENTS OF LU MATRIX STORED BY ROW C WITH RECIPROCALS OF DIAGONAL ELEMENTS C B IS THE VECTOR C X IS THE PRODUCT UT"U*B (X MUST BE DIFFERENT FROM B) C DO 10 I-l.N X(I)-0.0D0 10 CONTINUE . DO 50 I-l.N KS-ID(I)+1 KE-ILU(I+1)-1 DIAG-1.0D0/ALU(KS-1) XX-DIAG*B(I) IF (KS.GT.KE) GO TO 30 DO 20 K-KS.KE J-JLU(K) XX-XX+ALU(K)*B(J) 20 CONTINUE 30 X(I)-X(I)+DIAG*XX IF (KS.GT.KE) GO TO 50 DO 40 K-KS.KE J-JLU(K) X(J)-X(J)+ALU(K)*XX 40 CONTINUE 50 CONTINUE RETURN END SUBROUTINE DSUBU_(N,ILU.JLU.ID.ALU,B,X) IMPLICIT REAL*8(A-H,0-Z) DIMENSION ILU(1).JLU(1).ID(1),ALU(1),B(N).X(N) C DO FORWARD AND BACK SUBSTITUTION TO SOLVE UT*U«X-B C WHERE: C N IS THE ORDER OF THE MATRIX C ILU GIVES INDEX OF FIRST NONZERO ELEMENT IN ROW OF LU C JLU GIVES COLUMN NUMBER C ID GIVES INDEX OF DIAGONAL ELEMENT OF U C ALU HAS NONZERO ELMENTS OF LU MATRIX STORED BY ROW C WITH RECIPROCALS OF DIAGONAL ELEMENTS OF U C B IS THE RHS VECTOR ,. C X IS THE SOLUTION VECTOR C NP-N+1 DO 10 I-l.N X(I)-B(I) 10 CONTINUE C FORWARD SUBSTITUTION DO 30 I-l.N KS-ID(I)+1 KE-ILU(I+1)-1 XX-X(I)*ALU(KS-1) X(I)-XX IF (KS.GT.KB) GO TO 30 DO 20 K-KS.KB f o r t ran directory MYDILUCG.FOR;13 21-SEP-1985 19:47 Page 9 J-JLU(K) X(J)-X(J)-ALU(K)*XX 20 CONTINUE 30 CONTINUE C BACK SUBSTITUTION DO 60 II-l.N I-NP-II KS-IDCD + l KE-ILU(I+1)-1 SUM-0.0D0 IF (KS.GT.KE) GO TO 50 DO 40 K-KS.KE J-JLU(K) SUM-SUM+ALU(K)*X(J) 40 CONTINUE 50 X(I)-(X(I)-SUM)*ALU(KS-1) 60 CONTINUB RETURN END SUBROUTINE DSUBL_(N,ILU,JLU.ID,ALU,B,X) IMPLICIT REAL«8(A-H,0-Z) DIMENSION ILU(l),JLU(l),ID(1),ALU(1),B(N),X(N) C DO FORWARD AND BACK SUBSTITUTION TO SOLVE L*LT"X-B C WHERE: C N IS THE ORDER OF THE MATRIX C ILU GIVES INDEX OF FIRST NONZERO ELEMENT IN ROW LU C JLU GIVES THE COLUMN NUMBER C ID GIVES INDEX OF DIAGONAL ELEMENT OF U C ALU HAS NONZERO ELEMENTS OF LU MATRIX STORED BY ROW C DIAGONAL ELEMENTS OF L ARE 1.0 AND NOT STORED C B IS THE RHS VECTOR C X IS THE SOLUTION VECTOR C NP-N+1 DO 10 I-l.N X(I)-B(I) 10 CONTINUE C FORWARD SUBSTITUTION DO 30 I-l.N KS-ILU(I) KE-IDCD-l IF (KS.GT.KE) GO TO 30 SUM-0.0D0 DO 20 K-KS.KE J-JLU(K) SUM-SUM+ALU(K)*X(J) 20 CONTINUE X(I)-X(I)-SUM 30 CONTINUE C BACK SUBSTITUTION DO 50 II-l.N I-NP-II KS-ILU(I) KE-ID(I)-1 IF (KS.GT.KE) GO TO 50 338 fort ran directory MYDILUCG.FOR;13 21-SEP-198B 19:47 Page 10 XX -X(I) IF (XX.EQ.0.0) GO TO 50 DO 40 K-KS.KE J-JLU(K) X(J)-X(J)-ALU(K)*XX 40 CONTINUE 50 CONTINUE RETURN END DOUBLE PRECISION FUNCTION DGVV(V,w,N) IMPLICIT DOUBLE PRECISION (A-H.O-Z) DIMENSION V(N),W(N) C SUBROUTINE TO COMPUTE DOUBLE PRECISION VECTOR DOT PRODUCT. C SUM 0.0D0 DO 10 I - 1,N SUM - SUM + V(I)*w(I) CONTINUE • SUM 10 DGW -RETURN END fortran directory MYSILUCG.F0R;14 21-SEP-198f3 19:48 Page 1 LOGICAL FUNCTION SILUCG(N,IA,JA,A,B.X,ITEMP,RTEMP,EPS,ITER,IE) IMPLICIT REAL*4(A-H,0-Z) C C INCOMPLETE LU DECOMPOSITION-CONJUGATB GRADIENT C - — -C VEERE: C INI IS THE NUMBER OF EQUATIONS. IF N < 0, ITEMP AND C RTEMP CONTAIN THE ILU FROM A PREVIOUS CALL AND C B AND X ARE THE NEW RHS AND INITIAL GUESS. C IA IS AN INTEGER ARRAY DIMENSIONED INl+1. IA(I) IS THE C INDEX INTO ARRAYS JA AND A OF THE FIRST NON-ZERO C ELEMENT IN ROW I. LET MAX-IA(INI+1)-IA(1). C JA IS AN INTEGER ARRAY DIMENSIONED MAX. JA(K) GIVES C THE COLUMN NUMBER OF A(K) . C A IS A REAL*4 ARRAY DIMENSIONED MAX. IT CONTAINS THE C NONZERO ELEMENTS OF THE MATRIX STORED BY ROW. C B CONTAINS THE RHS VECTOR. C X IS A REAL*4 ARRAY DIMENSIONED INI. ON ENTRY, IT CONTAINS C AN INITIAL ESTIMATE; ON EXIT, THE SOLUTION. C ITEMP IS AN INTEGER SCRATCH ARRAY DIMENSIONED 3*(INI+MAX)+2. C RTEMP IS AN REAL*4 SCRATCH ARRAY DIMENSIONED 4*INI+MAX. C EPS IS THE CONVERGENCE CRITERIA. IT SPECIFIES THE RELATIVE C ERROR ALLOWED IN THE SOLUTION. TO BE PRECISE, CONVERGENCE C IS DEEMED TO HAVE OCCURED WHEN THE INFINITY-NORM OF THE C CHANGE IN THE SOLUTION IN ONE ITERATION IS .LT. EPS * THE C INFINITY-NORM OF THE CURRENT SOLUTION. HOWEVER, IF EPS C .LT. 0.0, IT IS INTERNALLY SCALED BY THE MACHINE PRECISION, C SO THAT, FOR EXAMPLE, EPS 256.0 WILL ALLOW THE LAST TWO C HEXADECIMAL DIGITS OF THE SOLUTION TO BE IN ERROR. C ITER GIVES THE REQUESTED NUMBER OF ITERATIONS. C IE IS AN INTEGER VARIABLE. FOR NORMAL RETURN, IT GIVES C THE NUMBER OF ITERATIONS DONE (NEGATIVE IS NO CONVERGENCE). C ON ERROR RETURN, THE ROW IN ERROR. C C (MODIFIED TO RETURN LOGICAL VALUE, J. THORNBURG, 13/MAY/85.) C (MODIFIED TO ADD CONVERGENCE CRITERIA, J. THORNBURG, 17/MAY/85.) C THE FUNCTION RETURNS .TRUE. ON A NORMAL RETURN, .FALSE. ON AN ERROR RETURN. C C REFERENCE: C D.S.KERSHAW,"THE INCOMPLETE CHOLESKY-CONJUGATE GRADIENT C METHOD FOR INTERATIVE SOLUTION OF LINEAR EQUATIONS", C J.COMPUT.PHYS. JAN 1978 PP 43-65 C DIMENSION IA(1),JA(1),A(l),B(1),X(1),ITEMP(l),RTEMP(1) NP-IABS(N) IE-0 IF (NP.EQ.O) GO TO 20 C CALCULATE INDICES FOR BREAKING UP TEMPORARY ARRAYS. Nl-NP+1 MAX-IA(N1)-IA(1) ILU-1 JLU-ILU+N1 ID-JLU+MAX IC-ID+NP JC-IC+N1 tortran directory MYSILUCG.F0R;14 21-SEP-1988 19:48 Page 2 JCI-JC+MAX IR-1 IP-IR+NP 151- IP+NP 152- IS1+NP IALU-IS2+NP IP (N.LT.O) GO TO 10 C DO INCOMPLETE LU DECOMPOSITION CALL SLU_(NP.IA.JA,A,ITEMP(IC),ITEMP(JC),ITEMP(JCI),RTEMP(IALU), * ITEMP(ILU).ITEMP(JLU),ITEMP(ID).RTEMP(IR),IE.S20) C AND DO CONJUGATE GRADIENT ITERATIONS C CALL MODIFIED TO ADD ADJUSTABLE CONVERGENCE CRITERIA EPS C - J. THORNBURG, 17/MAY/85. 10 CALL SNCG_(NP,IA,JA,A,B,X,ITEMP(ILU),ITEMP(JLU),ITEMP(ID), * RTEMP(IALU),RTEMP(IR),RTEMP(IP),RTEMP(IS1),RTEMP(IS2), » EPS,ITER,IE) SILUCG - .TRUE. RETURN 20 SILUCG - .FALSE. RETURN END SUBROUTINE SLU_(N,IA,JA,A,IC,JC,JCI.ALU,ILU,JLU,ID,V,IE,*) IMPLICIT REAL*4(A-H,0-Z) DIMENSION IA(1),JA(1),A(1),IC(1),JC(1),JCI(l). * ALU(1),ILU(1),JLU(1),ID(N),V(N) LOGICAL NODIAG COMMON /ICBD / ICBAD C INCOMPLETE LU DECOMPOSITION C WHERE: C N.IA.JA, AND A ARE DESCRIBED IN FUNCTION SILUCG C IC IS AN INTEGER ARRAY DIMENSIONED N+l, IC(J) GIVES THE C INDEX OF THE FIRST NONZERO ELEMENT IN COLMN J IN C ARRAY JC. C JC IS AN INTEGER ARRAY WITH THE SAME DIMENSION AS A. C JC(K) GIVES THE ROW NUMBER OF THE K'TH ELEMENT IN C THE COLUMN STRUCTURE. C JCI IS AN INTEGER ARRAY WITH THE SAMB DIMENSION AS A. C JCI(K) GIVES THE INDEX INTO ARRAY A OF THE K'TH ELEMENT C OF THE COLUMN" STRUCTURE. C ALU HAS THE SAMB DIMENSION AS A. ON EXIT, IT WILL C CONTAIN THE INCOMPLETE LU DECOMPOSITION OF A WITH THE C RECIPROCALS OF THE DIAGONAL ELEMENTS OF U. C ILU AND JLU CORRESPONDS TO IA AND JA BUT FOR ALU. C ID IS AN INTEGER ARRAY DIMENSIONED N. IT CONTAINS C INDICES TO THE DIAGONAL ELEMENTS OF U. C V IS A REAL SCRATCH VECTOR OF LENGTH N. C IE GIVES THE ROW NUMBER IN ERROR. C NOTE: SLU_ SETS ARGUMENTS IC THROUGH V. C ICBAD-0 C ZERO COUNT OF ZERO DIAGONAL ELEMENTS IN U. C C FIRST CHECK STRUCTURE OF A AND BUILD COLUMN STRUCTURE DO 10 I-l.N IC(I)-0 fort ran directory MYSILUCG.F0R;14 21-SEP-1985 19:48 Page 3 10 CONTINUE DO 30 I-l.N KS-IA(I) KE-IA(I+1)-1 NODIAG-.TRUE. DO 20 K-KS.KE J-JA(K) IF (J.LT.l.OR.J.GT.N) GO TO 210 IC(J)-IC(J)+1 IF (J.EQ.I) NODIAG-.FALSE. 20 CONTINUE IF (NODIAG) GO TO 210 30 CONTINUE C MAKE IC INTO INDICES KOLD-IC(l) IC(1)-1 DO 40 I-l.N £NEW-IC(I+1) IF (KOLD.EQ.O) GO TO 210 IC(I+l)-IC(I)+KOLD KOLD-KNEW 40 CONTINUE C SET JC AND JCI FOR COLUMN STRUCTURE DO 60 I-l.N KS-IA(I) KE-IA(I+1)-1 DO 50 K-KS.K.E J-JA(K) L-IC(J) IC(J)-L+1 JC(L)-I JCKD-K 50 CONTINUE 60 CONTINUE C FIX UP IC KOLD-IC(l) IC(1)-1 DO 70 I-l.N XNEW-IC(I+1) IC(I+l)-KOLD KOLD-XNEV 70 CONTINUE C FIND SORTED ROW STRUCTURE FROM SORTED COLUMN STRUCTURE NP-N+1 DO 80 I-l.NP ILU(I)-IA(I) 80 CONTINUE C MOVE ELEMENTS. SET JLU AND ID DO 100 J-l.H KS-IC(J) KE-IC(J+1)-1 DO 90 X-XS.KE I-JC(K) L-ILU(I) ILU(I)!-L+1 fort ran directory MYSILUCG.F0R;14 21-SBP-1985 19:48 Page 5 180 CONTINUE 190 CONTINUE C RESET V IP (KKS.GT.KKB) GO TO 200 DO 195 K-KKS, KS.E J-JLU(K) V(J)-0.0 195 CONTINUE 200 CONTINUE RETURN 210 IE-I RETURN 1 220 IE-IROW RETURN 1 END SUBROUTINE SNCG_(N,IA,JA,A,B,X,ILU,JLU,ID,ALU,R,P,SI,S2, * EPS,ITER.IE) IMPLICIT REAL»4(A-H,0-Z) DIMENSION IA(1),JA(1),A(1),B(N) ,X(N),ILU(1),JLU(l),ALU(l),ID(N). * R(N),P(N),S1(N),S2(N) C N O N S Y M M E T R I C C O N J U G A T E G R A D I E N T C W H E R E : C N . I A . J A . A . B , A N D X A R E D E S C R I B E D I N S U B R O U T I N E S I L U C G . C I L U G I V E S I N D E X O F F I R S T N O N Z E R O E L E M E N T I N ROW O F L U . C J L U G I V E S C O L U M N N U M B E R . C I D G I V E S I N D E X O F D I A G O N A L E L E M E N T O F U . C A L U H A S N O N Z E R O E L E M E N T S O F L U M A T R I X S T O R E D B Y ROW C W I T H R E C I P R O C A L S O F D I A G O N A L E L E M E N T S O F U . C R . P . S l , A N D S 2 A R E V E C T O R S O F L E N G T H N U S E D I N T H E C I T E R A T I O N S . C F O L L O W I N G P A R A M E T E R A D D E D B Y J . T H O R N B U R G , 1 7 / M A Y / 8 5 . C E P S I S C O N V E R G E N C E C R I T E R I A . ( D E S C R I B E D I N S U B R O U T I N E C S I L U C G ) . C I T E R I S MAX N U M B E R O F I T E R A T I O N S . C I E G I V E S A C T U A L N U M B E R O F I T E R A T I O N S , N E G A T I V E I F • C N O C O N V E R G E N C E . C C R 0 - B - A « X 0 C A L L S M U L 1 _ ( N , I A , J A . A . X . R ) •;DO 1 0 I - l . N R ( I ) - B ( I ) - R ( I ) 10 CONTINUE C P0-(UT»U)(-1)«AT*(L*LT)(-1)*R0 C FIRST SOLVE L*LT»S1-R0 CALL SSUBL_(N,ILU,JLU,ID,ALU,R,SI) C TIMES TRANSPOSE OF A CALL SMUL2_(N,IA,JA,A,S1,S2) C THEN SOLVE UT"U*P-S2 CALL SSUBU_(N.ILU,JLU,ID,ALU,S2.P) IB-0 RDOT - SGW(R,S1.N) C LOOP BEGINS HERE 20 CALL SMUL3_(N,ILU,JLU,ID,ALU,P,S2) PDOT - SGVV(P,S2,N) C f o r t ran directory MYSILUCG.F0R.14 21-SBP-1988 19:48 Page 4 JLU(L)-J KK-JCI(K) ALU(L)-A(KK) IF (I.EQ.J) ID(J)-L 90 CONTINUE 100 CONTINUE C RESET ILU (COULD JUST USE IA) DO 110 I-l.NP ILU(I)-IA(I) 110 CONTINUE C FINISHED WITH SORTED COLUMN AND ROW STRUCTURE C C DO LU DECOMPOSITION USING GAUSSIAN ELIMINATION DO 120 I-l.N V(I)-0.0 120 CONTINUE DO 200 IROW-l.N I-ID(IROW) PIVOT-ALU(I) IF (PIVOT.NE.0.0) GO TO 140 C THIS CASE MAKES THE ILU LESS ACCURATE ICBAD-ICBAD+1 KS-ILU(IROW) KE-ILU(IROW+l)-l DO 130 K-KS.KE PIVOT-PIVOT+ABS(ALU(K)) 130 CONTINUE. IF (PIVOT.EQ.0.0) GO TO 220 140 PIVOT-1.0/PIVOT ALU(I)-PIVOT KKS-I+1 KKE-ILU(IROW+l)-l IF (KKS.GT.KKE) GO TO 160 DO 160 K-KKS.KKE J-JLU(K) V(J)-ALU(K) 150 CONTINUE C FIX L IN COLUMN IROW AND DO PARTIAL LU IN SUBMATRIX 160 KS-IC(IROW) KE-IC(IROW+l)-l DO 190 K-KS.KE I-JC(K) IF (I.LE.IROW) GO TO 190 LS-ILU(I) LE-ILU(I+1)-1 DO 180 L-LS.LE J-JLU(L) IF (J.LT.IROW) GO TO 180 IF (J.GT.IROW) GO TO 170 AMULT-ALU(L) * PIVOT ALU(L)-AMULT IF (AMULT.EQ.O.O) GO TO 190 GO TO 180 170 IF (V(J).EO.O.O) GO TO 180 ALU(L)-ALU(L)-AMULT*V(J) f o r t ran directory MYSILUCG.F0R;14 21-SEP-1985 19:48 Page 6 IP (PDOT.EQ.0.0) RETURN C ALPHA-RDOT/PDOT C EQUATION 9PA ALPHA-(R,LINV*R)/(P,UT*U*P) XMAX-1.0 XDIF-0.0 DO 30 I-l.N AP-ALPHA*P(I) X(I)-X(I)+AP C EQUATION 9PB X-X+ALPHA*P AP-ABS(AP) XX-ABS(X(I)) IF (AP.GT.XDIF) XDIF-AP IF (XX.GT.XMAX) XMAX-XX 30 CONTINUE IE-IE+1 C C CONVERGENCE TEST (CHANGED BY J. THORNBURG, 17/MAY/85) C IF ((EPS .GT. 0.0) .AND. (XDIF .LT. EPS * XMAX)) RETURN IF ((BPS .LT. 0.0) .AND. (XMAX + XDIF/ABS(EPS) .BQ. XMAX)) * RETURN C IF (IE.GE.ITER) GO TO 60 CALL SMUL1_(N,IA,JA.A.P.S2) DO 40 I-l.N R(I)-R(I)-ALPHA*S2(I) C EQUATION 9PC R-R-ALPHA*A*P 40 CONTINUB CALL SSUBL_(N,ILU,JLU,ID,ALU,R,SI) C CALL INPROD(R,Sl,EDOT.RRDOT,N) RRDOT - SGW(R,S1,N) BETA-RRDOT/RDOT C EQUATION 9PD BETA-(R+,LINV*R+)/(R,LINV*R) RDOT-RRDOT CALL SMUL2_(N,IA,JA,A,S1,S2) CALL SSUBU_(N,ILU,JLU,ID,ALU,S2,SI) DO 50 I-l.N P(I)-S1(I)+BETA*P(I) C EQUATION 9PE P-(UT*U)(-1)*AT*(L*LT)(-1)*R+BETA*P 50 CONTINUE GO TO 20 60 I E — I E RETURN END SUBROUTINE SMUL1_(N,IA,JA,A,B,X) IMPLICIT REAL*4(A-H,0-Z) DIMENSION IA(1),JA(1).A(1),B(N),X(N) C MULTIPLY A TIMES B TO GET X C WHERE: C N IS THE ORDER OF THE MATRIX C IA GIVES INDEX OF FIRST NONZERO ELEMENT IN ROW C JA GIVES COLUMN NUMBER C A CONTAINS THE NONZERO ELEMENTS OF THE NONSYMMETRIC C MATRIX STORED BY ROW f o r t ran directory MYSILUCG.F0R.14 21-SEP-1985 19:48 Page 7 C B IS THE VECTOR C Z IS THE PRODUCT (MUST BE DIFFERENT FROM B) C DO 20 I-l.N ' • KS-IA(I) KE-IA(I+1)-1 SUM-0.0 DO 10 K-KS.KE J-JA(K) SUM-SUM+A(K.)*B(J) 10 CONTINUE Z(I)-SUM 20 CONTINUE RETURN END SUBROUTINE SMUL2_(N.IA,JA,A.B.Z) IMPLICIT REAL*4(A-H,0-Z) DIMENSION IA(1),JA(1),A(1),B(N),Z(N) C MULTIPLY TRANSPOSE OF A TIMES B TO GET X C WHERE: C N IS THE ORDER OF THE MATRIZ C IA GIVES INDEX OF FIRST NONZERO ELEMENT IN ROW C JA GIVES COLUMN NUMBER C A CONTAINS THE NONZERO ELEMENTS OF THE NONSYMMETRIC C MATRIX STORED BY ROW C B IS THE VECTOR C X IS THE PRODUCT (MUST BE DIFFERENT FROM B) C DO 10 I-l.N X(I)-0.0 10 CONTINUB DO 30 I-l.N KS-IA(I) XE-IA(I+1)-1 BB-B(I) DO 20 K-KS.KE J-JA(K) X(J)-X(J)+A(K)«BB 20 CONTINUE 30 CONTINUE RETURN END SUBROUTINE SMUL3_(N.ILU,JLU.ID,ALU,B,X) IMPLICIT REAL*4(A-H,0-Z) DIMENSION ILU(l),JLU(l),ID(1),ALU(1),B(N),X(N) C MULTIPLY TRANSPOSE OF U TIMES U TIMES B TO GET X C WHERE: C N IS THB ORDER OF THE MATRIZ C ILU GIVES INDEZ OF FIRST NONZERO ELEMENT IN ROW OF LU C JLU GIVES COLUMN NUMBER C ID GIVES INDEZ OF DIAGONAL ELEMENT OF U C ALU HAS NONZERO ELEMENTS OF LU MATRIZ STORED BY ROW C WITH RECIPROCALS OF DIAGONAL ELEMENTS C B IS THE VECTOR C Z IS THE PRODUCT UT*U»B (Z MUST BE DIFFERENT FROM B) f o r t ran directory MYSILUCG.F0R;14 21-SEP-1985 19:48 Page 8 C DO 10 I-l.N X(I)-0.0 10 CONTINUE DO 50 I-l.N KS-ID(I)+1 KE-ILU(I+1)-1 DIAG-1.0/ALU(KS-1) XX-DIAG*B(I) IP (KS.GT.KE) GO TO 30 DO 20 K-KS.KE J-JLU(K) XX-XX+ALU(K)*B(J) 20 CONTINUE 30 X(I)-X(I)+DIAG*XX IP (KS.GT.KE) GO TO 50 DO 40 K-KS.KE J-JLU(K) X(J)-X(J)+ALU(K)*XX 40 CONTINUE 50 CONTINUE RETURN END SUBROUTINE SSUBU_(N,ILU,JLU.ID.ALU.B,X) IMPLICIT REAL»4(A-H.0-Z) DIMENSION ILU(l),JLU(l),ID(1).ALU(l),B(N),X(N) C DO FORWARD AND BACK SUBSTITUTION TO SOLVE UT*U*X-B C WHERE: C N IS THE ORDER OF THE MATRIX C ILU GIVES INDEX OF FIRST NONZERO ELEMENT IN ROW OF LU C JLU GIVES COLUMN NUMBER C ID GIVES INDEX OF DIAGONAL ELEMENT OF U C ALU HAS NONZERO ELMENTS OF LU MATRIX STORED BY ROW C WITH RECIPROCALS OF DIAGONAL ELEMENTS OF U C B IS THE RHS VECTOR C X IS THE SOLUTION VECTOR C NP-N+1 DO 10 I-l.N X(I)-BCI) 10 CONTINUE C FORWARD SUBSTITUTION DO 30 I-l.N KS-ID(I)+1 KE-ILU(I+1)-1 XX-X(I)»ALU(KS-1) X(I)-XX IF (KS.GT.KE) GO TO 30 DO 20 K-KS.KB J-JLU(K) X(J)-X(J)-ALU(K)*XX 20 CONTINUE 30 CONTINUE C BACK SUBSTITUTION DO 60 II-l.N f o r t ran directory MYSILUCG.F0R;14 21-SEP-1985 19:48 Page 9 I-NP-II KS-ID(I)+1 KB-ILU(I+1)-1 SUM-0.0 IF (KS.GT.KE) GO TO 80 DO 40 K-KS.KE 'J-JLU(K) SUM-SUM+ALU(K)*X( J) 40 CONTINUE 50 X(I)-(X(I)-SUM)*ALU(KS-1) 60 CONTINUE RETURN END SUBROUTINE SSUBL_(N.ILU,JLU,ID,ALU,B,X) IMPLICIT REAL*4(A-H,0-Z) DIMENSION ILU(1),JLU(1),ID(1),ALU(1),B(N).X(N) C DO FORWARD AND BACK SUBSTITUTION TO SOLVE L*LT*X-B C WHERE: C N IS THE ORDER OF THE MATRIX C ILU GIVES INDEX OF FIRST NONZERO ELEMENT IN ROW LU C JLU GIVES THE COLUMN NUMBER C ID GIVES INDEX OF DIAGONAL ELEMENT OF U C ALU HAS NONZERO ELEMENTS OF LU MATRIX STORED BY ROW C DIAGONAL ELEMENTS OF L ARE 1.0 AND NOT STORED C B IS THE RHS VECTOR C X IS THE SOLUTION VECTOR C NP-N+1 DO 10 I-l.N X(I)-B(I) 10 CONTINUE C FORWARD SUBSTITUTION DO 30 I-l.N KS-ILU(I) KE-ID(I)-1 IF (KS.GT.KE) GO TO 30 SUM-0.0 DO 20 K-KS.KE J-JLU(K) SUM-SUM+ALU(K)*X(J) 20 CONTINUE X(I)-X(I)-SUM 30 CONTINUE C BACK SUBSTITUTION DO 50 II-l.N I-NP-II KS-ILU(I) KE-ID(I)-1 IF (KS.GT.KE) GO TO 50 XX-X(I) IF (XX.EQ.0.0) GO TO 50 DO 40 K-KS.KE J-JLU(K) X(J)-X(J)-ALU(K)*XX 40 CONTINUE 348 fo r t ran directory MYSILDCG.F0R;14 21-SEP-1985 19:48 Page 10 50 CONTINUE RETURN END REAL FUNCTION SGW(V,W,N) IMPLICIT REAL (A-H.O-Z) DIMENSION V(N),W(N) C SUBROUTINE TO COMPUTE REAL VECTOR DOT PRODUCT. C SUM 0.0 DO 10 I - l.N SUM - SUM + V(I)*W(I) CONTINUE • SUM 10 SGW -RETURN END 349 patchutil directory BLACKHOLE.H;27 21-SEP-1985 18:55 /* This f i l e describes how black holes are represented: */ Page 1 struct black_hole_dscr { double rho, z; double mass; double lambda; int surrounding_patch_flag; double momentum; int refle'ctlon_term_sign; double reflection_radius; double spin; }; /* position of black hole */ /* * Note rho must be zero to retain * axisymmetry (2 space dimensions). */ /* obvious I II «/ /* » monopole coefficient for approximate * solution — normally one half times * some estimate of mass of this b.h. /* */ 0 —> patch # of closest surrounding patch 0 --> i l l e g a l 0 --> negative of patch * of mirror image symmetric b.h.'s closest surrounding patch i n positive z-direction */ /* +1 —> use "+" sign for Kij 2nd term 0 —> ignore KIJ 2nd term -1 « > use "-" sign for KIJ 2nd term radius 'a' for KIJ 2nd term; should * normally be one half the mass »/ /* i n positive z-direction */ Each black hole w i l l , i f within the volume covered by the patch system, be Immediately surrounded by a 'coord_type-"polar spherical"' patch, as given by the 'surrounding_patch_flag' item above. If the black hole i s outside the patch system's volume, then presumably some symmetry (mirror image about theta - 90 degrees for now) i s being exploited, and this item i n the black hole descriptor w i l l give (the negative of) the 'symmetric' black hole's immediately surrounding patch. struct bhs_dscr /* black hole system descriptor */ { int N_black_hole; /* how many b.h.s are there? */ struot black_hole_dsor *black_hole; /* « —> array of b.h. dscr's * (indexed i n origin 1) V }; patchutil directory CVT.H;18 21-SEP-198S 18:50 Page 1 /* Integer codes for 'cvt_' oonvertion functions: */ •define CVT_ERROR -1 •define CVT_BNDRY_COND_TYPE_ERROR 0 •define 0FFSET_C1 0 •define OFFSET C2 1 •define OFFSET C3 2 •define OFFSET C4 3 •define OFFSET C5 4 •define OFFSET S 5 •define OFFSET_PSI 6' •define OFFSET_R 7 •define PSI_MINUS MASS MONOPOLES -10 •define PSI_MINDS_AREA MONOPOLES -11 •define PSI_MINUS_TOT E_PER M MONOPOLES -12 •define PSI_MINUS_TOT E PER A MONOPOLES -13 •define PSI_MINUS_SPHERICALLY SYM MEAN -14 •define PSI_MINDS_SPHERICALLY SYM MIN -15 •define PSI_MINUS_Z_AXIS -16 •define PSI_MINUS_EQUATOR -17 •define TRUE_RESIDUAL -25 •define K_HAT_RR -26 351 patchutil directory INOUT.H:a 21-SEP-1985 18:50 Page 1 /* * The following 'enum' i s used i n classifying points w.r.t. patch boundaries * and/or patch boundary terms: */ enum relation { INSIDE, ON_BNDRY, OUTSIDE }; 352 patchutil directory PATCH.H;79 21-SBP-198S 18:48 Page 1 /* This f i l e describes bow patches, grids, and functions are represented: */ / The basic idea i s that each patch i s a 'Manhattan convex' subset of a rectangle l n the i - J plane, where '1' and ' J ' are the 2 integer indices of i t ' s coordinate system. This subset i s defined by the minimum and maximum values of i on each line of constant J, and of J on each line of constant 1. (The 'Manhattan convexity' condition gaurantees that these w i l l suffice, i.e. that any constant 1 or constant J line w i l l intersect the patch i n a f i n i t e closed interval.) To transform from 1-J coordinates back to 'physical' rho-z coordinates, the following scheme i s used: x - 1 * i_step, y - J • y_step i f (polar spherical) then { r - x, theta - y, transform to rho, z } i f (cylindrical) then { rho - x, z - y } rho +- rho_center, z +- z_center / /* 'flag' code values for boundary condition types: */ •define DIRICHLET -1 •define NEUMANN -2 •define ROBIN -3 •define REFLECTION_SYMMETRIC -4 •define MARGINALLY_TRAPPED -5 struct line_end_dscr /* describes the end of a coordinate line */ { int end_lj; /• 1 or J value for last point of line */ int flag; /* * < o ~> 'true' boundary (see above for codes) * - 0 --> invalid » > 0 —> patch number to Interpolate into */ I* * For Dirichlet or Neumann boundary conditions, no coefficients of any kind * are needed. •/ union { /* * If we have Robin, Reflection Symmetric or Marginally Trapped boundary * conditions here, we need these coefficients to extrapolate the 'end_lj' * value from 'inner' ones. */ struct { double d l . d2. d3; } extrapolate; /• * If we are interpolating into another coordinate patch (as given by 'flag' * above), we need this information to do i t . */ struot { int i_low, J_low; /• » Coordinates of the Interpolation 'square' 353 patchutil directory PATCH.H;79 21-SEP-1985 18:48 Page 2 * are (i_low.J_low), (i_low,J_low+l), * (i_low+l,J_low), (l_low+l,J_low+l), i n the * system of the 'other' patch. */ double dOO. dOl, dlO, d l l ; /* * The interpolated value i s found by taking a * 'dot product' of these coefficients with the * function values at the 4 coordinates given * above. */ } interpolate; } boundary_info; }; /* * Grid functions are stored as arrays of 'grid_fn' structures, each of which * holds a l l the functions defined at that grid point. This i s convienient to * use, and also improves reference l o c a l i t y for the program. */ struct grid_fn double c l _ , c2_, c3_, c4_, c5_; /* del-squared coefficients */ double S_; /* source function */ double psl_; /* conformal factor I t s e l f */ double R_; /* residual */ }; enum bndry { I_MIN, I_MAX, J_MIN. J_MAX }; enum coord_type { CYLINDRICAL, POLAR_SPHERICAL }; enum difference_scheme { INDEPENDENT_TERMS, LOCALLY_CONSERVATIVE }; enum conformal_fn_type { PSI, OMEGA_OF_PSI }: struct coord_patch_dscr { enum ooord_type coord_type; enum difference_scheme difference_scheme; enum conformal_fn_type conformal_fn_type; double rho_center, z_center; /* position for i-0, J-0 */ double l_step, J_step; int i_mln, i_max; /* referred to as 'size info' */ int j_min, J_max; /* (ditto) V struct line_end_dscr * line_end[4]; /* * This 4-element array i s indexed by (an 'int' type-* case of) an 'enum bndry'; each element points to an * array of line_end_dscr's to describe that boundary. * * Note these arrays are indexed i n origin j_min, * J_min, l_min, and i_min respectively, so the * pointers are offset as appropriate. The i line ends * are indexed by J and vice versa (111). * * Note also that the 'size info' may be 'downsized' * after these arrays are allocated --> don't try to 354 patchutil directory PATCH.H;79 21-SEP-19S5 18:48 Page 3 * deallocate them via 'cfree(...)'. */ int fn_l_step, fn_j_step; /« « These define the storage layout of the grid function * arrays in memory — they are in units of 'struct * grld_fn*s. */ struot grid_fn *fn_00_ptr; /• —> 1-0, J-0 in storage array */ }» struct |rld_dscr int N_patch; /* 'real' patches are numbered #1 to #N_patch */ struct coord_patch_dscr 'patch; /* —> array of patch dscrs */ •define GLOBAL_REF 0 /* patch • to use as global reference coord */ /* * By convention, the highest numbered patch i s of coord_type="polar spherical" * and has the model's outer boundary as i t ' s J_MAX boundary. »/ /* * The actual accessing of grid functions i s done as follows: * (Note ' + 3' below allows a 'border' space for boundary extrapolation!) * (Note 'ptr_' i s a 'struct coord_patch_dscr *', typically of the form « '&> pgd->patch[p] ' e t c ) »/ •define GRID_FN_SIZE ( slzeof(struct grid_fn) / sizeof(double) ) •define GRID_FN_I_SIZE(ptr_) ( (ptr_)->l_max - (ptr_)->i_mln + 3 ) •define GRID_FN_J_SIZE(ptr_) ( (ptr_)->j_max - (ptr_)->j_mln + 3 ) •define GRID_FNS(ptr_,i_,J_) \ ( (ptr_)->fn_00_ptr + (l_)«(ptr_)->fn_i_step + (J_)*(ptr_)->fn_J_step ) On disk, the data i s represented i n the following f i l e s : '.pat' f i l e - Describes a coordinate patch system, ln human readable form, '.grd' f i l e - Same thing, but l n a 'binary image' form. This i s Independent of the black hole system and hence does NOT include the 'true' boundary condition coefficients, '.par' f i l e - Describes a l l parameters for a given black hole and coordinate system, i n human readable form; coordinate system i s described by naming a '.pat'/'.grd' pair, '.gfn' f i l e - Stores a l l grid functions, i n 'binary image' form. grldname.pat I I V + + I mkgrd I + + I l V patchutil directory PATCH.H;79 21-SEP-1985 18:48 Page 4 grldname.grd I I V +- + I mkgfn I <-+ + I I I V modelname.gfn i I V + + l GR or I •> l display I <• l program I modelname.par i I I I + I I I l I + 356 patchutil directory TEMPBNDRY.H;7 21-SEP-1985 18:61 Page 1 /* This f i l e describes the temporary patch boundary data structure */ struct bndry_defn_term { struot bndry_defn_term *next; /* * The terms are i n a one-way linked * l i s t , since we have no knowledge in * advance of how many there w i l l be. •/ /* f i r s t define how the boundary location i s chosen: */ enum { CONSTANT_BNDRY_TYPE, PATCH_BNDRY_TYPE } defn_type; union { double value; /• i f CONSTANT type */ struct { /* i f PATCH type */ int patch; /* the other patch number */ enum bndry bndry; /* which bndry of i t do we hit??? */ } patch_info; } defn_value; /* now decide how we w i l l get the boundary values: */ enum { TRUE_BNDRY_COND, PATCH_BNDRY_COND } bndry_cond_type; union { char *bndry_cond; /* i f TRUE_BNDRY type */ int patch; /* i f PATCH type */ } bndry_cond_value; }; struct natch_bndry double x_min_bound, x_max_bound, y_mln_bound, y_max_bound; /* bounding box of patch */ struct bndry_defn_term * bdt_llst[4]; /* * This (4-element) array i s Indexed by * (an 'int' type-cast of) an 'enum * bndry'; each element points to a * l i s t of boundary definition terms * describing that boundary. */ }; /» « The overall temporary data structure w i l l be an array (1 origin) of * patch_bndry structures, indexed by patch number. »/ 357 patchutil directory ALLOCGFNA.C;7 21-SEP-1985 18:59 Page 1 •include "util:stdo.h" •include "patchutil:patch.h" /» * This funotion makes a l l policy decisions on the storage layout of grid * functions — i.e. are they stored by column (FORTRAN) or by row (the rest of * the world), and sets the fn_i_step, fn_J_step, and fn_00_ptr f i e l d s of-a * coord_patch_dscr appropriately. The latter i s set up pointing to a suitable * offset from a suitable-size block of storage, so the access macros defined * i n 'patch.h' can be used. * * Arguments: » ptr —> The coordinate patch descriptor to do the allocation for. */ void allocate_grid_fn_array(ptr) register struct coord_patch_dscr *ptr; { char *calloc(); void error_exlt(); /* make storage layout policy — currently stored by rows: */ ptr->fn_i_step - GRID_FN_J_SIZE(ptr); ptr->fn_J_step - 1; /* allocate storage: */ ptr->fn_00_ptr - ALLOC(GRID_FN_I_SIZE(ptr) « GRID_FN_J_SIZE(ptr), struct grld_fn); i f (ptr->fn_00_ptr ~ NULL) then error_exit(OK_EXIT, "allocate_grld_fn_array(...): insufficient memory — exltlng\n" ); /* DOES NOT RETURN */ /* adjust for proper origin i n Indexing: */ ptr->fn_00_ptr — ptr->fn_i_step * (ptr->i_min - 1); ptr->fn_00_ptr — ptr->fn_j_step * (ptr->J_mln - 1); patchutil directory 358 8INARYIO.C;S3 21-SEP-1985 19:00 Page 1 /* This f i l e contains routines to do l/o on 'machine readable' f i l e s . */ /* * Routines i n this f i l e are: * lnput_output_grd - Inputs or Outputs a '.grd' f i l e s from/to disk. * input_output_gfn - Inputs or Outputs a '.gfn' f i l e from/to disk. */ * include < stdi o.h > •inolude "utll:stdo.h" •include "patchutll:patch.h" ' This function does input/output of '.grd' grid f i l e s from/to disk. It's the * only function which knows the grid data structure's disk representation. * Arguments: * grldname - The name of the grid ( i . e . the filename without the '.grd'). * a i r —> 'w' for writing, 'r' for reading. Note that 'dir' may actually be a » 'normal' C string, so long as i t ' s 1st character i s appropriate. * pgd —> ike «grid_dscr' structure. (For reading, this i s f i l l e d l n l ) * The function handles a l l errors 'Internally', so i f i t returns, the caller » may presume that a l l i s well. * BUGS: Error checking isn't very s t r i c t ! I I * / void input_output_grd(grldname, d i r . pgd) char *dir; register struct grld_dscr *pgd; { void set_global_ref(); void error_exit(); char *calloo(); FILE *fopen(); void fread(), fwriteO; /* non-standard, VMS specif void foloseQ; register FILE *fp; •define BUFSIZE 100 char filename[BUFSIZE]; void (*frwp)(); /* 'fread/write pointer' V int p; enum bndry bndry; int start, oount; sprlntf(filename, "%s.grd", grldname); fp - fopen(filename, («dlr — 'w') 7 "w" : " r " ) ; i f (fp — NULL) then error_exit(OK_EZIT, 359 patchutil directory BINARYI0.C;53 21-SEP-1985 19:00 Page 2 "input_output_grd: unable to open f i l e "*s' — exiting", filename); /* DOES NOT RETURN «/ •define NOMEM \ error_exlt(OK_EXIT, \ "input_output_grd: insufficient memory for grid "*s' — exiting", \ gridname) /* DOES NOT RETURN »/ \ /* END OF KACRO DEFN •/ frwp - (*dir ~ 'w') ? fwrite : fread; /•do the grid_dsor struoture i t s e l f : V (*frwp)(8f pgd->N_patch, sizeof(int), 1, fp); i f (*dlr I- 'w') then { /* read —> allocate coord_patch_dscr's and set up global ref. patch •/ pgd->patch - ALLOC(pgd->N_patch + 1, struct coord_patch_dscr); i f (pgd->patch ~ NULL) then NOMEM; set_global_ref(» pgd->patch[GLOBAL_REF]); } /* do the coord_patch_dscr's themselves: */ (*frwp)(» pgd->patch[l], slzeof(struct coord_patch_dscr), pgd->N_patch, fp); /• f i n a l l y , do the line_end_dscr arrays: */ for (p - 1 ; p <- pgd->N_patch ; ++p) for (bndry - I_MIN ; bndry <- J_MAX ; ++bndry) { /» process this boundary's llne_end_dscr array: •/ switch (bndry) { case I_MIN: case I_MAX: start - pgd->patch[p].J_min; count - pgd->patch[p].j_max - start + 1; break; case J_MIN: case J_MAX: start - pgd->patch[p].i_min; count - pgd->patch[p].i_max - start + 1; break; } •define PTR pgd->patch[p].line_endt(int)bndry] i f (*dlr I- 'w') then { /* read « > allocate line_end_dscr array: */ PTR - ALLOC(count, struct llne_end_dscr); i f (PTR — NULL) then NOMEM; PTR — start; /* adjust index origin */ 360 patchutil directory BINARYI0.C;53 21-SEP-1985 19:00 Page 3 } (* f r v p ) ( a r PTR[start], sizeof(struct line_end_dscr), count, ^ fp); /* end of this paton */ fclose(fp); } / « « » * * » » » * « « » « * * t » » * » « « « « » « » » » » » » » » * » * » * * * * » * « * » « » » » * « * * * » » « « » * » » * * » * » « » * » * * » * / This function does input/output of '.gfn' grid f i l e s from/to disk. It's the only function which knows the grid functions' disk representation. Arguments: grdname - The filename of the grid function data f i l e (without '.gfn' on the end). dir —> 'w' for writing, 'r' for reading. Note that 'dlr' may actually be a 'normal' C string, so long as i t ' s 1st character i s appropriate, pgd —> The 'grid_dscr' structure describing the grid to be used i n the data transfer. For reading, i t i s assumed that a l l the non-grid-function f i e l d s have been f i l l e d i n, by (for example) 'input_pat' and 'allocate_grld_fn_arrays', or by the "read" option of 'lnput_output_grd'. The function handles a l l errors 'internally', so i f i t returns, the caller may presume that a l l i s well. BUGS: Error checking isn't very s t r i c t ! I ! >/ void input_output_gfn(grdname, d i r . pgd) char grdname[]; char *dir; register struct grid_dscr *pgd; { void allocate_grid_fn_array(); void error_exit(); char *calloc(); FILE «fopen(); void freadQ, fwrlteO; /* non-standard, VMS specific */ void fcloseQ; •define BUFSIZE 100 char filename[BUFSIZE]; void (*frwp)(); /* 'fread/write pointer' */ register FILE *fp; register int p, l . J ; register struct coord_patoh_dsor *ptr; 361 patchutil directory BINARYIO.C;53 21-SEP-19B5 19:00 Page 4 sprintf(filename, "%s.gfn", grdname); fp - fopen(filename. (*dir — 'w') ? "w" : " r " ) ; i f (fp -- NULL) then error_exit(OK_EXIT, "input_output_gfn: unable to open f i l e '%s' — exiting", filename); /• DOES NOT RETURN */ frwp - (*dlr ~ 'w') ? fwrite : fread; for (p - 1 ; p <- pgd->N_patch ; ++p) ptr - &r pgd->patchtp]; i f (*dir !- 'w') then allocate_grid_fn_array(ptr); /* process this patch's function array: */ for ( i - ptr->l_min ; i <- ptr->i_max ; ++i) for (J - ptr->line_end[J_MIN][i].end_ij ; J <- ptr->llne_end[J_MAX][i].end_ij ; ++J) { (*frwp)(GRID_FNS(ptr, i , J), slzeof(struct grld_fn), 1. fp); } } /» end of this patch */ fclose(fp); 362 patchutil directory COORD.C;26 21-SEP-1983 19:00 Page 1 /* This f i l e oontains coordinate conversion routines */ /» * The following functions are available: * cvt_iJ_to_xy - Converts ( l . J ) to (x,y) within a given patch * ovt_xy_to_lJ - Converts (x.y) to (i . J ) within a given patch * cvt_xy_to_xy - Converts (x.y) i n one patch to (x.y) i n another * cvt_rtheta_to_rhoz - Converts (r,theta) to (rho.z) * cvt_rhoz_to_rtheta - Converts (rho.z) to (r,theta) »/ •Include "util:stdo.h" •include "patchutil:patch.h" / I t t l l l l l l l l l l l l t l l l l l l l l t M t l l M I I I I I I I I I l l l l l l l l l l l l l l l l / * This function converts integer '1/J' to floating point 'x/y' coordinates, as » described i n 'patch.h'. Note that the interpretation of the 'x/y' coord's * depends on the type of coordinate system the patch uses. • » Arguments: « ptr —> The coord_patch_dscr for the patch. * (i.J) - The integer coordinates to be converted. * (px.py) — » Where the (x.y) results are to be stored, or NULL to omit the * storing. */ void cvt_lJ_to_xy(ptr, i , J. px, py) register struct coord_patch_dscr *ptr; int 1. j ; double *px, *py; i f (px I- NULL) then *px - ( (double) 1 ) • ptr->l_step; i f (py I- NULL) then *py - ( (double) J ) * ptr->J_step; / l l l l l l l l l l l l t l l l I t • I I I K I I I I I K I I I I I I M I I I I I I I K I / /« * This function converts floating point 'x/y' to integer ' i / J ' coordinates, as * described l n 'patch.h'. Note that the interpretation of the 'x/y' coord's * depends on the type of coordinate system the patch uses. * » Arguments: . « ptr —> The coord_patch_dscr for the patoh. * (x.y) - The floating point coordinates to be converted. * (pi.pj) —> Where the (l . J ) results are to be stored, or NULL to omit the * storing. •/ void cvt_xy_to_iJ(ptr, x. y, p i . pJ) register struct coord_patch_dsor *ptr; double x, y; int *pl, *pj; int round_double_to_lnt(); i f (pi I- NULL) then *pi - round_double_to_int( x / ptr->i_step ); 363 patchutil directory COORD.C;26 21-SBP-1985 19:00 Page 2 i f (pJ I- NULL) then *pj - round_double_to_int( y / ptr->J_step ); / t t * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * / /* « This funotion converts floating point 'x/y' coordinates i n the system of one * patch to floating point 'x/y' coordinates i n the system of another patch, as * described i n "patch.h'. Note that the interpretation of the 'x/y' coord's * depends on the types of coordinate system the patches use. * * Arguments: * p t r l —> The coord_patch_dscr for the 'source' patch. * (xl.yl) - The 'souroe' coordinates to be converted. * ptr2 —> The coord_patch_dscr for the 'destination' patch. * (px2,py2) —> Where the 'destination' coordinates are to be stored, or NULL * to omit the storing. */ void cvt_xy_to_xy(ptrl, x l , y l , ptr2, px2, py2) register struct coord_patch_dscr * p t r l ; double x l , y l ; register struct coord_patch_dscr *ptr2; double *px2, *py2; { void cvt_rtheta_to_rhoz(); void cvt_rhoz_to_rtheta(); double rho, z; i f ( (ptrl->coord_type — POLAR_SPHERICAL) 88 (ptr2 ->COOrd_type ~ POLAR_SPHERICAL) 88 (ptrl->rho_center — ptr2->rho_center) 88 (ptrl->z_center ~ ptr2->z_center) ) then { /» special case: coincentrio spherical coords: */ i f (px2 I- NULL) then *px2 - x l ; I* 'r' i s identical •/ i f (py2 I- NULL) then *py2 - y l ; /*.so i s 'theta'!I! */ else { /» 'normal' case */ i f (ptrl->coord_type — POLAR_SPHERICAL) then cvt_rtheta_to_rhoz(xl, y l , »rho, Sz); else { rho - x l ; z - y l ; } rho +- ptrl->rho_oenter; z +- ptrl->z_center; rho — ptr2->rho_center; z — ptr2->z_oenter; i f Cptr2->ooord_type POLAR_SPHERICAL) 364 patchutil directory COORD.C;26 21-SEP-1985 19:00 Page 3 then cvt_rhoz_to_rtheta(rho, z, px2, py2); i f (px2 I- NULL) then *px2 - rho; i f (py2 1- NULL) then *py2 - z; /* end of 'normal' case */ } } / « » » » « * * » « « * * * « « » * * « * * * * » « » « * » » « » » » » * « « « » » « « « * » « * » » » « » * « « » » « « » * « « « « « « « » * « * » » » * / /* * This function converts polar spherical to cyl i n d r i c a l coordinates: * » Arguments: * (r,theta) - Polar spherical coordinates to be converted. * (prho.pz) —> Where cyl i n d r i c a l coordinate result i s to be stored, or NULL * to omit the storing. */ void cvt_rtheta_to_rhoz(r, theta, prho. pz) double r, theta, *prho, *pz; double sin(), cos(); i f (prho I- NULL) then *prho - r * sln(theta); i f (pz I- NULL) then *pz - r * cos(theta); . / * * * * * * * « * * * • * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * » * * * / /» * This function converts c y l i n d r i c a l to polar spherical coordinates: * * Arguments: * (rho.z) - Cylindrical coordinates to be converted. * (pr,ptheta) —> Where polar spherical coordinate result i s to be stored, or * NULL to omit the storing. * * Note that the origin i s deemed to be at r-0, theta-0. •/ void cvt_rhoz_to_rtheta(rho, z. pr, ptheta) double rho, z, *pr, *ptheta; { double hypot(); /* hypot(x.y) returns sqrt(x*x + y*y) */ double atan2(); /* 4-quadrant arctangent (with backwards args) */ double temp_r; temp_r - hypot(rho, z); i f (pr I- NULL) then *pr - temp_r; i f (ptheta I- NULL) then *ptheta - (temp_r — 0.0) ? 0.0 : arctan2(z, rho); 365 p a t c h u t i l d i r e c t o r y CVT.C;126 21-SEP-1985 19:00 Page 1 /* Conversions between numeric codes and character names */ * function name « cvt_bndry_to_char * cvt_coord_type_to_char * cvt_difference_soheme_to_char * cvt_conformal_fn_type_to_char * * cvt_bndry_to_code * cvt_coord_type_to_code * cvt_difference_scbeme_to_code * cvt_conformal_fn_type_to_code * * cvt_bndry_cond_type_to_code * cvt_grid_fn_name_to_offset V convert from enum bndry enum coord_type enum difference_scheme enum conformal_fn_type char * char * char * char * char * char * - to — char * char * char * char * int int int int int int •include "util:stdc.h" •include "patchutil:patch.h" •include "patchutil:cvt.h" I* static struct table_entry •define TABLE_ENTRY_SIZE static struct full_table_entry •define FULL_TABLE_ENTRY_SIZE static struct table_entry coord_type_table t] - { { char *name; }; sizeof(struct table_entry) { char *name; int code; }; sizeof(struct full_table_entry) "cylindrical", "polar spherical" }; statlo struct table_entry difference_scheme_table t l - { "Independent terms", "locally conservative" }; static struct table_entry conformal_fn_type_table [] { "psi", "omega(psi)" }; * This function converts a boundary code to character form. * * Arguments: * bndry - The boundary code to convert. * * A pointer to the charaoter form i s returned as the function result. * string pointed at i s NOT to be altered 1 I I */ char *cvt_bndry_to_char(bndry) enum bndry bndry; { The 366 patchutil directory CVT.C;126 21-SEP-1985 19:00 Page 2 static struot table_entry bndry_table [] - { "I_MIN", "I_MAZ", "J_MIN", "J_MAX" }; return(bndry_table[bndry].name); * This function converts a coordinate type code to character form. * * Arguments: « coord_type - The coordinate type code to convert. s * A pointer to the character form i s returned as the function result. The * string pointed at i s NOT to be altered I I I •/ char *cvt_coord_type_to_char(coord_type) enum coord_type ooord_type; { return(coord_type_table[coord_type].name); / , ,» . . . . , . . . . . , ,* , , , . . ,»<*.»*», , , , . , , ,» , , , .„ I* * This function converts a difference scheme code to character form. * « Arguments: * difference_scheme - The difference scheme code to convert. * * A pointer to the character form i s returned as the function result. The * string pointed at i s NOT to be altered! l ! » / char *cvt_difference_scheme_to_char(difference_scheme) enum dlfference_scheme difference_scheme; { return(dlfference_scheme_table[difference_scheme].name); } /,,,,«,..,,..,.*,......,,,.,,..,*«.,.«.........««.,,.«,..» , . , , , .«. . . . . * This function converts a conformal function type code to character form. * * Arguments: * conformal_fn_type - The conformal function type code to convert. * * A pointer to the character form i s returned as the function result. The * string pointed at i s NOT to be altered!! I »/ char * ovt_oonformal_fn_type_t o_char(conformal_fn_type) enum conformal_fn_type oonformal_fn_type; { return(oonformal_fn_type_tabletconformal_fn_type].name); 3 6 7 patchutil directory CVT.C;126 21-SBP-1985 19:00 Page 3 } / * * » » » » « » » * » * * * * * « * * » » » * » » * * « * « * » « » » » » « » • » * » * » » « * « » • » • » » * * * * » « « » « » » « « » » » » » * * « » / /» * This function converts a a character string representing a boundary code to * an integer which i s either 'CVT_ERR0R' (defined i n 'cvt.h') or which can be * legally type cast into an 'enum bndry'. * * Arguments: * string - The string to convert. • * The integer described above i s returned as the function result. * * Note that the mapping from string to Integer code, i s many to one, since the * same Integer code has (in general) a different string form for each type of * coordinate system i t occurs i n . */ int cvt_bndry_to_code(string) char string[]; { char *table_search(); struct full_table_entry *p; statio struct full_table_entry bndry_table [] -{ { "r_mln", I_MIN }, { "rho_mln", I_MIN }, { "r_max", I_MAX }, { "rho_max", I_MAX }, { "theta_min". J_MIN }, { "z_min", J_MIN }, { "theta_max", J_MAX }, { "z_max". J_MAX } h •define BNDRY_TABLB_SIZE (sizeof(bndry_table) / FULL_TABLE_ENTRY_SI2E) p - (struct bndry_table_entry *) table_search(BNDRY_TABLE_SIZE, FULL_TABLE_ENTRY_SIZE, bndry_table, string); return( (p ~ NULL) ? CVT_ERROR : p->COde ); /**********************••********••*******************•*«*«••***************>•/ /* * This function oonverts a a character string representing a coordinate system * type into an integer whloh i s either 'CVT_ERROR' (defined l n 'cvt.h') or * which can be legally type cast into an 'enum coord_type'. * * Arguments: * string - The string to oonvert. • * The integer described above i s returned as the function result. »/ int cvt_coord_type_to_code(string) char string[]; 368 patchutil directory CVT.C;126 21-SEP-1985 19:00 Page 4 { char *table_searoh(); •define TABLE_SIZE (slzeof(coord_type_table) / TABLE_ENTRY_SIZE) struct table_entry *p; p - (struct table_entry •) table_search(TABLE_SIZE, TABLE_ENTRY_SIZE, coord_type_table, string); return( (p ~ NULL) ? CVT_ERR0R : (p - coord_type_table) ); / » » » » * * » « » « » » » » » * * « « * » » » * » * » » * * * * » » » * * * » « » » » « » * » « * * » « * » » » * « » * » » * » * « * « « » * * » » « » * / /* * This function converts a a character string representing a difference scheme * into an integer which i s either 1CVT_ERR0R' (defined i n 'cvt.h') or which * can be legally type cast into an 'enum difference_scheme'. * * Arguments: * string - The string to convert. « * The integer described above i s returned as the function result. */ int cvt_dlfference_scheme_to_code(string) char string!]; char *table_search(); •define TABLE_SIZE (slzeof(difference_scheme_table) / TABLE_ENTRY_SIZE) struct table_entry *p; p - (struct table_entry *) table_search(TABLE_SIZE, TABLE_ENTRY_SIZ E, difference_scheme_table, string); return( (p ~ NULL) ? CVT_ERR0R : (p - difference_scheme_table) ); / * * * * * * * * * * * * * * * * • * * * * * * * * * * * * * * * * * * * * * * • * * * * * * * * * * * * * * * * * * « * * * * * * * * * * * * * * * * * * / /* * This funotion oonverts a a character string representing a type of conformal * funotion into an Integer which i s either 'CVT_ERROR' (defined i n 'cvt.h') or * whloh can be legally type cast into an 'enum conformal_fn_type'. * * Arguments: » string - The string to oonvert. * * The integer described above i s returned as the function result. •/ int ovt_conformal_fn_type_t o_code(st ring) char string[]; { 369 patchutil directory CVT.C.-126 21-SEP-1985 19:00 Page 5 char *table_search(); •define TABLE_SIZB (sizeof(conformal_fn_type_table) / TABLE_ENTRY_SIZE) struct table_entry *p; p - (struct table_entry *) table_search(TABLE_SIZE, TABLE_ENTRY_SIZE, conformal_fn_type_table, string); return( (p ~ NULL) ? CVT_ERR0R : (p - conformal_fn_type_table) ); / t t * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * / /* * This function converts a character string representing a boundary condition » type into an integer which i s either 1CVT_BNDRY_COND_TYPE_ERROR' (defined l n * 'cvt.h') or which i s one of the codes defined i n 'patch.h'. « * Arguments: * 6tring - The string to convert. « * The integer described above i s returned as the function result. */ int cvt_bndry_cond_type_to_code(string) char string[]; { char *table_search(); struct full_table_entry *p; static struct full_table_entry bct_table [] -{ { "Dirichlet", DIRICHLET }, { "Neumann", NEUMANN }, { "Robin", ROBIN }, { "Reflection Symmetrio", REFLECTION_SYMMETRIC }, { "Marginally Trapped", MARGINALLY_TRAPPED } •define BCT_TABLE_SIZE (sizeof(bot_table) / FULL_TABLE_ENTRY_SIZE) p - (struct full_table_entry *) table_search(BCT_TABLE_SIZE, FULL_TABLE_ENTRY_SIZE, bet_table, string); return( (p — NULL) ? CVT_BNDRY_COND_TYPE_ERROR : p - > O O d e ) ; / * * » * * * » » * * * * » * » » * * * * * * » « * » « * » « » * » * » * » « * * » * » * * * » * « « * « « » * * * * * * * * * * « * » * « * * * * * * « * / * This function converts a character string representing a grid function name * into the offset i n 'doubles' of that grid function i n a 'struct grid_fn' (as * defined l n 'patch.h') or into one of several possible negative 'code' values * (as defined i n 'cvt.h', including CVT_ERR0R for unknown grid function name). 370 patchutil directory CVT.C;126 21-SEP-1985 19:00 Page 6 * Arguments: * string - The string to convert. * * The integer desoribed above i s returned as the function result. «/ int cvt_grid_fn_name_to_offset(string) char string[]; { char *table_search(); struct full_table_entry * p ; static struct full_table_entry grid_fn_name_table [] -" c l " . "c2", *C3". "c4". " C 5 " , "s". "psi". "r", "psi-mm", "psi-am", "psi-tem", "psi-tea", "psi-ssmean", "psl-ssmln", "psl-zaxls", "psl-eojuator" "r(true)", "krr", 0FFSET_C1 }, 0FFSET_C2 }, 0FFSET_C3 }, 0FFSET_C4 }, OFFSET_C5 }, OFFSET_S }, OFFSET_PSI }, OFFSET_R }, PSI_MINUS_MASS_MONOPOLES }, PSI_MINUS_AREA_MONOPOLES }, PSI_MINUS_TOT_EJPER_M_MONOPOLES }, PSI_MINUS_TOT_E_PER_A_MONOPOLES }, PSI_MINUS_SPHERICALLY_SYM_MEAN }, PSI_MINUS_SPHERICALLY_SYM_MIN }, PSI_MINUS_Z_AXIS }, PSI_MINUS_EOUATOR }. TRDE_RESIDUAL }. K_HAT_RR } •define GFN_TABLE_SIZE (sizeof(grid_fn_name_table) / FULL_TABLE_ENTRY_SIZE) p - (struct full_table_entry *) table_search(GFN_TABLE_SIZE, FULL_TABLE_ENTRY_SIZ E, grid_fn_name_table, String); return( (p -- NULL) ? CVT_ERROR : p->COde ); } 371 patchutil directory DUMP.C;63 21-SEP-1985 19:02 Page 1 /* This f i l e contains routines to dump out the various data structures */ /• * The following functions are contained in this f i l e : « dump_bhs - Dumps 'bhs' data structure. « dump_grld - (ditto for 'grid') » dump_patch_bndry - (ditto for 'patch_bndry') */ •include "util:stdo.h" •include "patchutil:blackhole.h" •include "patchutil:patch.h" •include "patchutil:tempbndry.h" / » * « « » * * » » « « « » * * * « » • » * » » » * * * * » » * » « « « * « * * * * * * » * * « * * » » » « » * » « « » * » * » » « « » * * « « » » » » « » / / * * This function dumps out the black-hole-system data structure. * * Arguments: * pbhsd —> The black-hole-system descriptor to be dumped. */ dump_bhs(pbhsd) struct bhs_dscr *pbhsd; { int 1; printf("\n DUMP OP BLACK HOLE SYSTEM \n"); If (pbhsd -- NULL ) then { p r l n t f ( " PANIC'11 — pbhsd-NULL \n"); return; } i f (pbhsd->black_hole NULL) then { p r i n t f ( " PANICIII — pbhsd- >black_hole-NULL \n"); return; } for (i-1 ; 1 <- pbhsd->N_black_hole ; ++1) i f (1 I - 1) then printf("\n"); prlntf("Black Hole •%d:\n", 1); prlntf("rho-%lf z-%lf\n", pbhsd-> black_hole[i].rho, pbhsd->blaok_hole[i].z); prlntf("mass-%lf lambda-«lf surrounding_patch_flag-%d\n", pbhsd->black_hole[i].mass, pbhsd->black_hole[i].lambda, pbhsd->black_holeti].surroundlng_patch_flag); p r l n t f ( " \ momentum-%lf reflectlon_term_sign-%d reflection_radius-%lf\n", pbhsd->black_hole[i].momentum, pbhsd-> black_hole[1].reflection_term_sign, 372 patchutil directory DUMP.C;63 21-SEP-1985 19:02 Page 2 pbhsd->black_hole[l].refleotion_radlus); printf("spin-%lf\n", pbhsd->black_hole[l].spin); r i n t f ( " END OF BLACK HOLE SYSTEM DUMP -\n"); / * » » * * * * * * * * * * • * » « * * * * * * * * * » » * * » » * • » » * * * * * » * * » » » * * » » * * * » » * * * * » * » * * * * * * * » * « * » * * / I* * This function dumps out the 'grid' data structure. * * Arguments: * pgd —> i n e grid data structure to be dumped. V dump_g rid(pgd) struct grid_dscr *pgdj int p; enum bndry bndry; int 1J; char * l j _ s t r i n g ; int ij_mln, lj_max; register struct coord_patch_dscr *ptr; register struct line_end_dscr *pled; int N_grid_points(); char *cvt_coord_type_to_char(); char *cvt_dlfference_scheme_to_char(); char *cvt_conformal_fn_type_to_char(); char * cvt_bndry_t o_char(); printf("\n DUMP OF GRID SYSTEM \n"); i f (pgd — NULL ) then { pr l n t f ( " PANICIII — pgd-NULL \n"); return; } i f (pgd->patch — NULL) then { pri n t f ( " PANICIII — pgd->patch-NULL \n"); return; } printf("This Grid System has a total of %d patches, %d grid points\n", pgd->N_patch, N_grid_points(pgd, 0)); for (p-1 ; p <- pgd->N_patch ; ++p) { printf("\n patch *%d (has %d grid points) start:\n", p. N_grid_points(pgd, p)); ptr - 9 pgd->patoh[p]; 373 patchutil directory DUMP.C;63 21-SEP-1985 19:02 Page 3 prlntf("ooord_type-%d (%s)\n", ptr->coord_type, cvt_ooord_type_t o_char(pt r-> coord_type) ); prlntf("difference_scheme-%d (%s)\n", ptr->difference_scheme, cvt_differenoe_scheme_to_char(ptr->difference_scheme) ); prlntf("conformal_fn_type-%d (%s)\n", ptr->conformal_fn_type, cvt_conformal_fn_type_to_char(ptr->conformal_fn_type) ): prlntf ("rho_center-'*lf z_center-%lf\n", ptr->rho_center, ptr->z_center); p r l n t f ( " l _ s t e p - % l f J_step-%lf\n", ptr->i_step, ptr->j_step); prlntf("l_min-%d i_max-%d\n", ptr->l_min, ptr->i_max); prlntf("J_min-%d 3_max->%d\n", ptr->J_min, ptr->j_max); prlntf("fn_l_step-%d fn_J_etep-%d fn_00_ptr-0x%08x\n", ptr->fn_i_step, ptr->fn_J_step, ptr->fn_00_ptr); for(bndry - I_MIN ; bndry <- J_MAI ; ++bndry) { i f (ptr->llne_end[bndry] ~ NULL) then { prlntf("%d llne_end array not yet allocated\n", bndry); oontlnue; /* with next boundary */ } /* get to here --> llne_end array exists -=> print i t : */ switch (bndry) { case I_MIN: case I_MAX: l j _ s t r i n g - "J"; lj_mln - ptr->J_min; lj_max - ptr->J_max; break; case J_MIN: case J_MAX: i j . s t r i n g - "1"; ij_min - ptr->l_mln; lj_max - ptr->l_max; break; } for (1J - lj_mln ; 1J <- ij_max ; ++1J) { pled - fif ptr->line_end[bndry].[lj]; prlntf("line_end[%s][%s-%d] - { end_lj-%d flag-%d ", ovt_bndry_to_char(bndry), l j _ s t r l n g , 1J, 374 patchutil directory •define ROOT •define HANDLE(x) DUMP.C;63 21-SEP-1985 19:02 Page 4 pled->end_ij, pled-> flag ) t i f (pled->flag > 0) then { pled->boundary_lnfo.interpolate p r i n t f ( " ~ > (%d,%d)", ROOT.i.low, ROOT.J_lov); i f (x » 0.0) then p r i n t f ( " 0.0 " ) ; \ else i f (x ~ 1.0) then pri n t f ( " 1.0 " ) ; \ else p r i n t f C %.31f", x); HANDLE(ROOT.dOO) HANDLE(ROOT.dOl) HANDLE(ROOT.dlO) HANDLE(ROOT.dll) } else switch (pled->flag) case DIRICHLET: oase NEUMANN: pri n t f ( " ~ > (no coefficients needed)"); break; case ROBIN: case REFLECTION_SYMMETRIC: case MARGINALLY_TRAPPED: prlntf ("~> %.31g %.31g %.31g" , •define ROOT pled->boundary_lnfo.extrapolate ROOT.dl, R00T.d2, ROOT.d3); break; default: p r l n t f ( " — > *** ( i l l e g a l value) * * * " ) ; break; } n r l n t f ( " }\n"); /« end of this boundary */ } prlntf("- patch •%d stop:\n", p); nrintf(" END OF GRID SYSTEM DUMP \n"); /***•**********•••***********************************************<*******•****/ I* * This function dumps out the temporary patch boundary data structure. * * Arguments: * N_patch - The number of coordinate patches. * patoh_bndry —> (1 origin) The patch boundary data structure to dump. */ 375 patchutil directory DUMP.C;63 21-SEP-1985 19:02 Page 5 dump_patch_bndry(N_patch, patch_bndry) int N_patcb; register struct patoh_bndry *patoh_bndry; register struct bndry_defn_term *ptr; int p; enum bndry bndry; printf("\n DUMP OP PATCH BOUNDARY TEMPORARY DATA STRUCTURE \n"); i f (patch_bndry NULL) then { printf("patch_bndry-NULL\n"); return; } for (p - 1 ; p <- N_patch ; ++p) { prlntf("\n patcb #%d start:\n", p); printf("x_min_bound=%lf x_max_bound=%lf\n", patch_bndry[p].x_min_bound, patch_bndry[p].x_max_bound); printf("y_mln_bound-%lf y_max_bound-%lf\n", patoh_bndry[p].y_mln_bound, patcb_bndry[p].y_max_bound); /* print out l i s t , i f any: */ for (bndry - I_MIN ; bndry <- J_MAX ; ++bndry) { ptr - patch_bndry[p].bdt_list[bndry]; i f (ptr « NULL) then { printf("\n%d l i s t —> (NULL)\n", bndry); continue; /* with next bndry «/ } printf("\n%d l i s t : \ n " , bndry); for ( ; ptr I - NULL ; ptr - ptr->next ) pri n t f ( " — > defn_type-%d", ptr->