Open Collections

UBC Theses and Dissertations

UBC Theses Logo

UBC Theses and Dissertations

Investigation of dopant profiles from capacitance-voltage measurements on Schottky diodes Leong, Hank W.H. 1990

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

Item Metadata

Download

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

Full Text

Investigation of Dopant Profiles From Capacitance-Voltage Measurements on Schottky Diodes by H A N K W. H . L E O N G B. A . Sc. (Hons), The University of British Columbia, 1988 A THESIS SUBMITTED IN P A R T I A L F U L F I L M E N T OF T H E REQUIREMENTS FOR T H E D E G R E E OF M A S T E R OF APPLIED SCIENCE in T H E F A C U L T Y OF G R A D U A T E STUDIES (The Department of Electrical Engineering) We accept this thesis as conforming to the required standard T H E UNIVERSITY OF BRITISH C O L U M B I A December 1990 ®Hank W. H . Leong, 1990 In presenting this thesis in partial fulfilment of the requirements for an advanced degree at the University of British Columbia, I agree that the Library shall make it freely available for reference and study. I further agree that permission for extensive copying of this thesis for scholarly purposes may be granted by the head of my department or by his or her representatives. It is understood that copying or publication of this thesis for financial gain shall not be allowed without my written permission. Department The University of British Columbia Vancouver, Canada DE-6 (2/88) Abstract Measurement of the differential capacitance (C) of a Schottky diode as a function of voltage (V) is widely used to probe dopant profiles in semiconductors. However, the theory of the dopant profiling method is based on an approximation, and does not work well when the dopant concentration changes rapidly with distance. The region beyond the maximum of an implanted Gaussian profile is of particular interest in connection with ingot qualification tests for GaAs, and it is just there that the problem is the most serious. In this thesis, an investigation was made by numerical simulation on problems associated with the profiling method. Programs were written to calculate the differential capacitance-voltage relation for GaAs Schottky diodes with and without deep energy levels, and with a specified dopant distribution. The programs predict what the approximation method would indicate for the dopant profiles according to a set of canonical equations used in the profiling method. The predicted and the specified dopant profiles were then compared. Mainly ion-implanted dopant profiles in semiconductors were studied although doped epitaxial layers were also considered. For ion-implanted GaAs, the predicted dopant profiles were found to be about 10% lower near the peak region than the true dopant profiles, and the predicted profiles were confirmed to be too high in the tail region. For doped epitaxial layers, the predicted profile was found, in some cases, to give good estimates for the dopant concentrations on the high and low sides of the true i i step profile, but in some others, the predicted profiles were found to be totally misleading. For GaAs with deep levels, a method of calculating the differential capacitance was developed to take into account the fact that the deep levels do not respond to the 1 M H z a.c. signal normally used in the C(V) measurements. It is believed to simulate the experimental C(V) measurements more realistically. The tail sections of the predicted profiles were found to increase with the concentration of background shallow donor atoms in the deep-level-free semiconductor before ion-implantation, and with the number of impurity atoms which are channelled or diffused to the region during or after ion-implantation. This implies that although the profiling method is erroneous in the tail section, it can nevertheless be used on a comparative basis to indicate the level of background shallow dopant concentration, and the degree of channelling or diffusion. The effects of the substrate parameters in liquid encapsulated Czochralski (LEC) GaAs, which include the concentrations of EL2, net shallow acceptors, and sometimes Cr, have been investigated on the predicted dopant profiles for ion-implanted samples. Increases in Cr and net shallow acceptor concentrations were found to increase the steepness of the predicted dopant profile, while an increase in EL2 concentration has little effect. A method of estimating dopant activation efficiency in GaAs has been proposed. This method uses the author's second program to avoid underestimations of the activation efficiency in GaAs caused by the peak lowering in the predicted dopant profiles. i i i The concept of Debye length in semi-insulating L E C GaAs was also discussed. The Debye length given by the standard formula for semiconductors with shallow donors and acceptors can become inapplicable when deep levels are present. iv Table of Contents Abstract . i i List of Table vii List of Figures viii Acknowledgements xii Chapter I Introduction 1 1.1 Importance of Knowing Dopant Distributions in Semiconductors 1 1.2 Comparison of Dopant Profiling Methods 2 1.3 Inherent Problems in the C(V) Method 3 1.4 Objectives in the Thesis 4 1.5 Organization of the Thesis 4 Chapter II The Developments of the C(V) Method 5 2.1 The Original Theory of Schottky 5 2.2 Investigation of the Accuracy in the C(V) Method 8 2.3 Later Developments of the C(V) Method 10 2.4 Present Contributions to the C(V) Method 16 Chapter III Dopant Profiling by the C(V) Method on Deep-Level-Free Semiconductor 20 3.1 Introduction 20 3.2 Theory 21 3.3 Program Implementation 25 3.4 Results and Discussions 27 3.4.1 Semiconductor with a Doped Epitaxial Layer . . . . 27 3.4.2 Semiconductor with Ion-Implanted Impurity Atoms 36 3.4.3 Semiconductors with Ion-Implanted Impurity Atoms and Different Background Dopant Concentrations 44 3.4.4 Semiconductors with Ion-Implanted and Some Channelled or Diffused Impurity Atoms 46 v 3.5 Reconstruction of Dopant Profiles 49 3.6 Summary 51 Chapter IV Dopant Profiling by the C(V) Method on Semiconductor with Deep Levels 53 4.1 Introduction 53 4.2 Theory 54 4.3 Program Implementation 64 4.4 Results and Discussions 65 4.4.1 Apparent Dopant Profile in a Typical GaAs Sample . . . . 65 4.4.2 Comparison of Dopant Profiles Predicted by the Two Programs 75 4.4.3 Effects of Substrate Parameters on the Apparent Dopant Profile in GaAs 79 4.5 A Practical Application of the Program CVGaAs 90 4.6 Summary 94 Chapter V Debye Length in Semi-Insulating (SI) Semiconductors . . 96 5.1 Definition of Debye Length in a Deep-Level-Free Semiconductor 96 5.2 Improper Application of the Definition to GaAs with Deep Levels 98 Chapter VI Conclusions and Suggestions For Future Work 103 References 107 Appendix I An Initial Solution 110 Appendix II Listing of Program CVFREE 112 Appendix III Listing of Program CVGaAs 117 Appendix IV Listing of Program COLSYS 124 vi Lis t o f Table Table 5.1 Debye Lengths in Semi-Insulating GaAs vii List of Figures Figures 2.1 Depletion in the Schottky Diode 6 2.2 Illustration of the New Definition of the Depletion Region in a Schottky Diode 13 3.1 Energy Band Diagram in a Schottky Diode 22 3.2 Dopant Profiles for a Step-doped Semiconductor 28 3.3 Potential Distributions (a) and Field Distributions (b) in a Step-Doped Semiconductor at Various Voltage Biases 30 3.4 Assumed and Predicted Dopant Distributions in a Step-Doped Semiconductor, and Electron Distributions in the Semiconductor at Various Voltage Biases 31 3.5 Space Charge Distributions in a Step-Doped Semiconductor at Various Voltage Biases 33 3.6 Apparent Dopant Distributions in Step-Doped Semiconductors with Different High-Low Junctions 35 3.7 Potential Distributions (a) and Field Distributions (b) in an Ion-Implanted Semiconductor at Various Voltage Biases 37 3.8 Assumed and Predicted Dopant Distributions in an Ion-Implanted Semiconductor in Linear Scale (a) and Log Scale (b) 39 vii i 3.9 Deviations Between Assumed and Predicted Dopant Distributions in an Ion-Implanted Semiconductor 40 3.10 Assumed and Predicted Dopant Distributions in an Ion-Implanted Semiconductor, and Electron Distributions in the Semiconductor at Various Voltage Biases 42 3.11 Space Charge Distributions in an Ion-Implanted Semiconductor at Various Voltage Biases 43 3.12 Assumed and Predicted Dopant Distributions in Ion-Implanted Semiconductors with Various Background Dopant Concentrations 45 3.13 Assumed and Predicted Dopant Distributions in Ion-Implanted Semiconductors with Various Degrees of Channelling or Diffusion 48 3.14 Reconstruction of Dopant Profiles in an Ion-Implanted Semiconductor 50 4.1 Energy Band Diagram in a GaAs Schottky Diode 56 4.2 Potential Distributions (a) and Field Distributions (b) in an Ion-Implanted GaAs at Various Voltage Biases 67 4.3 Assumed and Predicted Dopant Distributions in an Ion-Implanted GaAs in Linear Scale (a) and Log Scale (b) 68 4.4 Deviations Between Assumed and Predicted Dopant Distributions in an Ion-Implanted GaAs 70 ix 4.5 Assumed and Predicted Dopant Distributions in an Ion-Implanted GaAs, and Electron Distributions in the Semiconductor at Various Voltage Biases . . 71 4.6 Space Charge Distributions in an Ion-Implanted GaAs at Various Voltage Biases together with a Gaussian Dopant Profile 73 4.7 Distributions of Ionized EL2 in an Ion-Implanted GaAs at Various Voltage Biases 74 4.8 Calculated C(V) Profiles in GaAs Samples with and without Deep Levels 77 4.9 Predicted Dopant Profiles in GaAs Samples with and without Deep Levels 78 4.10 Calculated C(V) Profiles in GaAs Samples with Various EL2 Concentrations 81 4.11 Apparent Dopant Profiles in GaAs Samples with Various EL2 Concentrations 82 4.12 Calculated C(V) Profiles in GaAs Samples with Various Net Acceptor Concentrations 84 4.13 Apparent Dopant Profiles in GaAs Samples with Various Net Acceptor Concentrations 85 4.14 Calculated C(V) Profiles in GaAs Samples with Various Chromium Concentrations . 88 4.15 Apparent Dopant Profiles in GaAs Samples with Various Chromium Concentrations 89 x 4.16 Activation Efficiency Estimation Using Dopant Profiles Predicted by CVGaAs and Measured by the C(V) Method 93 5.1 Estimation of Exponentially Decaying Rates in Potential Distributions in L E C SI GaAs 100 5.2 Variation of Ionized EL2 Concentration in L E C SI GaAs 102 xi Acknowledgements I owe many thanks to my graduate supervisor, Dr. L . Young, for his support and guidance during the course of my work. Helpful discussions with Dr. M . Maciazaek and Mr. R. Bult in the Electronic Material Division of Johnson-Matthey Ltd. are appreciated. Special thanks should be made to NSERC and Johnson-Matthey Ltd. for their research grant to the Solid-State Laboratory at U B C . I would like to thank Dr. D. Hui for his help and discussions at the beginning of my M . A . Sc. program. Appreciations are also due to Dr. U . Ascher of the Computer Science Department for his computer program COLSYS and Ms. C. Moore of the Computing Centre for her attempt to debug my program. Ms. N . Leong is thanked for typing part of the thesis. Dr. N . Jaeger is thanked for letting me use his PC system. I would also like to extend my thanks to my fellow students C. Backhouse and D. Shulman, and our research engineer H . Kato for many interesting, both technical and non-technical, discussions. Last but not the least, I would like to thank my family, especially my mother, for their support and faith in me. xii Chapter I Introduction 1.1 Importance of Knowing Dopant Distributions in Semiconductors Knowledge of dopant distribution in semiconductors is essential to both device designers and device manufacturers. Device designers use dopant distribution to determine fundamental relations between various device parameters which describe the performance of the device, and from these relations, the device designers optimize their design to yield the best device performance. Device manufacturers (and wafer suppliers), on the other hand, need to ensure that they can achieve the desired dopant distribution on semiconductor wafers. They qualify wafers by implanting impurity atoms (shallow donors, or acceptors, or possibly both) into some sample wafers from an ingot of semi-insulating semiconductor crystal, and then measuring the dopant distributions in these wafers. The sample wafers must show certain dopant distribution and dopant activation in their implanted dopant profiles before the whole set of wafers from the ingot is accepted for the fabrication of integrated circuits. This qualification process is particularly important in the fabrication of gallium arsenide (GaAs) devices as S i 2 9 , the commonly used impurity atom, may on implantation find itself in a gallium site (Ga) or an arsenic site (As) in GaAs wafers, and the net dopant distribution is determined by the number difference of S i 2 9 in the Ga sites 1 manufacturers that they can achieve a high activation efficiency of donor S i 2 9 atoms in GaAs wafers. For a high activation of donor S i 2 9 atoms, the percentage of S i 2 9 located in the Ga sites must be much higher than that of S i 2 9 located in the As sites . 1.2 Comparison of Dopant Profiling Methods The methods which are used to determine dopant distributions in semiconductors include the C(V) measurement method (simply called the C(V) method) and Secondary-Ion Mass Spectroscopy (SIMS). In the C(V) method, the capacitance (C) of a Schottky diode is measured as a function of the reverse bias voltage (V) applied on the diode, and the distribution of the electrically active dopant atoms is calculated from the C(V) profile according to a set of canonical equations derived by Schottky [1], In SIMS, a bare semiconductor wafer is sputtered in a high vacuum, and secondary ions emitted from the sputtered surface are detected [2], thus giving the distribution of the impurity atoms in the semiconductor. Neither of the profiling methods is ideal. Each has its own advantages and disadvantages. While SIMS can be used to probe accurately any impurity distributions (above certain dopant concentration limits), it is destructive and expensive. The C(V) method, however, may not be as accurate as SIMS, particularly for probing rapidly changing dopant distributions. But it is an attractive method because it is inexpensive and non-destructive, and because it can be easily carried out. Besides, the C(V) method is the only method for measuring dopant profiles in GaAs or other compound 2 semiconductors where the commonly used dopant atoms such as S i 2 are amphoteric (depending on the sites they occupy). This is because the C(V) method gives the distribution of the net effective dopant concentration while SIMS gives the distribution of the implanted impurity atom concentration. 1.3 Inherent Problems in the C(V) Method There are, however, some inherent problems in the C(V) method. The main problem is that the C(V) method does not predict very accurately dopant distributions which change rapidly, e.g., those of abrupt junctions and ion-implanted dopants. For the case of ion-implanted wafers, the dopant profile predicted by the C(V) method tends to be lower in the peak region and much higher in the tail region than the real Gaussian-like dopant distribution prescribed by the LSS theory [3-5]. The exaggerated concentrations in the tail region of the dopant distribution predicted by the C(V) method may, in particular, cause serious problems as the dopant distribution in that region is of great interests to device designers and device manufacturers. The performance of devices such as microwave devices depends very much on the dopant distribution in that region. The second problem associated with the C(V) method is its failure to consider deep levels in semiconductors. This is critical to GaAs device manufacturers as deep levels like EL2 are necessary in "undoped" Liquid Encapsulated Czochralski GaAs (LEC GaAs) for compensating the excess of shallow acceptors over shallow donors originally resided in the substrate. 3 1.4 Objectives in the Thesis The main objective in this thesis is to investigate the problems which are inherent in the C(V) method. The author will try, by numerical simulation, to demonstrate the accuracy of the dopant profiles predicted by the C(V) method on ion-implanted semiconductors with no deep energy levels. The accuracy probe of the dopant profiles is also carried out on ion-implanted semiconductors with deep levels (e.g. GaAs). In the former case, the simulation program is used to investigate the effects of various substrate dopant concentrations and the effects of channelled or diffused impurity atoms on the dopant profiles. In the latter case, the extended simulation program is used to investigate the effects of the deep levels in GaAs such as EL2 and those due to Cr on the dopant profiles. The ultimate goal is to minimize the effects of the inherent problems on the dopant profiles predicted by the C(V) method. 1.5 Organization of the Thesis The thesis is organized as follows. In Chapter II, the theoretical development of the C(V) method is discussed, along with a brief preview of the present contribution to the C(V) method. In Chapter III, the C(V) method is applied to semiconductors with only shallow dopants, and in Chapter IV, the C(V) method is applied to semiconductors with deep levels and shallow dopants, such as GaAs. A new method of simulating the C(V) method on semiconductors with deep levels is also presented in Chapter IV. In Chapter V , the meaning of Debye length in semi-insulating GaAs is discussed. And finally, conclusions and suggestions for future work are given in Chapter VI . 4 Chapter II The Developments of the C(V) Method 2.1 The Original Theory of Schottky The theory of the C(V) method, originated by Schottky [1], is based on the so-called depletion approximation. When a d. c. reverse bias voltage is applied on a Schottky diode, two distinct layers are assumed to exist under the metal-semiconductor junction of the diode — in calculating the space charge density, the top layer is supposed to be completely depleted of charge carriers, and the bottom layer free of space charge. The top layer is normally called the depletion region while the bottom layer is called the bulk of the semiconductor. The depth to which the depletion region extends is called the depletion region width. If the voltage (V) applied to the diode is increased by dV, the depletion region would extend, and the depletion width x* would change correspondingly by dx* as shown in Figure 2.1. The change in the total charge (per unit area) on the semiconductor of the Schottky diode, dQ, would be equal to the change in the space charge in the semiconductor, which is a pulse (or spike) added to the edge of the depletion region in the space charge distribution, that is 5 (a) Figure 2.1 Depletion in the Schottky Diode (a) Schottky Diode and (b) Depletion 6 dQ=qN(x')dx* C 2 - 1 ) and the differential capacitance of the Schottky diode C is £ = | ^ 21 = | qN(x *) — | =qN(x *)\—\ (2.2) A 1 J K 1 1 dV] 1 dV* where A is the effective area of the Schottky diode. This Schottky diode can also be considered as a parallel-plate capacitance, and the capacitance C can be written as C=— (2.3) or C Thus dx* _ eAdC dV~ c2dV Equation (2.2) can be re-arranged to give Equation (2.6). C 1 x'=^ (2.4) (2.5) qA d^_ (2-6) 1 dVl Substituting Equation (2.5) into Equation (2.6), one can express N(x*) in terms of the differential capacitance at'a certain applied voltage bias V : 7 qeA2 tdC, V-') dV Equations (2.4) and (2.7) are often called the canonical equations of the C(V) method. They are the backbone of the method. Using these equations, dopant concentration N(x*) can be estimated from C(V) measurements on a Schottky diode. Because it is only an estimate, N(x*) obtained in this way is often called the apparent dopant concentration, and denoted as N*(x*). The C(V) measurements can be made using a d. c. voltage plus a small a.c. voltage. The d. c. voltage is used as the bias voltage, and the a.c. voltage is used for measuring the differential capacitance at the d. c. bias voltage. The d. c. voltage is stepped through a voltage range so that a C(V) profile can be obtained. 2.2 Investigation of the Accuracy in the C(V) Method N*(x*) obtained from the C(V) measurements, however, does not represent the true dopant profile [6-18]. Deviations between N*(x*) and the true dopant profile arise because of the depletion approximation assumption on which the C(V) method is based. The abrupt depletion region does not exist in reality. The change in the space charge distribution due to the small voltage increase dV is actually spread out in the entire semiconductor region. This spread-out change of space charge causes peak and tail artifacts in N*(x*). Wu, Douglas and Mueller [6] investigated the validity and limitation of the C(V) 8 method on a semiconductor without deep levels. They considered the inverse problem for the C(V) method: they calculated the C(V) distribution for a Schottky diode made of the deep-level-free semiconductor with a specified dopant distribution, and then computed the apparent dopant profile according to the canonical equations. They concluded that the dopant profiles given by the C(V) method are misleading when it is applied to substrate with rapidly varying dopant profiles. For step-doped semiconductors, i.e., a doped epitaxial layer, they pointed out that the apparent dopant profiles are not related to the original profiles in any obvious way. For ion-implanted semiconductors, they pointed out that the apparent dopant profiles can be quite different from the true implanted dopant profile and exhibit an artificial "exponential tail" which may not be present in the actual impurity atom distribution. Johnson and Panousis [5] also investigated the accuracy of the apparent dopant profile by tackling the inverse problem on step-doped and ramp-doped semiconductors without deep levels. They correctly realized that the change of the space charge due to a small increment of the voltage on the Schottky diode is spread out, and does not sample the dopant distribution, especially the rapidly changing dopant distribution. They pointed out that the spatial resolution for the apparent dopant profile is limited to the order of a Debye length, which was defined by them as LD= dopant concentration. If the true dopant profile changes in a distance that is smaller than the Debye length, the apparent dopant profile would be significantly different from the ekT , where N is the local qzN 9 true dopant profile. In a step-doped semiconductor, for example, the difference between the apparent dopant profile and the true dopant profile is most evident near the abrupt junction. 2.3 Later Developments of the C(V) Method Many researchers have tried to improve the method. Assuming the validity of the depletion approximation, Kennedy et al. [8] claimed that the apparent dopant profile obtained from Equation (2.7) represents the distribution of majority carrier concentration rather than the dopant concentration. Based on this claim, a formula for the dopant concentration is derived in their subsequent paper [9] for semiconductors with shallow donors or shallow acceptors. Their derivation is shown below. In a n-type semiconductor where there is no current flow, J=qD„ qu. „«—3-=0 " ndx n dx (2.8) and thus dty_ kT 1 dn(x) dx q n(x) dx (2.9) where the Einstein relation D n / u n = kT/q has been used. Apply Poisson's equation to the deep-level-free semiconductor, 10 *l=l(N(x)-n{x)) (2.10) ax e Combining Equation (2.9) and (2.10), we have -EAiJ-Md^lQjw-tfc)) (2 . i i ) q dx n(x) dx e and thus N^^-ElAi-L^ (2.12) q q dx n(x) dx where n(x) is given by the canonical equations according to what Kennedy et al. claimed [8], that is, 1 C 3 niX>~q^~d£> (2-13) ldVl Though it is easily derived, Equation (2.12) can give the dopant concentration only when the electron concentration distribution is known. Kennedy et al. relied on their claim in the first paper [8] for the electron concentration distribution. Kennedy's method, however, does not give the true dopant distribution [7, 10, 11]. The depletion approximation assumption which they used is known to be the source of errors in the C(V) method [6-18]. The validity of equation (2.12) can also be questioned. One might ask: under what condition, namely, under what bias voltage, should the distribution of electron concentration be taken? Nishida [13] and Baccarani et al. [14] realized the lack of theoretical support in Kennedy's method. They tried independently to derive analytically the Kennedy's results 11 i (Equation (2.11) and their claim) using a more rigorous definition of depletion layer width x*. This new definition is implicitly given in an equation where the distribution of majority carriers at a low bias (in the case of x*=0) is included, as shown below: <?*(*> / Pj*y)dx=qfND(x)dx+q{[ND(x)-n0(x)]dx (2-14) 0 O x ' Here Qsc(x*) is the total space charge per unit area, n0(x) is the distribution of electron concentration in the case of x*=0, and the semiconductor which the equation is applied to is assumed to contain shallow donors only. This definition is illustrated in Figure 2.2 (after Nishida). Figure 2(a) shows the donor and electron distributions when the entire semiconductor is space-charge neutral, i . e., the vertical and the obliquely hatched areas are exactly equal. This is the case where x*=0, and n(x)=n0(x). Figure 2(b) depicts the general case where the majority carriers (electrons) are depleted from the surface. According to the definition of x* given in Equation (2.12), the vertically and obliquely hatched areas are equal. This definition removes the abrupt depletion approximation by letting electrons (majority carriers) diffuse into the depletion region and maintain the validity of Boltzmann distribution in that region [11]. However, using the implicit definition of x*, both Nishida, and Baccarani et al. surprisingly inferred the same results as Kennedy et al. 12 Figure 2.2 Illustration of the New Definition of the Depletion Region in a Schottky Diode 13 Lehovec [11] used a different approach to improve the C(V) method on ion-implanted semiconductors with no deep levels. He parameterized the differential capacitance (C) of a partially depleted n-channel with steep dopant gradient (e.g. Gaussian distribution) in terms of the position dependence of the peak electron concentration (n0) when the gate bias voltage is changed. Using x* = eC" 1, he then obtained an expression for the position (x*) in the dopant profile, as shown in Equation (2.15). (2.15) NQ-dOn(x)dx)/dx0 where a=—, P=—, x 0 is the position of the peak electron concentration, and N 0 e q is the dopant concentration at the position of maximum electron concentration. From this expression, Lehovec identified two different contributions which make x* deviate from x 0 . The first contribution is the variation of the built-in potential with x 0 . It is called the "built-in potential effect" and it is shown in the first term in the numerator of Equation (2.15). It should be noted that the built-in potential of the Schottky barrier can be expressed in terms of the peak electron concentration n 0 as shown in the following equation (i. e. Equation (7) in his paper): 14 V^x^LnA B where N B is the dopant concentration in the bulk of the semiconductor. The second contribution is the extension of the electron distribution from x 0 into the depletion region. It is called the "gradual depletion edge effect" and it is shown in the second term in the numerator of Equation (2.15), i.e. the integral. Lehovec indicated that both Nishida and Baccarani et al. included only the second contribution in their analysis involving the more rigorous definition of depletion width x*. However, this contribution was believed to be small and probably negligible so that the claim of Kennedy et al. remains valid even when the abrupt depletion approximation was removed [11]. Using the expression for x* (Equation (2.15)), Lehovec derived a set of formulae for the dopant distribution: N -i Vo l , (2aNrm ( 2 - 1 6 ) dlnN'/dx* x0=x*-Q.laN')m (2.17) where x 0 is also the position of the peak electron concentration. This set of formulae was used by Lehovec to reconstruct the actual dopant distribution from the tail of the apparent dopant distribution estimated by the C(V) method. The reconstructed dopant profile was claimed to deviate only slightly from the true dopant profile [11]. Unlike Lehovec, who focused on the ion-implanted dopant profiles, Shenai et 15 al. [18,19] tried to improve the C(V) method on epitaxial layers in GaAs substrate. They proposed a charge conservation model to reconstruct the true dopant profile. They claimed that using their reconstruction method, the true impurity distribution can be resolved to within a few Debye lengths if an accurate estimation of the free electron distribution is made. However, it is not clear what the resolution of their reconstruction method is, and indeed the meaning of Debye length in GaAs with deep level present is questioned in Chapter V in this work. It is also uncertain whether or not their reconstruction method can be applied on semiconductors with ion-implanted dopant atoms. A l l of the improvement methods above were claimed to reduce somewhat the deviation between the estimated dopant profile and the true dopant profile. However, complicated calculations are involved in some of the methods, and some of the methods have an uncertain theoretical basis. The simple Schottky method is still the one extensively used in the semiconductor industry. 2.4 Present Contributions to the C(V) Method In this work, some technically important aspects of Schottky's C(V) method were investigated by numerical simulation. Similar to Wu et al. [6] and Johnson et al. [7], the author also tackled the inverse problem. A program was written to predict the apparent dopant profile according to the canonical equations in a semiconductor with a known dopant distribution. It is confirmed that the dopant profile predicted by the C(V) 16 method deviates from the true dopant profile. If the assumed input dopant profile is Gaussian as in the case of ion-implanted wafers [3-5], the predicted dopant profile shows a lower dopant concentration in the peak region and a much higher dopant concentration in the tail region of the Gaussian distribution. The lowering of the peak is about 10% of the true dopant profile while the exaggeration of the tail is excessive. An investigation was also carried out on how the predicted dopant profile for ion-implanted wafers changes with various net concentrations of shallow donors (N B) which originally reside in the substrate. It was found that the higher N B , the higher is the tail in the predicted profile. This confirmed that the C(V) method can be used to probe dopant profiles on a comparative basis. It was often suspected that the erroneous tail which the predicted profile shows is caused by dopant atoms which are channelled to the region during ion-implantation or diffused to the region after ion-implantation, rather than by some inaccuracies inherent in the C(V) method [10]. To investigate the effect of channelled or diffused dopant atoms on the predicted dopant profile, a Gaussian distribution of dopant concentration with an exponential tail was input to the simulation program. It was found that the predicted dopant profile differs from the predicted dopant profile for the assumed dopant profile without any tails. Several researchers have tried to reconstruct the dopant profile from the predicted dopant profile in the past [9, 11]. However, it was found that none of the reconstruction methods works adequately. A new method to simulate the C(V) method on GaAs wafers was developed. This 17 method takes into account the fact that the deep levels in GaAs do not follow the high frequency a.c. signal (normally 1 MHz) used in the experimental capacitance-voltage measurements. It is believed that the present method more realistically simulates the experimental C(V) method. Using this new method in the second program, the author investigated the effects of deep levels such as EL2 and those due to Cr, and the effects of residual shallow impurity atoms in the GaAs substrate on the dopant profile predicted by the C(V) method. The results from the simulations confirmed that Cr can be used to increase the steepness of ion-implanted dopant profiles. The second computer program can be used by wafer suppliers to investigate the degree of activation of ion-implanted S i 2 9 atoms in GaAs, which is a crucial qualification parameter in newly grown GaAs wafers. A comparison between the dopant profile predicted by the program and the dopant profile measured using the C(V) method may give some insights on how well S i 2 9 activates in the wafers. The dopant profile predicted by the program can be used to estimate more accurately the activation efficiency of S i 2 9 in GaAs samples. Some experimental results were obtained from C(V) measurement on an ion-implanted GaAs made at UBC. These results were compared with that obtained by the simulation program with the input Gaussian profile prescribed by the LSS theory [3-5]. Some of the intermediate results from the second simulation program have helped to explore the meaning of Debye length in GaAs. The Debye length for a uniform doped 18 semiconductor is defined as L T ekT , where p B and n B are the hole and electron concentrations in the semiconductor. The Debye length is supposed to be the distance over which the potential distribution in the semiconductor biased with a small voltage has changed by a factor of 1/e. The formula for the Debye length was derived [20] for semiconductors with the exclusion of deep energy levels in them. However, this same formula was found to be also applied in the literature to GaAs with deep levels [21]. This improper application is obviously incorrect. The intermediate results from the author's simulation program indicate that the rate of the exponential decay in the potential distribution in semi-insulating GaAs (SI GaAs) is much faster than what the Debye length indicates. 19 Chapter III Dopant Profiling by the C(V) Method on Deep-Level-Free Semiconductor 3.1 Introduction Schottky's C(V) method is simulated for a deep-level-free semiconductor with a Schottky diode. The semiconductor is assumed to contain a distribution of intentionally added shallow donors, N D (x) , and a uniform distribution of unintentionally present shallow donors or shallow acceptors, N B . N D(x) is usually introduced to the semiconductor by ion-implantation, and it is assumed to be Gaussian for the ion-implanted wafers [3-5]. N D (x) can also represent the dopant distribution in an epitaxial layer, and in this case, it is assumed to be a step function. N B , often called the background dopant concentration, represents the difference between shallow donors and shallow acceptors which already exist in the substrate before the introduction of N D (x) to the semiconductor. A program called C V F R E E was written to predict the apparent dopant profile for the semiconductor according to the canonical equations. This predicted dopant profile is compared with the assumed dopant profile, N D (x) , and the accuracy of the predicted dopant profile is examined. In the program, the semiconductor is assumed to be GaAs although it can also be any other semiconductors. 20 The objective to tackle the inverse problem is twofold. First the author wants to verify some of the observations on the C(V) method known in the literature. Secondly, he would like to explore some practical implications in the dopant profiles predicted by the C(V) method. The program C V F R E E is used to investigate the accuracy of the dopant profiles predicted by the C(V) method, as well as to investigate the effects of various background dopant concentrations N B , and the effects of channelled or diffused impurity atoms on the predicted dopant profile. 3.2 Theory The Schottky diode and its energy band diagram are shown in Figure 3.1. A reverse bias voltage V is assumed to be applied across the n-type semiconductor in the diode. The dopant profile in the semiconductor is assumed to be Gaussian (or any other type). 21 Figure 3.1 Energy Band Diagram in a Schottky Diode 22 The calculation of the differential capacitance on the Schottky diode at a reverse bias voltage V is quite involved. The total charges on the semiconductor must be obtained when the applied voltage on the diode is V and V + 6*V. The total charge is calculated from the electric field at the surface of the semiconductor, and the electric field is obtained from the derivative of the electrostatic potential distribution in the semiconductor at each of the applied voltages. The electrostatic potential distribution i|r(x) in the semiconductor in the Schottky diode is determined by the Poisson-Boltzmann equation ^±=_P<P0 (3.1) dx2 e ^ = -l(ND\x)+NB*-n(x)) (3.2) dx2 e where e is the permittivity of the semiconductor, p(x) is the charge density, q is the proton charge, N B + and N D + ( x ) are the ionized dopant densities, and n(x) is the electron density in the semiconductor. We have omitted minority hole concentration and hence are restricted to n-type substrate. The shallow donor and acceptor atoms in the semiconductor are assumed to be completely ionized. The electron concentration n(x) varies with the potential i|r(x) according to the Boltzmann distribution. g » ( * ) «(x)=nBe ki (3-3) Here, n B is the electron concentration in the bulk, and it is determined from the charge 23 neutrality equation p(x=oo) = 0, i.e., n B = N B + . In the bulk, N D + ( x =00) has become negligible. The boundary conditions for this second-order differential equation are: ijr(x=0) = i|rs and t|r(x=oo) = 0 (3.4) where i|rs is the potential at the surface of the semiconductor. i|rs = V - V b i , where V is the applied d. c. bias voltage on the diode, and V b i is the built-in voltage of the diode. To obtain the differential capacitance, a small voltage increment <SV, equivalent to the a.c. signal strength in the experimental C(V) measurements, is added to the applied bias voltage V . The Poisson-Boltzmann equation is solved again with new boundary conditions i|r(x=0) = »|rs + 6V and iJr(x=°o) = 0 (3.5) The total charge Q on the semiconductor at each of the applied voltages (V and V + 6*V) is calculated using Q = - edi|r/dx(x=0) where di|r/dx(x=0) is obtained from the solution of the Poisson-Boltzmann equation. The difference (<5Q) of the total charges computed from the two solutions is then used to calculate the differential capacitance C of the Schottky diode at the applied voltage V using C = 6Q/6V. As a check, the difference of the total charges is also obtained from the difference of the carrier charges calculated by integrating the carrier density from the surface to the bulk of the semiconductor. (The charge of the ionized impurity atoms is unchanged with the surface potential ijr(x=0). Hence, this charge is cancelled when the difference is taken, and it does not need to be included in the integrand). The applied bias voltage V is stepped by A V , and the above process is repeated 24 until a capacitance-voltage profile is obtained. This C(V) profile is then used in the canonical equations to obtain the apparent dopant distribution N*(x*). 3.3 Program Implementation A robust method of solving the Poisson-Boltzmann equation is needed because the potential distribution changes rapidly near the surface of the semiconductor. A computer program called C O L S Y S , which is available in MTS from the U B C Computing Centre, is used. The program [22, 23] uses the method of spline collocation at Gaussian points to solve boundary value problems. COLSYS was incorporated in the program C V F R E E . For each applied voltage bias, COLSYS is called to solve the Poisson-Boltzmann equation at i|r(x=0) = i|rs. The total charge Q on the semiconductor is calculated from the electric field at the surface. The total carrier charge Qc is also obtained by integrating the carrier density from the surface to the bulk of the semiconductor. Both Q and Qc are stored in data arrays. The above process is repeated in a loop controlled by i|fs(i.e. i|r(x=0)). i|rs scans from a large negative voltage (e.g. -2.5 V) to a small voltage (e.g. 0 V) in steps of A V . These voltages are user-defined. The differential capacitances CO and CI are computed from the adjacent difference of the total charge array Q, and from the adjacent difference of the total carrier charge array Qc respectively. C0(V) and C1(V) are then used to calculate the apparent dopant concentrations N0*(x*) and Nl*(x*). C1(V) and Nl*(x*) are used to check against C0(V) 25 and NO*(x*) to ensure their accuracies. In the program, A V is set to equal S V to reduce the number of calls for COLSYS to solve the Poisson-Boltzmann equation and to increase the accuracy of numerical evaluation of dC/dV in the calculation of the apparent dopant concentrations. The results from the solution of the Poisson-Boltzmann equation which include the potential distribution, the electric field distribution, the electron concentration distribution and the space charge distribution are output selectively at i|rs = 0, -0.5 V , -1.0 V , -1.5 V , etc. An initial approximation to the solution, derived in Appendix I with the assumption of a complete depletion, is provided for the first call of COLSYS to solve the Poisson-Boltzmann equation. The previous solution is used as an approximation for the other calls of COLSYS. The listing of C V F R E E is included in Appendix II. 26 3.4 Results and Discussions 3.4.1 Semiconductor with a Doped Epitaxial Layer We first investigate the accuracy of the apparent dopant concentration in a semiconductor with a doped epitaxial layer. The true dopant distribution N D (x) in the semiconductor is a step function. In the program, it is assumed to be 5 x 10 1 6 cm"3 for the depth x between 0 and 0.2 um, and 1 x 10 1 4 c m 3 for x larger than 0.2 um, giving a high-low dopant concentration ratio of 500. Wu et al. [6] have concluded that the apparent dopant profile for a step-doped semiconductor is not related to the true profile in any obvious way. The result in Figure 3.2 does show that near the transition of the abrupt junction, the dopant distribution predicted by the C(V) method deviates from the step function, and on the low side of the step function, in particular, the apparent dopant profile displays a long exaggerated tail. Unlike Wu et. al. , however, we found that the C(V) method does predict accurately, at least for this particular step-doped semiconductor, the dopant concentrations on the high side and on the low side of the step function. The apparent dopant profile is flattened at about 5 x 10 1 6 c m 3 for the depth x between 0.05 and 0.15 um, and it extends to 1 x 10 1 4 cm"3 in the bulk, indicating what the dopant concentrations on the high side and the low side should be. 27 5 * 1 0 Dopant Cone. (cm**-3) 0.4 0.6 Depth (micron) Figure 3.2 Dopant Profiles for a Step-doped Semiconductor 28 The potential distributions and the electric field distributions in the step-doped semiconductor at various surface potentials (correspondingly at various applied bias voltages on the diode) are shown in Figure 3.3. The surface potential i|rs is varied from -2 V to 0.2 V in steps of 0.02 V . A non-smooth transition appears at x=0.2 um in the electric field distributions due to the abrupt junction in the dopant profile. The electric field distributions are also seen to be almost linear near the surface at ij/ s = -0.5, -1.0, -1.5 and -2 V , similar to the case of uniformly doped semiconductors where the field distribution is linear for the entire region. Figure 3.4 depicts the electron concentration distributions at various surface potentials together with the step dopant distribution and the apparent dopant distribution. Figure 3.4 shows that the apparent dopant profile does not represent the distribution of majority carriers either. Although on the low side of the step function, the curve prescribed by the C(V) method is closer to the electron distributions at low biases than to the step function, it deviates very much from the electron distributions near the surface. In fact, as expected, the electron concentration distribution varies very much with the applied bias voltage near the surface. These results do not quite agree with Kennedy's claim and the derived result of Nishida [13] and Baccarani et al. [14], both of which predict that the apparent dopant distribution gives an estimate of the electron concentration distribution. 29 (a) (b) 0.5 Potential (Volt) -0.5 -1 - 1 . 5 --2 0.2 Field (V/micron) -5 --10 --15 0.0 0.1 - ' / / / / / / - / . •OV •*(¥ •-0J0V •-130V 0.4 0.6 Depth (micron ) 0.8 ^ . / / ••" / / / / / . . - • • / , FOV F-1V _ F-0.50V F-2V 0.2 0.3 Depth (micron) 0.4 0.5 Figure 3.3 Potential Distributions (a) and Field Distributions (b) in a Step-Doped Semiconductor at Various Voltage Biases 30 Depth (micron) Figure 3.4 Assumed and Predicted Dopant Distributions in a Step-Doped Semiconductor, and Electron Distributions in the Semiconductor at Various Voltage Biases 31 Figure 3.5, similar to Figure 11 in Reference 10, shows the space charge distributions at various applied biases along with the step dopant function. The figure verifies that the depletion approximation assumption used in the C(V) method is incorrect. A small change in the applied voltage (from 0.02 V to 0 V) does not simply add a change in the space charge at the edge of the artificial depletion region. The change in the space charge is rather spread out in the entire region of the semiconductor. 32 Space Charge (/cm**3) SC002V SC-050V STEP. SCOV s c - i v " " 0 . 0 0 .1 0 . 2 0 . 3 Depth (micron) 0 . 4 0 . 5 Figure 3.5 Space Charge Distributions in a Step-Doped Semiconductor at Various Voltage Biases 33 The program C V F R E E is also applied to step doped semiconductors with different ratios of high-low dopant concentrations to further verify the conclusion of Wu et al. The step dopant distributions and the corresponding apparent dopant distributions are shown in Figure 3.6. The input step profiles are exactly the same as the cases considered by Wu et al. In Figure 3.6(a), the step function has a high-low dopant concentration ratio of 10, and the transition occurs at x=0.25 um. In this case, the apparent dopant profile is no longer flattened on the high side of the step function, and it only has a point of inflection at the high dopant concentration. In Figure 3.6(b), the high-low ratio is increased to 100, but the thickness of the doped epitaxial layer is reduced to 0.15 um. In this case, the apparent dopant profile is indeed as Wu et al. expected: it does not resemble the input dopant profile in any obvious way. The apparent dopant profile shown in Figure 3.6 are very similar to those of Wu et. al . , except that in Figure 3.6(b), the apparent dopant profile does not fluctuate like that of Wu et. al . , and hence no smoothing process is necessary. The results for the three cases indicate that the accuracy of the apparent dopant profile for the step-doped semiconductor depends on the dopant concentrations on the high and low sides of the step function, and the thickness of the epitaxial layer. For some cases, the C(V) method provides a fairly accurate estimate of the true dopant concentrations on the high and low sides of the step profile. 34 5 - 10 Dopant Conc.(cm**-3) 10 16 .'5 5 * 10 \ \ : \ \ _1_L.1JJ 0.2 0.4 0.6 Depih (micron) 0.8 5 - 1 0 Dopont Cone. (cm*'-3) 0.4 0.6 Depth (micron) Figure 3.6 Apparent Dopant Distributions in Step-Doped Semiconductors with Different High-Low Junctions 35 3.4.2 Semiconductor with Ion-Implanted Impurity Atoms Since ion-implantation is the most common method to introduce dopant atoms into semiconductors, it is the main objective in the thesis to investigate the accuracy of the apparent dopant profile on a semiconductor with ion-implanted dopant atoms. The ion-implanted dopant distribution is assumed to be a truncated Gaussian [3-5] with its peak dopant concentration N p = 1 x 10 1 7 cm"3 centred at R P = 0.1096 um. The standard deviation A R P of the Gaussian distribution is assumed to be 0.0526 um. Thus, where N p = 1 x 10 1 7 cm"3, R P = 0.1096 um, and AR P=0.0526 um. Figure 3.7 shows the potential distributions and the electric field distributions in the ion-implanted semiconductor at various surface potentials. The surface potential i|rs is varied from -2.5 V to 0.2 V in steps of 0.02V. 36 (a) Potential (Volt) (b) -1 --2 --3 POV P-IV P-2S0V P-O50V P-2V 0.0 0.1 0.2 0.3 Depth (microns) 0.4 0.5 Field (V/micron) -15 --20 0.2 0.3 Depth (micron) 0.5 Figure 3.7 Potential Distributions (a) and Field Distributions (b) in an Ion-Implanted Semiconductor at Various Voltage Biases 37 Figure 3.8 depicts the Gaussian dopant distribution N D (x) and the apparent dopant distribution N*(x*) both in linear and logarithmic scale. The background dopant concentration N B has been added to the Gaussian. N*(x*) deviates from N D (x) in two different ways: the peak of N*(x*) is lower than that of N D (x) while the tail of N*(x*) on the substrate is much higher than that of N D (x) . The exaggeration of the tail in the apparent dopant profile is more evident in the logarithmic scale plot while the lowering of the peak in the N*(x*) is more obvious in the linear scale plot. Despite these deviations, N*(x*) still follows the Gaussian fairly closely near the peak. The largest lowering of the peak in N*(x*) is about 7x l0 1 5 cm"3, which is only about 10% of the true dopant concentration at the depth position. In the tail region, however, N*(x*) is much exaggerated, and it does not resemble the true dopant profile at all. At x=0.33 um, for example, the C(V) method predicts a dopant concentration of 2 x l 0 1 6 cm"3, while the true dopant concentration is about l x l O 1 4 cm"3, which is the background dopant concentration. The much exaggerated estimate near the surface by the C(V) method is caused by the forward bias voltage applied to the diode. The forward bias causes a large current flow, and hence the C(V) method is no longer valid. The difference between N*(x*) and N D(x) is plotted as a function of the depth x in Figure 3.9. The curve in Figure 3.9 shows more clearly the inaccuracies in N*(x*) predicted by the C(V) method. 38 Dopant Cone. (cm**-3) O DeDth (micron) Dopant Cone, (cm**-3) Depth (micron) Figure 3.8 Assumed and Predicted Dopant Distributions in an Ion-Implanted Semiconductor in Linear Scale (a) and Log Scale (b) 39 (N*(x*)-NG) (cm**-3) 5 H 0 - 5 H - 1 0 H 1 1 1 1 1 0.0 0.1 0.2 0.3 0.4 0.5 Depth (micron) Figure 3.9 Deviations Between Assumed and Predicted Dopant Distributions in an Ion-Implanted Semiconductor 40 Figure 3.10 shows the distributions of electron concentration at various surface potentials along with the apparent dopant concentration N*(x*) and the Gaussian. N*(x*) is seen to be close to the electron distributions at low biases in the roll-off region of the dopant profile. However, they differ from each other near the surface. In fact, as expected, the electron distributions vary very much near the surface, and at large biases, the electron distributions are not close to the apparent dopant profile at all. Again, the results show that the Kennedy's claim and the derived result of Nishida and Baccarani et al. are not completely correct - the apparent dopant profile N*(x*) does not resemble to the bias-dependent electron distributions in the entire region. Figure 3.11 shows the space charge distributions at various surface potentials. As Lehovec [11] indicated, a dipole exists on the substrate side at small surface potentials due to the gradient of the dopant profile in the region. As the magnitude of the surface potential increases, however, the dipole becomes smaller. When the surface potential is large enough to completely deplete the semiconductor, the dipole disappears. Figure 3.11 also shows that the change in the space charge with the surface potential is spread out in the entire region of the semiconductor. This spread-out charge variation is different from the "spike-like" change variation assumed in the depletion approximation, and hence causes errors in the dopant profile predicted by the C(V) method. 41 2.0x10 1 7 Majority Carrier (cm**-3) 5.0*10 1 M 0.0 0.1 N»(X«) E-0.50V E - 2 V EOV E-1V GOUII 0.2 0.3 Depth (micron) 0.5 Figure 3.10 Assumed and Predicted Dopant Distributions in an Ion-Implanted Semiconductor, and Electron Distributions in the Semiconductor at Various Voltage Biases 42 Space Charge (/cm**3) scov S C - 1 V S C - 2 £ 0 V S C - O 5 0 V S C - 2 V G a u t l 0.0 0.1 0.2 0.3 Depth (micron) 0.4 0.5 Figure 3.11 Space Charge Distributions in an Ion-Implanted Semiconductor at Various Voltage Biases 43 3.4.3 Semiconductors with Ion-Implanted Impurity Atoms and Different Background Dopant Concentrations The background dopant concentration N B often changes from one wafer to another, and from one ingot to another. The program C V F R E E was applied to two semiconductor samples which have the same implant, but different background dopant concentrations (10 1 3 cm"3 and 10 1 4 cm"3) to investigate the behaviour of the apparent dopant profiles with the background dopant concentration. The apparent dopant profiles predicted by the program for these samples are plotted in Figure 3.12 together with the input dopant profiles. The results in Figure 3.12 indicate that the higher N B , the more exaggerated the tail in the apparent dopant distribution. The results confirmed that the C(V) method can be used to probe dopant profiles on a strictly comparative basis. 44 2.0*10 i 7 Dopant Cone. (cm**-3) 10" J 10 'N 10 14 10 l 3 d 5.0*10 12 q 0 DOPANT DOPNBI0 GAUSS GAUSSNB10 0.2 0.4 0.6 Depth (micron) 0.8 Figure 3.12 Assumed and Predicted Dopant Distributions in Ion-Implanted Semiconductors with Various Background Dopant Concentrations 45 3.4.4 Semiconductors with Ion-Implanted and Some Channelled or Diffused Impurity Atoms Moline [10] stated that the exaggerated tail in the apparent dopant distribution is due to donor atoms located in the region, rather than an artifact of the measurement. His speculation was based on his observation that the capacitance calculated for a semiconductor having the same dopant profile as the apparent dopant profile obtained in his sample does not deviate much from the capacitance measured in the sample. However, Moline did not point out that the C(V) method also predicts smaller dopant concentrations near the peak region. A deficit of impurity atoms in the peak region and an excess of impurity atom in the tail region in the apparent dopant profile probably have a counteracting effect in his calculation of capacitance, and hence he obtained a capacitance which is almost identical to his measured value. We have also investigated the effects of impurity atoms channelled or diffused into the substrate on the dopant profiles predicted by the C(V) method. We used the approach of Wu et al. [6], rather than Moline [10]: we modelled the distribution of channelled or diffused impurity atoms by replacing the Gaussian distribution with two different kinds of exponential tails for x > = x 0 . Mathematically, for 0 < = x < = x 0 , the true dopant profiles are still Gaussian, that is, 46 (*-*p2 NDix)=Npe 2A*> (3.7) but for x > = x 0 , in model I, ND(x)=N1eaiX (3-8) and in model II, ND(x)=N2e'^x (3-9) where N , and a l , N 2 and a2 have been chosen such that N D (x) is continuous and smooth at the joint x = x 0 . Each of the dopant distributions represented by Equation (3.7) and (3.8) was used as the input dopant profile to the program C V F R E E . The program predicts the apparent dopant distribution according to the canonical equations. Figure 3.13 depicts the input dopant profiles ( + N B ) and their apparent dopant profiles predicted by the C(V) method. GAUSS represents the normal Gaussian distribution, and DOPANT is its apparent dopant profile. GAUSSTAIL1 and GAUSSTAIL2 are the input dopant profiles in model I and model II while D O P A N T 1 and DOPANT2 are the corresponding apparent dopant distributions. Figure 3.13 shows that similar kinds of inaccuracies exist in the apparent dopant distributions. A l l of them 47 Figure 3.13 Assumed and Predicted Dopant Distributions in Ion-Implanted Semiconductors with Various Degrees of Channelling or Diffusion 48 appear to be lower in the peak region, and higher in the tail region than their corresponding input dopant profiles. The level of exaggeration in the tail of the apparent dopant profile, however, varies with the concentration level in the tail region of the input dopant profiles. The results in Figure 3.13 indicate that the exaggerated tail in the apparent dopant profile is not just caused by some impurity atoms channelled or diffused into the region. At least part of the tail exaggeration is actually inherent in the C(V) method. The results also imply that the C(V) method can be used on a comparative basis to show the relative degree of channelling or diffusion in the semiconductor. 3.5 Reconstruction of Dopant Profiles Since inaccuracies exist in the apparent dopant profile, improvement of the C(V) method is necessary. Kennedy et al. and Lehovec have proposed two different reconstruction methods for the dopant profiles. Lehovec has investigated Kennedy's reconstruction method, and found that the reconstructed dopant profile still deviates from the true dopant profile. We examined Lehovec's reconstruction method using the apparent dopant profile predicted by the program C V F R E E and Equation (2.14) and (2.15) in his paper [11]. The reconstructed dopant profile is plotted in Figure 3.14 together with the input Gaussian profile and the apparent dopant profile. We found that while the Lehovec line does reduce the exaggerated tail in the apparent dopant profile, it is shifted consistently to the surface of the semiconductor. 49 D O P A N T L E H O V E C D O P A N T C O N C . ( u m * * - 3 ) G A U S S C U R F I T  D E P T H ( M I C R O N ) Figure 3.14 Reconstruction of Dopant Profiles in an Ion-Implanted Semiconductor 50 In Figure 3.14, a Gaussian curve has been fitted to the peak of the apparent dopant profile. This fitted Gaussian appears to be closer to the input Gaussian in the tail region even though it has a lower dopant concentration than the input Gaussian in the peak region. 3.6 Summary A few points can be summarized from the results and discussions above: 1. For some step-doped semiconductors, the C(V) method predicts fairly accurately the dopant concentration on the high and low sides of the step profile, but it fails to give a good estimate for the dopant concentration near the transition of the high-low junction. Near the transition, the apparent dopant profile rolls down smoothly, and it clearly deviates from the abrupt-transition step function. 2. For semiconductors with ion-implanted impurity atoms, the C(V) method predicts a dopant profile which is lower near the peak region and higher in the tail region than the true dopant profile. The peak in the apparent dopant profile is normally lowered by about 10% of that in the true dopant profile, but the tail in the apparent dopant profile is far too much exaggerated. 3. The inaccuracies in the apparent dopant profiles are caused by the depletion approximation assumption made in the C(V) method. The change in the space charge distribution due to a change of the applied voltage is spread out in the 51 entire semiconductor region, rather than concentrated on the edge of the depletion region as assumed in the C(V) method. 4. The C(V) method can be used on a comparative basis to indicate the relative levels of background dopant atoms, and channelled or diffused dopant atoms. 5. Some of the reconstruction methods proposed in the literature have been investigated. Kennedy's method was found to rely on an incorrect assumption that the canonical equations describe the distribution of electron concentration while Lehovec's method was found to shift the dopant profile consistently to the surface of the ion-implanted semiconductor. A Gaussian profile fitted to the peak of the apparent dopant profile was found to be fairly close to the true Gaussian dopant profile in the tail region. 52 Chapter IV Dopant Profiling by the C(V) Method on Semiconductor with Deep Levels 4.1 Introduction The deep-level-free semiconductor which was considered in Chapter III cannot be grown if it is a compound semiconductor. In a compound semiconductor, deep energy levels always exist. In GaAs, for example, there is a deep donor level E L 2 and sometimes a deep acceptor level due to chromium Cr. E L 2 whose origin is still not fully known compensates the excess shallow acceptors, e.g. carbon atoms, in the GaAs substrate. The existence of E L 2 , in fact, is vital for undoped semi-insulating L E C GaAs since it pins the Fermi level in the semiconductor and creates the SI property. The accuracy of the dopant profile predicted by the C(V) method on a GaAs sample in a Schottky diode with ion-implanted impurity atoms (Si 2 9) was investigated by numerical simulation. The GaAs sample was assumed to contain uniform distributions of E L 2 , net shallow acceptors (i.e. the excess of shallow acceptors over shallow donors), and in some cases, deep acceptors Cr before being implanted with a truncated Gaussian distribution of donor S i 2 9 atoms. The concentrations for the three species were N d d , N b and N d a respectively. The deep level E L 2 was assumed to behave as a single deep donor which donates one electron when it is ionized, and Cr as a single deep 53 acceptor which receives an electron when it is filled. The general approach is similar to that in Chapter III, but the capacitance calculation method is different. In this new capacitance calculation method, it is assumed that the deep levels in GaAs do not respond to the high frequency a.c. signal (normally 1 MHz) used in the experimental C(V) measurements. 4.2 Theory The calculation of the differential capacitance on the GaAs Schottky diode at a reverse bias voltage V is even more involved than that in Chapter III. The existence of deep levels in GaAs makes the Poisson-Boltzmann equation for the semiconductor more complicated. This complication is compounded because the deep levels do not respond to the 1 M H z a.c. signal normally used in the experimental C(V) measurements. In this chapter, we use a new method of calculating the differential capacitance on the GaAs Schottky diode which allow for this considered: the GaAs semiconductor is in an equilibrium state when only a d. c. reverse bias voltage V is applied on the Schottky diode, and the GaAs semiconductor is in a non-equilibrium state when the d. c. reverse bias voltage V plus an a.c. signal <SV are applied on the diode. For the equilibrium state, the Poisson-Boltzmann equation can be solved for the electrostatic potential \|r(x) in the semiconductor with densities of the ionized deep donors and ionized deep acceptors given in terms of the Fermi-Dirac functions. For the non-equilibrium state, however, the deep levels do not follow the newly added a.c. signal, and the 54 charges associated with the ionized deep donors and deep acceptors are unchanged. Therefore, the Poisson-Boltzmann equation for the non-equilibrium state can be solved for the electrostatic potential i|rN(x) in the semiconductor with the unchanged densities of ionized deep donors and deep acceptors given in terms of the previous solution t|r(x). The electric fields at the surface of the semiconductor, obtained from the two solutions of the Poisson-Boltzmann equations, can then be used to calculate the total charges in the semiconductor at the equilibrium and the non-equilibrium. The differential capacitance can be obtained from the total charges. This process of calculating the differential capacitance is mathematically formulated below. Consider the energy band diagram in Figure 4.1 of the GaAs semiconductor in the Schottky diode reverse biased at a voltage V . In the diagram, E s d(x) and E s a(x) are respectively the free energy levels of the shallow donors and shallow acceptors in the semiconductor. E d d(x) and E d a(x) are respectively the free energy levels of deep donor EL2 and deep acceptor Cr. E s d(x) and E^Cx) are very close to the conduction band E c and the valence band E A respectively, and hence all of the shallow donors and shallow acceptors are assumed to be completely ionized. E d d (x) [24, 25], E d a (x) [26, 27] and the energy bandgap E [28] of GaAs are temperature dependent: 55 x • 0 Figure 4.1 Energy Band Diagram in a GaAs Schottky Diode 56 AEdd=Ec-Edd=0.759-2.34xlO-AT (4.1) A E . =Er-E. =0.709-fc71og0.93- 2 ' 4 * 1 0 (4.2) £=1.519- 5 A x l ° - ^ (4.3) * T+204 where T is the temperature in Kelvin, and k is the Boltzmann constant. A l l of the energy levels are in electron volts (eV). The formulae are valid for the temperature range between 300K and 450K. At this temperature range, E d d(x) and E d a(x) are close to the intrinsic energy level E ; , and hence only parts of the deep donors and deep acceptors are ionized. The percentages of ionized deep donors and deep acceptors vary with the electrostatic potential i|r(x) according to the Fermi-Dirac functions. ^ + ^ ) = 1 _ 1 Ue k T (4.4) (4.5) Ue k T The electrostatic potential distribution i|r(x) is defined in terms of the intrinsic energy levels: -q^(x)=Ei(x)-Eib (4.6) i|r(x) is determined from the Poisson-Boltzmann equation: 57 </2fr(x)_ pfr) die2 e ^ ^ = - ^ I > W - n ( A ; ) + i V + > ) - A r - a + N + ^ ) - A r - ^ ) ] (4.7) dx2 e where e = permittivity of GaAs = e 012.737(l + 1.2xl()-4T) [28] p(x) = concentration of holes = pBexp(-qi|r(x)/kT) n(x) = concentration of electrons = nBexp(qi|r(x)/kT) N s d + ( x ) = concentration of ionized donor S i 2 9 atoms = N s d(x) (complete ionization) ( * - * p ) 2 = N,e~ ^ (Actually N s d(x) is the concentration of the net donor implant in GaAs) N a " = concentration of net ionized shallow acceptors (i.e. the excess of ionized shallow acceptors over ionized shallow donors) which reside in the substrate before implantation = N a (complete ionization) N d d + ( x ) = concentration of ionized deep donors EL2 N d a"(x) = concentration of ionized deep acceptors Cr 58 The boundary conditions for the non-linear second-order differential equation are: i|r(0) = i|r„ and i|r(°°) = 0 (4.8) The Fermi Energy Level relative to the intrinsic energy level, (Ep - E l b ) , is determined from the charge neutrality in the bulk of the GaAs substrate. Mathematically, at x = oo, p(oo) = 0, and the charge neutrality equation is PB-nB-"'a+"*d°°)-N'^H=° ( 4 ' 9 ) where EF'Ea> kT PB=Pie EF~EO> kT Ue kT Ue kT We can rewrite Edd(°o) - Ep and Eda(«>) - Ep as follows: E^)-EFHEm-Ec^(Ecb-E^(Eib-EF) and similarly, 59 E^oo)-EF=-AE^~H^))-(EF-E^ (4.11) Here a subscript b has been added to E d d , E c and E ; to indicate that they represent their quantities in the bulk. N c and N v are the densities of states in the conduction band and the valence band respectively. 7VC(7)=A/C(300^)(77300)3/2 (4.12) ^7)=A/y(300X)(77300) 3 / 2 (4.12) where N C(300K) = 4 .7xl0 1 7 cm"3 and NV(300K) = 7.0xl0 1 8 cm"3 for GaAs [29]. The electron and hole concentrations in intrinsic GaAs, n ; and p ;, at a temperature T can be calculated from the following formula: nrPrJNdDNtMe Eg IkT (4.14) Define kT A=e kT B=e kT 60 then e * =Ai) and Thus the charge neutrality equation becomes „ ( T 1 -±)+NJ\ -7-7-)"^<JTV>-"a=0 (4-15) The bisection method can be used to solve this equation for -n , which gives (Ep - E l b), the Fermi energy level relative the intrinsic level in the bulk. Once (Ep - E lb) is known, the Poisson-Boltzmann equation can be solved for the electrostatic potential i|r(x) in the semiconductor. 61 Before the differential equation can be solved, the deep energy levels need to be expressed in terms of the potential i|r(x) as in Equation (4.17) and (4.18) below. Thus EJ^-E^-qm+iE^-Ef) (4.16) and similarly Thus EJ.xyE^-qUxXE^-E,) (4.17) Using Equations (4.10), (4.11), (4.16) and (4.17), the Poisson-Boltzmann equation now can be written in terms of the electrostatic potential \|r(x) as in Equation (4.18). l ± = . l \ p . a - U + N 2o> _ N + N n 1 ) * ] This differential equation together with the boundary conditions in Equation (4.8) can then be solved numerically for the electrostatic potential ijr(x) in the semiconductor at equilibrium. The equilibrium charge Q0 in the GaAs sample can be calculated from the solution 62 i|r(x) using QO =-edi|r(x=0)/dx. If now an a.c. signal with a signal amplitude of <SV is added to the reverse bias voltage V , the charges associated with the ionized deep levels are unchanged, and the charges associated with the mobile carriers (electrons and holes) are re-distributed according to a new electrostatic potential i|fN(x). This new electrostatic potential x|rN(x) is determined from the Poisson-Boltzmann equation (4.19): —!L—±\pfU-n#a+Ht 2°2 -Nm+N* J A - N - ( 4 . 1 9 ) dx2 e where N d d + ( x ) and Nd a"(x) are calculated from the previous solution i|r(x) according to the Fermi-Dirac functions in Equations (4.4) and (4.5). The boundary conditions for this non-linear second-order differential equation are: *N(0) = * . + * V , and i|rN(«>)=0 (4-20) The solution ijrN(x) can then be used to calculate the non-equilibrium charge Q l in the GaAs sample using Q l = -edi|rN/dx(x=0). Finally, the differential capacitance C at the reverse bias voltage V can be obtained from QO and Q l using C(V) = (Q0-Q1)/<SV. The capacitance calculation process is repeated until a C(V) profile is obtained. The C(V) profile is then used in the canonical equations to obtain the apparent dopant distribution N*(x*). 63 4.3 Program Implementation The above process of simulating the apparent dopant profile is implemented in another program called CVGaAs. COLSYS is also incorporated in this new program. For each reverse d. c. voltage bias, COLSYS is called twice to solve Equation (4.18) and Equation (4.19) with their corresponding boundary conditions for the electrostatic potential i|r(x) and i|rN(x) in the semiconductor at an equilibrium and a non-equilibrium. The total charges QO and Q l are then calculated correspondingly from the derivatives of the potential distributions at the surface of the semiconductor, and the differential capacitance is calculated using C(V) = (Q0-Q1)/6*V. The capacitance calculation process is repeated in a loop. i|rs is the variable which controls the loop. i(rs varies from a small voltage (e.g. 0 V) to a large negative voltage (e.g. -2.5 V) in steps of A V . Again these voltages are user-defined. It should be noted that the value of <SV, which is equivalent to the a.c. signal, is different from the value of A V , which is the step size for the d. c. bias voltage. 6*V must be very small for an accurate calculation of the differential capacitance. The results from the solution of the Poisson-Boltzmann equation which include the potential distribution, the electric field distribution, the electron concentration distribution, the ionized deep level distributions and the space charge distribution are output selectively at i|rs = 0, -0.5V, -1.0V, -1.5V, etc. No initial approximation to the solution is provided for the first call of COLSYS to solve the Poisson-Boltzmann equation. The previous solution is used as an 64 approximation for the other calls of COLSYS. The listing of CVGaAs and the listing of COLSYS are attached in Appendix III and Appendix IV. 4.4 Results and Discussions 4.4.1 Apparent Dopant Profile in a Typical GaAs Sample We first apply the program CVGaAs to predict the apparent dopant profile in a typical GaAs semiconductor sample. The sample has the following parameters: N d d (EL2) = 1 x 10 1 6 cm"3 N A = 1 x 10 1 5 cm' 3 N d a ( C r ) = 0 The Fermi energy level for this GaAs substrate is 0.0440 eV above the intrinsic energy level in the bulk, and hence it is slightly n-type. The sample is ion-implanted with a dose of 4 x 10 1 2 c m 2 and an energy of 80 keV. The LSS theory [3-5] indicates that the implantation should introduce a truncated Gaussian distribution of S i 2 9 in the sample with the following parameters. Centre RP = 0.0677 um Standard Deviation a = 0.0370 um (i.e. ARP) Peak dopant concentration N^= Dose = 4 .463*10 1 7 on ~3 j2ltott~erfc(-*-)) 2 J2a 65 We assume that all of the Si atoms are activated as donors. Hence the truncated Gaussian distributions represents the distribution of shallow donors in the sample. Figure 4.2 shows that the potential distributions and the electric field distributions in the GaAs sample at various surface potentials. The surface potential is varied from 0.02 V to -3.80 V in steps of 0.02 V . The magnitude of the a.c. signal is assumed to be 0.01 V (10 mV). The dopant profile predicted by the program CVGaAs and the input Gaussian profile are plotted with a linear scale in Figure 4.3(a), and with a logarithmic scale in Figure 4.3(b). Again two different kinds of inaccuracies in the apparent dopant profile are observed in Figure 4.3. The apparent dopant profile demonstrates a lower peak and an exaggerated tail. In the peak region of the dopant profile, up to 10% deficit is possible. In the tail region of the dopant profile, however, it is so much exaggerated that it is simply erroneous, as indicated in the logarithmic plot. 66 (a) (b) Potential (Volt) Field (V/micron) 0.0 0.1 0.2 0.3 Depth (micron) 0.2 0.3 Depth (micron) 0.4 Figure 4.2 Potential Distributions (a) and Field Distributions (b) in an Ion-Implanted GaAs at Various Voltage Biases 67 (a) " o c dopant Cone. (cm**-3) A -3 -2 -1 -A ; \ ' \ V N*(X«) Gau«« 0.0 0.1 0.2 0.3 Depth (micron) 0.4 0.5 (b) 5 - 1 0 Dopant Cone. (cm"-S) 0.2 0.3 Depth (micron) 0.5 Figure 4.3 Assumed and Predicted Dopant Distributions in an Ion-Implanted GaAs in Linear Scale (a) and Log Scale (b) 68 The difference between the apparent dopant profile and the input Gaussian profile is plotted in Figure 4.4. The deficit in the peak region of the dopant profile seems to be larger in magnitude than the exaggeration in the tail region. In terms of the percentage difference, however, because the dopant concentration near the peak is much higher than that in the tail, the C(V) method provides a much better estimate for the dopant concentration near the peak than in the tail. In fact, the accuracy of the profile predicted by the C(V) method is still within a reasonable limit in the peak region. If a Gaussian is fitted to the peak of the apparent dopant profile, as shown in Chapter III (3.5), it should give an estimate to the true dopant profile with about 10% error only in most ion-implanted GaAs samples. Figure 4.5 shows the electron concentration distributions in the GaAs sample at various surface potentials together with the apparent dopant profile and the input Gaussian. The apparent dopant profile is seen to be close to the electron concentration distributions at low biases only in the roll-off region near the peak when x is approximately between 0.08 um and 0.17 um. A marked difference is observed between these electron concentration distributions in GaAs and those in the deep-level-free semiconductor in Chapter III (3.4.2). Because the GaAs substrate with deep level is semi-insulating, the electron concentration goes down much more quickly when the depth x is larger than 0.17 um, and the electron concentration distributions deviate significantly from the apparent dopant profile into the bulk. This deviation makes the prediction of Kennedy et al. [8], Nishida [13], and Baccarni et al. [14] obviously incorrect in the bulk of GaAs with deep levels. 69 N*(x*)-NG (cm**-3) 0.0 0.1 0.2 0.3 0.4 0.5 Depth (micron) Figure 4.4 Deviations Between Assumed and Predicted Dopant Distributions in an Ion-Implanted GaAs 70 Figure 4.5 Assumed and Predicted Dopant Distributions in an Ion-Implanted GaAs, and Electron Distributions in the Semiconductor at Various Voltage Biases 71 Figure 4.6 depicts the space charge distributions in the GaAs sample at various surface potentials together with the input Gaussian profile. These space charge distributions behave similarly on the bulk side to those for the deep-level-free semiconductor in Chapter III - a small dipole also exists at low biases in the region due to the gradient of the dopant profile. This dipole decreases as the applied voltage increases in magnitude, and it disappears when the applied voltage is large enough to deplete the GaAs sample to a position where the implanted dopant concentration has become negligible. However, a different behaviour is observed for the space charge distribution in GaAs near the surface of the semiconductor. These distributions are consistently above the input Gaussian distribution in that region because the deep levels (EL2) near the surface of the GaAs sample are almost completely ionized, adding nearly l x l O 1 6 cm"3 to the space charge density in that region. The distributions of ionized EL2 are plotted in Figure 4.7. 72 Figure 4.6 Space Charge Distributions in an Ion-Implanted GaAs at Various Voltage Biases together with a Gaussian Dopant Profile 73 7 0 1 4 W r ^ ? ^ - £ £ ^ £ ^ * * - 3 ) 10 13 10 12 10 10 10 10! 10' 107 10( 10s 104 11 1 0 * 0.0 0.1 n 2 0-3 D e P'b (micron) ns of Ionized EL2 v°tege Biases « an Ion~lmplanted 74 4.4.2 Comparison of Dopant Profiles Predicted by the Two Programs C V F R E E and CVGaAs were written for two different GaAs models. C V F R E E was for GaAs samples without deep levels, while CVGaAs was for GaAs samples with deep levels. Therefore, differences in the dopant profiles predicted by them are expected, especially in the tail region where the concentrations of ion-implanted dopant atoms are in the same order of magnitude as the concentrations of substrate impurities. These differences are also expected to vary with the substrate parameters. Nevertheless, it is interesting to compare the apparent dopant profiles predicted by the two programs for their discrepancies from the true dopant profile of ion-implantation. The parameters in the GaAs substrates with and without deep levels have been chosen such that (E F - E i b ) (and hence the carrier concentrations in the bulk) are the same. The GaAs substrate with deep levels is assumed to have an EL2 concentration of l x l O 1 6 cm"3 and a net shallow acceptor concentration of l x l O 1 5 cm"3. The Fermi level for this n-type GaAs sample is 0.105 eV above its intrinsic level at 295K. To maintain the same (Ep - E i b ) in the sample without deep levels, the background shallow donor concentration N B must be 7.08xl0 6 cm"3, which is calculated from the charge neutrality equation: NB=nB-PB <,EF-Elt) (£f-£(j) 75 Simulations using the two programs have been carried out for the two samples. The two samples are assumed to be ion-implanted with the same energy, but half of the dose as in section 4.4.1. Hence the implanted Gaussian dopant profile has the following parameters: 1^=0.0677 um, a=0.0370 um and N p =2.232xl0 1 7 cm"3. Figure 4.8 shows the capacitance-voltage (C(V)) profiles for the Schottky diodes made of the two samples. The two profiles behave similarly at low applied voltages (and hence at low surface potential). However, when the applied voltage is large in magnitude, the two profiles have different slopes. This difference in the slopes leads to a difference between the corresponding apparent dopant profiles in the tail region. As shown in Figure 4.9, the apparent dopant profile for GaAs with deep levels is consistently lower in the tail region than that for GaAs without deep levels while they remain very much the same in the peak region. The difference between the two dopant profiles should not be surprising. In the second program, we have considered that the deep levels do not respond to the a.c. signal used in the C(V) measurements. Our method of calculating the capacitance has reduced, i f not removed, the effects of the deep donors EL2 on the differential capacitance as the C(V) method does in the experimental measurements. Hence the second program lowers the erroneous tail in the apparent dopant profile in GaAs. The results from the simulations indicate that although the apparent dopant concentration for GaAs with deep levels is still far too excessive in the tail region, the experimental C(V) method nevertheless gives a better estimate to the ion-implanted dopant profile. 76 C A P A C I T A N C E ( F / u m * * : 2 0 . 0 -i PSI ( V O L T ) Figure 4.8 Calculated C(V) Profiles in GaAs Samples with and without Deep Levels 77 1 7 Dopant Cone. (cm**-3) 3><10 -i Depth (micron) Figure 4.9 Predicted Dopant Profiles in GaAs Samples with and without Deep Levels 78 4.4.3 Effects of Substrate Parameters on the Apparent Dopant Profile in GaAs The parameters which control the dopant profile in an ion-implanted semiconductor can be classified into two groups - the implant parameters and the substrate parameters. The implant parameters are chosen such that the desired dopant profile can be obtained with a minimum degree of channelling. The substrate parameters, however, are pre-determined by wafer suppliers. It is in the interest of the wafer suppliers to know the effects of the substrate parameters on the dopant profiles obtained using the C(V) method. In a GaAs sample, the substrate parameters include the EL2 concentration, the net shallow acceptor concentration (i.e. the excess of shallow acceptors over the shallow donors), and possibly the deep acceptor chromium concentration. The concentration level of each of the three species may have some effects on the apparent dopant profile. A study of these effects is carried out with the program CVGaAs. 1. Variation of Apparent Dopant Profiles with EL2 Concentrations CVGaAs is used to simulate the apparent dopant profiles in three GaAs samples which have the same net shallow acceptor concentration of l x l O 1 5 cm"3 and no Cr, but different EL2 concentrations of 5x l0 1 5 , l x l O 1 6 and 5xl0 1 6cm" 3 respectively. A l l of the three samples are slightly n-type before being ion-implanted, with their Fermi levels 79 0.0234, 0.0440 and 0.0872 eV above the intrinsic level at 295K respectively. The C(V) profiles for the three samples are shown in Figure 4.10. The curves are seen to be very close to each other at small applied voltages (and hence small surface potentials). However, at large applied voltages, because the semiconductor has been depleted across the peak of the dopant profile to a region where the implanted dopant concentration is comparable to the EL2 concentration, the variation of the EL2 concentration affects the C(V) curves. They extend toward the left as the EL2 concentration increases. This change in the C(V) curves, however, has a very minimal effect on the apparent dopant profiles. As shown in Figure 4.11, the apparent dopant profiles are almost the same for the first two samples, and it only rises a little when the donor EL2 concentration has increased to 5x l0 1 6 cm"3. 80 Figure 4.10 Calculated C(V) Profiles in GaAs Samples with Various EL2 Concentrations 81 Figure 4.11 Apparent Dopant Profiles in GaAs Samples with Various EL2 Concentrations 82 2. Variation of Apparent Dopant Profiles with Net Shallow Acceptor Concentrations CVGaAs is used to simulate the apparent dopant profiles in another three GaAs samples which have the same EL2 concentration of l x l O 1 6 cm"3 and no Cr, but different net shallow acceptor concentrations of 5x l0 1 4 , l x l O 1 5 and 5xl0 1 5cm" 3 respectively. Two of the three samples are slightly n-type before being ion-implanted, with the Fermi levels 0.0630 and 0.0440 eV above their intrinsic level at 295K. The third sample, which has a net shallow acceptor concentration of 5x l0 1 5 cm"3, is slightly p-type, with its Fermi level 0.0120 eV below the intrinsic level. The C(V) profiles for the three samples are shown in Figure 4.12. Again, the curves are seen to be very close to each other at small applied voltages. However, at the large applied voltages, because the semiconductor has been depleted across the peak of the dopant profile to a region where the implanted dopant concentration is comparable to the net shallow acceptor concentration, the variation of the net shallow acceptor concentration affects the C(V) curves. They extend toward the right as the net shallow acceptor concentration increases. The change in the C(V) curves leads to various rates of decrease in the apparent dopant profiles on the bulk side not far away from the peak. As shown in Figure 4.13, the apparent dopant profiles become steeper as the net shallow acceptor concentration increases. A significant rise in the steepness is observed, in particular, for the sample with the highest net shallow acceptor concentration. 83 Figure 4.12 Calculated C(V) Profiles in GaAs Samples with Various Net Acceptor Concentrations 84 3.0x10 1 7 Dopant Cone, (cm**-3) 10 17 1 0 , 5 J 10 13 0.0 C5e14N C5e15N C1el5N Gauss 0.2 0.3 Depth (micron) Figure 4.13 Apparent Dopant Profiles in GaAs Samples with Various Net Acceptor Concentrations 85 However, the C(V) method fails to indicate that the third sample has a p-type substrate. This is probably caused by the fact that the apparent dopant concentration in the tail region away from its peak is erroneous due to the depletion approximation assumption. 3. Variation of Apparent Dopant Profiles with Chromium Concentrations CVGaAs is used to simulate the apparent dopant profiles in five more GaAs samples which have the same EL2 concentration of l x l O 1 6 cm"3 and the same net shallow acceptor concentration of l x l O 1 5 cm"3, but different Cr concentrations of 0, 5 x l 0 1 4 , l x l O 1 5 , 5 x l 0 1 5 and l x l O 1 6 cm"3 respectively. Three of the five samples are slightly n-type before being ion-implanted, with the Fermi levels 0.0440, 0.0375 and 0.0287 eV above their intrinsic level at 295K respectively. The fourth sample, which has a Cr concentration of 5 x l 0 1 5 cm"3, is slightly p-type, with its Fermi level 0.0148 eV below the intrinsic level. The fifth sample, which has the largest Cr concentration, has a rather heavy p-type substrate, with its Fermi level 0.297 eV below the intrinsic level. The C(V) profiles for the five samples are shown in Figure 4.14. For the first three samples, the curves are seen to be very close to each other at small applied voltages. For the fourth, and particularly for the fifth sample, the capacitance has decreased considerably from those for the first three. More significant changes are observed in the C(V) curves at large applied voltages, because the semiconductor has been depleted across the peak of the dopant profile to a region where the implanted 86 dopant concentration is comparable to the Cr concentration in some of the samples. These curves extend toward the right as the Cr concentration increases. The change in the C(V) curves also leads to an increasing rate of decrease in the apparent dopant profiles on the bulk side not far away from the peak. As shown in Figure 4.15, the apparent dopant profiles become steeper as the Cr concentration increases. A significant rise in the decreasing rate is observed, in particular, for the two p-type samples. The C(V) method also fails to indicate that two of the five samples have p-type substrates. The three simulations above show that the variation of EL2 concentration has little impact on the apparent dopant profile while the variations of Cr and the net shallow acceptor concentrations increase the steepness of the dopant profile on the bulk side not far away from the peak of the profile. The results seem to indicate that the steepness of the dopant profile in that region depends inversely on the Fermi level (Ep - E i b ) in the GaAs substrate : the smaller the value of (E F - E i b ) , the steeper the profile in the region. Our results confirmed that chromium can be used in GaAs to increase the steepness of the dopant profile on the bulk side not far from the peak. A sharp drop in the dopant profile is required for microwave devices. 87 Figure 4.14 Calculated C(V) Profiles in GaAs Samples with Various Chromium Concentrations 88 Figure 4.15 Apparent Dopant Profiles in GaAs Samples with Various Chromium Concentrations 89 4.5 A Practical Application of the Program CVGaAs Activation efficiency of the ion-implanted S i 2 9 in GaAs is an important qualification parameter for GaAs wafer suppliers. It is defined in a GaAs sample as the amount of net activated S i 2 9 atoms, which is the excess amount of S i 2 9 atoms activated as donors over those activated as acceptors, divided by the dose used in ion-implantation. Ideally, the amount of net activated S i 2 9 atoms can be integrated from the true profile of electrically active atoms, i.e. net shallow donors. In reality, however, it can only be estimated from the apparent dopant profile obtained from the C(V) method. The estimation method is not well defined because the apparent dopant profile itself is an estimate, and it is erroneous in its tail section. A common practice is to obtain the estimated dose of electrically active S i 2 9 atoms by integrating the Gaussian profile which is fitted to the peak of the apparent dopant profile. This practice, however, certainly underestimates the activation efficiency in the GaAs sample as the peak of the apparent dopant profile has been shown to be lower than the true Gaussian dopant profile. The program CVGaAs can be used to solve this problem of low activation efficiency estimation. It can be used to simulate the dopant profile according to the C(V) method in the implanted GaAs sample with the substrate parameters specified by the wafer suppliers, and with the implanted distribution of S i 2 9 dopant atoms prescribed by the theory of LSS [3-5]. A Gaussian profile fitted to the peak of the simulated dopant 90 profile can then be integrated to give an estimated dose, D I , which is underestimated by the C(V) method. If the implanted S i 2 9 atoms were assumed to be fully activated as donors, that is, i f the implanted profile input to the program were assumed to represent the true profile of electrically active dopant atoms, then the difference between the estimated dose DI from the program and the implant dose D would indicate the error in activated dose introduced by the C(V) method. In reality, however, the profile of the implanted S i 2 9 atoms does not represent the profile of electrically active dopant atoms because some of the S i 2 9 atoms may be implanted into As sites and hence behave as acceptors. An estimate of the electrically active dopant profile can be obtained from the C(V) measurement on the sample. An integration of a Gaussian distribution fitted to the peak of the measured dopant profile gives a dose, D2, which unfortunately includes the error caused by the C(V) method. A correction factor can be made by adding the error (D -DI) to D2, and this would give a better estimate to the activated dose in the sample. The improved estimate is D2 + (D - DI) , and the activation efficiency is D The estimation process is illustrated in Figure 4.16. The impurity profile is assumed to be Gaussian represented by GAUSS with Rp = 0.1096 um, ARp = 0.0526 um and N p = 2.32xl0 1 7 cm"3. The implant dose is 3 x l 0 1 2 cm"3. In Figure 4.16, C A L D O P represents the dopant profile predicted by the program CVGaAs, and C A L F I T 91 the fitted Gaussian to the peak of C A L D O P . CALFIT has the following parameters: Rp = 0.1096 um, ARp = 0.0494 um, and N p = 2.32xl0 1 7 cm' 3 . An integration of C A L F I T from the surface to the bulk gives the dose D I , which is 2.84xl0 1 2 cm"3. Hence the underestimated error is (3 -2.84)xl0 1 2 cm' 3 = 0.16xl0 1 2 cm"3. A measurement using the C(V) method has been made on the sample. In Figure 4.16, E X P D O P represents the dopant profile obtained from the measurement, and EXPFIT the fitted Gaussian to the peak of EXPDOP. EXPFIT has the following parameters: Rp = 0.107 um, ARp = 0.0638 um, and N p = 1.67xl0 1 7 cm"3. An integration of EXPFIT from the surface to the bulk gives the dose D2, which is 2.54xl0 1 2 cm"3. Thus the better estimated activation efficiency would be q^xio^+o.iexio12),^ Q % 3xl012 which is 5.3% more than the estimate made in the common practice. The above estimation process has been based on the assumption that the implanted impurity profile is Gaussian given by the LSS theory. However, this assumption needs not to be true because some degrees of channelling always occur during ion-implantation, and channelling distorts the Gaussian-like implant profile. Nevertheless, this profile can be obtained accurately using the other profiling technique SIMS (up to certain concentration limit). The profile from SIMS can be used in the activation estimation process. In this case, the C(V) method and SIMS are complementary to each other. 92 3 * 1 0 , 7 Dopant Cone, (cm**-3) 0.1 0 . 2 0 . 3 Depth (micron) 0 . 4 0 . 5 Figure 4.16 Activation Efficiency Estimation Using Dopant Profiles Predicted by CVGaAs and Measured by the C(V) Method 93 4.6 Summary 1. A new method of calculating the differential capacitance was developed for Schottky diodes made of semiconductors with deep levels. In this method, it is considered that the deep levels do not respond to the a.c. signal used in the experimental C(V) measurement. It is believed this new method more realistically simulate the C(V) profile of the diodes. 2. Using this new method, the dopant distribution was predicted for a typical ion-implanted GaAs sample according to the C(V) method. The same kinds of inaccuracies as in section 3.4.2 were observed in this apparent dopant profile: the peak of the profile is lowered while the tail of the profile is exaggerated. The lowered peak still gives a fairly good estimate to the true dopant profile in the region, with about 10% error, but the exaggerated tail is much higher than the true dopant profile, and it is erroneous. 3. The apparent dopant profile in a GaAs sample was found to deviate significantly from the electron concentration distributions near the surface as well as in the tail section near the bulk. 4. The apparent dopant profile in GaAs with deep levels was found to be lower in the tail section than that in GaAs without deep levels although the implanted profile is the same in both samples. 5. The steepness of an implanted dopant profile in its roll-off section not far away 94 from the peak seems to depend on (Ep - E i b ) in a GaAs substrate. An increase in the Cr concentration or the net shallow acceptor concentration reduces (E F - E i b ) and hence increases the steepness of the dopant profile in the section, while an increase in the EL2 concentration raises (E F - E i b ) and hence decreases the steepness of the dopant profile in the section. However, the effect of EL2 concentration variation was found to be very minimal. 6. A new method of estimating dopant activation efficiency in GaAs was proposed. This method uses the simulation program CVGaAs to avoid underestimations of the activation efficiency in GaAs. 95 Chapter V Debye Length in Semi-Insulating (SI) Semiconductors 5.1 Definition of Debye Length in a Deep-Level-Free Semiconductor Consider that a voltage \Jrs which is much less than kT/q (25.9 mV at 300K) is applied across the deep-level-free semiconductor with uniform distribution of shallow donors (N s d ) and shallow acceptors ( N J . The Debye length (L D ) could be defined as the distance over which the electrostatic potential \Jr(x) in the semiconductor has changed by a factor of 1/e. The concept of Debye length can be shown mathematically using the Poisson-Boltzmann Equation on a semiconductor with no deep levels. Let N + denote the net concentration of ionized impurities, N + = N + s d - N ' ^ . Then, d2ty(x)_ pjx) ( 5 ^ dx2 e ^ W = - i ( p W - „ ( x ) + A r + ) (5.2) dx2 e dm.^-ltpf * n + N 1 (5.3) dx2 e In the bulk of the semiconductor, t|r(«>) = 0, and p(°o) = 0. Thus, pB-nB+N+=0 (5-4) or 96 N*-nB-pB (5-5) since qi|r s/kT < < 1, p(x) and n(x) can be approximated by Taylor's series: Using Equations (5.5), (5.6) and (5.7), equation (5.3) can be written as: d2ir(x) q. qty(x). qty(x). s — 5 ^ - - - ( P B ( 1 - - M 1 ^ ) - " B ( 1 + - ^ 7 ^ ) + " B - P B ) dx2 kT kT (5.8) Thus d2y(x) q2(PB+nB) (5.9) dx2 e W The solution of this second-order ordinary-differential equation under the boundary conditions of t|r(x=0) = f s , and t|r(x=«>) = 0 is: (5.10) where ekT 12(PB+nB> (5.11) Lp is the Debye length for the deep-level-free semiconductor. Clearly, a t x = L D , i|r(x) has decreased by a factor of 1/e, and i|r(LD) = t|rs/e. 97 5.2 Improper Application of the Definition to GaAs with Deep Levels Equation (5.11) has also often been applied to GaAs [21]. The result of Equation (5.11), however, does not indicate the exponentially decaying rate of the potential distribution in GaAs. In "undoped" SI GaAs, EL2 must be present in a sufficient concentration to compensate the excess amount of shallow acceptors. The density of ionized EL2 in SI GaAs is not uniform across the semiconductor because it varies with the potential. This means that N + is no longer a constant. Since N + changes with the distance x, and the Poisson-Boltzmann equation cannot be simplified to the form of Equation (5.9). The Debye length given by Equation (5.11) hence is incorrect. The potential distribution in SI GaAs, however, still very much resembles an exponentially decaying function as shown in Figure 5.1. The potential distributions were obtained numerically from the program CVGaAs assuming that N D (x) = 0, and the potential difference across the GaAs samples is much less than kT/q (25.9 mV at 300K), i . e. i|rs < < kT/q. The true Debye lengths for the samples can be obtained graphically from these potential distributions. It is still the distance from the surface of a GaAs sample to the depth where t|r(x) has changed by a factor of 1/e, but it is not given by Equation (5.11) with n B and p B equal to their bulk values. Table 5.1 lists the results of Debye lengths for various SI GaAs substrate obtained from Equation (5.11) and obtained from the potential distributions. A huge difference between these corresponding Debye lengths is found for SI GaAs with different substrate parameters. The Debye length calculated by Equation (5.11) is more than 1,000 times 98 larger than the Debye length obtained graphically from the potential distribution. The difference between the Debye lengths is due to the non-uniform space charge distributions in the samples. As shown in Figure 5.2, the concentration of ionized EL2 varies with the depth x. 99 Potential (Vo O . O - i — 0.0 0.1 0.2 0.3 0.4 0.5 Depth (microns) Figure 5.1 Estimation of Exponentially Decaying Rates in Potential Distributions in L E C SI GaAs 100 Table 5.1 Debye Lengths in Semi-Insulating GaAs N E L 2 N C R N A - N D EF"Eib PB L D L D Sample (cm 3) (cm"3) (cm"3) (ev) (cm 3) (cm"3) (um) (um) (5.11) Graph 1 l e l6 0 le l5 0.0440 2.23e5 7.08e6 1.59e3 0.142 2 l e l 6 0 le l4 0.1051 2.08e4 1.37e7 4.87e2 0.423 3 l e l6 5el4 le l5 0.0350 3.18e5 4.96e6 1.87e3 0.178 101 n i i i i i 0.0 0.1 0.2 0.3 0.4 0.5 Depth (micron) Figure 5.2 Variation of Ionized EL2 Concentration in L E C SI GaAs 102 Chapter VI Conclusions and Suggestions For Future Work An investigation has been made on the inaccuracies of the dopant profiles obtained from the C(V) measurements on Schottky diodes made of semiconductors with and without deep levels. The investigation was carried out by considering the inverse problem of the C(V) method. For both diodes, it was confirmed that the C(V) method introduces errors to the apparent dopant profile if the true dopant profile changes rapidly with the depth in the semiconductor under the Schottky contact in the diode. If the true dopant profile is a step function, as in the case of doped epitaxial layers, the apparent dopant profile was found to deviate significantly from the true dopant profile near the transition of the high-low junction in the step function. If the true dopant profile is Gaussian, as in the case of ion-implanted semiconductor, the apparent dopant concentration was found to be much larger than the true dopant concentration in the tail section of the profile where the true dopant concentration rolls off rapidly. Nevertheless, it was found that the C(V) method still can be used to provide good estimates for the dopant distributions if the apparent dopant profiles are interpreted properly. For the case of step-doped semiconductors, the C(V) method may predict fairly accurately the dopant concentrations on the high side and the low side of the step function. For the case of ion-implanted semiconductors, a Gaussian fitted to the peak of the apparent dopant profile can give a good estimate to the true Gaussian profile with about 10% error. The 10% error is caused by the lowering of the peak in the apparent 103 dopant profile from that in the true dopant profile. It should be noted, however, that for the case of step-doped semiconductors, the apparent dopant profile sometimes may be totally erroneous. Whether or not it is totally erroneous seems to depend on the concentration ratio of the high-low junction in the step function, and the thickness of the doped epitaxial layer. Further studies of the C(V) method on step-doped semiconductors are necessary to determine the exact nature of the inaccuracies in the apparent dopant profiles for these semiconductors. The inaccuracies in the apparent dopant profiles are due to the incorrect depletion approximation assumption made in the C(V) method. The change in the space charge due to a small increase in the applied voltage on the diode is not just added to the edge of an artificial depletion region, but it is spread out in the entire semiconductor region. This spread-out change of the space charge introduces errors. The scale of exaggeration in the tail section of the apparent dopant profile for ion-implanted semiconductors varies with the substrate parameters and the true dopant distribution in that region. For the case of the deep-level-free semiconductors, the level of exaggeration in the tail was found to increase with the background shallow dopant concentration N B . The higher N B is, the larger is the tail. If the deep-level-free semiconductor is ion-implanted with certain degree of channelling or diffusion, the tail exaggeration was found to vary with the degree of channelling and diffusion. The larger the number of dopant atoms channelled or diffused to the tail region, the more exaggerated the tail in the apparent dopant profile. The two observations above verify that the C(V) method can be used on a strictly comparative basis to indicate the level of 104 background shallow dopant concentration and the degree of channelling or diffusion. For ion-implanted semiconductors with deep levels such as GaAs, the steepness of the apparent dopant profile in the roll-off region not far away from the peak was found to vary inversely with the Fermi level (E F - E i b ) in the substrate. The smaller (E F - E i b ) is, the steeper the dopant profile in the region. An increase in the Cr or the net shallow acceptor concentration in GaAs reduces (E F - E i b ) , and hence increases the steepness of the profile in the region. An increase in the deep donor EL2 concentration in GaAs raises ( E F - E i b ) , and hence decreases the steepness of the profile in the region. For the latter case, however, the level of decrease in the steepness was found to be very minimal. A new method of calculating the differential capacitance on a Schottky diode was developed for the case where the diode is made of semiconductors with deep levels, e.g. GaAs. This new method takes into account the fact that the deep levels do not respond to the 1 M H z a.c. signal normally used in the C(V) measurements. This new method reduces the effects of EL2 in GaAs on the apparent dopant profile. The dopant profile predicted by the program CVGaAs using the new method for GaAs was found to be lower in the tail section than the dopant profile predicted by the program C V F R E E for semiconductors without deep levels although the implanted profile and the Fermi level relative to the intrinsic level in the bulk are the same in both samples. This leads to a conclusion that the C(V) method gives a better estimate to the ion-implanted dopant profile in GaAs with deep levels than in GaAs without deep levels. Both of the dopant profiles predicted by the two programs C V F R E E and CVGaAs 105 were found to be close to the electron concentration distributions at low biases in the roll-off section not far away from the peak of the true Gaussian dopant profile in ion-implanted semiconductors. The dopant profile predicted by C V F R E E was also found to follow the electron concentration distributions at low biases fairly closely into the bulk. However, as expected, both of the predicted profiles deviate significantly from the electron concentration distributions near the surface of the semiconductors, and the electron concentration distributions themselves deviate from each other in the region. In a semiconductor with deep levels such as GaAs, because it is semi-insulating, the apparent dopant profile was also found to deviate from the electron concentration distributions in the bulk. A practical application of the program CVGaAs was found in the newly proposed method of estimating dopant activation efficiency in GaAs. This new method is believed to give better estimates to the dopant activation efficiency of ion-implanted S i 2 9 atoms in GaAs. The meaning of the Debye length given by the formula LD= ekT \ Q' (PB+nB> in terms of the free electron concentration n B and the hole concentration n B was discussed. It was pointed out that this Debye length in semi-insulating L E C GaAs does not indicate the rate of exponential decay of the potential distribution i|r(x) in the semiconductor under small voltage biases. The exponential decay rate in the potential distribution was found to be typically only one thousandth of that indicated by the Debye length. 106 References 1. W. Schottky, Z . Phys., 118, 539, 1942. 2. Y . Tarni, editor, VLSI Technology, P.207, Springer-Verlag, 1981. 3. J. Lindhard and M . Scharff, Phys. Rev., 124, 128, 1961. 4. J. Lindhard, M . Scharff and H . E . Schoitt, Kgl . Danske Videnskab Selskab. Mat. Fys. Medd., 33, #14, 1963. 5. O. S. Oen, D . K . Holmes, and M . T. Robinson, J. Appl. Phys., 34, 302, 1963. 6. C. P. Wu, E . C. Douglas and C. W. Mueller, "Limitations of the C V Technique for Ion-Implanted Profiles", IEEE Trans. Electron Dev. ,ED-22, 6, 319, 1975. 7. W. C. Johnson, and P. T. Panousis, "The Influence of Debye Length on the C-V Measurement of Doping Profiles", IEEE Trans, Electron Dev. ED-18, 965, 1971. 8. D.P . Kennedy and R.R. O'Brien, "On the Measurement of Impurity Atom Distributions by the Differential Capacitance Technique", I B M J. Res. Dev. 13, 212, 1968. 9. D . P. Kennedy, P. C. Murley and W. Kleinfelder, "On the Measurement of Impurity Atom Distributions in Silicon by the Differential Capacitance Technique", J. Res. Dev., 12, 399, 1968. 10. R. A . Moline, "Ion-Implanted Phosphorous in Silicon: profiles Using C-V 107 Analysis", J. App. Phys., 42, 9, 3553, 1971. 11. K . Lehovec, "C-V Profiling of Steep Dopant Distributions", Solid-State Electronics, 27, 12, 1097, 1984. 12. K . Lehovec, " C - V Analysis of a Partially Depleted Semiconducting Channel", App. Phys. Lett., 26, 3, 82, 1975. 13. M . Nishida, "Depletion Approximation Analysis of the Differential Capacitance-Voltage Characteristics of an MOS Structure with Nonuniformly Doped Semiconductors", IEEE Trans. Electron Dev., ED-26, 7, 1081, 1979. 14. G . Baccarani, M . Rudan, G. Spadini, H . Maes, W. Vandervorst and R. Van Overstraeten, "Interpretation of C-V Measurements for Determining the Doping Profile in Semiconductors", Solid-State Electronics, 23, 65, 1980. 15. D . J. Bartelink, "Surface Depletion and Inversion in Semiconductors with Arbitrary Dopant Profiles", App. Phys. Lett., 37, 2, 220, 1980. 16. H . Kroemer and W. Y . Chien, "On the Theory of Debye Averaging in the C-V Profiling of Semiconductors", Solid-State Electronics, 24, 655, 1981. 17. M . Nishida and M . Aoyama, "An Improved Definition for the Onset of heavy Inversion in an MOS Structure with Nonuniformly Doped Semiconductors", IEEE Trans. Electron Dev., ED-27, 7, 1222, 1980. 18. K . Shenai and R. W. Dutton, "Channel-Buffer (Substrate) Interface Phenomena in GaAs MESFET's Fabricated by Molecular-Beam Epitaxy", IEEE Trans. Electron Dev., ED-35, 5, 590, 1988. 19. K . Shenai, Ph. D . Thesis, Stanford University, 1988. 108 20. See, for example, ref. 29, P.368. 21. R. E . Kremer, M . C. Arikan, J. C. Abele, and J. S. Blakemore, "Transient Photoconductivity Measurements in Semi-Insulating GaAs", J. App. Phys. 62, 6, 2424, 1987. 22. C. Moore, "Solution of Boundary Value Problems: U B C C O L S Y S " , MTS Program Manual, UBC Computing Centre, 1982. 23. U . Ascher, J. Christiansen and R. D . Russel, "Collocation Software for Boundary-Value ODEs", A C M Trans, on Math. Software, 7, 2, 209, 1981. 24. G . M . Martin, App. Phys. Lett., 39, 9, 747, 1981. 25. J. C. Bourgoin and H . J. von Bardeleben, "Native Defects in Gallium Arsenide", J. Appl. Phys., 64, 9, R65-R91 (EL2 level in R80), 1988. 26. G . M . Martin, A . Mitonneau, D . Pons, A . Mircea, and D . W. Woodward, "Detailed Electrical Characterization of Deep Cr Acceptor in GaAs", J. Phys. C. Solid-State Phys., 13, 3855, 1980. 27. W. Platen, H . J. Schmutzler, and D. Kohl, "Interface States of Ag/(110)GaAs Schottky Diodes Without and With Interfacial Layers", J. App. Phys. 64, 1, 218, 1988. 28. C. D . Thurmond, J. Electrochem. Soc. 122, 1133, 1975. 29. S. M . Sze, Semiconductor Device Physics, P.850, Second Edition, John Wiley & Sons, 1981. 109 Appendix I An Initial Solution When the reverse bias voltage applied to the diode is large in magnitude, an initial solution approximation can be derived for the Poisson-Boltzmann equation (3.2) with the depletion approximation assumption. In the depletion region, 0 < x < x*, p(x) = N D (x) + N B (x). Outside the region, p(x)=0. An integration of the Poisson-Boltzmann equation from the bulk to x gives: X X ^=-A/p(t i )^=-A/p(n)^ ( I D dx e x' where di|r/dx(oo)=0 has been used. If x > x*, thendi|r/dx =0, and t|r(x)=0. If 0 < x < x*, an integration of Equation (I.l) from the surface to x gives x C * W - ^ s = - ( ^ ) / / p(r\)d^dC (1-2) Jx Using integration by parts, Equation (1.2) becomes m-*s(.x)=-(±)[xfp(odz-[(;p(odC] a.3) e X Thus 110 *(x)-*>)--(5)[*/WC)+Nfl)rfC-/C(^1>(C)+AgrfC] (1-4) Substituting the Gaussian distribution in Equation (3.6) to Equation (1.1) and (1.4), and evaluating the integrals, one can obtain the following approximation for di|r(x)/dx and i|r(x): iSsa.-<i)L dx e \ (^R/f^erM-erfiu'yyN^x-x^ (1.5) and dx e 2 -«*2 m-u\ , NB,„2 .^2N + AR/Np(e-U -e-u) + - ^ ( J C ' - J C " ) ] (1.6) where u = (x-Rp)/ARp, u = (x -Rp)/ARp, and the error function is defined as erj%u)=(-^:)fe-u2du (1.7) 111 Appendix II Listing of Program CVFREE 112 L i s t i n g o f C V F R E E a t 1 6 : 5 1 : 2 4 o n D E C 1 1 . 1090 f o r CC1d=MWHL o n G 1 C C - V P R O F I L E O F O E E P - L E V E L - F R E E S E M I C O N D U C T O R 2 C 3 C H a n k L e o n g 4 C N o v . 3 , 19S0 5 C 6 C T h i s p r o g r a m p r e d i c t * t h e d i e t 1 b u t i o n o f d o p a n t c o n c e n t r a t i o n 7 C i n d o p e d s e m i c o n d u c t o r a c c o r d i n g t o t h e c a n o n i c a l e q u a t i o n s u s e d 8 C i n t h e C I V ) a e t h o d . T h e a l g o r i t h m o f t h e p r o g r a m Is e x p l a i n e d i n 9 C m o r e d e t a i l s i n C h a p t e r I I I o f my t h e s i s . 10 C T h e U T S s u b r o u t i n e C O L S Y S Is c a l l e d t o s o l v e t h e P o i s s o n -11 C B o l t z a e n n e q u a t i o n r e p e t i t i v e l y i n t h e p r o g r a m . 12 C 13 I M P L I C I T R E A L ' 8 ( A - H . 0 - Z > 14 C P a r a m e t e r s u s e d i n C O L S Y S 15 R E A L ' S F S P A C E I 3 0 0 0 0 0 ) . Z E T A I 2 ) , T 0 L ( 2 ) , Z 1 2 ) , X L , X R 16 I N T E G E R I S P A C E I 3 5 0 0 0 ) . M l 1) . I P A R I 11) . L T 0 L I 2 ) . N E O . I F L A G 17 E X T E R N A L F S U B . O F S U B . G S U B . D G S U B , D U M M Y 16 C P h y s i c a l p a r a m e t e r s 18 C C 4 4 M 0 N / I N F O / D O P E , R P , S I G M A , Q E S . 0 C 0 N 0 . E C O N B . P S I 2 0 C 21 R E A L ' B E C O N , C O N S T 22 C ECON 1s t h e e l e c t r o n c o n e . 23 I N T E G E R N . N F L A G 24 C N Is t h e n u m b e r o f a p p l i e d v o l t a g e s t e p s . 25 C 26 R E A L ' S H , V , 0 0 ( 5 1 0 ) , C ( 5 I 0 ) . R C C I 5 I 0 ) , C C O N . K 27 C 0 0 Is t o t a l c h a r g e o b t a i n e d f r o m t h e f i e l d a t t h e 28 C s u r f a c e . C 1s t h e c a p a c i t a n c e . RCC 1s 1 / C " 2 , a n d C C O N 29 C i s t h e c o m p u t e d d o p a n t c o n c e n t r a t i o n a t t h e p o s i t i o n 30 C OF I. C , R C C . C C O N a n d * a r e c o m p u t e d f r o m t h e a r r a y 0 0 . 31 C 32 R E A L ' S O S . 0 1 ( 5 1 0 ) . C K 5 1 0 ) . R C C K 5 1 0 ) . C C 0 N 1 , M l 33 C 01 I s t h e t o t a l c a r r i e r c h a r g e I n t e g r a t e d f r o m t h e e l e c t r o n 34 C d i s t r i b u t i o n . C I , R C C 1 , CC0N1 a n d M l a r e t h e c o r r e s p o n d i n g 35 C r e s u l t s c o m p u t e d f r o m 0 1 . 36 C 37 I N T E G E R L I S T ( I ) / ' " / 38 C D e f i n e p h y s i c a l p a r a m e t e r s 39 C 40 0 = 1 . 6 0 2 1 8 0 - 1 9 41 E S = I 3 . 1 ' 8 . 8 5 4 D - 1 8 42 0 E S = O / 2 . 5 4 J D - 2 / E S 43 D 0 P E = 2 . 2 3 1 6 D 5 . 44 R P = 0 . 0 6 7 7 D O 45 S I G M A = . 0 3 7 0 D O 46 D C O N 0 = 6 . 8 5 D - 6 47 E C 0 N B = 7 . 0 8 0 - 6 48 K R I T E I 5 . 5 0 ) 49 5 0 F O R M A T ! ' I N P U T P S I , N . S T E P ' ) 50 READ ( 5 , L I S T ) P S I . N . S T E P 51 C 52 V = P S I » S T E P / 2 5 3 » R I T E ( 7 , 6 0 ) P S I . N . S T E P 54 6 0 FORMAT I ' P S 1 =' , F 5 . 2 . • N = ' , I 4 , ' S T E P = ' , F 5 . 3 ) 55 C 0 N S 7 = O . 5 D 0 / 2 . 5 4 2 D - 2 56 P S I = P S I / 2 . 5 4 2 0 - 2 57 S T E P = S T E P / 0 . 0 2 5 4 2 D O 5B C 59 C S e t up p a r a m e t e r s f o r t h e B V P 6 0 C 61 X L = O . D 0 62 K R I T E I 5 . 7 0 ) 63 70 F O R M A T ( ' I N P U T THE T H I C K N E S S OF S E M I C O N D U C T O R ' ) 64 READ ( 5 . L I S T ) XR 6 5 C 66 C o n e ODE o f o r d e r 2 67 Ml 11 = 2 68 NEQ=1 6 9 C 70 C G i v e l o c a t i o n s o f B . C . 71 2 E T A I 1 ) = 0 . D 0 72 Z E T A ( 2 ) = X R 73 C 74 C S e t up p a r a m e t e r a r r a y 76 0 0 100 1 = 1 .11 76 100 I P A f l ( l ) = 0 77 I P A R I 1 ) = 1 78 I P A R I 3 1 = 4 0 79 IPAR<4)=2 8 0 I P A R ( 5 ) = 3 0 0 0 0 0 81 I P A R I 6 ) = 3 5 0 0 0 82 1 P A R ( 9 ) = 1 83 C 84 C T « o e r r o r t o l e r a n c e s o n U a n d U ' 8 5 L T 0 L ( 1 ) = 1 86 L T O L ( 2 ) = 2 87 W R I T E I 5 , 1 1 0 ) 88 110 FORMAT I ' T O L E R A N C E S ARE ' ) 89 R E A D I 5 . L I S T ) T 0 L I 1 ) , T 0 L I 2 ) 9 0 C 91 C S t a r t t o s o l v e t h e B V P 92 N F L A G = 0 S 3 DO 4 5 0 J = 1 . N 94 C A L L C 0 L S Y S ( N E 0 . M , X L , X R . 2 E T A . I P A R , L T 0 L . T 0 L , F I X P N T . 9 5 • I S P A C E . F S P A C E . I F L A G . F S U B . D F S U B , G S U B . D G S U B . D U M M Y I 96 C 97 IF I I F L A G N E . 1) GO TO 545 99 C P R O C E S S THE S O L U T I O N 100 C 101 C THE PROGRAM C A L L S S U B R O U T I N E A P P S L N TO E V A L U A T E T H E 102 C S O L U T I O N AT E A C H X . S U B R O U T I N E P R C S TO C O M P U T E E L E C T R O N 103 C C O N C . AND S U B R O U T I N E OECON TO OUTPUT THE S O L U T I O N . 104 C THE PROGRAM A L S O C O M P U T E S THE TOTAL E L E C T R O N C H A R G E 105 C BY S I M P S O N ' S R U L E . 106 C 107 C 108 C S E T N F L A G TO 1 SO T H A T THE P O T E N T I A L D I S T R I B U T I O N . F I E L D 109 C D I S T R I B U T I O N AND E T C . A R E O U T P U T , E . G . AT P S I = - 2 . 5 V . - 2 . 0 V 110 C - 1 . 5 . E T C . 111 0 U 0 T T = ( P S I - S T E P / 4 ) / C O N S T 112 B S T E P = D A B S ( 0 U 0 T T - D 1 N T ( Q U O T T ) ) ' C O N S T 113 IF ( 8 S T E P . L T . S T E P ) NFLAG=1 114 C IF N F L A G = 1 . P R I N T OUT THE H E A D I N G OF S O L U T I O N D A T A F I L E 116 IF ( N F L A G . E Q . 1 ) C A L L HOING 116 C 117 C EVALUATE THE SOLUTION FROM X=XL TO XR 118 C THE INTERVAL (XL.XR) IS DIVIDED TO 3 SUNINTERVALS WITH 119 c DIFFERENT X-STEP SIZE 120 X=0.00 121 CALL APPSLN(X,Z,FSPACE.ISPACE) 122 CALL PRCS(X,ECON,Z) 123 IF (NFLAG.E0.1) CALL OECONIX,ECON.Z) 124 c QO(JI=TOTAL CHARGE=(E-FIELO AT X=OI'ES 125 00(J)=ZI2)'ES 126 PSIl=PSI ,2.542D-2 127 WRITEI3.542) PSI1.00IJ) 128 c SUM THE TOTAL ELECTRON TO OS. THEN PUT THE SUM IN OKJ) 129 0S=ECON 130 c 131 XSTEP=0.0002D0'XR 132 X=X«XSTEP 133 DO 200 1=1.200 134 CALL APPSLNlX.Z.FSPACE.ISPACEl 135 CALL PRCS(X.ECON.Z) 136 IF (NFLAG.EQ.1) CALL OECONIX.ECON,Z) 137 c SIMPSON'S RULE 138 IF (MOOII,2).EO.1) 0S=0S»4'ECON 139 IF (MOOII.2).EO.O) 05=QS«2-ECON 140 200 X=X»XSTEP 141 C THREE EXTRA ECONS HAVE BEEN AOOEO 142 OK JI = <OS-3-ECON)'O.OIDO/3 143 C 144 c USE SIMPSON'S RULE AGAIN IN ANOTHER INTERVAL 145 QS=ECON 146 c 147 XSTEP=O.O025D0'XR 148 DO 400 1=1,59 149 CALL APPSLNlX.Z.FSPACE.ISPACEl 150 CALL PRCSIX.ECON.Z) 151 IF (NFLAG.E0.1) CALL OECONIX.ECON,Z) 152 IF (M00(I.2).E0.1) OS=0S»4'ECON 153 IF (MOOII,21 EO.01 0S=0S*2'EC0N 154 400 X=X.XSTEP 155 C EXTRA ECON HAS BEEN ADDED 156 OH J)=01l J]«(OS-ECONI '0.025D0/3 157 C 156 c USE SIMPSON'S RULE AGAIN IN ANOTHER INTERVAL 159 OS=ECON 160 c 161 XSTEP=O.OtDO'XR 162 DO 425 1=1.80 163 CALL APPSLNlX.Z.FSPACE.ISPACEl 164 CALL PRCSIX.ECON.Z) 165 IF INFLAG.EO.il CALL OECONIX,ECON.Z) 166 IF (M0D(I,2).E0.1) QS=OS«4'EC0N 167 IF (MODII,2).EO.OI 0S=0S«2'EC0N 166 425 X=X»XSTEP 169 C EXTRA ECON HAS BEEN ADDED 170 O K J 1=01 (J)«(QS-ECON) '0. 1D0/3 171 C 172 C 173 C SOLVE AGAIN WITH REDUCED PSI AND INITIAL APPROX. SOLN. 174 PSI=PSI«STEP 175 IPAR(9)=3 176 IPAR(3)=ISPACE(1) 177 NFLAG=0 176 450 CONTINUE 179 C 180 C C-V PROFILE CALCULATIONS 182 c THE DIFFERENTIAL CAPACITANCE EOUALS TO THE CHANGE OF 183 c TOTAL CHARGE DIVIDED BY THE CHANGE OF APPLIED VOLTAGE. 184 c THE CHANGE OF TOTAL CHARGE IS OBTAINED BOTH FROM THE 185 c CHANGE OF THE E-FIELD AT THE SURFACE AND FROM THE CHANGE 186 c TOTAL ELECTRON CHARGE, CAUSED BV THE CHANGE OF THE APPLIED 187 c VOLTAGE BIAS. 188 c THE METHOD OF CENTRAL DIFFERENCE IS USED TO EVALUATE ALL 189 c DIFFERENTIATIONS. 190 c 191 c COMPUTE THE CAPACITANCE 192 c 193 WRITEI8.532) 194 STEP=STEP,0.O2542D0 195 N=N-1 196 DO 475 J=1,N 197 C(JI=<0OIJI-O0(J.t))/STEP 196 RCC!J) = 1/(C(JI"2I 199 C1(J) = (01(J»1)-OKJ) CO/STEP 200 RCC1IJI = 1/(C1(J)"2) 201 WRITE 18.540) V,C(J).RCCIJ).C1IJ).RCC1IJl 202 203 475 V=V«STEP 204 C 205 C COMPUTE THE CARRIER CONCENTRATION 206 C 207 WRITE(S,533) 208 H=-2/(0,ES) 209 ViV-STEP'N'STEP/2 210 N=N- 1 211 DO 485 J=1 ,N 212 CCON=H/I(RCCIJ.1)-RCCIJ))/STEP)•1.OD12 213 CC0N1=H/((RCC1(JM>-RCC1< J) l/STEP) * 1.0012 214 W=ESM1/C(J)»1/C(J'l))/2 215 Wl=ES,(1/CKJ)»1/C1(J»l))/2 216 HRITE(9.540) V.W.CCON.Wl.CC0N1 217 485 V=V»STEP 218 GO TO 550 219 532 FORMAT 12X.1HV.13X.11HC (F/MI •' 2) , 3X , 12HC1 (F/MI"2)> 220 533 FORMAT 14X,1HV.12X.9HWIMICRON),6X,12HCC0NI/MI " 3) . 221 • 2X.10HW1IMICRON I.4X.13HCC0N11/MI••3)) 222 540 FORMAT!2X.512X.IPO 12.5)) 223 542 FORMAT!2I2X.IP012.5)1 224 545 WRITEI5.546) IFLAG 225 546 FORMAT!12) 226 550 STOP 227 END 226 C 229 C 230 SUBROUTINE FSUB(X.Z.F) 231 C OEFINES THE RHS OF THE ODE 232 IMPLICIT REAL'8(A-H,0-Z) 233 COMMON/ I N F O / D O P E . R P . S I GMA. O E S . D C O N O , E C O N B . P S I 234 D I M E N S I O N 2 1 2 ) , F ( 1) 235 C 236 c G A U S S I A N D O P I N G P R O F I L E 237 0 C O N = D O P E ' O E X P ( • ( X - R P t M X - R P J / U ' S I G M A ' S I G M A ) ) 238 c 239 c S I M P L I F I E D P O I S S O N ' S E O U A T I O N 240 F ( U s - O E S M D C O N O . D C O N - E C O N B ' O E X P I Z C 11) 1 241 c 242 RETURN 243 END 244 c 2 4 5 c 246 S U B R O U T I N E O F S U B I X . Z . D F I 247 c D E F I N E S THE J A C O B I A N OF THE RHS OF THE ODE 248 I M P L I C I T R E A L - e i A - H . 0 - 2 ) 249 C O M M O N / I N F O / D O P E , R P . S I G M A , Q E S . D C O N O . E C O N B . P S I 2 5 0 D I M E N S I O N 2 ( 2 ) , 0 F ( 1 , 2 ) 251 c WRT PHI 2 5 2 D F ( 1. 1) = Q E S ' ECONB • D E X P ( Z ( 11) 2 5 3 c WRT P H I ' 254 D F ( 1 , 2 1 = 0 . 0 0 255 END 256 c 257 c 258 S U B R O U T I N E G S U B I I . Z . G ) 2 5 9 c E V A L U A T E S THE B . C . 260 I M P L I C I T R E A L ' 8 ( A - H , 0 - Z I 261 C O M M O N / I N F O / D O P E . R P , S I G M A . O E S . D C O N O . E C O N B , P S I 2 6 2 D I M E N S I O N 2 ( 2 ) 263 c 264 GO TO ( 1 . 2 ) ,1 265 1 G = Z ( 1 ) - P S I 266 R E T U R N 267 2 G = Z ( 2 ) - 0 . D 0 26B R E T U R N 269 END 270 c 271 c 272 S U B R O U T I N E D G S U B ( I . Z , D G ) 2 7 3 c E V A L U A T E S THE J A C O B I A N OF THE B . C . 274 I M P L I C I T R E A L ' 8 ( A - H , 0 - Z ] 275 D I M E N S I O N Z ! 2 ) , D G ( 2 > 2 7 6 c 277 D G ( 1 ) = 0 . D 0 278 D G I 2 ) = 0 . D 0 279 GO TO ( 1 , 2 ) . I 280 1 D G ( 1 ) = 1 . D O 281 RETURN 282 2 0 G ( 2 ) = 1 . 0 0 28 3 R E T U R N 284 END 285 C 286 C 287 c 2 8 8 S U B R O U T I N E D U M M Y ( X . Z . D M J U I 289 c P R O V I D E S AN I N I T I A L S O L U T I O N I F I P A R ( 9 ) = 1 . 2 9 0 c THE I N I T I A L S O L U T I O N BELOW I S V A L I D IF THE S E M I C O N D U C T O R 291 c IS STRONGLY D E P L E T E D . 2 9 2 I M P L I C I T R E A L - 8 ( A - H . 0 - Z ) 293 C O M M O N / I N F O / D O P E . R P . S I G M A , O E S , D C O N O , E C O N B . P S 1 294 D I M E N S I O N Z ( 1 1 , D M J U ( 1 ) 295 X S = 2 . D 0 296 S R 2 = D S O R T ( 2 . D O ) 297 R 0 0 T P I = D S Q R T ( 3 . 1 4 1 5 9 D 0 ) 298 IF ( X . L T . X S ) GO TO 100 299 Z ( 1 1 = 0 300 Z I 2 ) = 0 301 D M J u l l ) = 0 302 GO TO 200 303 100 X S R P = ( X S - R P ) / ( S R 2 , S I G M A > 304 X R P = ( X - R P ) / ( S R 2 - S I G M A ) 305 X S R P 2 = X S R P ' X S R P 306 X R P 2 = X R P - X R P 307 Z ( 2 ) = 0 E S ' ( S I G M A * D 0 P E ' R 0 0 T P I / S R 2 ' ( O E R F ( X S R P ) - D E R F ( X R P ) ) + D C O N 0 308 * ( X S - X ) ) 309 Z ( 1 1 = P S I . X, Z ( 2 l - 0 E S M O C 0 N O / 2 M X S - X S X ' X ) » S R 2 - S I G M A - D O P E ' 310 • ( S I G M A / S R 2 * ( D E X P ( - X R P 2 ) - D E X P ( - X S R P 2 ) l * R P - R 0 0 T P I / 2 . 0 0 -311 < (DERF ( X S R P ) - DERF ( X R P ) ) ) ) 312 OMJU( 1) = - 0 E S M D 0 P E , D E X P ( - X R P 2 ) » D C O N 0 ) 3 1 3 2 0 0 C O N T I N U E 314 RETURN 315 END 316 C 317 c 318 S U B R O U T I N E HDING 319 c P R I N T OUT THE T I T L E OF THE S O L U T I O N D A T A . 320 c 321 W R I T E ! 7 , 7 0 0 ) 322 W R I T E ( 7 . 7 0 0 ) 323 W R I T E ( 7 . 7 0 1 ) 324 c 325 700 F O R M A T ( I X ) 326 701 F 0 R M A T I 6 H X ( M I ) , 1 X . 5 H U ( V ) . 9 X . 8 H U ' ( V / M I ) , 5 X . 327 • 1 2 H N ( X ) I / M I " 3 ) , 1 X , 1 0 H N D ( / M I " 3 ) . 3 X . 1 2 H U ' ' ( V / M f 2 ) ) 328 RETURN 329 END 3 3 0 C 331 S U B R O U T I N E P R C S ! X . E C O N . Z ) 332 C C A L C U L A T E THE E L E C T R O N C O N C E N T R A T I O N 333 I M P L I C I T R E A L ' B I A - H . O - Z ) 334 C O M M O N / I N F O / D O P E . R P , S I G M A , O E S .DCONO . E C O N B , P S I 335 D IMENSION Z ( 2 ) 336 R E A L • a X . E C O N 337 C 338 c COMPUTE E L E C T R O N C O N C E N T R A T I O N AT X 339 E C O N = E C 0 N B ' D E X P ( Z ( 1 ) ) 340 c 341 c CONVERT R E S U L T S IN V O L T S . V / M I C R O 342 Z l 1 ) = Z ( 1 ) ' 0 . 0 2 S 4 2 D 0 343 Z ( 2 I = Z ( 2 ) , 0 . 0 2 5 4 2 0 0 344 RETURN 345 END 346 c 347 S U B R O U T I N E O E C O N I X , E C O N . Z ) 346 c OUTPUT THE S O L U T I O N P R O F I L E S 349 I M P L I C I T R E A L ' 8 ( A - H . 0 - Z > 350 C O M M O N / I N F O / D O P E . R P , S I G M A , Q E S . D C O N O . E C O N B , P S I 351 D I M E N S I O N 1(2) 352 R E A L ' S X . T O C O N . E C O N . F 353 C 354 C COMPUTE T O T A L DOPING C O N C E N T R A T I O N AT X 355 T D C O N = D C O N O » D O P E ' D E X P ( - ( X - R P ) M X - R P ) / ( 2 ' S I G M A ' S I G M A > ) 356 C 357 C COMPUTE THE G R A D I E N T OF THE P O T E N T I A L IN V / M I C R 0 " 2 358 S C = T D C O N - E C O N 359 c 360 c OUTPUT R E S U L T S TO I / O UNIT 7 361 Z 2 = - Z ( 2 I 362 E C = E C O N ' 1 0D12 363 TOCON = T D C O N ' 1 . 0 0 1 2 364 S C = S C 1 . 0 D 1 2 365 W R I T E ( 7 . 7 5 0 ) X . Z ( 1 ) . Z 2 , E C . T D C O N . S C 366 7 5 0 F 0 R M A T I 0 P F 7 . 3 . I X , 51 IX . 1PD12 . 5 ) ) 367 R E T U R N 368 END Appendix III Listing of Program CVGaAs 117 L i l t i n g o f C V G A A S a t 1 6 . 2 4 : 4 ? o n D E C 6 , 1 9 9 0 f o r CC1d=HWHL o n 0 P a p a 1 1 C C - V P R O F I L E OF I O N - I M P L A N T E D G a A a 2 C 3 C H a n k L e o n g 4 C N o v . 3 . 1990 5 C 6 C T h l t p r o g r a m , p r e d i c t s t h e d l s t l b u t l o n o f d o p a n t c o n c e n t r a t i o n 7 C In d o p e d G a A a a c c o r d i n g t o t h e c a n o n i c a l e q u a t i o n s u a e d In t h e 6 C C I V ) m e t h o d . T h e a l g o r i t h m o f t h e p r o g r e m l a e x p l e l n e d In m o r e 9 C d e t a l l a 1n C h a p t e r IV o f my t h e s l a . 10 C D e e p l e v e l a s u c h a s E L 2 e n d t h o s e d u e t o C r may b e c o n t a i n e d 11 C In G a A a . 12 C T h e MTS s u b r o u t i n e C O L S Y S 1a c a l l e d t o s o l v e t h e P o l a s o n -13 C B o l t z m a n n e q u a t i o n r e p e t i t i v e l y In t h e p r o g r a m . 14 C 15 I M P L I C I T R E A L ' e l A - H , N , 0 - Z ) 16 C P a r a m e t e r s u s e d 1n C O L S Y S 17 R E A L ' S F S P A C O I 2 B 5 O O 0 ) , F S P A C 1 ( 2 6 5 0 0 0 } , 2 E T A ( 2 ) , T O L ( 2 1 , 2 ( 2 ) , X L , X R 1B I N T E G E R I S P A C O t 3 5 0 0 0 ) , I S P A C 1 ( 3 5 0 0 0 ) ,M( 1) , IPAROt 11) . IPAR 1 ( 1 1 ) , L T 0 L ( 2 ) IS I N T E G E R N E O , 1 F L A G 2 0 E X T E R N A L F S U 8 0 . F S U B 1 . D F S U B 0 . D F S U B 1 . G S U B . 0 G S U 8 . D U M M Y 21 C O M M O N / E O S O L N / F S P A C O . I S P A C O 22 C O M M O N / N Q S O L N / F S P A C 1 , I S P A C 1 2 3 C 24 C P h y a l c a l p a r a m e t e r s o f t h e G a A s 2 5 C O M M O N / D A T A / N P . R P , S I G M A , N O D . NOA ,NA ,N I . O . E S , O E S , B E T A . P S I . Y I , A , B 28 C O M M O N / P O T L / V , S T E P , CONST 2 7 C O M M O N / X / I L . I R 28 C 2 9 R E A L ' S E C O N . C O N S T 3 0 C E C O N 1s t h e e l e c t r o n c o n e . 31 I N T E G E R I , N . N F L A G 32 C N 1s t h e n u m b e r o f a p p l i e d d . c . v o l t a g e s t e p s . 3 3 C 34 D I M E N S I O N C I 5 1 0 ) 35 C C Is t h e d l f f e r e n t l e l c a p a c i t a n c e a t v a r i o u s b i a s e s 36 C 37 I N T E G E R L 1 S T I » / • • • / 36 C 39 C 4 0 C I n p u t t h e p h y s i c a l p a r e m e t e r s 41 C A L L I N F O 42 C 4 3 C 44 C S e t u p p a r a m e t e r s f o r t h e B V P 4 5 C 46 C O n e OOE o f o r d e r z 47 M ( 1 ) = 2 4 6 NE0=1 4 9 C 5 0 C G i v e l o c a t i o n s o f B . C . 51 Z E T A ( 1 ) * X L 52 2 E T A I 2 U X R 5 3 C 54 C S e t u p p o r a m e t e r a r r a y 5 5 I P A R O ( 1 ) = 1 56 1 P A R 0 1 2 ) = 0 57 I P A R 0 I 3 U 1 0 O 5 8 I P A R 0 ( 4 ) = 2 59 I P A R 0 ! 5 ) = 2 8 S O O 0 6 0 I P A R O I 6 1 = 3 5 0 0 0 61 I P A R 0 I 7 U 1 6 2 I P A R 0 ! 8 ) = C 6 3 I P A R O ( 9 > = 0 64 I P A R O I 1 0 1 = 1 6 5 I P A R 0 ( 1 1 ) = O e e IPARIII)=I 6 7 I P A R 1 ( 2 ) = 0 6 6 1 P A R 1 I 3 ) = 1 0 0 6 9 1 P A R 1 ( 4 ) = 2 70 I P A R 1 ( 5 l = 2 6 S O O O 71 I P A R 1 ( 6 ) = 3 S O O O 72 I P A R 1 ( 7 ) = 1 7 3 I P A R M B I r f ) 74 I P A R 1 ( 9 ) = 0 7 5 I P A R K 1 0 ) * ! 76 I P A R 1 ( 1 1 I = 0 77 C T » o e r r o r t o l e r a n c e s o n U a n d U ' 78 L T O L I D m l 79 L T O L ( 2 ) = 2 8 0 W R I T E I 5 . 4 0 ) 81 4 0 F O R M A T ! ' I N P U T T O L E R A N C E S ON P O T E N T I A L AND F I E L D ' ) 8 2 R E A D I 5 . L I S T ) T 1 . T 2 8 3 W R I T E I 7 . 4 5 ) T 1 . T 2 84 T O M D m l l 8 5 T O L ( 2 ) = T 2 88 4 5 F O R M A T ) ' T O L I 1) = ' . 1 P D 1 2 . 5 . ' T O L ( 2 ) = ' . 1 P 0 1 2 . 5 ) 87 C 88 C I n p u t s u r f a c e p o t e n t i a l ( P S I ) , a t e p s i z e o f P S I ( S T E P ) 6 9 C a n d n u m b e r o f a t e p s ( N ) . 9 0 W R I T E I 5 . 5 0 I 91 5 0 F O R M A T ( ' I N P U T P S I , D . C . S C A N S T E P - S I Z E ' ) 92 R E A D ( 5 , L I S T ) P S I , S T E P 9 3 C 94 m i T E f S . S S ) 95 5 5 F O R M A T ! INPUT NUMBER OF S T E P S ' ) 96 R E A 0 I 5 . L I S T ) N 97 C I n p u t t h e a . c . s i g n a l m a g n i t u d e 9 6 H R I T E ( 5 . 5 6 ) g g 56 F O R M A T t ' I N P U T A . C . S I G N A L S T R E N G T H ' ) 100 REA0(5,L1ST) AC 101 C E c h o t h e I n p u t s In t h e o u t p u t f i l e s 102 W R I T E I 4 . 6 0 ) P S I , S T E P , N , A C 103 W R I T E ! 7 , 6 0 ) P S I . S T E P . N . A C 104 8 0 F O R M A T ! ' I N I T . P S I = ' , F 8 . 2 . ' S T E P * ' . F 8 . 5 . ' N = ' , I 3 . ' A C = ' . F B . 5 > 105 C 106 R P S I = P S I 107 R S T E P = S T E P 108 RAC=AC 1 0 8 ' V = P S I » S T E P / 2 110 C O N S T = - 0 . 5 D O / B E T A 111 P S I = P S I / B E T A 112 S T E P = S T E P / B E T A 113 A C s A C / B E T A 114 C 115 s m i T E ( 3 , 8 0 ) 116 8 0 F O R M A T I ' P S I ( V ) O S O ( C ) P S I - A C I V ) 0 S 1 ( C I ) 118 C 119 C S o l v e t h e P o l e e o n - B o l t x e j a n n e q u a t i o n f o r t h e EOM c a e e 1 2 0 C A L L C O L S V S I N E O . M . X L . X R . Z E T A . I P A R O . L T O L . T O L . F I X P N T . 121 • I S P A C O . F S P A C O . I F L A G , F S U B 0 . D F S U B 0 . G S U B . D G S U B . D U I 4 M Y ) 122 C F o r o t h e r c a l l e t o C O L S Y S , u e e f o r a e r e o l u t l o n e n d a e e h 1 2 3 I P A R 0 I » I = 3 124 I P A R 1 ( 9 > = 3 125 C T r e n e f e r t h e e q u i l i b r i u m e o l u t t o n e r r e y t o t h e N O N - E O M 12B C e o l u t t o n e r r e y , e n d u e e 1t e e e n I n i t i a l q u e s e f o r H O N - E O M 1 2 ? DO 2 0 0 J « 1 . 2 8 5 0 0 0 128 F S P A C K J l r f S P A C O l J l 129 2 0 0 C O N T I N U E 130 DO 201 J = 1 . 3 5 0 0 0 131 I S P A C K J U I S P A C O I J ) 132 2 0 1 C O N T I N U E 133 C 134 DO 4 5 0 J = 1 , N 135 W R I T E ( 5 , 5 4 B ) J 138 IF ( I F L A G . N E . 1) GO TO 5 4 5 137 C S o l v e P o l e e o n - B o l t z a a n n e q u a t i o n f o r n o n - e q u l 1 I b r 1 u » c a s e 138 C e f t e r I n c r e m e n t 1 n g t h e a u r f a c e p o t e n t i a l b y a . c . 139 P S I H L = P S 1 140 P S I = P S I » A C 141 R P S I H L s R P S I 142 R P S I = R P S I » R A C 143 I P A R 1 ( 3 ) = I S P A C 1 ( 1 ) 144 C A L L C 0 L S Y S ( N E 0 . M , X L . I R . Z E T A , 1 P A R 1 . L T 0 L , T 0 L , F I X P N T , 145 • I S P A C 1 . F S P A C 1 . I F L A G , F S U B 1 . D F S U B 1 . G S U B . D G S U B . D U M M Y ) 148 C 147 IF ( I F L A G . N E . 1) GO TO 5 4 5 148 C P r o c e a e t h e e o l u t t o n e IEOM AND N O N - E O M ) 149 C A L L P R O C S S ( O O . O I ) 150 C C o m p u t e t h e c a p a c i t a n c e C 151 C ( J ) = ( Q 0 - 0 1 ) / R A C 152 C O u t p u t t h e c h a r g e a 153 I T R I T E ( 3 , 5 0 0 ) R P S I H L . O O . R P S I .01 154 C 155 C S o l v e f o r t h e e q u i l i b r i u m c a a a a g a i n w i t h P S I I n c r e a a e d b y S T E P . ISO P S I = P S I H L » S T E P 157 R P S 1 = R P S I H L « R S T E P 158 I P A R 0 ( 3 ) = I S P A C O ( 1 1 159 C A L L C O L S Y S I N E O . M . X L . X R . Z E T A . I P A R O . L T O L . T O L . F I X P N T . 160 • I S P A C O . F S P A C O . I F L A G . F S U B O . D F S U B O . G S U B . D G S U B , D U M M Y ) 161 4 5 0 C O N T I N U E 162 C 163 C 164 C O b t a i n t h e a p p a r e n t d o p a n t p r o f i l e b y C ( v ) e e t h o d 165 C A L L C V P F L R ( N . C ) 166 C 167 S O D F 0 R M A T I 4 1 2 X . 1 P 0 1 8 . 9 ) ) 168 GO TO 5 5 0 169 5 4 5 < r R I T E ( 5 , 5 4 6 ) I F L A G 1 7 0 5 4 6 F O R M A T ! 1 4 ) 171 5 5 0 S T O P 172 END 173 C 174 C 175 S U B R O U T I N E INFO 176 C INPUT THE P H Y S I C A L P A R A M E T E R S OF THE S E M I C O N D U C T O R . 177 I M P L I C I T R E A L - 8 ( A - H , K , N . 0 - Z ) 178 C O M M O N / O A T A / N P , R P . S I G M A , N O D , N D A , N A , N I , 0 . E S , O E S , B E T A , P S I , Y 1 , A , B 179 C O M M O N / X / X L . X R 180 I N T E G E R L I S T ( I ) / " ' / 181 C 182 1 T R I T E I 5 . 5 ) 183 5 F O R M A T ! ' I N P U T THE T E M P E R A T U R E ' I 164 R E A D 1 5 . L I S T ) T 185 T 3 = T / 3 O 0 166 C B E T A = K T / O = 0 . 0 2 5 9 AT 300K 187 B E T A = 0 . 0 2 5 9 * T 3 188 N C 3 0 0 = 4 . 7 D 5 189 N V 3 0 0 = 7 . 0 0 6 190 T 3 S 0 R T = D S 0 R T ( T 3 ' T 3 ' T 3 ) 101 N C = N C 3 0 0 ' T 3 S 0 R T 192 N V = N V 3 0 0 - T 3 S O R T 193 0 = 1 . 8 0 2 1 6 0 - 1 9 194 E S = 1 2 . 7 3 7 D 0 , e . 8 5 4 D - 1 8 M 1 » 1 . 2 D - 4 , T ) 195 0 E S = O / B E T A / E S 196 E G = 1 . 5 1 9 - 5 . 4 D - 4 ' T ' T / I T » 2 0 4 ) 197 N I = O S O R T ! N C 3 O O * N V 3 O 0 ) ' T S S O R T ' D E X P ! - E G / 2 / B E T A ) 198 C D E E P ENERGY L E V E L S MEASURED FROM BOTTOM OF CONDUCTION BAND 199 D L T E D = 0 . 7 5 9 - 2 . 3 4 0 - 4 ' T 2 0 0 0 L T E A = 0 . 7 0 9 - B E T A ' D L 0 G 1 0 . » 3 O 0 ) - 2 . 4 D - 4 M M / ( T » 2 0 4 ) 201 F A C T 0 R = B E T A * D L 0 G ! N V / N C > / 2 2 0 2 A = 0 E X P ( ( E G / 2 - F A C T 0 R - D L T E D > / B E T A ) 2 0 3 B = D E X P t ! E G / 2 - F A C T O R - D L T E A ) / B E T A ) 2 0 4 W R I T E ( 5 , 7 ) N C . N V , F A C T O R 2 0 5 W R I T E ( 5 , 8 ) E G , D L T E O , D L T E A 2 0 6 W R I T E ( 5 , B ) A . B . N I 207 7 F O R M A T ! ' N C = ' . 1 P D 1 2 . S . ' N V E ' , 1 P D 1 2 . 5 , ' F A C T O R " ' . 1 P D 1 2 . 5 ) 2 0 8 8 F O R M A T ! ' E G = ' , 1 P D 1 2 . 5 . ' O L T E D = ' , 1 P D 1 2 . 5 , ' D L T E A * ' , 1 P D 1 2 . 5 ) 2 0 9 9 F O R M A T ! ' A S ' . 1 P D 1 2 . 5 . ' B= ' . 1 P D 1 2 . 5 . ' NI= ' . 1 P 0 1 2 . 5 I 2 1 0 C C O N C E N T R A T I O N S OF I M P U R I T I E S . I N C L U D I N G D E E P L E V E L S 211 r m i T E ( 5 , 1 0 ) 2 1 2 10 FORMAT ( ' INPUT N D D . NOA AND NA • ) 2 1 3 R E A 0 I 5 . L I S T ) N D D , N O A . N A 214 H R I T E I 5 . 3 0 ) N D D . N O A . N A 2 1 5 e j n l T E I I . 4 0 ) N O D . N O A , N A 2 1 8 W R I T E I 2 . 4 0 ) N D O . N D A . N A 217 K R I T E ( 3 , 4 0 ) N D O . N D A . N A 2 1 8 > J R I T E ( 4 . 4 0 ) N D D . N O A . N A 2 1 9 W R 1 T E I 7 . 4 0 ) N D O.NDA . N A 2 2 0 C C A L C U L A T E THE D I F F E R E N C E OF F E R M I E N E R G Y L E V E L AND I N T R I S I C 221 C E N E R G Y L E V E L IN THE B U L K . 2 2 2 C A L L F E R M I -2 2 3 C G A U S S I A N DOPANT P R O F I L E P A R A M E T E R S 2 2 4 R P = O . 1 0 9 6 D O 2 2 5 S I G M A * . 0 5 2 6 D 0 2 2 6 T 0 U = R P / S I G M A / D S 0 R T ( 2 . D 0 I J 2 7 N P = 3 . D 4 / ( t - O . S O O ' D E R F C I T O U l l / S I G M A / D S O R T I Z . O O ' S . 1 4 1 5 9 5 D 0 ) 2 2 8 K R I T E I S . L I S T ) NP 2 2 9 C B O U N D A R I E S OF SEMICONDUCTOR 2 3 0 J L = 0 . 0 0 0 231 « J R 1 T E ( 5 , 2 0 ) 2 3 2 2 0 F O R M A T ! ' INPUT THE T H I C K N E S S OF S E M I C O N D U C T O R ' ) J 3 3 R E A 0 I 5 . L I S T ) XR 2 3 4 3 0 F 0 R M A T I F 1 0 . 2 , 1 I . F 1 0 . 2 . 1 X . F 1 0 . 2 ) 2 3 5 4 0 F O R M A T ! ' H D D S ' . F 1 0 . 2 , • N D A = ' . F 1 0 . 2 . ' N A = ' . F 1 0 . 2 ) 2 3 6 R E T U R N 2 3 7 E N D 2 3 B C 2 3 9 S U B R O U T I N E F E R M I 2 4 0 2 4 1 C B I S E C T I O N M E T H O D I S U S E D TO F I N D T H E F E R M I E N E R G Y L E V E L F R O M 2 4 2 C T H E C H A R G E N E U T R A L I T Y E Q U A T I O N I N G A A S . D E E P E N E R G Y L E V E L S ARE 2 4 3 C A S S U M E D TO E X I S T I N G A A S . 2 4 4 C D E F I N E X = E F * E I I N B U L K AND Y 1 • E X P ! • X / B E T A ) . 2 4 5 I M P L I C I T R E A L ' S 1 A - H . K . N . O - 2 1 2 4 6 C O M M O N / D A T A / N P . R P , S I G M A . N D D , N O A . N A . N I , 0 , E S , O E S , B E T A , P S I . Y 1 , A ,B 2 4 7 W R I T E I 5 . 1 0 0 ) 2 4 8 I N T E G E R L I S T ( 1 ) / " ' / 2 4 9 C I N P U T D E S I R E O S O L U T I O N A C C U R A C Y A N D T H E E N E R G Y R A N G E W H I C H 2 5 0 C T H E F E R M I E N E R G Y L E V E L I S I N . 2 5 1 R E A D ! 5 . L I S T ) D L T X . X L . X R 2 5 2 « m i T E ( 5 , 1 5 0 ) D L T X . X L . X R 2 5 3 1 0 0 F O R M A T ! ' I N P U T D E S I R E D S O L U T I O N A C C U R A C Y , X L AND X R ) 2 5 4 1 5 0 F O R M A T I F 1 0 . 5 , 1 X . F 1 0 . 5 . I X . F l o . 5 ) 2 5 5 C 2 5 6 D L T X 2 = 2 ' D L T X 2 5 7 1 0 X D I F F = X R - X L 2 5 8 C E X I T I F T H E D E S I R E D A C C U R A C Y I S A C H I E V E D . 2 5 9 I F ( X D I F F . L T . D L T X 2 ) GO TO 2 0 2 6 0 C A S S U M E T H E S O L U T I O N I S I N T H E R I G H T H A L F O F T H E I N T E R V A L 2 6 1 T E M P = X L 2 6 2 X L = ( X L « X R > / 2 2 8 3 Y L = D E X P ( - X L / B E T A ) 2 6 4 Y R = 0 E X P ( - X R / B E T A ) 2 8 5 F V L S N I • I Y L - 1 / Y L > * N D D * ( 1 - 1 / ( 1 * A ' Y L 1 ) - N D A / I 1 « B ' Y L ) - N A 2 6 6 F Y R = N I ' I Y R - 1 / Y R ) + N O D * 1 1 * 1 / ! 1 ' A ' Y R ) ) - N O A / I 1 « B ' Y R ) - N A 2 8 7 S I G N S F Y L " F Y R 2 6 8 I F ( S I G N . L T . 0 . 0 ) 0 0 TO 1 0 2 6 9 C I N C O R R E C T A S S U M P T I O N . THE S O L U T I O N I S A C T U A L L Y I N THE L E F T 2 7 0 X R = X L 2 7 1 X L = T E M P 2 7 2 0 0 TO 1 0 2 7 3 2 0 X = ( X L » X R ) / 2 2 7 4 C X N E F - E I I N B U L K 2 7 5 Y T = D E X P ( - X / B E T A ) 2 7 6 W R I T E I 1 , 2 0 0 ) X . F Y L . F Y R 2 7 7 K R I T E ( 2 . 2 0 0 ) X . F Y L . F Y R 2 7 B W R I T E ( 3 , 2 0 0 ) X . F Y L . F Y R 2 7 9 W U T E I 4 . 2 0 0 ) X . F Y L . F Y R 2 8 0 W R I T E I 5 . 2 O 0 ) X . F Y L . F Y R 2 8 1 W R I T E I 7 . 2 0 0 ) X . F Y L . F Y R 2 8 2 2 0 0 F O R M A T ! ' E F - E I B = ' , 1 P D 1 2 . 5 , • F Y L = ' . 1 P D 1 2 . 5 . ' F Y R S ' , 1 P D 1 2 . 5 ) 2 8 3 R E T U R N 2 8 4 E N D 2 6 5 C 2 B 6 C 2 8 7 S U B R O U T I N E F S U B O I X . Z . F ) 2 8 8 C O E F I N E S T H E R H S O F T H E ODE 2 8 9 I M P L I C I T R E A L ' B I A - H . N . O - Z ) 2 9 0 C O M M O N / D A T A / N P . R P , S I G M A , N D D . N O A . N A . N I . O . E S . O E S . S E T A . P S I . Y 1 . A . B 2 9 1 D I M E N S I O N Z I 2 ) . F I D 2 9 2 I N T E G E R L I D / " ' / 2 9 3 C G A U S S I A N D O P I N G P R O F I L E 2 9 4 X N = ( X - R P ) / S I G M A 2 9 5 N D = N P ' O E X P ( - X N ' X N / 2 ) 2 9 8 C 2 9 7 C M O D I F I E D P O I S S O N - B O L T Z M A N N E O U A T I O N 2 9 6 I F ( 2 ( 1 1 L T . - 1 7 0 0 0 ) GO To 2 5 2 9 9 Y E X P Z 1 = Y 1 ' 0 E X P ( - Z ( 1 ) ) 3 0 0 A Z 1 = A ' Y E X P 2 1 3 0 1 B Z 1 = B ' V E X P 2 1 3 0 2 I F ( Z ( 1 ) . L T . O.DO) GO TO 2 0 3 0 3 1 0 F I 1 ) = - O E S ' ( N I ' ( Y E X P Z 1 - 1 / Y E X P Z 1 ) + N D - N A 3 0 4 • • N O O M 1 - 1 / 1 U A Z 1 ) ) N O A / I 1 « B Z 1 ) I 3 0 5 GO TO 3 0 3 0 6 2 0 F I 1 ) = - Q E S ' ( - N I / Y E X P Z 1 » N D - N A 3 0 7 • • N D D * I 1 - 1/1 ! • A Z 1 1 ) - N O A / I 1 * B Z 1 ) ) 3 0 8 C 3 0 9 G O TO 3 0 3 1 0 2 5 F I 1 ) = - O E S " I N D - N A * N D 0 ) 3 1 1 3 0 R E T U R N 3 1 2 E N D 3 1 3 C 3 1 4 S U B R O U T I N E D F S U B O I X , Z , D F ) 3 1 8 C O E F I N E S T H E J A C O B I A N OF T H E R H S O F T H E ODE 3 1 6 I M P L I C I T R E A L ' 8 ( A - H , N . 0 - Z ) 3 1 7 C O M M O N / D A T A / N P . R P , S I G M A . N D D , N O A , N A . N I , 0 , E S , O E S . B E T A . P S I . Y 1 . A . B 3 1 8 D I M E N S I O N 2 1 2 ) . D F I 1 , 2 ) 3 1 9 I N T E G E R H L L / ' " / 3 2 0 C WRT P H I 3 2 1 I F ( Z I 1 ) . L T . - 1 7 5 0 0 ) GO TO 2 5 3 2 2 Y E X P Z U Y I ' O E X P I - Z I D ) 3 2 3 A Z U A ' Y E X P Z I 3 2 4 B Z I S B ' Y E X P Z I 3 2 5 I F I Z I 1 ) L T . O.DO) GO TO 2 0 3 2 8 1 0 D F ( 1 . T ) S O E S - ( N I ' ( Y E X P Z 1 - . 1 / Y E X P Z I ) 3 2 7 • • N 0 0 , A Z 1 / ( 1 . A Z 1 ) / ( 1 « A Z 1 ) 3 2 8 • • N 0 A , B Z 1 / ( 1 » B Z 1 ) / ( 1 - > B Z 1 ) I 3 2 9 GO TO 3 0 3 3 0 2 0 D F I 1 , 1 ) = O E S * I N I / V E X P Z 1 3 3 1 • • N D D , A Z 1 / ( 1 « A Z 1 ) / I 1 « A Z 1 ) 3 3 2 • « N D T ' B Z 1 / ( 1 « B Z 1 ) / ( 1 * B Z U > 3 3 3 GO TO 3 0 3 3 4 2 5 D F ( 1 , 1 1 = 0 . 0 0 3 3 5 C WRT P H I ' 3 3 8 3 0 D F ( 1 , 2 ) S O . D 0 3 3 7 R E T U R N 3 3 8 E N D 3 3 B C 3 4 0 C 3 4 1 S U B R O U T I N E F S U B K X . Z . F ) 3 4 2 C D E F I N E S T H E R H S OF T H E ODE. I O N I Z E D D E E P D O P A N T S A R E 3 4 3 C T R E A T E D A S ' F I X E O C H A R G E S ' . 3 4 4 I M P L I C I T R E A L ' 8 I A - H . N . 0 - Z I 3 4 5 C O M M O N / D A T A / N P , R P , S I G M A , N D D , N D A , N A , N I , Q , E S , O E S . B E T A , P S I , Y 1 , A ,B 3 4 6 C O M M O N / E O S O L N / F S P A C O . I S P A C O 3 4 7 D I M E N S I O N Z O I 2 ) . 2 ( 2 ) , F ( 1 ) , F S P A C O ( 2 8 5 0 0 0 1 , I S P A C O I 3 5 0 0 0 ) 3 4 8 C 3 4 8 C G A U S S I A N D O P I N G P R O F I L E 3 5 0 X N = ( X - R P ) / S I G M A 351 N D = N P ' D E X P ( - X N ' X N / 2 ) 3 5 2 C 3 5 3 IF ( 2111 L T . - 1 7 5 . 0 0 ) GO TO 25 354 C 3 5 5 C A L L A P P S L N I X . 2 0 . F S P A C O , I S P A C O ) 3 5 6 Y E X P Z 0 = Y 1 ' D E X P ( - Z 0 ( 1 ) I 357 C ' F I X E D C H A R G E S ' IN E L 2 3 5 8 N D O P = N D D ' ( 1 -1 /< t ' A ' Y E X P Z O I ) 3 5 9 C " F I X E D C H A R G E ' IN D E E P A C C E P T O R S 3 6 0 NDAM=NDA/ ( L B ' Y E X P Z O ) 361 C 3 6 2 C M O D I F I E D P O I S S O N ' S E O U A T I O N 3 6 3 Y E X P Z 1 = Y 1 ' D E X P ( - Z ( 1 I ) 364 IF ( Z U > . 11 O . D O ) GO TO 20 365 F ( 1 > = - 0 E S ' ( N I ' ( Y E X P Z 1 - 1 / Y E X P Z 1 l - N D - N A ^ N D D P - N D A M I 366 GO TO 30 367 2 0 F ( 1 ) = - 0 E S ' ( - N I / Y E X P Z 1 « N D - N A » N D 0 P - N D A M ) 3 6 8 C 369 GO TO 3 0 3 7 0 2 5 F ( 1 l = - 0 E S ' ( N D - N A » N D D P - N 0 A M > 371 3 0 R E T U R N 3 7 2 END 3 7 3 C 3 7 4 C 3 7 5 C 376 S U B R O U T I N E D F S U B 1 ( X , Z , D F ) 377 C D E F I N E S THE J A C O B I A N OF THE RHS OF THE ODE 3 7 8 I M P L I C I T R E A L ' 6 ( A - H , N , 0 - Z ) 3 7 9 C O M M O N / D A T A / N P , R P , S I G M A . W D D . N D A , N A , N I , 0 , E S . O E S . B E T A , P S I , Y 1 , A , B 3 6 0 D I M E N S I O N Z 0 ( 2 ) , Z ( 2 ) , D F ( 1 , 2 ) 381 C K R T PH I 3 8 2 I F ( Z M I L T . - 1 7 0 . D O ) GO TO 25 3 8 3 Y E X P Z 1 = Y 1 ' D E X P ( - Z ( 1 ) ) 384 I F I Z ( 1 ) L T . O . D O ) GO TO 20 3 8 5 10 D F ( 1 , 1 ) = 0 E S ' ( N I • ( Y E X P Z 1 * 1 / Y E X P Z 1 ) ) 3 8 8 GO TO 30 387 2 0 O F ! 1, 1 ) = O E S ' ( N I / Y E X P Z 1 ) 3BB C HRT P H I ' 389 GO TO 30 3 9 0 2 5 D F ( t . 1 ) = 0 . D 0 391 30 D F ( 1 , 2 1 = 0 . D O 3 9 2 R E T U R N 393 END 394 C 3 9 5 C 3 9 6 S U B R O U T I N E G S U B ( I . Z . G ) 397 C E V A L U A T E S THE B . C . 398 I M P L I C I T R E A L ' 6 ( A - H . N . 0 - Z ) 399 C O M M O N / D A T A / N P . R P , S I G M A , N O D , N D A . N A . N I , 0 , E S , O E S . B E T A , P S I , Y 1 , A , B 4 0 0 D I M E N S I O N 2 ( 2 ) 401 C 4 0 2 GO TO I 1 . 2 ) , 1 4 0 3 1 G = Z ( 1 ) - P S I 404 R E T U R N 4 0 5 2 G = Z ( 2 ) - 0 . D 0 4 0 6 R E T U R N 4 0 7 END 4 o e c ; 4 0 9 C 4 1 0 C 411 S U B R O U T I N E D G S U B t I , Z , D G ) 4 1 2 C E V A L U A T E S THE J A C O B I A N OF THE B . C . 4 1 3 I M P L I C I T R E A L ' 8 ( A - H , N , 0 - Z 1 414 D I M E N S I O N 2 ( 2 ) , D G ( 2 ) 4 1 5 C 4 1 6 D G M I c O . D O 4 1 7 D G ( 2 ) = 0 . D O 4 1 6 GO TO ( 1 . 2 ) . I 4 1 9 1 D G ! 1 ) = 1 . D O 4 2 0 R E T U R N 421 2 D G ( 2 ) = 1 . D 0 4 2 2 R E T U R N 4 2 3 END 4 2 4 C 4 2 5 C 4 2 6 S U B R O U T I N E D U M M Y ( X . Z . D M J U ) 427 R E T U R N 4 2 8 END 4 2 B C 4 3 0 431 S U B R O U T I N E HOINO 4 3 2 C P R I N T OUT THE T I T L E OF THE S O L U T I O N D A T A . 4 3 3 W R I T E I 1 . 6 9 8 ) 4 3 4 W R I T E ( 1 , 7 0 0 > 4 3 5 W R I T E I 2 . 6 9 9 ) 4 3 6 • m i T E ( 2 . 7 0 1 ) 4 3 7 C 4 3 8 6 9 8 F O R M A T ( ' E O M ' ) 4 3 8 6 9 9 F O R M A T ! ' N O N - E O M ' ) 4 4 0 7 0 0 F O R M A T ( 6 H X ( M I ) , I X . S H U ( V I , 8 X . B H U ' ( V / M I I . 5 X . 1 3 H N I X I I 1 / C M ' ' 3 1 . 441 • I X , 1 5 H N D D P ( X ) ( / C M " 3 ) , IX . 15HNDAMIXI ( / C M " 3 > , I X , 4 4 2 • 15HI0N D 0 P ( / C M " 3 ) . 1X , 15HSPC C H G ( / C M " 3 ) ) 4 4 3 701 F O R M A T ( 6 H X ( M I ) , 1 1 . S H U ( V ) , 9 X . B H U ' ( V / M I ) , 5 X , 4 4 4 • 1 3 H N I X M 1 / C M " 3 ) , I X , 1 4 H D L T C H G ( / C M " 3 ) ) 4 4 5 R E T U R N 4 4 8 END 4 4 7 C 4 4 8 C 4 4 9 S U B R O U T I N E . O E C O N I X . Z O , 2 1 ) 4 5 0 C O U T P U T THE S O L U T I O N P R O F I L E S 451 I M P L I C I T R E A L ' B ( A - H . N . O - Z ) 4 5 2 C O M M O N / D A T A / N P . R P , S I G M A , N D O , N D A . N A . N I . O . E S . O E S . B E T A , P S I . Y 1 . A , B 4 5 3 D I M E N S I O N Z 0 ( 2 ) . Z 1 I 2 I 4 5 4 R E A L ' 8 X . P 0 . N 0 . P 1 , N 1 . N D . N A 1 . N D D P . N D A M . D O P I O N . R H O 4 5 5 C 4 5 6 C G A U S S I A N DOPANT P R O F I L E 4 5 7 X N = ( X - R P ) / S I G M A 4 5 8 N D = N P ' D E X P ( - I N ' X N / 2 ) ' 1 . D 1 2 4 5 9 C C O M P U T E THE T O T A L CHARGE D I S T R I B U T I O N 4 6 0 Y E X P Z 0 = Y 1 ' D E X P ( - Z 0 ( 1 ) ) 461 N D O P = N D O ' ( 1 - 1 / ( 1 » A ' Y E X P Z 0 ) ) ' 1 . D 1 2 4 6 2 N D A M = N D A / ( 1 * B ' Y E X P Z 0 ) ' 1 . D 1 2 4 6 3 P 0 = N I ' V E X P Z 0 ' 1 . D 1 2 4 6 4 H 0 = N I / V E X P Z 0 ' I . D 1 2 4 B S N A 1 = N A ' 1 . D 1 2 4 6 6 I F ( 2 0 ( 1 ) . L T . 0 0 0 ) 0 0 TO 2 0 0 4 6 7 R H O = P O - N O • N D - N A 1 • N O O P - N O A M 4 6 S GO TO 300 4 6 9 2 0 0 R H O = - N O • N D - N A t • N D O P - N O A M 4 7 0 3 0 0 D 0 P I O N = N D » N D D P - N A 1 - N O A M 4 7 1 C 4 7 2 C C O N V E R T R E S U L T S IN V O L T S , V / M I C R O . OR / C U " 3 4 7 3 R Z 0 1 = Z 0 ( 1 ) ' B E T A 4 7 4 R Z 0 2 = - Z 0 ( 2 ) ' B E T A 4 7 5 C 4 7 6 C O U T P U T E Q U I L I B R I U M R E S U L T S TO I / O U N I T 1 4 7 7 W R I T E ! 1 ,7501 X , R Z 0 1 . R Z 0 2 . N 0 . H O O P . N O A M , O O P I O N , R H O 4 7 8 C N O N - E Q U I L I B R I U M R E S U L T S 4 7 9 V E X P Z 1 = V 1 ' D E X P ( - Z U 1 ) > 4 8 0 P 1 = N I ' Y E X P Z 1 M . D 1 2 4 8 1 N 1 = N I / Y E X P Z 1 ' 1 . 0 1 2 4 8 2 I F 1 2 1 ( 1 ) . L T . ODO) GO TO 4 0 0 4 8 3 D L T C H G = ( P 1 - N 1 ) - ( P 0 - N 0 ) 4 8 4 GO T O 5 0 0 4 8 5 4 0 0 0 L T C H G = - N 1 » N 0 4 8 6 C C O N V E R T R E S U L T S IN V O L T S , V / M I C R O , OR / C M " 3 4 8 7 5 0 0 R Z 1 1 = Z 1 ( 1 I ' B E T A 4 8 8 R Z 1 2 = - Z 1 I 2 ) ' B E T A 4 8 9 W R I T E ( 2 , 6 0 0 ) X , R Z 1 1 , R Z 1 2 , N 1 , D L T C H G 4 9 0 7 5 0 F O R M A T ( O P F 7 . 3 , I X , 7 ( I X , I P 0 1 2 . 5 ) ) 491 8 0 0 F O R M A T I O P F 7 . 3 , 1 X . 4 I I X . 1 P 0 1 2 . 5 I ) 4 9 2 R E T U R N 4 9 3 E N D 4 9 4 C 4 9 5 S U B R O U T I N E P R 0 C S S I O 0 . O 1 I 4 9 6 C P R O C E S S T H E S O L U T I O N 4 9 7 C 4 9 6 C T H E P R O G R A M C A L L S S U B R O U T I N E A P P S L N TO E V A L U A T E THE 4 9 9 C S O L U T I O N AT E A C H X . S U B R O U T I N E C E C O N TO COMPUTE E L E C T R O N 5 0 0 C C O N C . AND S U B R O U T I N E O E C O N TO OUTPUT THE S O L U T I O N . 5 0 1 C THE PROGRAM A L S O C O M P U T E S THE T O T A L C H A R G E ON THE G a A a 5 0 2 C U S I N G - E S ' Z ( 2 ) ' B E T A . 5 0 3 C 5 0 4 I M P L I C I T R E A L ' 8 ( A - H . N . 0 - Z ) 5 0 5 C O M M O N / D A T A / N P . R P , S I G M A , N D D , N O A , N A , N I , 0 , E S , Q E S . B E T A , P S I , Y 1 , A , B 5 0 6 C O U M O N / E O S O L N / F S P A C O . I S P A C O 5 0 7 C O M U O N / N Q S O L N / F S P A C 1 , I S P A C 1 5 0 8 C O U M O N / P O T L / V , S T E P , C O N S T 5 0 9 C O M M O N / X / X L . X R 5 1 0 D I M E N S I O N F S P A C O I 2 8 S 0 O 0 ) . F S P A C K 2 B 5 0 0 0 ) , Z 0 ( 2 ) , Z 1 ( 2 ) 511 D I M E N S I O N I S P A C O I 3 5 0 0 0 ) . I S P A C 1 ( 3 5 0 0 0 ) 5 1 2 I N T E G E R N F L A G 5 1 3 C 5 1 4 N F L A G = 0 5 1 5 S T E P 2 = S T E P / 2 5 1 6 C S E T N F L A G TO 1 S O T H A T THE P O T E N T I A L D I S T R I B U T I O N , F I E L D 5 1 7 C D I S T R I B U T I O N AND E T C • A R E O U T P U T , E . G . AT P S I = - 2 . 5 V . - 2 . 0 V 5 1 8 C - 1 . 5 , E T C . 5 1 9 T A R G E T = S T E P 5 2 0 DO 100 I d . 2 0 521 R E M N D R = O A B S ( P S I - T A R G E T ) 5 2 2 I F IREMNOR . L T . 0 A B S ( S T E P 2 ) ) N F L A G s l 5 2 3 I F ( N F L A G E O . 1) GO TO 150 5 2 4 T A R G E T b T A R G E T ' C O N S T 5 2 5 100 C O N T I N U E 5 2 6 150 C O N T I N U E 527 C I F N F L A G = 1 , P R I N T OUT T H E S O L U T I O N D A T A 5 2 8 I F ( N F L A G . E O . 1 ) C A L L HDING 5 2 9 C 5 3 0 C I F N F L A G = 1, E V A L U A T E THE S O L U T I O N F R O M X = XL TO XR. 531 C I F N F L A G o 1, E V A L U A T E THE S O L U T I O N ONLY AT X=0 TO G I V E O S . 5 3 2 C T H E I N T E R V A L ( X L . X R ) I S D I V I D E D TO 3 S U B I N T E R V A L S WITH 5 3 3 C D I F F E R E N T X - S T E P S I Z E S TO G I V E PROPER R E S O L U T I O N S 5 3 4 X = O . 0 D O 5 3 5 C A L L A P P S L N ( X . Z O . F S P A C O . I S P A C O ) 5 3 6 C A L L A P P S L N ( X , Z 1 , F S P A C 1 , I S P A C 1 I 537 C O S s T O T A L C H A R G E * ( E - F I E L O AT X = O I ' E S 5 3 8 0 0 = Z O ( 2 ) ' E S ' B E T A 5 3 9 0 1 = Z 1 ( 2 ) ' E S ' B E T A 5 4 0 C 541 I F ( N F L A G . N E . 1) GO TO 500 5 4 2 C A L L O E C O N ( X . Z O . Z I ) 6 4 3 X S T E P = O . O 0 0 2 D 0 ' X R 5 4 4 DO 2 0 0 1 = 1 . 2 0 0 5 4 5 X = X « X S T E P 5 4 6 C A L L A P P S L N ( I . Z O . F S P A C O . I S P A C O ) 5 4 7 C A L L A P P S L N ( X . 2 1 . F S P A C 1 , I S P A C 1 ) 5 4 8 C A L L O E C O N I I . Z D . Z D 5 4 9 2 0 0 C O N T I N U E 5 5 0 X S T E P * O . O O 2 5 O 0 * I R 551 D O 4 0 0 1 = 1 , 2 0 5 5 2 X = X » X S T E P 5 5 3 C A L L A P P S L N f X . Z O . F S P A C O , I S P A C O ) 5 5 4 C A L L A P P S L N ( X , Z 1 , F S P A C 1 , I S P A C 1 ) 5 5 5 C A L L 0 E C 0 N I X . Z 0 . Z 1 ) 5 5 6 4 0 0 C O N T I N U E 5 5 7 I S T E P = 0 . 0 1 D O ' I R 5 5 6 DO 4 2 5 1 = 1 . 7 9 5 5 9 X = X ' X S T E P 5 6 0 C A L L A P P S L N ( X , Z O . F S P A C O . I S P A C O ) 561 C A L L A P P S L N I X , Z 1 . F S P A C 1 , I S P A C 1 ) 5 6 2 C A L L O E C O N I X . 2 0 , 2 1 ) 5 6 3 4 2 5 C O N T I N U E 5 6 4 5 0 0 R E T U R N 5 6 5 END 5 6 6 C 5 6 7 C 5 6 6 S U B R O U T I N E C V P F L R I N . C I 5 6 9 C 5 7 0 C C-V P R O F I L E C A L C U L A T I O N S 571 C 5 7 2 C T H E A P P A R E N T DOPANT C O N C E N T R A T I O N I S C A L C U L A T E D FROM 5 7 3 C THE C - V P R O F I L E A C C O R D I N G TO THE C A N O N I C A L E O U A T I O N S . 5 7 4 C THE METHOD OF C E N T R A L D I F F E R E N C E I S U S E D TO E V A L U A T E A L L 5 7 5 C D I F F E R E N T I A T I O N S . 5 7 6 C 5 7 7 I M P L I C I T R E A L ' 8 ( A - H , N , 0 - Z ) 5 7 6 C O M M O N / D A T A / N P . R P , S I G M A . N D O . N O A , N A . N I . O . E S . O E S , B E T A , P S I . Y 1 . A . B 5 7 9 C O M U O N / P O T L / V . S T E P . C O N S T 5 8 0 R E A L ' S H , V . C ( 5 I 0 ) . R C C I 5 1 0 ) S 8 1 R E A L ' S IT .CCON 5 8 2 C C C O N I S T H E C O M P U T E D DOPANT C O N C E N T R A T I O N AT THE P O S I T I O N 5 8 3 C O F 5 8 4 C 5 8 5 I N T E G E R N 5 8 6 I N T E G E R L I S T d W ' / 5 8 7 * R n E ( 4 , 5 3 2 ) 5 8 8 S T E P = S T E P ' B E T A 5 8 9 V S U R F o V 5 9 0 C C A L C U L A T E 1 / C " 2 . AND OUTPUT THE C A P A C I T A N C E AND 1 / C " 2 5 9 1 DO 4 7 5 J = 1 , N 5 9 2 RCC< J ) = 1 / ( C I J > " 2 ) 5 9 3 H R I T E I 4 . S 4 0 ) V S U R F . C ( J ) , R C C ( J l 5 9 4 4 7 5 V S U R F = V S U R F « S T E P 5 9 5 C 5 9 8 c C A L C U L A T E THE C A R R I E R C O N C E N T R A T I O N 5 9 7 c 5 9 8 K R I T E ( 7 , 5 3 3 > 6 9 9 0 = 1 . 6 0 2 1 8 0 - 1 9 6 0 0 E S = 1 3 . 1 ' 8 . 8 5 4 D - 1 8 8 0 1 H = 2 / ( 0 ' E S ) 8 0 2 V S U R F = V « S T E P / 2 8 0 3 N=N- 1 8 0 4 DO 4 8 5 J = I , N 6 0 5 C C 0 N = H ' 1 . 0 1 2 / 1 ( R C C < J ) - R C C < J » I I l / S T E P ) 6 0 8 « = E S ' ( 1 / C ( J ) » 1 / C < J « 1 ) ) / 2 8 0 7 W R 1 T E ( 7 , 5 4 0 ) V S U R F . H . C C O N 6 0 S 4 8 5 V S U R F = V S U R F « S T E P 6 0 9 5 3 2 F O R M A T { 2 X , 1HV, 1 3 X , 1 0 H C 1 F / M P * 2 ) , 3 X , 1 6 H 1 / C 2 ( F / M I " 2 ) > 6 1 0 5 3 3 FORMAT ( 4 X . 1 H V , 1 2 X , 9 H H ( M I C R O N ) , 6 X , 1 2 H C C 0 N I / C M ' • 3 1 ) 6 1 1 5 4 0 F 0 R M A T ( 0 P F 7 . 3 . 2 X . 2 1 2 X , 1 P D 1 2 . 5 ) ) 6 1 2 R E T U R N 8 1 3 END Appendix IV Listing of Program COLSYS COLSYS is a robust numerical program which solves multi-point boundary value problems. The program was written by Drs. U . Ascher, J. Christiansen and R. D . Russel, and it is solely available in MTS from UBC Computing Centre. The listing of the program is included here for reference purposes in case it will not be available to readers at a later date. 124 P A R T I MAIN S T O R A G E A L L O C A T I O N AND PROGRAM CONTROL S U B R O U T I N E S S U B R O U T I N E C O L S Y S I N C O M P . U, A L E F T , A R I G H T , Z E T A , I P A R , L T O L . 1 T O L . F I X P N T , I S P A C E . F S P A C E , I F L A G , F S U B , 2 D F S U B . G S U 8 , D G S U B , S O L U T N ) S U B R O U T I N E C O L S Y S S O L V E S A M U L T I - P O I N T BOUNDARY V A L U E P R O B L E M FOR A M I X E D ORDER S Y S T E M OF O O E - S G I V E N BY ( M I D ) U = F I X ; Z ( U I X ) ) ) 1 = 1 NCOMP I I A L E F T . L T . X . L T . A R I G H T , G I Z E T A I J ) ; Z I U I Z E T A I J I ) ) > = 0 J = 1 MSTAR J M S T A R = M ( 1 ) ' M ( 2 ) « . . . ' M I N C O M P I WHERE T U = (U , U U 1 I S THE E X A C T S O L U T I O N V E C T O R 1 2 NCOMP ( M I ) U I S THE M I = M I I ) TH D E R I V A T I V E OF U I I ( 1 ) ( M i l ) ( M N C O M P - 1 ) T Z I U ( X ) ) = ( U I X ) , U ( X ) U (X ) U ( X ) ) 1 1 1 NCOMP F < X , Z ( U > ) I S A ( G E N E R A L L Y ) N O N L I N E A R F U N C T I O N OF I Z ( U ) n Z ( U ( X ) ) . G t Z E T A ( J ) ; Z ( U ) ) I S A ( G E N E R A L L Y ) N O N L I N E A R F U N C T I O N J U S E D TO R E P R E S E N T A BOUNDARY C O N D I T I O N . THE BOUNDARY P O I N T S S A T I S F Y A L E F T . L E . Z E T A ( l ) . L E . . . . L E . Z E T A ( M S T A R ) . L E . A R I G H T THE O R D E R S MI O F T H E D I F F E R E N T I A L E O U A T I O N S S A T I S F Y M1 . L E . M2 . L E L E . MNCOMP . L E . 4 . W R I T T E N BY U . A S C H E R , D E P A R T M E N T OF COMPUTER S C I E N C E . U N I V E R S I T Y OF B R I T I S H C O L U M B I A , V A N C O U V E R . B . C , CANADA V6T 1W5 J . C H R I S T I A N S E N AND R . D . R U S S E L L . M A T H E M A T I C S D E P A R T M E N T , S IMON F R A S E R U N I V E R S I T Y , B U R N A B Y , B . C . CANADA V5A 1S6 METHOD THE METHOD U S E D TO A P P R O X I M A T E THE S O L U T I O N U I S C O L L O C A T I O N AT G A U S S I A N P O I N T S , U S I N G B - S P L I N E S OF ORDER K » M I AND C O N T I N U I T Y MI -1 IN THE I • TH COMPONENT , I = 1 N C O M P . H E R E . K I S THE NUMBER OF C O L L O C A T I O N P O I N T S PER S U B I N T E R V A L AND I S C H O S E N S U C H THAT K . G E . M I N C O M P I . MAIN R E F E R E N C E S ( I I U . A S C H E R . J . C H R I S T I A N S E N AND R . D . R U S S E L L . A C O L L O C A T I O N S O L V E R FOR M I X E D ORDER S Y S T E M S OF BOUNDARY V A L U E P R O B L E M S T E C H . R E P . 7 7 - 1 3 . D E P T . COMPUTER S C . , U N I V . B . C . , V A N C O U V E R , C A N A O A . A L S O IN M A T H . COMP. 33 ( 1 9 7 9 ) . 6 5 9 - 6 7 9 . ( 2 ) U . A S C H E R . J . C H R I S T I A N S E N AND R . D . R U S S E L L , C O L S Y S - A C O L L O C A T I O N COOE FOR BOUNDARY V A L U E P R O B L E M S P R O C . C O N F . F O R C O D E S FOR B V P - S IN O O E - S . H O U S T O N . T E X A S , 1 9 7 6 . OTHER R E F E R E N C E S ( 3 ) U . A S C H E R AND R . D . R U S S E L L E V A L U A T I O N OF B - S P L I N E S FOR S O L V I N G S Y S T E M S OF BOUNDARY V A L U E P R O B L E M S T E C H . R E P . 7 7 - 1 4 , D E P T . COMPUTER S C . . U N I V . B . C . . V A N C O U V E R , C A N A O A . ( 4 ) C . DEBOOR AND R. W E I S S S O L V E B L O K : A P A C K A G E FOR S O L V I N G ALMOST B L O C K D I A G O N A L L I N E A R S Y S T E M S , WITH A P P L I C A T I O N S TO S P L I N E A P P R O X I M A T I O N AND THE N U M E R I C A L S O L U T I O N OF ORDINARY D I F F E R E N T I A L E O U A T I O N S MRC T E C H R E P O R T 1 6 2 5 , U N I V E R S I T Y OF W I S C O N S I N - M A D I S O N (51 R. D . R U S S E L L AND J . C H R I S T I A N S E N A D A P T I V E M E S H S E L E C T I O N S T R A T E G I E S FOR S O L V I N G BOUNDARY V A L U E P R O B L E M S S I A M J . N U M E R . A N A L . 7 ( 1 9 7 6 ) , 6 0 - 6 0 . INPUT TO C O L S Y S V A R I A B L E S NCOMP - N O . OF D I F F E R E N T I A L E O U A T I O N S (NCOMP . L E . 20 ) M ( J ) - ORDER OF THE J - T H D I F F E R E N T I A L E O U A T I O N ( M l J ) . L E M l J » 1 1 AND MSTAR = M i l l • ... * U ( N C O M P ) L E . 40 I A L E F T - L E F T END OF I N T E R V A L A R I G H T - R I GHT END OF I N T E R V A L 2 E T A I J I - J - T H S I D E C O N D I T I O N P O I N T (BOUNDARY POINT I. MUST H A V E Z E T A I J ) . L E . Z E T A I J ' I ) I P A R - AN I N T E G E R ARRAY D I M E N S I O N E D AT L E A S T 1 1 . A L I S T OF THE P A R A M E T E R S IN I P A R AND THEIR MEANING F O L L O W S . SOME P A R A M E T E R S ARE RENAMED IN C O L S Y S ; T H E S E NEW NAMES ARE G I V E N IN P A R E N T H E S E S . I P A R I 1 I ( = N O N L I N I = 0 I F THE P R O B L E M I S L I N E A R = 1 IF THE P R O B L E M I S N O N L I N E A R I P A R I 2 I = N O . OF C O L L O C A T I O N P O I N T S PER S U B I N T E R V A L < = K I WHERE MINCOMPI . L T . K . L E . 7 . IF I P A R I 2 1 = 0 T H E N C O L S Y S S E T S K b MAX ( M ( N C 0 M P ) « 1 , 6 -M INCOMPI I I P A R I 3 ) = N O . OF S U 8 I N T E R V A L S IN T H E I N I T I A L MESH I = N ) . IF I P A R O ) = 0 T H E N C O L S Y S A R B I T R A R I L Y S E T S N = 5 . I P A R I 4 I = N O . OF S O L U T I O N AND D E R I V A T I V E T O L E R A N C E S . ( = NTOL ) WE R E Q U I R E 0 . I T . NTOL . L E . M S T A R . I P A R I S ) » D I M E N S I O N O F F S P A C E . < « NOIMF I 1 P A R I 6 ) = D I M E N S I O N OF I S P A C E . ( * ND1MI I I P A R I 7 I - O U T P U T CONTROL ( = I P R I N T I = -1 FOR F U L L D I A G N O S T I C P R I N T O U T = 0 FOR S E L E C T E D P R I N T O U T = 1 FOR NO P R I N T O U T = 0 C A U S E S C O L S Y S TO G E N E R A T E A UNIFORM I N I T I A L M E S H . = 1 IF THE I N I T I A L MESH IS P R O V I D E D BY THE U S E R . IT I S D E F I N E D IN F S P A C E AS F O L L O W S : THE MESH A L E F T = X ( 1 ) . L T . X I 2 I . L T L T . X I N ) . L T . X I N * 1 1 s A R I G H T WILL OCCUPY F S P A C E ! 1> F S P A C E I N ' l ) . THE USER N E E D S TO S U P P L Y ONLY THE I N T E R I O R MESH P O I N T S F S P A C E I J ) = X I J ) . J = 2 N . E 2 IF THE I N I T I A L MESH I S S U P P L I E D BY THE USER AS WITH I P A R ( 8 I = 1 . AND IN A D D I T I O N NO A D A P T I V E MESH S E L E C T I O N I S TO B E D O N E . I P A R I 9 ) I = I G U E S S I = 0 I F NO I N I T I A L G U E S S FOR THE S O L U T I O N I S P R O V I D E D . = I IF AN I N I T I A L G U E S S I S P R O V I D E D BY THE USER IN S U B R O U T I N E S O L U T N . = 2 IF AN I N I T U L MESH AND A P P R O X I M A T E S O L U T I O N C O E F F I C I E N T S ARE P R O V I D E D BY THE USER IN F S P A C E . ( T H E FORMER AND NEW MESH ARE THE SAME I. = 3 IF A FORMER MESH AND AN A P P R O X I M A T E S O L U T I O N C O E F F I C I E N T S ARE P R O V I D E D BY THE USER IN F S P A C E . AND THE NEW MESH I S TO BE TAKEN TWICE AS C O A R S E ; I . E . . E V E R Y SECOND P O I N T FROM THE FORMER M E S H . = 4 IF IN A D D I T I O N TO A FORMER I N I T I A L MESH AND AN A P P R O X I M A T E S O L U T I O N C O E F F I C I E N T S , A NEW MESH I S P R O V I D E D IN F S P A C E AS W E L L . ( S E E D E S C R I P T I O N OF OUTPUT FOR F U R T H E R D E T A I L S ON I G U E S S = 2 . 3 , AND 4 . 1 I P A R I 1 0 1 = 0 I F THE P R O B L E M I S R E G U L A R = 1 I F THE F I R S T R E L A X F A C T O R I S = R S T A R T . AND T H E N O N L I N E A R I T E R A T I O N DOES NOT R E L Y ON P A S T C O V E R G E N C E ( U S E FOR AN E X T R A S E N S I T I V E N O N L I N E A R P R O B L E M O N L Y ) . = 2 I F WE ARE TO R E T U R N I M M E D I A T E L Y UPON ( A ) TWO S U C C E S S I V E N O N C O N V E R G E N C E S , OR IB) A F T E R O B T A I N I N G ERROR E S T I M A T E FOR THE F I R S T T I M E . I P A R I 11)= N O . OF F I X E D P O I N T S IN THE MESH OTHER THAN A L E F T AND A R I G H T . I « NFXPNT , THE D I M E N S I O N OF F I X P N T ) L T O L - AN ARRAY OF D I M E N S I O N I P A R I 4 I . L T O L U I = L S P E C I F I E S THAT THE J - T H T O L E R A N C E IN TOL C O N T R O L S THE ERROR IN THE L - T H COMPONENT OF Z I U ) . A L S O R E O U I R E THAT 1 . L E . L T 0 L I 1) . L T . L T O L I 21 . L T L T . L T 0 L 1 N T 0 L ) . L E . M S T A R TOL - AN ARRAY OF O I M E N S I O N I P A R I 4 ) . T O L ( J ) I S THE ERROR T O L E R A N C E ON THE L T O L I J ) - T H COMPONENT O F Z I U ) . T H U S . THE CODE A T T E M P T S TO S A T I S F Y F O R J=1 N T O L ON E A C H S U B I N T E R V A L A B S I Z I V I - Z I U I ) . L E . T O L I J I ' A B S I Z I U I ) « T O L ( J ) L T O L I J ) L T O L I J ) I F V I X ) I S T H E A P P R O X I M A T E S O L U T I O N V E C T O R . F I X P N T • A N ARRAY OF D I M E N S I O N I P A R I 1 1 1 . IT C O N T A I N S THE P O I N T S , OTHER THAN A L E F T ANO A R I G H T , WHICH A R E TO B E I N C L U D E D IN E V E R Y M E S H . I S P A C E - AN I N T E G E R WORK ARRAY OF O I M E N S I O N I P A R I B ) . I T S S I Z E P R O V I D E S A C O N S T R A I N T ON NMAX, THE MAXIMUM NUMBER OF S U B I N T E R V A L S . CHOOSE I P A R I 6 ) A C C O R D I N G TO THE FORMULA I P A R I 6 I . G E . N M A X ' N S I Z E I WHERE N S I Z E I = 3 • KDM - NREC WITH KDM = KD • MSTAR ; KD = K • NCOMP ; N R E C u N O . OF R IGH T END BOUNDARY C O N D I T I O N S . F S P A C E - A R E A L WORK ARRAY OF D I M E N S I O N I P A R I 5 1 . I T S S I Z E P R O V I D E S A C O N S T R A I N T ON NMAX. C H O O S E I P A R ( 5 I A C C O R D I N G TO THE FORMULA I P A R ( S ) . G E . N M A X ' N S I Z E F WHERE N S I Z E F « 4 « K « 2 , K D » ( 4 » 2 ' K ) • MSTAR • ( K D M - N R E C I ' ( K D M « 1 ) . I F L A G • T H E MOOE OF R E T U R N FROM C O L S Y S . = 1 F O R NORMAL R E T U R N E 0 I F THE C O L L O C A T I O N MATRIX I S S I N G U L A R . =•1 I F THE E X P E C T E D N O . OF S U B I N T E R V A L S E X C E E D S S T O R A G E S P E C I F I C A T I O N S . = 2 IF THE N O N L I N E A R I T E R A T I O N HAS NOT C O N V E R G E D . = - 3 I F T H E R E I S AN INPUT D A T A E R R O R . USER S U P P L I E O S U B R O U T I N E S THE F O L L O W I N G S U B R O U T I N E S MUST BE D E C L A R E D E X T E R N A L IN T H E MAIN PROGRAM WHICH C A L L S C O L S Y S . NAME OF S U B R O U T I N E F D R E V A L U A T I N G F I X . Z I U I X ) ) ) = T ( F F ) AT A P O I N T X IN ( A L E F T . A R I G H T ) . IT 1 NCOMP S H O U L D H A V E T H E H E A D I N G S U B R O U T I N E F S U B IX . Z , F ) WHERE F I S T H E V E C T O R C O N T A I N I N G THE V A L U E OF F K X . Z I U ) ) I N T H E 1 - T H COMPONENT AND 1 Z ( U ( » l ) = U t t > 2 I M S T A R ) ) I S D E F I N E D AS A B O V E UNDER P U R P O S E . D F S U B • NAME OF S U B R O U T I N E F O R E V A L U A T I N G THE J A C O B I A N OF F I X . Z I U I I AT A P O I N T X . IT SHOULD H A V E THE H E A D I N G S U B R O U T I N E D F S U B (X . Z , O F ) WHERE Z I U ( X ) ) I S D E F I N E D AS FOR F S U B AND THE (NCOMP) BY I U S T A R ) ARRAY OF SHOULD B E F I L L E O BY THE P A R T I A L D E R I V -A T I V E S OF F . V I Z . FOR A P A R T I C U L A R C A L L ONE C A L C U L A T E S D F I I . J ) = D F I / D Z J . 1 = 1 NCOMP J=1 M S T A R . GSUB - NAME O F S U B R O U T I N E FOR E V A L U A T I N G THE 1 - T H COMPONENT OF G I X . Z I U I X ) ) ) = G I Z E T A I D . Z I U I Z E T A I l ) ) ) ) AT A P O I N T X = I Z E T A I I ) WHERE 1 . L E . 1 . L E . M S T A R . IT SHOULD H A V E THE H E A D I N G S U B R O U T I N E GSUB II . Z , G) WHERE 2 I U ) I S AS F O R F S U B . AND 1 AND G=G A R E AS A B O V E . 1 NOTE THAT IN C O N T R A S T TO F IN F S U B , H E R E ONLY ONE V A L U E P E R C A L L I S R E T U R N E D IN G . O G S U B - NAME OF S U B R O U T I N E FOR E V A L U A T I N G THE I - T H ROW OF THE J A C O B I A N OF G ( X . U I X ) ) . IT SHOULD HAVE THE H E A D I N G S U B R O U T I N E DGSUB 11 , Z . DG) WHERE Z I U ) I S AS FOR F S U B , I AS FOR GSUB AND THE M S T A R -V E C T O R DG SHOULD B E F I L L E D WITH THE P A R T I A L D E R I V A T I V E S OF G , V I Z , FOR A P A R T I C U L A R C A L L ONE C A L C U L A T E S D G I I . J ) = DG1 / D Z J J=1 M S T A R . S O L U T N - NAME OF S U B R O U T I N E TO E V A L U A T E THE I N I T I A L A P P R O X I M A T I O N FOR Z I U I X I I AND FOR O M V A L ( U ( X ) ) = V E C T O R OF THE M J - T H D E R I V A T I V E S OF U I X ) . IT SHOULD H A V E THE H E A D I N G S U B R O U T I N E S O L U T N IX , Z , O M V A L ) N O T E THAT T H I S S U B R O U T I N E IS N E E D E D ONLY I F U S I N G I P A R I B ) = 1. AND T H E N A L L MSTAR COMPONENTS OF Z AND NCOMP COMPONENTS OF DMVAL SHOULO B E S P E C I F I E O FOR ANY X . A L E F T . L E . X . L E . A R I G H T . U S E OF O U T P U T FROM C O L S Y S S O L U T I O N E V A L U A T I O N ON R E T U R N FROM C O L S Y S . THE A R R A Y S F S P A C E AND I S P A C E C O N T A I N I N F O R M A T I O N S P E C I F Y I N G THE A P P R O X I M A T E S O L U T I O N . T H E U S E R CAN PRODUCE THE S O L U T I O N V E C T O R Z( U I X ) ) AT ANY P O I N T I, A L E F T . L E . X . L E . A R I G H T , BY THE S T A T E M E N T , C A L L A P P S L N I X , Z , F S P A C E . I S P A C E ) WHEN S A V I N G T H E C O E F F I C I E N T S FOR L A T E R R E F E R E N C E . O N L Y I S P A C E ! 1) I S P A C E ! 7 . N C O M P ) AND F S P A C E ! 1 ) F S P A C E I I S P A C E ( 7 ) ) N E E D TO B E S A V E D AS T H E S E A R E THE Q U A N T I T I E S U S E D BY A P P S L N . S I M P L E C O N T I N U A T I O N A F O R M E R L Y O B T A I N E D S O L U T I O N CAN E A S I L Y BE U S E D AS THE F I R S T A P P R O X I M A T I O N FOR THE N O N L I N E A R I T E R A T I O N FOR A NEW P R O B L E M BY S E T T I N G ( I G U E S S =) I P A R I 9 I = 2 . 3 OR 4 . I F T H E FORMER S O L U T I O N HAS J U S T B E E N O B T A I N E D THEN THE V A L U E S N E E D E D TO D E F I N E THE F I R S T A P P R O X I M A T I O N ARE A L R E A D Y IN I S P A C E AND F S P A C E . A L T E R N A T I V E L Y . IF THE FORMER S O L U T I O N WAS O B T A I N E D IN A P R E V I O U S RUN AND I T S C O E F F I C I E N T S MERE S A V E D THEN THOSE C O E F F I C I E N T S MUST 'BE P U T B A C K I N T O I S P A C E ( 1 ) I S P A C E ! 7 *NCOMP) AND F S P A C E ! t ) F S P A C E ! I S P A C E ! 7 ) ) . FOR I P A R I 9 ) . 2 OR 3 S E T I P A R I 3 ) • I S P A C E ! 1 ) I • THE S I Z E OF T H E P R E V I O U S MESH I. FOR I P A R ( B ) « 4 T H E USER S P E C I F I E S A NEW MESH OF N S U B I N T E R V A L S AS F O L L O W S . THE V A L U E S IN F S P A C E M I F S P A C E ! I S P A C E ! 7 ) ) H A V E TO B E S H I F T E D BY N-1 L O C A T I O N S TO F S P A C E ( N « 2 ) F S P A C E ! I S P A C E ! 7 ) » N . t ) AND THE NEW MESH I S THEN S P E C I F I E D IN F S P A C E ( I ) F S P A C E I N ' l ) . A L S O S E T I P A R I 3 ) = N . P A C K A G E S U B R O U T I N E S THE F O L L O W I N G D E S C R I P T I O N G I V E S A B R I E F O V E R V I E W OF HOW THE P R O C E D U R E I S B R O K E N DOWN INTO THE S U B R O U T I N E S WHICH MAKE UP THE P A C K A G E C A L L E D C O L S Y S . FOR F U R T H E R D E T A I L S THE USER SHOULD R E F E R TO D O C U M E N T A T I O N IN THE V A R I O U S S U B R O U T I N E S AND TO THE R E F E R E N C E S C I T E D A B O V E . THE S U B R O U T I N E S F A L L I N T O FOUR G R O U P S : P A R T 1 - THE M A I N S T O R A G E A L L O C A T I O N AND PROGRAM CONTROL S U B R O U T I N E S . C O L S Y S - T E S T S INPUT V A L U E S , DOES I N I T I A L I Z A T I O N AND B R E A K S UP THE WORK A R E A S , F S P A C E AND I S P A C E , I N T O THE ARRAYS U S E D BY THE PROGRAM. C O N T R L - I S THE A C T U A L D R I V E R OF THE P A C K A G E . T H I S R O U T I N E C O N T A I N S T H E S T R A T E G Y FOR N O N L I N E A R P R O B L E M S . P A R T 2 - MESH S E L E C T I O N AND ERROR E S T I M A T I O N S U B R O U T I N E S C O N S T S - I S C A L L E D ONCE BY C O L S Y S TO I N I T I A L I Z E C O N S T A N T S WHICH ARE U S E D FOR ERROR E S T I M A T I O N AND MESH S E L E C T I O N . NEWMSH - G E N E R A T E S M E S H E S . IT C O N T A I N S THE T E S T TO D E C I D E WHETHER OR NOT TO R E D I S T R I B U T E A M E S H . ERRCHK - P R O D U C E S ERROR E S T I M A T E S AND C H E C K S A G A I N S T THE T O L E R A N C E S AT E A C H S U B I N T E R V A L PART 3 - C O L L O C A T I O N S Y S T E M S E T - U P S U B R O U T I N E S L S Y S L V - C O N T R O L S THE S E T - U P AND S O L U T I O N OF THE L I N E A R A L G E B R A I C S Y S T E M S OF C O L L O C A T I O N E O U A T I O N S WHICH A R I S E AT E A C H NEWTON I T E R A T I O N . B L D B L K - I S U S E D BY L S Y S L V TO S E T UP THE E O U A T I O N I S I A S S O C I A T E D WITH A S I D E C O N D I T I O N POINT OR A C O L L O C A T I O N P O I N T . P A R T 4 - B - S P L I N E S U B R O U T I N E S A P P S L N S E T S UP A S T A N D A R D C A L L TO APPROX . APPROX E V A L U A T E S A P I E C E W I S E P O L Y N O M I A L S O L U T I O N . B S P F I X E V A L U A T E S ( I . E . THE THE MESH INDEPENDENT B - S P L I N E S F I X E D B - S P L I N E S ) 6 S P V A R E V A L U A T E S V A R Y I N G B THE MESH D E P E N D E N T B - S P L I N E S ( I . E S P L I N E S ) THE B S P O E R G E N E R A T E S V A L U E S F O R THE D E R I V A T I V E S N E E D E D TO S E T UP THE C O L L O C A T I O N E O U A T I O N S . A P P D I F - G E N E R A T E S A D I V I D E D D I F F E R E N C E T A B L E FROM THE B - S P L I N E C O E F F I C I E N T S FOR A C O L L O C A T I O N S O L U T I O N . THE T A B L E I S U S E O IN APPROX . HORDER - E V A L U A T E S THE H I G H E S T ORDER D E R I V A T I V E S OF THE CURRENT C O L L O C A T I O N S O L U T I O N U S E D FOR MESH R E F I N E M E N T . TO S O L V E THE L I N E A R S Y S T E M S OF C O L L O C A T I O N E Q U A T I O N S C O N S T R U C T E D IN P A R T 3 . C O L S Y S U S E S THE P A C K A G E S O L V E B L O K OF OE BOOR AND W E I S S ( T O A P P E A R IN T O M S ) . I M P L I C I T R E A L ' S ( A - H . O - Z ) COMMON / O R D E R / K . N C . M S T A R . K D . K D M . M N S U M . M T ! 2 0 1 COMMON / A P P R / N , N O L O . N M A X , N A L P H A , M S H F L G , M S H N U M . M S H L M T . M S H A L T COMMON / S I D E / T Z E T A ( 4 0 ) . T L E F T , T R I G H T , I Z E T A , I W R COMMON / N O N L N / P R E C I S , N O N L I N , I T E R . L I M I T . I C A R E , I P R I N T . I G U E S S . I F R E E Z COMMON / E O O R D / I N D ( 5 ) , I N E 0 I 2 0 ) , M N 0 I 5 I . N D . NEQ COMMON / E R R O R S / T T L I 4 0 ) , W G T M S H ( 4 0 ) . T O L I N I 4 0 ) . R O 0 T I 4 0 ) . 1 J T O L 1 4 0 ) . L T T O L 1 4 0 ) . N T O L E X T E R N A L F S U B , D F S U B , G S U B , D G S U B , S O L U T N D I M E N S I O N M I D . Z E T A ( I ) , I P A R I 1 ) , L T 0 L I 1 I , T O L I 1 ) , 1 F I X P N T ! 1 ) . I S P A C E ! 1 ) . F S P A C E ( I ) THE A C T U A L S U B R O U T I N E C O L S Y S S E R V E S AS AN I N T E R F A C E WITH THE P A C K A G E OF S U B R O U T I N E S R E F E R R E D TO C O L L E C T I V E L Y AS C O L S Y S . T H E S U B R O U T I N E S E R V E S TO T E S T SOME OF THE INPUT P A R A M E T E R S , RENAME SOME OF T H E P A R A M E T E R S ( T O MAKE UNDER-S T A N D I N G OF THE CODING E A S I E R ) , TO DO SOME I N I T I A L I Z A T I O N , AND TO B R E A K THE WORK A R E A S F S P A C E AND I S P A C E UP INTO THE A R R A Y S N E E D E D BY THE P R O G R A M . . . S P E C I F Y MACHINE D E P E N D E N T O U T P U T UNIT IWR AND COMPUTE M A C H I N E D E P E N D E N T CONSTANT P R E C I S * 100 ' MACHINE UNIT ROUNDOFF IWR E t P R E C I S E I'.DO 10 P R E C I S E P R E C I S / 2 . D O P R E C P 1 E P R E C I S • 1 .DO I F ( P R E C P 1 . G T . 1 . D 0 ) GO TO 10 P R E C I S • P R E C I S * 1 0 0 . D O IN C » S E I N C O R R E C T INPUT D A T A I S D E T E C T E D , T H E PROGRAM R E T U R N S I M U E O I A T E L T K I T H I F L A G . - J I F L A G > -1 I F (NCOMP . L T . 1 . O R . NCOMP O T . 20) I F ( M I D . L T . 1 O R . M(NCOMP) . G T . 4 ) I F (NCOMP E O . 1) DO 20 1=2 .NCOMP IF ( M I I - 1 ) . G T . M I D ) 2 0 C O N T I N U E 1 0 C O N T I N U E . . RENAME SOME OF THE P A R A M E T E R S AND S E T D E F A U L T V A L U E S . N D N L I N « I P A R I 1 ) K > I P A R I 2 I I F IK . E O . 0) K • MAIOI M ( N C O M P ) « l . 5 - M I N C O M P ) ) H > I P A R I 3 1 IF (N . E O . 0) N = 6 I R E A D = I P A R I B ) I G U E S S ' I P A R I B ) IF INONLIN . E O . 0 . A N D . I G U E S S . E O . 1) I G U E S S « 0 I F ( I G U E S S G E . 2 A N D . I R E A D E O . 0 ) I R E A D = 1 I C A R E = I P A R I 1 0 1 N T O L = I P A R I 4 1 NDIMF = I P A R I S ) ND IU I = I P A R I 6 ) N F X P N T • I P A R I 1 1 ) I P R I H T = I P A R 1 7 ) MSTAR » 0 MNSUM s 0 DO 40 1=1 .NCOMP MNSUM = MNSUM • M i l I " 2 4 0 MSTAR = MSTAR - M i l l DO 5 0 1=1 .NCOMP 5 0 M T U ) • M i l ) DO CO 1 = 1 . M S T A R BO T Z E T A 1 1 ) = 2 E T A I I 1 DO 70 1 = 1 . N T O L L T T O L ( I ) « L T O L ( I ) 7 0 T O L I N ( I ) = T O L I I I T L E F T = A L E F T T R I G H T * A R I G H T NC « NCOMP KD = K * NCOMP KDM « KO • MSTAR . . . P R I N T THE INPUT O A T A F O R C H E C K I N G . I F ( I P R I N T . G T . (* 111 0 0 TO 100 IF ( N O N L I N . G T . 01 0 0 TO 80 WRITE I 1 W R . 2 6 0 ) N C O M P . ( M I I P I . I P = 1 , N C O M P ) GO TO BO 60 W R I T E I I W R . 2 7 0 ) N C O M P , I M I I P ) , I P = 1 , N C O M P ) 8 0 " R I T E I I W R . 2 6 0 ) ( Z E T A I I P ) , I P = 1 , M S T A R ) •TRITE ( I W R . 2 9 0 ) K • R I T E ( 1 W R . 3 0 0 ) ( L T O L I I P ) . I P = 1 , N T 0 L ) W R I T E ( I W R . 3 1 0 ) ( T O L I I P ) . I P = 1 , N T 0 L ) R E T U R N R E T U R N GO TO 30 R E T U R N I F ( I G U E S S . G E . 2) W R I T E I I W R . 3 2 0 ) I F ( I R E A D . E O . 2 ) W R I T E ( I n n . 3 3 0 ) IF ( N F X P N T G T . 0 ) WRITE ( I W R . 3 4 0 ) N F X P N T , t I F I X P N T I I P ) , I P = I . N F X P N T ) 100 C O N T I N U E C C . . . CHECK FOR C O R R E C T N E S S OF DATA C I F (K . L T . 0 . O R . K . G T . 7) R E T U R N I F (N . L T . 0) R E T U R N IF I I R E A D . L T . 0 O R . I R E A D . G T . 2 ) R E T U R N I F ( I G U E S S . L T . 0 . O R . I G U E S S . G T . 4 ) R E T U R N IF I I C A R E L T . 0 OR I C A R E . G T . 21 R E T U R N IF ( N T O L . L T . 0 . O R . N T O L . G T . M S T A R ) R E T U R N IF ( N F X P N T . L T . 01 R E T U R N IF ( I P R I N T . L T . ( - 1 ) . O R . I P R I N T . G T . II R E T U R N • IF (MSTAR . L T . 0 . O R . MSTAR . G T . 4 0 ) R E T U R N C . . . S E T L I M I T S ON I T E R A T I O N S AND I N I T I A L I Z E C O U N T E R S . C . . . L I M I T = MAXIMUM NUMBER OF NEW70N I T E R A T I O N S PER MESH C . . . S E E S U B R O U T I N E NEWMSH FOR THE R O L E S OF MSHLMT , M S H F L G . C . . . MSHNUM . ANO M S H A L T . C M5HLMT « 3 M S H F L G • 0 MSHNUM « 1 M S H A L T • 1 L I M I T = 4 0 C C . . . COMMUTE THE M A X I U M P O S S I B L E N FOR T H E G I V E N S I Z E S OF C . . . I S P A C E AND F S P A C E . C N R E C • 0 DO 110 1 1 = 1 , M S T A R I • MSTAR • 1 - I I I F ( Z E T A I I ) . L T . A R I G H T ) GO TO 110 N R E C • I I 110 C O N T I N U E N F I X I • N R E C N S I Z E I • 3 • K D U - N R E C N F I I F « N R E C ' ( K D M * 1 1 . 2 • MNSUM • 2 • MSTAR • 3 N S I Z E F . * 4 • K • 2 • KD • ( 4 « 2 ' K ) • M S T A R . K K D M - N R E C ) • ( K D M * 1) NMAXF . (NO I MP • N F I X F ) / N S I Z E F NMAXI « (NDIM1 • N F I X I I / N S I Z E I I F ( I P R I N T . L T . I I W R I T E I I W R . 3 5 0 ) N M A X F . NMAXI NMAX > MI NO INMA X F , N M A X I ) IF INMAX . L T . N ) R E T U R N IF (NMAX . L T . N F X P N T . 1 ) R E T U R N I F (NMAX . L T . 2 - N F X P N T . 2 . A N D . I P R I N T L T . 1) W R I T E 1 1 W R , 3 6 0 ) C . . . G E N E R A T E P O I N T E R S TO B R E A K UP F S P A C E AND I S P A C E . L X I e 1 LA = L X I • NMAX . 1 L X I O L D = LA * KDM • (NMAX ' ( K D M - N R E C ) • N R E C ) L X I J > L X I O L D * NMAX . 1 L A L P H A t L I U . K • NMAX L O L P H A • L A L P H A . NMAX • KO • MSTAR L E L P H A > L O L P H A . NMAX ' KD • MSTAR L A L D I F • L E L P H A • W A X • K • MSTAR • MNSUM LRUS « L A L D I F • M U I • K • MSTAR • UNSUU L V A L S T « L R H S • NMAX • (KDM • N R E C ) • N R E C L S L O P E « L V A L S T • 4 • MSTAR • M U X L A C C U M . L S L O P E « KMAI L I P I V • 1 L I N T E 6 • L I P I V • I L V A L S T - L R H S ) I F I G U E S S . G E . 2, MOVE L O C A T I O N S IN F S P A C E . H O L D AND A L D I F 2 ) 4 ) • K I F ( I G U E S S . L T HOLD * N IF ( I G U E S S . E O N A L D I F • NOLD N P t « N • 1 IF ( I G U E S S . E O . 4 ) DO 120 I d . N A L D I F 120 F S P A C E ( L A L D I F « 1 - 1 ) NP1 « NOLO • 1 IF I I G U E S S . E O . 4 ) DO 130 I c l . N P I 130 F S P A C E I L X I O L D ' I - I ) GO TO 160 140 DO ISO 1 * 1 , N P 1 150 F S P A C E I L X I O L D - I - 1 I 160 C O N T I N U E TO T H E I R P R O P E R GO TO 160 N O L D • I S P A C E ! I I M S T A R • MNSUM NP1 * NP1 • NOLD • 1 F S P A C E ! N P I . I ) F S P A C E ! L X l ' I - 1 I F S P A C E I N O . I ) I N I T I A L I Z E C O L L O C A T I O N P O I N T S , C O N S T A N T S , M E S H . C A L L C O N S T S C A L L H E M U S H ( 3 - I R E A D . F S P A C E I L X I I . F S P A C E ( L X I O L D ) . 1 F S P A C E ( L X I J ) , D U M 1 . 0 U M 2 , DUM3, DUMA, 2 N F X P N T . F I X P N T ) D E T E R M I N E W H I C H A R E T H E D I F F E R E N T ORDER E O U A T I O N S A N D P U T T H E S E O R D E R S I N UNO . A L S O G E N E R A T E T H E P O I N T E R S 1ND A N D I N E O W H I C H W I L L B E U S E D I N B S P O E R . I N D ( I ) • 1 U N O ! 1 ) • U l 1 ) NO - t N E Q • 0 I G • ( M I D ' l l ' ( M I D ' K I • 1 I F ( N C O M P . L E . 11 GO TO 2 0 0 0 0 1 9 0 J = 2 , N C O M P M J r M U I I F ( M J E O . M ( J - D ) GO TO 1 7 0 NO = ND • 1 I N D ( N D ) = I G M N O I N D I » M J GO TO 1 6 0 1 7 0 N E O c N E O * 1 I N E O I N E O I - I G 1 6 0 I G k I G * ( M J . 1 ) • < M J » K ) 1 9 0 C O N T I N U E I N O ( N O M ) E I N D I N D I • I G 2 0 0 C O N T I N U E D E T E R M I N E F I R S T A P P R O X I M A T I O N . I F T H E P R O B L E M I S N O N L I N E A R . C I F ( I G U E S S .GE. 2 ) GO TO 2 3 0 MP I = N * 1 DO 2 1 0 I = 1.NP1 2 1 0 F S P A C E I I • L X I O L D • 1) = F S P A C E I I • L X I - 1) NOLD = N I F I N O N L I N .EO. 0 .OR. I G U E S S .EO. 1) GO TO 2 3 0 C C... S Y S T E M P R O V I D E S F I R S T A P P R O X I M A T I O N O F T H E S O L U T I O N . C... CHOOSE Z ( J I * 0 F O R J=1 M S T A R . C 0 0 2 2 0 I • 1 . N A L P H A 2 2 0 F S P A C E I I • L A L P H A • 1) « 0 . 0 0 C A L L A P P D I F ( F S P A C E ( L A L D I F ) . F S P A C E ( L A L P H A I . F S P A C E ( L X I I , 1 N, K, N C , MT, M S T A R ) 2 3 0 C O N T I N U E I F ( I G U E S S G E . 2 ) I G U E S S • 0 C A L L C O N T R L ( F S P A C E I L X I ) . F S P A C E ( L X I O L D ) . F S P A C E ( L X I J ) . 1 F S P A C E I L A L P H A ) . F S P A C E ( L A L D I F I . F S P A C E I L R H S ) . 2 F S P A C E ( L O L P H A >. F S P A C E I L E L P H A ) . 3 F S P A C E ( L A ) . F S P A C E ( L V A L S T ) . F S P A C E I L S L O P E ) . 4 F S P A C E I L A C C U M ) . I S P A C E I L I P I V ] . I S P A C E I L I N T E G ) , 5 N F X P N T , F I X P N T , I F L A G , F S U B . D F S U B . G S U B . D G S U B . 6 S O L U T N ) C... P R E P A R E O U T P U T I S P A C E ! 1) • N I S P A C E ! 2 ) « K I S P A C E I 3 ) « N C O M P I S P A C E ! 4 ) • M S T A R N A L D I F « N • K • M S T A R • MNSUM I S P A C E 1 5 ) « N A L D I F 1 S P A C E I 6 ) • N A L D I F • N • 2 I S P A C E I 7 ) • I S P A C E ! 6 ) • 6 5 0 0 2 4 0 I * I . N C O M P 2 4 0 I S P A C E ! 7 * 1 ) » M i l ) 0 0 2 5 0 I « 1 , N A L D I F 2 5 0 F S P A C E ( N . 1 » I I « F S P A C E ( L « L 0 I F - 1 « I 1 RETURN C 2 6 0 F O R M A T ! / / / 3 7 H T H E N U M B E R O F ( L I N E A R ) D I F F E O N S I S . 1 3 / I X . 1 teHTHEIR O R D E R S A R E , 2 0 1 3 ) 2 7 0 F O R M A T ! / / / 4 0 H T H E N U M B E R OF ( N O N L I N E A R ) D I F F E O N S I S , 1 3 / I X , t 1 6 H T H E I R O R D E R S A R E . 2 0 1 3 ) 2 6 0 F O R M A T ( 2 7 H S I D E C O N D I T I O N P 0 I N 1 S Z E T A . 6 F 1 0 . 6 , 4 1 / 2 7 1 . 8 F 1 0 . 6 ) ) 2 9 0 F O R M A T ( 3 7 H N U M B E R O F C O L L O C P T S P E R I N T E R V A L I S , 1 3 1 3 0 0 F O R M A T I 3 9 H C O M P O N E N T S OF Z R E 0 U 1 R 1 N G T O L E R A N C E S • . 6 1 7 X . 1 2 , 1 X ) . 1 4 I / 3 B X . 6 I 1 0 I ) 3 1 0 F O R M A T ( 3 3 H C O R R E S P O N D I N G E R R O R T O L E R A N C E S - . 6 1 . 6 0 1 0 . 2 , 1 4 1 / 3 9 1 , 6 0 1 0 . 2 ) 1 3 2 0 FORMAT 1 4 4 H I N I T I A L M E S H I E S ) A N D A L P H A P R O V I D E D B Y U S E R ) 3 3 0 FORMAT 1 2 7 H N O A O A P T I V E M E S H S E L E C T I O N ) 3 4 0 FORMAT I 1 0 H THERE A R E . I 5 . 2 7 H F I X E D P O I N T S I N T H E M E S H • 1 1 0 I 6 D 1 2 4 / 1 ) 3 5 0 F O R M A T 1 4 4 H T H E M A X I M U M N U M B E R OF S U B I N T E R V A L S I S M I N (. 1 4 . 1 2 3 H I A L L O W E D F R O M F S P A C E ) . . 1 4 . 2 4 H ( A L L O W E D F R O M I S P A C E 1 ) ) 3 6 0 F O R M A T ( / 5 3 H I N S U F F I C I E N T S P A C E TO D O U B L E M E S H F O R E R R O R E S T I M A T E ) E N D S U B R O U T I N E C O N T R L I X I . I I O L O . X I J , A L P H A . A L D I F . R H S , 1 D A L P H A . E A L P H A . A. V A L S T R . S L O P E . S ACCUM, I P 1 V . I N T E G S . N F X P N T , F I X P N T , I F L A G . 1 Fsue. DFSue, csus. ocsue. SOLUTN) P U R P O S E T H I S S U B R O U T I N E I S THE A C T U A L D R I V E R . THE N O N L I N E A R J ™ " " " * ' , S T R A T E G Y I S C O N T R O L L E D H E R E ( S E E (21 ) . UPON C O N V E R G E N C E . ERRCHK I S C A L L E D TO T E S T FOR S A T I S F A C T I O N OF THE R E Q U E S T E D T O L E R A N C E S . V A R I A B L E S R E L A X R E L U I N R L X O L O R S T A R T I F R Z LAITFRI I T E R I I H O L D I P R E O RNORM RNOLO A N S C L A N F I I AMORM N A L O I F I U E S H MAXIMUM T O L E R A N C E V A L U E . USED AS PART OF C R I T E R I A FOR C H E C K I N G FOR N O N L I N E A R I T E R A T I O N C O N V E R G E N C E THE R E L A X A T I O N F A C T O R FOR DAMPED NEKTON I T E R A T I O N MINIMUM A L L O W A B L E V A L U E FOR R E L A X ( O T H E R W I S E THE J A C O B I A N I S C O N S I D E R E D S I N G U L A R ) . P R E V I O U S R E L A X I N I T I A L V A L U E FOR R E L A I WHEN P R O B L E M I S S E N S I T I V E NUMBER OF F I X E D J A C O B I A N I T E R A T I O N S MAXIMUM V A L U E FOR I F R Z B E F O R E P E R F O R M I N G A R E I N V E R S I O N NUMBER OF I T E R A T I O N S (COUNTED ONLY WHEN J A C O B I A N R E 1 N V E R S I O N S ARE P E R F O R M E D ) . CURRENT MESH P R E V I O U S MESH 0 IF R E L A X I S D E T E R M I N E D BY A C O R R E C T I O N 1 IF RELAX I S D E T E R M I N E D BY A P R E D I C T I O N 0 I F THE J A C O B I A N I S TO BE I N V E R T E D 1 I F THE J A C O B I A N I S C U R R E N T L Y F I X E D ( F R O Z E N ) 0 I F NO P R E V I O U S C O N V E R G E N C E HAS B E E N O B T A I N E D 1 I F C O N V E R G E N C E ON A P R E V I O U S MESH HAS B E E N O B T A I N E D -1 NO C O N V E R G E N C E O C C U R R E D ( U S E D F O R R E G U L A R P R O B L E M S ) 0 A R E G U L A R P R O B L E M ; 1 A S E N S I T I V E P R O B L E M 2 USED FOR C O N T I N U A T I O N ( S E E D E S C R I P T I O N OF I P A R I 1 0 ) N O R U N O F ° R H S S ( R I G H T HAND S I D E ) FOR CURRENT I T E R A T I O N NORM OF RHS FOR P R E V I O U S I T E R A T I O N S C A L E D NORM OF NEWTON C O R R E C T I O N S C A L E O NORM OF NEWTON C O R R E C T I O N AT NEXT S T E P S C A L E D NORM OF A C O R R E C T I O N O B T A I N E D WITH J A C O B I A N F I X E D NUMBER OF COMPONENTS OF A L O I F ( S E E S U B R O U T I N E A P P R O X ) A CONTROL V A R I A B L E FOR S U B R O U T I N E S NEWMSH AND ERRCHK I 1) I M P L I C I T R E A L ' S ( A - H . 0 - 7 1 E X T E R N A L F S U B . D F S U B . G S U B . D G S U B . S O L U T N „ „ , , . . D I M E N S I O N X I I 1 ) . X 1 0 L D I 1 ) , X 1 J I 1 ) . A L P H A 1 1 ) . A L D I F I I ) , " " S I 1) D I M E N S I O N A l l ) . V A L S T R M ) . S L O P E ( l ) . ACCUMI 1) , I P I V ( I ) . I N T E G S I D I M E N S I O N D A L P H A I 1 ) , E A L P H A ( t ) . F I X P N T ( I ) COMMON / O R D E R / K , N C O M P . M S T A R . K D . K D M , M N S U M . M I 2 0 ) COMMON / A P P R / N , N O L D , N M A X , N A L P H A , M S H F L G , M S H N U M , M S H L M T . M S H A L T COMMON / S I O E / Z E T A I 4 0 ) . A L E F T , A R I G H T , I Z E T A , I W R . „ „ , COMMON / N O N L N / P R E C I S . N O N L I N , I T E R . L I M I T , 1 C A R E . I P R I N T , I G U E S S . I F R E E Z COMMON / E O O R D / I N D I 5 ) . I N E O I 2 0 ) , M N D I S ) . N D . NEO COMMON / E R R O R S / T O L ( A O I . W G T M S H I 4 0 1 . T O L I N I 4 0 1 . R O O T 1 4 0 1 , J T O L ( 4 0 ) . L T O L I 4 0 ) , N T O L C O N S T A N T S FOR CONTROL OF N O N L I N E A R I T E R A T I O N R E L M I N * 1 . 0 - 3 R S T A R T s 1 . D - 2 L M T F R Z * 4 C C . . . C O M P U T E THE MAXIMUM T O L E R A N C E C H E C K s O . D O DO 10 1 = 1 , N T O L 10 C H E C K = DMAX1 I T O L I N I I ) , CHECK I F A L P H A = D F L O A T ( N A L P H A ) I M E S H « 1 I C O N c 0 I F I N O N L I N .EO. 0 ) IC0N=1 ICOR = 0 L C O N V r o C C . . . THE MAIN I T E R A T I O N B E G I N S H E R E C . . . L O O P 20 I S E X E C U T E D U N T I L ERROR T O L E R A N C E S ARE S A T I S F I E D OR C . . . THE COOE F A I L S (DUE TO A S I N G U L A R MATRIX OR S T ^ M C E LIMITJWONSI 20 C O N T I N U E C C - • I N I T I A L I Z A T I O N F O R A NEW MESH I T E R •> 0 N A L O I F « N • K • MSTAR • MNSUM c » F f N O N L I N .GT. 0) B 0 ,„ .„ C . . . THE L I N E A R C A S E . C . . . S E T UP AND S O L V E E O U A T I O N S C A L L L S Y S L V ( I F L A G , X I , X I O L D , X I J , A L P H A , A L D I F RHS ' E A L P H A , A . I P I V , 1 N T E G S . RNORM. 0 F S U B 2 D F S U B . G S U B , D G S U B . S O L U T N ) C . . . CHECK FOR A S I N G U L A R MATRIX I F ( I F L A G . W E . 0) G 0 1 0 4 n 30 I F ( I P R I N T .LT. 1) W R I T E (IWR,480 ) R E T U R N C C . . . U P D A T E THE OLO M E S H 4 0 N P I « N • I DO 50 I « 1 , N P 1 50 X I O I D ( I ) « X K I I NOLD • N C C . . . P R E P A R E T A B L E OF D I V I D E D D I F F E R E N C E S AND C A L L ERRCHK C G0LT0*450IF , k l D l r - * L P H 4 - *• N C 0 U P - »• «1AR) ... I T E R A T I O N L O O P F O R N O N L I N E A R C A S E C... D E F I N E THE 1K1TI.L R E L A X A T I O N P A R A M E T E R (= R E L A X ) 60 R E L A X • 1.D0 C C... CHECK FOR P R E V I O U S C O N V E R G E N C E AND P R O B L E M S E N S I T I V I T Y I F ( I C A R E . E O . 1 . 0 0 . I C A R E . E O . < • » ) > R E L A X • R S T A R T I F ( I C O N . E O . 0 ) 0 0 TO X O C . C O N V E R G E N C E ON A P R E V I O U S MESH HAS B E E N O B T A I N E D . T H U S C . . WE HAVE A VERT GOOD I N I T I A L A P P R O X I M A T I O N FOR THE NEWTON C... P R O C E S S . P R O C E E D WITH ONE F U L L NEWTON AND THEN I T E R A T E C... WITH A F I X E D J A C O B I A N . C I F R E E Z • 0 C C... E V A L U A T E R IG HT HAND S I D E AND I T S NORM C C A L L L S Y S L V ( I F L A G . X I , X I O L D . X U , O A L P H A , A L O I F . R H S . 1 A L P H A , A . I P I V . I N T E G S . RNORM. 1, F S U B . 2 D F S U B . G S U B . D G S U B . S O L U T N ) C C... S O L V E FOR THE N E X T I T E R A T E . C . . . THE V A L U E OF I F R E E Z D E T E R M I N E S WHETHER T H I S I S A F U L L C . . . NEWTON S T E P (=0 ) OR A F I X E D J A C O B I A N I T E R A T I O N ( = 1 ) . ' I F ( I P R I N T . L T . 0 . A N D . I T E R . E O . 0 ) W R I T E ! I W R , 5 3 0 ) 7 0 IF t I P R I N T . L T . 0 ) WRITE ( I W R , 5 1 0 ) I T E R . RNORM RNOLD c RNORU C A L L L S Y S L V ( I F L A G . X I . X I O L D . X I J , D A L P H A , A L D I F . R H S . 1 A L P H A . A , I P I V . I N T E G S . RNORM, 2 « I F R E E Z . 2 F S U B . D F S U B . G S U B . D G S U B . S O L U T N ) C C . . . CHECK FOR A S I N G U L A R M A T R I X C I F ( I F L A G . E O . 0 ) GO TO 3 0 IF ( I F R E E Z . E G . 1) GO TO 9 0 C C . . . A F U L L NEWTON S T E P C I T E R » I T E R • 1 I F R Z • 0 C C . . . U P D A T E THE OLD M E S H . C NP1 » N • 1 DO 9 0 I c I . N P I 8 0 X I O L O ( I ) « X I I I ) NOLO • N 9 0 C O N T I N U E C C . . . U P D A T E A L P H A , COMPUTE NEW RHS AND I T S NORM C 0 0 100 I ' l . N A L P H A 100 A L P H A ( 1 ) « A L P H A ! I ) • D A L P H A t I ) C A L L A P P O I F I A L D I F , A L P H A . X I . N . K , N C O M P . M. M S T A R ) C A L L L S Y S L V I I F L A G , X I . X I O L D , X I J , D A L P H A . A L D I F . R H S . 1 A L P H A . A , I P I V , I N T E G S . RNORM, 1, F S U B , 2 D F S U B , G S U B , D G S U B . S O L U T N ) C . . . CHECK M O N O T O N I C I T Y . IF THE NORM OF RHS G E T S S M A L L E R . C . . . P R O C E E D WITH A F I X E D J A C O B I A N ; E L S E P R O C E E D C A U T I O U S L Y , C . . . AS IF C O N V E R G E N C E HAS NOT B E E N O B T A I N E D B E F O R E ( I C O N = 0 ) . IF IRNORM L T . P R E C I S ) GO TO 4 0 5 IF (RNORM . L E . RNOLD1 GO TO 120 IF I I P R I N T . L T . 0 ) WRITE ( I W R . 5 1 0 ) I T E R . RNORM IF ( I P R I N T . L T . 01 WRITE ( I W R , 5 4 0 ) ICON e 0 RELAX E R S T A R T DO 110 I = 1 , N A L P H A 110 ALPHA ( I ) « A L P H A ( I ) • D A L P H A ( 1 ) C A L L A P P O I F ( A L O I F , A L P H A . X I . N . K , N C O M P . M, M S T A R ) I T E R = 0 GO TO 140 120 IF ( I F R E E Z E O . 1) GO TO 130 I F R E E Z •= 1 GO 10 70 C C . . . V E R I F Y THAT THE L I N E A R C O N V E R G E N C E WITH F I X E D J A C O B I AN C . . . I S F A S T E N O U G H . C 130 I F R Z « I F R Z • 1 IF ( I F R Z . G E . L M T F R Z ) I F R E E Z = o IF tRNOLD . L T . 4 . 0 0 ' R N O R M ) I F R E E Z = 0 GO TO 300 C C . . . NO P R E V I O U S C O N V E R G E N C E HAS B E E N O B T A I N E D . P R O C E E D C . . . WITH THE M O D I F I E D NEWTON M E T H O D . C . . . E V A L U A T E R H S . C 140 1 F ( I P R I N T . L T . 0 ) W R I T E ( I W R , 5 0 0 ) C A L L L S Y S L V ( I F L A G . X I . X I O L D . X I J , D A L P H A . A L D I F . R H S . 1 A L P H A , A , I P I V . I N T E G S . RNORM, 1. F S U B . 2 D F S U B , G S U B . O G S U B , S O L U T N ) C C . . . F I N D A NEWTON D I R E C T I O N C 150 RNOLD • RNORM IF ( I T E R . G E . L I M I T ) GO TO 4 2 0 C A L L L S Y S L V ( I F L A G , X I , X I O L D , X I J . D A L P H A . A L D I F . R H S . 1 A L P H A , A . I P I V , I N T E G S , RNORM, 2 , F S U B . 2 D F S U B . G S U B , D G S U B , S O L U T N ) C C . . . CHECK FOR A S I N G U L A R M A T R I X C IF I I F L A G . E O . 0 ) GO TO 30 IF ( I T E R . G T . 0 ) GO TO 170 C C . . . B O O K K E E P I N O F O R F I R S T M E S H C I F ( I G U E S S E O . 1) I G U E S S * 0 C C . . . U P D A T E THE OLD M E S H C NP1 m H 4 1 DO 180 I . 1 . N P 1 180 X I O L O ( I ) « X K I I NOLO • N GO TO 190 170 C O N T I N U E C C . . . P R E D I C T R E L A X A T I O N F A C T O R F O R NEWTON S T E P . C A N D I F > O . D O 0 0 180 ! * 1 , N A L P H A 1 6 0 A N O I F • AND IF • ( E A L P H A ( I ) . D A L P H A ( 1 ) 1 * * 2 1 / ( A L P H A ( I ) ' A I P H A ( I ) • P R E C I S ) R E L A X • R E L A X " A N S C L I D M A X K O S O R K A M O I F / F A L P H A ) . 1 P R E C I S ) I F ( R E L A X G T . 1 . D 0 ) R E L A X « 1 DO I S O R L X O L O • R E L A X 1 P R E D • 1 I T E R « I T E R • 1 C C . . . D E T E R M I N E A N E " ALPHA AND F I N D N E K RHS AND I T S NORM C 0 0 2 0 0 I » l , N A L P H A 2 0 0 A L P H A ! I ) • A L P H A ( 1 ) • R E L A X • D A L P H A ( I ) 2 1 0 C A L L A P P D I F ( A L O I F . A L P H A . X I , N . K , NCOMP, M. M S T A R ) C A L L L S Y S L V ( I F L A G . X I . X I O L D . I I J , D A L P H A . A L D I F , R H S , 1 A L P H A . A , I P I V , I N T E G S , RNORM, 1, F S U B , 2 D F S U B , G S U B , D G S U B , S O L U T N ) C C . . . COMPUTE A F I X E D J A C O B I A N I T E R A T E ( U S E O TO CONTROL R E L A X ) C C A L L L S Y S L V ( I F L A G , X I . X I O L D , X I J . E A L P H A . A L D I F . R H S , 1 A L P H A . A , I P I V . I N T E G S . RNORM, 3 . F S U B , 2 O F S U B . G S U B . D G S U B . S O L U T N ) C C . . . F I N D S C A L E D NORMS OF V A R I O U S TERMS USED TO C O R R E C T R E L A X C ANORM « O . D O A N F I X • O . D O A N S C L = 0 . 0 0 DO 2 2 0 1 = 1 . N A L P H A A N S C L • ANSCL * O A L P H A I I ) * O A L P H A ( l ) / 1 ( A L P H A ( I ) ' A L P H A ( I ) • P R E C I S ) S C A L E ' A L P H A ( 1 ) - R E L A X ' O A L P H A ( I ) S C A L E = I .DO / ( S C A L E - S C A L E • P R E C I S ) ANORM s ANORM < D A L P H A ( I ) ' D A L P H A ( I ) ' S C A L E 2 2 0 A N F I X • A N F I X • E A L P H A ! I ) • E A L P H A ( I ) ' S C A L E ANORM = O S O R T I A N O R U / F A L P H A ) A N F I X > D S O R T ( A N F 1 X / F A L P H A ) A N S C L = D S O R T ( A N S C L / F A L P H A ) IF ( I C O R . E O . 1) GO TO 230 I F ( I P R I N T . L T . 0 ) WRITE ( I W R . 5 2 0 ) I T E R . R E L A X . ANORM. 1 A N F I X . R N O L D . RNORM GO TO 2 4 0 2 3 0 I F ( I P R I N T . L T . 0 ) WRITE ( I W R , 5 5 0 ) R E L A X , ANORM, A N F I X , 1 R N O L D , RNORM 2 4 0 ICOR = 0 C C . . . C H E C K FOR MONOTONIC D E C R E A S E IN D A L P H A . C I F ( A N F I X . L T . P R E C I S . O R . R N O R M . L T . P R E C I S ) G 0 TO 4 0 5 I F ( A N F I X . G T . ANORM) GO TO 2 5 0 C C . . . WE H A V E A O E C R E A S E . IF E A L P H A S M A L L . CHECK C O N V E R G E N C E C I F ( A N F I X . L E . C H E C K ) GO TO 2 6 0 C C . . . C O R R E C T THE P R E D I C T E D R E L A X U N L E S S THE C O R R E C T E D C . . . V A L U E I S WITHIN 10 P E R C E N T OF THE P R E O I C T E D O N E . C I F ( I P R E D N E . 1) GO TO 160 2 5 0 IF ( I T E R . G E . L I M I T ) GO TO 4 2 0 C C . . . C O R R E C T THE R E L A X A T I O N F A C T O R . C I P R E D = 0 ARG = I A N F 1 X / A N O R M • l . D O ) / R E L A X • 1 DO IF ( A R G . L T . 0 . 0 0 ) GO TO 150 I F ( A R G . L E . . 2 5 D 0 ' R E L A I « . 1 2 5 D 0 ' R E L A X " 2 ) GO TO 260 F A C T O R = - l . D O ' DSORT ( 1 . 0 0 * 8 . 0 0 * ARG) I F ( D A B S f F A C T O R - 1 , D 0 ) . L T . . I D O ' F A C T O R ) GO TO 150 R E L A X = R E L A X / F A C T O R GO TO 270 2 6 0 I F ( R E L A X . G E . . 9 0 0 ) GO TO 150 R E L A X = 1 . D 0 2 7 0 ICOR < 1 I F ( R E L A X . L T . R E L M I N ) GO TO 4 3 0 DO 2B0 1 = 1 . N A L P H A 2 8 0 A L P H A ( I ) = A L P H A ! 1 ) • ( R E L A X - R L X O L D ) ' D A L P H A ! I ) R L X O L D > R E L A X GO TO 2 1 0 C C . . . CHECK C O N V E R G E N C E . C . . . COMPUTE D I V I D E D D I F F E R E N C E T A B L E S FOR C O R R E C T I O N T E R M S . C 2 9 0 C A L L A P P D I F ( A . E A L P H A . I I , N , K , NCOMP, M . M S T A R ) GO TO 310 C C . . . I F ICON « 1 THEN A L S O S A V E A . C 3 0 0 C A L L A P P O I F ( E A L P H A . D A L P H A 3 1 0 C O N T I N U E INN • 0 J C O L • 0 J I N I T > 1 DO 380 I « 1, NTOL J E N D • J T O L I I ) - 1 I F ( J E N D . L T . J I N I T ) DO 320 J • J I N I T . J E N D M J > M I J ) N A L P H J = N ' K • M J J C O L « J C O L • M J INN * INN < M J • N A L P H J 3 2 0 C O N T I N U E 3 3 0 J I N I T • J E N D » t N A L P H J « N * K • M ( J I N I T ) INN1 « INK J C O L 1 • J C O L • 1 3 4 0 IF I J C 0 L 1 . E O . L T O L ( I ) ) INN1 • INN1 • N A L P H J J C O L 1 • J C O L 1 • 1 GO TO 340 3 5 0 U N I T • J C O L 1 • J C O L C C . . CHECK THAT T O L E R A N C E S ARE S A T I S F I E O FOR B - S P L I N E C O E F F S C DO 370 II = U N I T . N A L P H J IN « INN1 • I I I F ( I C O N E O 1) GO TO 360 IF ( D A B S ( A I I N I ) G T . T O L I N ( I ) • 1 ( D A B S ( A L D I F I I N I ) - 1 . 0 0 ) 1 GO TO 4 1 0 I I . N , K , N C O U P , M . M S T A R ) GO TO 3 3 0 GO TO 3 5 0 Z I L ) • Z I L ) • .600 • D A B S I V A L S T R I K N E N ) ) KNEW •= KNEW • 1 K S T O R E • K S T O R E • 1 60 C O N T I N U E C C . . . T E S T WHETHER THE T O L E R A N C E R E Q U I R E M E N T S ARE S A T I S F I E D C . . . IN THE I - T H I N T E R V A L . C I F ( I F I N . E O . 0 ) GO TO 6 0 DO 70 J = 1. N T O L L T O L J = L T O L I J ) 70 I F I ERR I L T O L J ) . G T . T O L I N I J ) • I Z I L T 0 L J ) « 1 DO) 1 I F I N = 0 8 0 DO 90 L = 1 . M S T A R 9 0 E R R E S T I L ) « D M A X 1 1 E R R E S T I L ) , E R R I L ) ) 100 C O N T I N U E IF ( I P R I N T . L T . 1) W R I T E I I W R . 1 3 0 ) L J <= 1 0 0 110 J = 1 ,NCOMP M J = L J - 1 • M I J ) I F I I P R I N T . L T . 1) W R I T E ! I W R , 1 2 0 ) J , ( E R R E S T I L ) , L= L J . M J ) L J = MJ * 1 110 C O N T I N U E R E T U R N C 120 FORMAT ( 3 H U ( , 1 2 . 3H) - . 4 D I 2 . 4 ) 130 FORMAT I / 2 B H THE E S T I M A T E D ERRORS A R E . ) 140 FORMAT I 19H MESH V A L U E S FOR Z l , 1 2 . 2 H ) , ) 160 F O R M A T ! 1 H . 6 0 1 5 . 7 ) END P A R T 3 C O L L O C A T I O N S Y S T E M S E T U P R O U T I N E S - - S E E I I ) S U B R O U T I N E L S Y S L V I I F L A G , X I , X I O L D . X I J , A L P H A , A L D I F , 1 R H S , A L P H O , A . I P I V , I N T E G S , RNORM. 2 M O D E . F S U B . D F S U B , G S U B , D G S U B , S O L U T N ) P U R P O S E T H I S R O U T I N E C O N T R O L S THE S E T U P AND S O L U T I O N OF A L I N E A R S Y S T E M OF C O L L O C A T I O N E O U A T I O N S . THE MATRIX A I S C A S T I N T O AN ALMOST BLOCK DIAGONAL FORM BY AN A P P R O P R I A T E O R D E R I N G OF THE COLUMNS AND S O L V E D U S I N G THE P A C K A G E OF DE B O O R - W E I S S ( 4 ) . THE MATRIX I S COMPOSED OF N B L O C K S . THE I - T H B L O C K HAS THE S I Z E I N T E G S I 1 , 1 ) ' I N T E G S I 2 . I ) . I T C O N T A I N S IN I T S L A S T ROWS THE L I N E A R I Z E D C O L L O C A T I O N E O U A -T I O N S (BOTH BUNDARY C O N D I T I O N S AND D I F F E R E N T I A L E O U A T I O N S I C O R R E S P O N D I N G TO THE I - T H S U B I N T E R V A L . I N T E G S I 3 , I ) S T E P S OF G A U S S I A N E L I M I N A T I O N ARE A P P L I E D TO IT TO A C H I E V E A P L U D E C O M P O S I T I O N . THE R I G H T HAND S I D E V E C T O R IS PUT INTO RHS AND THE S O L U T I O N V E C T O R I S R E T U R N E D IN A L P H A . L S Y S L V O P E R A T E S A C C O R D I N G TO ONE OF 5 MODES: MODE = 0 - S E T UP B O T H A ANO RHS . AND S O L V E S Y S T E M (FOR L I N E A R P R O B L E M S ) . MODE = 1 - S E T UP RHS ONLY AND COMPUTE I T S NORM. MODE c 2 - S E T UP A ONLY AND S O L V E S Y S T E M . C MODE = 3 - P E R F O R M FORWARD ANO BACKWARD S U B S T I T U T I O N (DO NOT S E T C UP A NOR FORM THE R H S ) . C FOR THE F I R S T I T E R A T I O N ON A P A R T I C U L A R M E S H . C I N T E G S IS C O M P U T E D . A L S O , THE I N I T I A L ALPHA ON C T H E NEW MESH I S C O M P U T E D . C V A R I A B L E S C I R H S . I A . I Z E T A . I A L P H O - P O I N T E R S TO R H S , A , Z E T A . A L P H O R E S P E C T I V E L Y C ( N E C E S S A R Y TO K E E P TRACK OF B L O C K S OF A C DURING M A T R I X M A N I P U L A T I O N S ) C A L P H O - B - S P L I N E C O E F F S FOR P R E V I O U S S O L U T I O N C DG - P A R T I A L D E R I V A T I V E S OF G FROM DGSUB C OF - P A R T I A L D E R I V A T I V E S OF F FROM DFSUB C RNORM - E U C L I D E A N NORM OF RHS C L S I O E - NUMBER OF S I D E C O N D I T I O N S IN CURRENT ANO P R E V I O U S B L O C K S C I C O L C - P O I N T E R TO CURRENT C O L L O C A T I O N POINT ARRAY X I J C ID - ( A N O T H E R ) P O I N T E R FOR RHS C I G U E S S * 1 WHEN CURRENT S O L N I S U S E R S P E C I F I E D C = 0 O T H E R W I S E C C I M P L I C I T R E A L ' S ( A - H . O - Z ) COMMON / O R D E R / K , N C O M P , M S T A R , K D . K D M , MNSUM. M I 2 0 ) COMMON / S I D E / 2 E T A I 4 0 ) , A L E F T . A R I G H T , I Z E T A , IWR COMMON / B S P L I N / V N C 0 L ( 6 6 . 7 ) , V N S A V E I 6 6 . 5 ) . V N I 6 6 ) COMMON / A P P R / N , N O L D . N M A X . N A L P H A , M S H F L G , M S H N U M , M S H L M T , M S H A L T COMMON / N O N L N / P R E C I S , N O N L I N . I T E R . L I M I T . I C A R E . I P R I N T . I G U E S S . I F R E E Z COMMON / H I / D N I , D N 2 , DN3 E X T E R N A L O F S U B . O G S U B D I M E N S I O N A L P H O ( I ) , l l l l l , I I 0 L D I 1 ) , X I J ( I ) , A L P H A ( 1 ) D I M E N S I O N A L D I F I 1 I , R H S ( 1 ) , A l l ) , I P I V I 1 ) . I N T E G S I 3 . 1 ) D I M E N S I O N Z I 4 0 ) . F I 4 0 ) , D F I 6 0 0 ) , D M V A L I 2 0 ) C M1 « MODE • 1 GO TO ( 1 0 , 3 0 . 3 0 . 3 1 0 ) , M1 C C . . . L I N E A R P R O B L E M I N I T I A L I Z A T I O N C 10 DO 20 1 . 1 . M S T A R 2 0 Z ( I ) < O . D O C C . . . I N I T I A L I Z A T I O N C 30 IRHS « 0 IA = 1 I Z E T A « 1 L S I O E « 0 RNORM s O . D O I A L P H O = 0 I F ( I T E R G E . 1 . O R . MODE . E O . 2 ) GO TO 8 0 C C . . . B U I L O I N T E G S ( D E S C R I B I N G B L O C K S T R U C T U R E OF M A T R I X ) C DO 70 ! * I .N I N T E G S I 2 . I ) * KDM IF ( I . L T . N ) GO TO 4 0 I N T E G S I 3 . I ) c KDM L S I O E = MSTAR oo to so 4 0 1 N T E G S I 3 . I ) * KD 5 0 I F ( IS IDE . E O . MSTAR ) GO TO 6 0 IF ( Z E T A ( L S I 0 E * 1 > . G E . XI ( I - 1 ) I GO TO 6 0 L S I O E s IS IDE • 1 GO TO 5 0 6 0 NROW s KD • L S I D E 70 I N T E G S ! 1 . 1 1 = NROW C C . . . T H E DO LOOP 2 8 0 S E T S UP THE L I N E A R S Y S T E M O F E O U A T I O N S . C SO DO 280 l e l . N X I L s X I I 1) I F ( I . G T . II X I L « X I I I - 1 1 X I R = X I ( N « 1 ) IF (1 . L T . NI X IR = X I I I . 2 1 DN1 s l . D O / 1 X 1 ( 1 * 1 ) • X I L ) 0N2 t> 1 . 0 0 / I X I I I * 1 ) • X I I I ) I DN3 s l . D O / (X IR • X I I I ) ) C C . . . CONSTRUCT A B L O C K OF A AND A C O R R E S P O N D I N G P I E C E OF R H S . C NROK • I N T E G S 1 1 . 1 ) I I B I I C O L C = ( I - l > • K ID • IRHS * I Z E T A - 1 C . . . GO THRU T H E NCOMP C O L L O C A T I O N E O U A T I O N S AND S I D E C O N D I T I O N S C . . . IN THE 1 - T H S U B I N T E R V A L C 0 0 2 7 0 L L = I . K XX s X I J ( I C O L C ' L L ) 100 I F ( I Z E T A . G T . MSTAR ) GO TO 160 I F ( Z E T A ( I Z E T A ) G E . XX I GO TO 160 C C . . . B U I L D E Q U A T I O N FOR A S I D E C O N D I T I O N . C 110 10 B 10 • 1 I A L P H 0 = 1 A L P H 0 • 1 IF IMODE . E O . 0 ) GO TO 130 I F ( I G U E S S N E . 1) 0 0 TO 120 C C . . . C A S E WHERE USER P R O V I D E D C U R R E N T A P P R O X I M A T I O N C C A L L S O L U T N I Z E T A I I Z E T A ) . Z . O M V A L ) GO TO 1 1 3 0 . 1 4 0 ) . MODE C C . . . OTHER N O N L I N E A R C A S E C 120 C A L L APPROX ( I I . Z E T A ( I Z E T A ) . Z . V N . X I O L D , N O L O . 1 A L O I F , K , N C O M P . M . M S T A R , 1, DUMMY, 01 I F (MODE . E O . 2 ) GO TO 140 C C . . . F I N O RHS BOUNDARY V A L U E . C 130 C A L L GSUB ( I Z E T A , Z , G ) R H S ( I D I B - G RNORM = RNORM • G * ' 2 IF (MODE . E O . II 0 0 TO 150 C . . . B U I L D A ROW OF A C O R R E S P O N D I N G TO A BOUNDARY P O I N T C 140 C A L L B L O B L K ( 1 , Z E T A I I Z E T A ) , L L . A ( I A ) , NROW. I D - I R H S . Z . 1 O F , N C O M P . X I . A L P H O . I A L P H O , 1. D F S U B . D G S U B ) 150 I Z E T A = I Z E T A « 1 C C . . . CHECK FOR OTHER S I D E C O N D I T I O N S . C I F ( I Z E T A . G T . MSTAR A N D . 1 Z E T A ( M S T A R > G E . 0MIN11 X X , A R I G H T ) ) GO TO 2 8 0 IF IXX G T . X I I N . I ) ) GO TO 2 6 0 GO TO 100 C C . . . T H I S V A L U E C O R R E S P O N D S TO A C O L L O C A T I O N I I N T E R I O R ) C . . . P O I N T . B U I L D THE C O R R E S P O N D I N G NCOMP E O U A T I O N S . C 160 I F ( I G U E S S . N E . 1) GO TO ( 2 1 0 , 1 7 0 . 2 3 0 ) , M1 C C . . . U S E I N I T I A L A P P R O X I M A T I O N P R O V I D E D BY THE U S E R . C C A L L S O L U T N ! X X , Z . D M V A L ) GO TO I 1 9 0 . 2 5 0 ) , MODE C C . . . F I N D RHS V A L U E S C 170 I F ( I T E R . G E . 1 I GO TO 180 C A L L APPROX ( I I . X X . Z . V N . X I O L D , N O L O . A L D I F , K . 1 N C O M P . M, M S T A R , 1, O M V A L . 1) GO TO 190 180 C A L L APPROX ( I . X X , Z . V N C 0 L I 1 . L L ) . X I O L D , H O L D . 1 A L D I F , K , N C O M P , M. M S T A R , 3 , D M V A L . 1) 190 C A L L F S U B ( I X . 2 . F ) C C . . . F I L L IN RHS V A L U E S (AND A C C U M U L A T E I T S N O R M ) . C DO 2 0 0 J s l , N C O M P ID B ID • 1 V A L U E B O M V A L ( J ) - F I J I R H S ( I O ) B - V A L U E RNORM B RNORM • V A L U E " ? I F ( I T E R . G E . 1) GO TO 2 0 0 I-ALPHO B I A L P H O • 1 A L P H O I I A L P H O ) B O M V A L I J ) 2 0 0 C O N T I N U E GO TO 2 8 0 C C . . . T H E L I N E A R C A S E C 2 1 0 C A L L F S U B ( X X . Z , F I DO 2 2 0 J s l , N C O M P 10 s ID . 1 2 2 0 R H S ( I D ) s F I J I 10 = ID - NCOMP 0 0 TO 2 5 0 C C . . . E V A L U A T E FORMER C O L L O C A T I O N S O L N FOR M0DE=2 C 2 3 0 I F ( I T E R G E . 1 ) GO TO 2 4 0 C A L L APPROX ( I I , X X . Z , V N . X I O L D , N O L O . A L D I F . K . 1 N C O M P . M. M S T A R . 1, DUMMY, 0 ) GO TO 250 240 CALL APPRO! (I. IX. 2 . VNCOLd.Ll), XIOLD. NOLO. 1 ALDIF, X, NCOMP, M. MSTAR, 3, DUMMY. 0) C C... FILL IN NCOMP ROWS OF A C 250 CALL BLD6LK (I. I I . LL, A(IA), NROW, ID-IRHS«1, Z. 1 OF, NCOMP, I I , ALPHO, IALPHO, 2, DFSUB, DGSUB) ID c ID * NCOMP C C... PREPARE TO SET UP SIDE CONDITIONS FOR LAST SUBINTERVAL C 2B0 IF (LL .IT. K) GO TO 270 IF II .LT. N .OR. IZETA GT. MSTAR) GO TO 280 XX = XKN'I) • l.DO GO TO 110 270 CONTINUE C C... UPDATE COUNTERS -- I-TH BLOCK COMPLETED C 280 IRHS = IRHS • NROW IA » IA • NROW * KDM 290 CONTINUE IF I MODE .NE. 1) GO TO 300 RNORM = DSQRTIRNORM / OFLOATINALPHA) RETURN C C... SOLVE THE LINEAR SYSTEM. C C... MATRIX DECOMPOSITION C 300 CALL FCBLOK (A, INTEGS, N, IPIV. ALPHA. IFLAG) C C... CHECK FOR SINGULAR MATRIX C IFIIFLAG .EO. 0) RETURN C C... PERFORM FORWARD AND BACKWARD SUBSTITUTION FOR MODE=0,2. OR 3. C 310 CALL SBBLOK (A, INTEGS, N, IPIV, RHS, ALPHA) C C... FINO THE COEFFICIENTS ALPHA OF THE INITIAL APPROX IF NECESSARY. C IF (ITER .GE. 1 .OR. MODE .NE. 2) RETURN IALPHO = 0 IRHS = 0 ISTO = 0 DO 320 1=1,N NROW = INTEGS!1,1) IRHS = IRHS • ISTO ISTART = ISTO • 1 ISTO = NROW - KD 00 320 J=ISTART,NROW IRHS = IRHS • 1 IALPHO = IALPHO • 1 RHS(IRHS) = RHS(IRHS) • ALPHOIALPHO) 320 CONTINUE CALL SBBLOK (A, INTEGS, N. IPIV, RHS, ALPHO) 00 330 1=1,NALPHA 330 ALPHOII = ALPHOI) - ALPHA 11) RETURN END SUBROUTINE BLDBLK (1, X, LL, 0. NROW, NC, Z. DF, NCOMP, 1 XI, ALPHO, IALPHO, MODE. DFSUB. DGSUB) PURPOSE: CONSTRUCT COLLOCATION MATRIX ROWS ACCORDING TO MODE: MODE =1 • A ROW CORRESPONDING TO A SIDE CONDITION. MODE = 2 - A GROUP OF NCOMP ROWS CORRESPONDING AN INTERIOR COLLOCATION POINT. VARIABLES: ALPHO • USED ONLY ON THE FIRST ITERATION FOR NONLINEAR PROBLEMS WHEN THE FIRST APPROXIMATION IS OTHER THAN A B-SPLINE REPRESENTATION ON THE CURRENT MESH. A RIGHT HAND SIDE IS BEING BUILT UP IN ALPHO WHICH, WHEN THE INVERTED COLLOCATION MATRIX IS APPLIED TO IT. WILL PRODUCE A FIRST APPROXIMATION ON THE CURRENT MESH ' IN TERMS OF B- SPLINES SO THE STEP-LENGTH ALGORITHM IN CONTRL CAN OPERATE. X - THE COLLOCATION OR SIDE CONDITION POINT. I - THE SUBINTERVAL CONTAINING X LL - IF X IS A COLLOCATION POINT THEN IT IS THE LL-TH OF K COLLOCATION POINTS ON THE I-TH SUBINTERVAL. 0 - THE SUB-BLOCK OF THE COLLOCATION MATRIX IN WHICH THE EOUATIONS ARE TO BE FORMED. NROW - NO. OF ROWS IN 0. NC - THE FIRST ROW IN 0 TO BE USED FOR EOUATIONS. Z • Z(X) DG - THE DERIVATIVES OF THE SIDE CONDITION. DF - THE JACOBIAN AT X. ID - THE ROW OF 0 BEING CONSTRUCTED. BASEF - VALUES AND DERIVATIVES OF THE B-SPLINE BASIS FOR EACH OF THE COMPONENTS. JCOMP - COUNTER FOR THE COMPONENT BEING DEALT WITH. L - COUNTER FOR THE B-SPLINES REPRESENTING U(JCOMP). J - COUNTER FOR THE LOWEST M(JCOMP) DERIVATIVES OF BSPLINES REPRESENTING U JCOMP IMPLICIT REAL'8 (A-H.OZ) COHtfON /APPR/ N.NOLO.NMAX.NALPHA.MSHFLG.MSHNUM.MSHLMT,MSHALT COMMON /ORDER/ K, ND, MSTAR, KD. KDM. MNSUM, MI20) COMMON /SIDE/ ZETAI40), ALEFT, ARIGHT. IZETA. IWR C0H40N /NONLN/ PRECIS,NONLIN,ITER,LIMIT,ICARE,IPRINT.IGUESS.IFREEZ COMMON /BSPLIN/ VNC0L(ee.7). VNSAVE188,5). VNI66) DIMENSION O(NROW.I). Z(1). DF(NCOMP,1) DIMENSION IIH), BASEF(620), ALPHOI 1), 00(40) C NK = NC IF (MODE .EO. 2) NK = NC • NCOMP - 1 DO 10 J=NC.NK DO 10 L=1.KDM 10 0IJ.L)=O.DO C 0 0 TO 3 7 0 3 6 0 I F ( D A B S ( E A L P H A ( I N ) ) . G T . T O L I N ( I ) • 1 ( D A B S t A L D I F t I N ) ) » 1 . 0 0 ) ) GO TO 4 1 0 3 7 0 C O N T I N U E 380 C O N T I N U E C C... C O N V E R G E N C E O B T A I N E D C I F ( I P R I N T . L T . 11 WRITE ( I W R , 5 6 0 ) I T E R I F ( I C O N .EO. 1) GO TO 4 5 0 C C . . . S I N C E C O N V E R G E N C E O B T A I N E D . U P D A T E C O E F F S WITH TERM. FROM C... T H E F I X E D J A C O B I A N I T E R A T I O N . C DO 380 1 = 1 . N A L D I F 3 9 0 A L D 1 F I I ) = A L D I F I I ) * A d ) DO 4 0 0 1 = 1 . N A L P H A 4 0 0 A L P H A ( I ) = ALPHA 11) • E A L P H A ( I ) 4 0 5 I F < ( A N F I X . L T . P R E C I S . O R . R N O R M . L T . P R E C I S ) A N D . I P R I N T . L T . 1 ) 1 W R I T E ( I W R . 5 6 0 ) I T E R I C O N = 1 IF ( I C A R E . E O . 1 -1 )1 I C A R E = 0 GO TO 4 5 0 C C... NO C O N V E R G E N C E . R E P E A T C 4 1 0 I F ( ICON . E O . 0 ) GO TO ISO GO TO 70 C C . . . D I A G N O S T I C S FOR F A I L U R E OF N O N L I N E A R I T E R A T I O N . C 4 2 0 I F d P R I N T . L T . 1) WRITE ( I W R , 5 7 0 ) I T E R GO TO 4 4 0 4 3 0 I F d P R I N T . L T . 1) W R I T E I 1 W R . 5 8 0 ) R E L A X . R E L M I N 4 4 0 I F L A G = - 2 LCONV = LCONV • 1 IF ( I C A R E E O . 2 A N D . LCONV . G T . 1) R E T U R N I F ( I C A R E .EO. 0 ) I C A R E = -1 GO TO 4 6 0 C C... C H E C K FOR ERROR T O L E R A N C E S A T I S F A C T I O N C 4 5 0 C A L L E R R C H K ( 1 M E S H , X I O L D , A L D I F , V A L S T R . A . M S T A R . I F I N ) I F ( I M E S H , E 0 . 1 . O R . I F I N . E O . 0 . A N D . 1 I C A R E . N E . 2) GO TO 4 6 0 I F L A G = 1 R E T U R N C C . . . P I C K A NEW MESH C . . . C H E C K S A F E G U A R D S FOR MESH R E F I N E M E N T C 4 6 0 I M E S H = 1 IF ( I C O N EO 0 . O R . MSHNUM . G E . MSHLMT 1 . O R . MSHALT . G E . MSHLMT) I M E S H = 2 I F ( M S H A L T . G E . MSHLMT . A N D . MSHNUM . L T . MSHLMT) 1 M S H A L T = I C A L L N E W M S H ( I M E S H . I I . X I O L D . X I J . A L D I F , V A L S T R , 1 S L O P E . A C C U M . N F X P N T . F I X P N T ) C C . . . E X I T IF E X P E C T E D N I S TOO L A R G E (BUT MAY TRY N=NUAX ONCE) C I F (N L E . NMAX) GO TO 4 7 0 N = N / 2 I F L A G = -I I F ( I C O N . E O . 0 . A N D . I P R I N T . L T . 1) WRITE ( I W R . 5 9 0 ) I F ( I C O N . E O . 1 . A N D . I P R I N T . L T . II WRITE ( I W R . 6 0 0 ) R E T U R N 4 7 0 I F ( I C O N E Q . 0 ) I M E S H = 1 I F ( I C A R E E O . 1) I C O N = 0 GO TO 2 0 4 9 0 F O R M A T ! / / 2 4 H THE MATRIX I S S I N G U L A R ) 600 F O R M A T t / 3 0 H F U L L DAMPED NEWTON I T E R A T I O N , ) 5 1 0 F O R M A T ( 1 3 H I T E R A T I O N = . 1 3 . 15H NORM ( R H S ) = , D I D . 2 ) 5 2 0 F 0 R M A T M 3 H I T E R A T I O N = , I 3 , 2 2 H R E L A X A T I O N F A C T O R = . D 1 0 . 2 1 / 3 3 H NORM OF S C A L E D RHS C H A N G E S FROM . D 1 0 . 2 . 3 H T 0 . D 1 0 . 2 2 / 3 3 H NORM OF RHS C H A N G E S FROM . D 1 0 . 2 . 3 H T O . D I D . 2 ) 5 3 0 F O R M A T ( / 2 7 H F I X E D J A C O B I A N I T E R A T I O N S . ) 5 4 0 F O R M A K / 3 5 H S W I T C H TO DAMPED NEWTON I T E R A T I O N . ) 5 5 0 FORMAT 140H R E L A X A T I O N F A C T O R C O R R E C T E D TO R E L A X = . D 1 0 . 2 1 / 3 3 H NORM OF S C A L E D RHS C H A N G E S F R O M . 0 1 0 . 2 . 3 H T 0 . D 1 0 . 2 2 / 3 3 H NORM OF RHS C H A N G E S FROM . 0 1 0 . 2 . 3 H T 0 . D 1 0 . 2 ) 5 6 0 F O R M A T ( / 1 8 H C O N V E R G E N C E A F T E R , I 3 . 1 1 H I T E R A T I O N S /I 5 7 0 F O R M A T ( / 2 2 H NO C O N V E R G E N C E A F T E R , 1 3 , 11H I T E R A T I O N S / I 5 8 0 F O R M A T ( / 3 7 H NO C O N V E R G E N C E . R E L A X A T I O N F A C T O R = , 0 1 0 . 3 1 , 2 4 H I S TOO SMALL ( L E S S T H A N . 0 1 0 . 3 . 1 H I / ) 5 9 0 F O R M A T ! 1 8 H (NO C O N V E R G E N C E ) ) 8 0 0 F O R M A T ! 5 0 H ( P R O B A B L Y T O L E R A N C E S TOO S T R I N G E N T , OR NMAX TOO 1 , 6 H S M A L L ) ) END P A R T 2 M E S H S E L E C T I O N , ERROR E S T I M A T I O N . (AND R E L A T E D C O N S T A N T A S S I G N M E N T ) R O U T I N E S - - S E E 1 1 ) . 1 2 ) , 15) S U B R O U T I N E NEWMSH ( M O D E . X I , X I O L D , X I J . A L D I F , V A L S T R . 1 S L O P E , A C C U M , N F X P N T , F I X P N T ) S E L E C T A MESH ON WHICH A C O L L O C A T I O N S O L U T I O N I S TO B E D E T E R M I N E D T H E R E A R E 5 P O S S I B L E MODES OF A C T I O N : MODE = 5 . 4 , 3 • D E A L M A I N L Y WITH D E F I N I T I O N OF AN I N I T I A L MESH F O R THE CURRENT BOUNDARY V A L U E P R O B L E M = 2 . 1 - D E A L WITH D E F I N I T I O N OF A NEW M E S H , E I T H E R BY S I M P L E M E S H H A L V I N G OR BY MESH S E L E C T I O N MORE S P E C I F I C A L L Y , FOR MODE • 5 AN I N I T I A L ( G E N E R A L L Y NONUNIFORM) MESH I S D E F I N E D BY T H E U S E R AND NO M E S H S E L E C T I O N I S TO BE P E R F O R M E D = 4 AN I N I T I A L ( G E N E R A L L Y NONUNIFORM) MESH I S D E F I N E D BY THE U S E R = 3 A S I M P L E U N I F O R M MESH ( E X C E P T P O S S I B L Y FOR SOME F I X E D P O I N T S ) I S D E F I N E D : N= N O . OF S U B I N T E R V A L S = 1 THE A U T O M A T I C M E S H S E L E C T I O N P R O C E D U R E IS U S E D ( S E E ( 1 ) ANO ( 5 ) FOR D E T A I L S ) - * A S I M P L E M E S H H A L V I N G I S P E R F O R M E D V A R I A B L E S N • NUMBER OF M E S H S U B I N T E R V A L S N O L O • NUMBER OF S U B I N T E R V A L S F O R F O R M E R M E S H X I • M E S H P O I N T A R R A Y X I O L D • FORMER M E S H P O I N T A R R A Y M S H L M T • M A X I M U M NO. OF M E S H S E L E C T I O N S W H I C H A R E P E R M I T T E D F O R A G I V E N N B E F O R E M E S H H A L V I N G M S H N U M • NO. OF M E S H S E L E C T I O N S W H I C H H A V E A C T U A L L Y B E E N P E R F O R M E D F O R T H E G I V E N N M S H A L T - NO. OF C O N S E C U T I V E T I M E S I P L U S 1 ) T H E M E S H S E L E C T I O N H A S A L T E R N A T E L Y H A L V E D AND D O U B L E D N. I F M S H A L T .GE. MSHLMT T H E N C O N T R L R E Q U I R E S THAT THE C U R R E N T M E S H B E H A L V E D . M S H F L G = 1 T H E M E S H I S A H A L V I N G OF I T S F O R M E R M E S H ( S O AN E R R O R E S T I M A T E H A S B E E N C A L C U L A T E D ) B 0 O T H E R W I S E I G U E S S - I P A R I O ) I N S U B R O U T I N E C O L S Y S I T I S U S E D H E R E ONLY F O R MODE=S AND 4 . WHERE = 2 THE S U B R O U T I N E S E T S I U X I O L O . T H I S I S U S E D E . G . I F C O N T I N U A T I O N I S B E I N G P E R -FORMED. AND A M E S H F O R THE OLO D I F F E R E N -T I A L E Q U A T I O N I S B E I N G U S E O = 3 SAME AS F O R = 2 , E X C E P T X I U S E S E V E R Y O T H E R P O I N T OF X I O L D ( S O M E S H X I O L D I S M E S H X I H A L V E D ) s 4 X I HAS B E E N D E F I N E D B Y T H E U S E R . A N D AN O L D M E S H X I O L D I S A L S O A V A I L A B L E O T H E R W I S E , X I H A S B E E N D E F I N E D B Y T H E U S E R AND WE S E T X I O L O = X I I N T H I S S U B R O U T I N E S L O P E - AN A P P R O X I M A T E Q U A N T I T Y TO B E E Q U I D I S T R I B U T E D F O R M E S H S E L E C T I O N ( S E E ( 1 ) ) . V 1 2 . ( K ' M J ) S L O P E 1 1 U MAX I W E I G H T I L ) 'U I X K I ) ) ) 1 . L E . L . L E . N T O L J WHERE J B J T O L ( L ) S L P H M X - M A X I M U M OF S L O P E ( I ) * ( X I O L D ( 1 * 1 ) - X I O L D ( I ) ) F O R I = 1 MOLD. A C C U M • A C C U M ( I ) I S T H E I N T E G R A L O F S L O P E F R O M A L E F T TO X I O L D ( I ) . V A L S T R - I S A S S I G N E D V A L U E S N E E D E D I N E R R C H K F O R T H E ERROR E S T I M A T E . I M P L I C I T R E A L ' S ( A - H . O - Z ) COMMON / O R D E R /IC. NCOMP. MSTAR , K D . K D M , MNSUM, Ml 201 COMMON / A P P R / N . N O L D . N M A X . N A L P H A . M S H F L G . M S H N U M . M S H L M T , M S H A L T COMMON / E R R O R S / T 0 L I 4 0 ) . W G T M S H I 4 0 ) . T 0 L I N I 4 0 ) . R O O T I 4 0 ) , 1 J T 0 L I 4 0 ) . L T 0 L I 4 0 ) . N T O L COMMON / C O L L O C / R H O ( 7 ) . W G T E R R I 4 0 ) COMMON / S I D E / 2 E T A I 4 0 I . A L E F T . A R I G H T , I 2 E T A , IWR COMMON / N O N L N / P R E C I S . N O N L I N . I T E R . L I M I T , I C A R E . I P R I N T , I G U E S S , I F R E E Z COMMON / B S P L I N / V N C O L I 6 6 , / ) , V N S A V E ( 6 6 , 5 ) . V N I 6 6 I D I M E N S I O N D 1 I 4 0 ) . 0 2 ( 4 0 ) , Z V I 4 0 ) . S L O P E ( l ) . A C C U M I 1 ) , V A L S T R I 1 ) D I M E N S I O N X K I I , X I O L O I I ) . X I J ( I ) , A L D I F I I) . F I X P N T I 1 I c N F X P 1 = N F X P N T •I GO TO ( 1 6 0 . 1 0 0 . 5 0 . 2 0 . 1 0 ) , MODE C C . . . M00E=5 S E T MSHLMT=1 SO THAT NO MESH S E L E C T I O N I S PERFORMED C 10 MSHLMT B 1 C C . . . M0DE=4 T H E U S E R - S P E C I F I E D I N I T I A L MESH I S A L R E A D Y IN P L A C E . C 2 0 I F ( I G U E S S . L T . 2) GO TO 4 0 C C . . . I G U E S S = 2 . 3 OR 4 . C N0LDP1 B NOLD • 1 IF ( I P R I N T . L T . 1) W R I T E ! I W R , 3 6 0 ) N O L D . I X I O L D I I ) , I = 1 , N 0 L D P 1 I IF I I G U E S S . N E . 3) GO TO 40 C C . . . I F I R E A D I I P A R I 6 I ) G E . 1 AND I G U E S S I I P A R I 9 ) ) C . . E O . 3 T H E N THE F I R S T M E S H I S E V E R Y S E C O N D P O I N T OF THE C . . . MESH IN X I O L O . C N B NOLO / 2 I B 0 DO 30 J r 1, N O L D . 2 1 = 1 * 1 30 X I I I ) B X I O L O I J I 4 0 C O N T I N U E NP1 B N • 1 X I ! 1) B A L E F T X I I N P 1 ) B A R I G H T GO TO 3 2 0 C C . . . M 0 0 E s 3 G E N E R A T E A I P I E C E W I S E I U N I F O R M M E S H . IF THERE ARE C . . . F I X E D P O I N T S THEN E N S U R E THAT THE N B E I N G U S E D I S L A R G E E N O U G H . C 5 0 I F ( N . L T . N F X P 1 I N B N F X P 1 NP1 B N • 1 X I I 1 ) B A L E F T I L E F T B 1 X L E F T B A L E F T C C . . . L O O P OVER THE S U B R E G I O N S B E T W E E N F I X E D P O I N T S . C DO 9 0 J B 1 . N F X P 1 XR1GHT B AR IGHT I R I G H T B NP1 IF I J . E O . NFXP1 ) GO TO 6 0 X R I G H T B F I X P N T ( J ) C C . . . D E T E R M I N E WHERE THE J - T H F I X E D P O I N T S H O U L D F A L L IN THE C . . . NEW MESH • T H I S I S X I I I R I G H T ) AND THE ( J - D S T F I X E D C . . . P O I N T I S IN X I I I L E F T ) C NMIN = ( X R I G H T - A L E F T ) / I A R I G H T • A L E F T ) • O F L O A T I N ) • 1 . 5 0 0 IF INMIN G T . N - N F X P N T ' J ) NMIN s N - N F X P N T • J I R I G H T B MAIO ( I L E F T . 1 . NMIN) 6 0 X I ( I R I G H T ) B XRIGHT C C . . . G E N E R A T E E Q U A L L Y S P A C E D P O I N T S B E T W E E N THE J - 1 S T AND THE C . . . J - T H F I X E D P O I N T S . C N R E G N » I R I G H T • I L E F T - 1 I F I NREGN . E O . 0 ) GO TO 8 0 OX • ( X R I G H T - X L E F T ) / D F L O A T I N R E G N . 1 ) 0 0 7 0 I - 1 . N R E G N 7 0 X K I L E F T . I I • X L E F T • D F L O A T ( I ) • OX 8 0 I L E F T e I R I G H T X L E F T « X R I G H T SO C O N T I N U E GO TO 320 C . . . MO0E=2 H A L V E THE C U R R E N T MESH ( I . E . D O U B L E I T S S U E ) 100 N2 • 2 • N C . . . C H E C K T H A T N DOES NOT E X C E E D S T O R A G E L I M I T A T I O N S I F (N2 . L E . NMAX) GO TO 120 C . . . I F P O S S I B L E , TRY WITH N=NMAX. R E D I S T R I B U T E F I R S T . I F (MODE . E O . 2) GO TO 110 N = NMAX / 2 GO TO 2 2 0 110 I F ( I P R I N T . L T . II W R I T E ( I W R . 3 7 0 1 N = N2 R E T U R N C . . . C A L C U L A T E THE OLD A P P R O X I M A T E S O L U T I O N V A L U E S AT C... P O I N T S TO B E U S E D IN ERRCHK F O R ERROR E S T I M A T E S . C... I F M S H F L G e l AN ERROR E S T I M A T E WAS O B T A I N E D FOR C . . . FOR T H E OLD A P P R O X I M A T I O N SO H A L F THE N E E D E O V A L U E S C . . . W I L L A L R E A D Y B E IN V A L S T R . 120 I F ( M S H F L G . E G . 01 GO TO 140 C . . . S A V E I N V A L S T R THE V A L U E S OF THE OLD S O L U T I O N C . . . AT THE R E L A T I V E P O S I T I O N S 1 /6 AND 5 / 6 IN E A C H S U B I N T E R V A L . K S T O R E = 1 0 0 130 I • 1 . N 0 L D HD6 * ( X I O L D I I O ) - I I O L D I I I I / 8 . D O X = X I O L O ( I ) • HD6 C A L L APPROX ( I , X , V A L S T R ( K S T O R E ) , V N S A V E ( 1 , 2 1 , X I O L D . 1 N O L D , A L D I F , K , N C O M P . M. M S T A R , 3 , D U M M , 0 ) X = X « 4 . D O • HD8 K S T O R E « K S T O R E • 3 • MSTAR C A L L APPROX ( I , X , V A L S T R ( K S T O R E ) , V N S A V E I 1 . 5 ) . 1 X I O L D . N O L D , A L D I F . K , N C O M P , M. M S T A R . 3 . D U M M . 0 ) K S T O R E = K S T O R E • MSTAR 130 C O N T I N U E GO TO 160 C . . . S A V E I N V A L S T R THE V A L U E S OF THE OLD S O L U T I O N C . . . AT THE R E L A T I V E P O S I T I O N S 1 / 6 . 2 / 6 . 4 / 6 AND 5 / 6 IN C . . . E A C H S U B I N T E R V A L . 140 K S T O R E = 1 DO 150 I = I .N X = X K I ) HD8 = ( X K I ' I ) - X K I ) ) / 6 . D O DO 150 J = 1 , 4 X s X • HD6 I F ( J . E 0 . 3 I X = X • HD6 C A L L APPROX ( I . X . V A L S T R ( K S T O R E ) , V N S A V E f 1 . J * 1 ) . 1 X I O L D , N O L D , A L D I F , K , N C O M P , M, M S T A R , 3 , 2 DUMM.O) K S T O R E = K S T O R E • MSTAR 150 C O N T I N U E 160 M S H F L G o 0 MSHNUM - 1 MODE - 2 C C . . . G E N E R A T E THE H A L V E D M E S H . C J » 2 DO 170 I • I . N I I I J I * ( X I O L D ( I ) • I I O L D ( I ' I I ) / 2 . D O X K J ' I I » X I O L D d ' D 170 J = J • 2 N = N2 GO TO 3 2 0 C C . . . MO0E=1 WE DO M E S H S E L E C T I O N IF IT I S D E E M E D WORTHWHILE C 180 I F ( N O L D . E O . 1 I GO TO 100 IF ( N O L D . L E . 2 , N F X P N T ) GO TO 100 C C . . . T H E F I R S T I N T E R V A L H A S TO B E T R E A T E D S E P A R A T E L Y FROM THE C . . . O T H E R I N T E R V A L S ( G E N E R A L L Y THE S O L U T I O N ON THE ( I - 1 I S T AND I T H C . . . I N T E R V A L S W I L L B E U S E D TO A P P R O X I M A T E T H E N E E D E D D E R I V A T I V E . B U T C . . . H E R E THE 1ST AND S E C O N D I N T E R V A L S ARE U S E D . ) C I • 1 C A L L HORDER ( 1 , 0 1 , X I O L D , A L D I F ) C A L L HORDER ( 2 . 0 2 , X I O L D , A L D I F ) C A L L APPROX ( I . X I O L O ( I ) . Z V . V N S A V E ( 1 . 1 1 , X I O L D , N O L D , 1 A L D I F , K , N C O M P , M, M S T A R , 3 , OUMM. 0 ) A C C U M I I I B O . D O S L 0 P E I 1 ) . O . D O ONEOVH « 2 . D O / ( X I 0 L D I 3 ) - X I O L D ( I ) I DO ISO J • 1 . N T 0 L J J • J T O L ( J ) J V E L T O L I J ) ISO S L O P E d ) = DMAX I ( S L O P E ( 11 . ( D A B S ( D 2 ( JJ) - D I ( J J ) ) 'WGTMSH1 J ) • 10NEOVH / ( I . D O « D A B S ( ZV( JV I 111 " R O O T I J I I SLPHMX r S L 0 P E I 1 1 • ( X I 0 L D I 2 I • X I O L D ( l l ) ACCUMI 2) = SLPHMX I F L I P « 1 C C . . . GO THROUGH T H E R E M A I N I N G I N T E R V A L S G E N E R A T I N G S L O P E C . . . ANO A C C U M . C 0 0 2 1 0 1 E 2 . N O L D I F ( I F L I P . E O . ( - 11 ) C A L L HORDER ( I. D I , X I O L D . A L D I F ) I F ( I F L I P . E O . 1 I C A L L HORDER ( I. D 2 . X I O L O . A L D I F ) C A L L APPROX ( I . X I O L D I I ) , Z V , V N S A V E I 1 , ! ) . X I O L D . N O L O . 1 A L D I F . K . N C O M P , M. M S T A R . 3 . DUMM. 0 ) ONEOVH • 2 . D O / ( X 1 0 L D I I . i l - X I O L D ( l - l ) ) S L O P E ( I ) « O . D O ' C C... E V A L U A T E F U N C T I O N TO B E E O U I D 1 S T R I B U T E D C DO 200 J * 1 . N T 0 L J J B J T O L ( J ) J V • L T O L I J ) 200 S L O P E ! 1 1 • D M A X 1 t S L O P E ( I > , ( D A B S < 0 2 ( J J ) - D 1 l J J ) > * W G T M S H < J I ' ' t ONEOVH / 1 1 . D O • D A B S I Z V I J V ) ) ) ) " R O O T I J I I C C... A C C U M U L A T E A P P R O X I M A T E I N T E G R A L OF F U N C T I O N TO BE C... E O U I D I S T R I B U T E D C TEMP - S L O P E I I ) • I X I O L D I I . D - X I O L D I l ) ) SLPHMX = D M A X 1 ( S L P H M X . T E M P ) ACCUMI I ' D = ACCUMI I ) • TEMP 2 1 0 I F L I P B • I F L I P AVRG r A C C U M I N O L D ' I ) / D F L O A T I N O L O ) D E G E O U = AVRG / D M A X K S L P H M X , P R E C I S ) C . . . N A C C U M = E X P E C T E D N TO A C H I E V E IX USER R E Q U E S T E D T O L E R A N C E S NACCUM e A C C U M I N O L D ' U * 1 .DO I F I I P R I N T . L T . 0 ) W R I T E l I W R , 3 5 0 1 D E G E O U . NACCUM C... D E C I D E I F MESH S E L E C T I O N I S WORTHWHILE ( O T H E R W I S E . H A L V E ) I F ( A V R G . L T . P R E C I S ) GO TO 100 IF ( D E G E O U . G E . . 5 D 0 ) GO TO 100 C... NMX A S S U R E S MESH HAS AT L E A S T H A L F AS MANY S U B I N T E R V A L S AS THE C . . . P R E V I O U S MESH NMX = MAXO I N 0 L D » 1 , NACCUM) / 2 C... T H I S A S S U R E S THAT H A L V I N G WILL B E P O S S I B L E L A T E R (FOR ERROR E S T ) NMAX2 • NMAX / 2 C... THE MESH I S AT MOST H A L V E D N • MINO ( N M A X 2 , N O L D , NMX) 2 2 0 N 0 L 0 P 1 E NOLD * 1 I F IN . L T . N F X P 1 ) N=NFXP1 MSHNUM B MSHNUM * 1 C . . . I F THE NEW MESH I S S M A L L E R THAN THE OLD MESH S E T MSHNUM C . . . SO THAT THE NEXT C A L L TO NEWMSH WILL PROOUCE A H A L V E D C . . . M E S H . I F N . E O . NOLD / 2 INCREMENT MSHALT SO T H E R E CAN NOT C... B E A N I N F I N I T E L O O P A L T E R N A T I N G B E T W E E N N AND N / 2 P O I N T S . I F IN . L T . NOLD) MSHNUM B MSHLMT I F IN . G T . N O L D / 2 ) M S H A L T = 1 I F IN . E O . N O L D / 2 ) M S H A L T » MSHALT « 1 M S H F L G B 0 C C . . . H A V I N G D E C I D E D TO G E N E R A T E A NEW MESH WITH N S U B I N T E R V A L S WE NOW C... DO S O , T A K I N G I N T O A C C O U N T THAT THE N F X P N T P O I N T S IN THE ARRAY C . . . F I X P N T MUST B E I N C L U D E D IN THE NEW M E S H . C IN = 1 A C C L B O . D O L O L D =2 X I I I ) = A L E F T X I ( N « 1 ) — A R I G H T DO 3 1 0 I = 1, N F X P 1 I F II . E O . N F X P 1 ) GO TO 2 5 0 0 0 230 J B L O L D . N0LDP1 LNEW B J IF ( F I X P N T ( I ) . L E . X I O L D ( J I ) GO TO 2 4 0 2 3 0 C O N T I N U E 2 4 0 C O N T I N U E ACCR = A C C U M I L N E W ) • ( F I X P N T ( I ) • X I O L D ( L N E W ) ) * S L O P E ( L N E W - 1 ) NREGN = ( A C C R - A C C L ) / ACCUMINOLDP1 I • D F L O A T ( N ) - . 5 0 0 NREGN B M I N O I N R E G N , N - IN - N F X P 1 « I I X K I N • N R E G N • 1) s F I X P N T I I ) GO TO 2 6 0 2 5 0 ACCR B A C C U M I N 0 L 0 P 1 ) LNEW — N 0 L 0 P 1 NREGN B N - IN 2 6 0 IF INREGN . E Q . 0 ) GO TO 300 TEMP B A C C L TSUM B ( A C C R - A C C L ) / D F L O A T I N R E G N * 1 ) 0 0 260 J B 1 , NREGN IN e IN « 1 TEMP B T E M P • TSUM DO 270 L B L O L D , LNEW L C A R R Y B L IF ( T E M P . L E . A C C U M I D ) GO TO 260 2 7 0 C O N T I N U E 2 8 0 C O N T I N U E L O L O B L C A R R Y 2 9 0 X K I N ) B X I O L O ( L O L D - 1 I • ( T E M P - A C C U M I L O L O - 1 1 1 / 1 S L O P E ( L O L O - I ) 300 IN B I N . 1 A C C L B ACCR L O L D • LNEW 310 C O N T I N U E MODE B 1 3 2 0 C O N T I N U E C C . . . R E G A R D L E S S OF HOW THE NEW MESH I S C H O S E N . THE NEW C O L L O C A T I O N C . . . P O I N T S X I J I N I A L E F T , A R I G H T I ARE G E N E R A T E D H E R E C K 2 B 1 DO 3 3 0 I B 1 , N H B ( X I ( I « 1 ) - I I I 1 I I / 2 . D O XM • ( X K I . 1 ) . X K I t ) / 2 . D O DO 330 J B 1 ,K X I J I K 2 ) B R H O ( J ) • H • XM K 2 e K 2 • 1 3 3 0 C O N T I N U E N P t = N • 1 IF ( I P R I N T I T . 1) W R 1 T E I I W R . 3 4 0 ) N , ( X I ( 1 1 . 1 * 1 , N P 1 1 N A L P H A B N • K • NCOMP • MSTAR R E T U R N 3 4 0 F O R M A T ( / I 7 H THE NEW M E S H ( O F , I 5 , 1 8 H S U B I N T E R V A L S ) . . 1 0 0 1 / 8 F 1 2 . 8 ) ) 3 5 0 F O R M A T ( / 2 1 H MESH S E L E C T I O N I N F 0 . / 3 0 H D E G R E E OF E O U I D I S T R I B U T I O N B 1 , F 8 . 5 , 2 6 H P R E D I C T I O N FOR R E Q U I R E D N B , I B ) 3 6 0 F 0 R M A T I / 2 O H T H E FORMER M E S H ( O F . I 8 . 1 5 H S U B I N T E R V A L S ) . . 1 1 0 0 I / S F 1 2 . B U 3 7 0 FORMAT ( / 2 3 H E X P E C T E D N TOO L A R G E I END S U B R O U T I N E C O N S T S P U R P O S E A S S I G N ( O N C E ) V A L U E S TO V A R I O U S ARRAY C O N S T A N T S . A R R A Y S A S S I G N E D DURING C O M P I L A T I O N : C N S T S 1 - WEIGHTS FOR E X T R A P O L A T I O N ERROR E S T I M A T E C N S T S 2 • WEIGHTS FOR MESH S E L E C T I O N ( T H E A B O V E W E I G H T S COME FROM THE T H E O R E T I C A L FORM FOR THE C O L L O C A T I O N ERROR - - S E E ( 6 ) ) A R R A Y S A S S I G N E D O U R I N G E X E C U T I O N : WGTERR - THE P A R T I C U L A R V A L U E S OF C N S T S 1 USEO FOR CURRENT RUN ( D E P E N D I N G OH K . I l l WGTMSH • G O T T E N FROM THE V A L U E S OF C N S T S 2 WHICH IN TURN A R E THE C O N S T A N T S IN THE T H E O R E T I C A L E X P R E S S I O N FOR THE E R R O R S . THE O U A N T I T I E S IN WGTMSH ARE tOX THE V A L U E S IN C N S T S 2 SO THAT THE MESH S E L E C T I O N A L G O R I T H M I S A I M I N G F O R ERRORS . I I A S L A R G E AS THE U S E R R E O U E S T E D T O L E R A N C E S . J T O L • COMPONENTS OF D I F F E R E N T I A L S Y S T E M TO WHICH T O L E R A N C E S R E F E R ( V I Z . I F L T O L ( I ) R E F E R S TO A D E R I V A T I V E OF U ( J ) . THEN J T O L I I ) = J ) ROOT - R E C I P R O C A L S O F E X P E C T E D R A T E S OF C O N V E R G E N C E OF COMPO-NENTS OF Z ( J ) FOR WHICH T O L E R A N C E S ARE S P E C I F I E D RHO - THE K C O L L O C A T I O N P O I N T S ON 1 - 1 , 1 ) V N C O L - THE MESH I N D E P E N D E N T 8 - S P L I N E S V A L U E S AT C O L L O C A T I O N P O I N T S I M P L I C I T R E A L * 8 ( A - H . O - Z ) COMMON / C O L L O C / R H O ( 7 ) . W G T E R R ( 4 0 ) COMMON / O R D E R / K , N C O M P , M S T A R , K D , K D M , M N S U M , M ( 2 0 ) COMMON / B S P L I N / V N C O L I 6 6 . 7 ) , V N S A V E I 6 6 , 5 ) . V N I 6 6 ) COMMON / E R R O R S / T 0 L I 4 0 ) , R G T M S H ( 4 0 ) . T 0 L I N I 4 0 ) . R 0 0 T I 4 0 ) , 1 J T O L ( 4 0 ) , L T O L ( 4 0 ) , N T O L COMMON / N O N L N / P R E C I S , N O N L I N , I T E R . L I M I T , I C A R E , I P R I N T , I G U E S S . I F R E E Z D I M E N S I O N C N S T S 1 ( 2 8 ) . C N S T S 2 I 2 8 ) D A T A C N S T S 1 / . 2 5 D 0 , . 6 2 5 0 - 1 , . 7 2 1 6 8 0 - 1 . 1 . 8 3 4 2 D - 2 , 1 1 . 0 0 6 5 0 - 2 . 5 . 8 1 0 0 0 - 2 , 5 . 4 6 5 8 D - 3 . 6 . 3 3 7 0 0 - 3 , 1 . 6 8 9 0 0 - 2 . 2 2 . 7 7 9 2 D - 2 . 1 . 6 0 9 5 0 - 3 . 1 . 4 9 6 4 D - 3 . 7 . S 9 3 8 D - 3 . 5 . 7 5 7 3 0 - 3 . 3 1 . 8 3 4 2 D - 2 . 4 . 6 7 3 0 - 3 . 4 . 1 5 0 0 - 4 , 1 . B 1 9 D - 3 , I . 4 6 8 D - 3 . 4 6 . 3 7 1 0 - 3 . 4 . 6 1 0 D - 3 . 1 . 3 4 2 D - 4 , 1 . 1 3 6 D - 4 , 4 . 8 6 9 D - 4 . 5 4 . 1 7 7 0 - 4 . 1 . 3 7 4 0 - 3 . 1 . 6 5 4 D - 3 , 2 . 6 6 3 D - 3 / D A T A C N S T S 2 / 1 . 2 5 0 - 1 . 2 . 6 0 4 D - 3 . 6 . 0 1 9 D - 3 , 2 1 7 0 D - 5 . 1 7 1 5 3 0 - 5 , 5 . 2 0 8 D - 4 . 0 . 6 8 9 0 - 6 . 3 . 6 6 9 D - 7 . 3 . 1 0 0 0 - 6 , 2 4 5 1 0 - 5 , 2 2 . 6 9 1 0 - 1 0 . 1 . 1 2 0 0 - 0 , 1 . 0 7 8 0 - 6 , 9 . 4 0 5 0 - 6 . 1 . 0 3 3 D - 6 , 3 5 . 0 9 7 D - 1 3 , 2 . 2 9 0 0 - 1 2 , 2 . 4 4 6 0 - 1 1 , 2 . 3 3 1 0 - 1 0 . 2 . 9 3 6 0 - 9 , 4 3 . 5 9 3 D - 8 . 7 . 0 0 1 0 - 1 6 . 3 . 3 6 3 0 - 1 5 . 3 . 9 2 1 0 - 1 4 , 4 . 0 2 8 0 - 1 3 . 6 5 . 6 4 6 0 - 1 2 , 7 . 5 3 1 0 - 1 1 , 1 . 1 2 9 0 - 9 / C C . . . A S S I G N WEIGHTS FOR ERROR E S T I M A T E C K O F F = K • ( K • 1 ) / 2 I E X T R A = 1 0 0 10 J = 1 ,NCOMP L I M = M I J ) DO 10 L = 1 . L I M W G T E R R ( I E X T R A ) = C N S T S 1 I K O F F • L I M • L ) I E X T R A = I E X T R A « 1 10 C O N T I N U E C C . . . A S S I G N ARRAY V A L U E S FOR MESH S E L E C T I O N : WGTMSH. J T O L , AND ROOT C JCOMP = 1 MTOT : m n DO 40 1 = 1 , N T O L L T O L I = L T O L I I I 2 0 C O N T I N U E IF ( L T O L I . L E . M TOT) GO TO 30 JCOMP = JCOMP • 1 MTOT = MTOT • M ( J C O M P ) GO TO 2 0 3 0 C O N T I N U E J T O L ( I ) = JCOMP W G T M S H ( I ) = 1 .01 * C N S T S 2 ( K O F F + L T O L I - M T O T ) / T O L I N ( I ) R O O T ( I ) = 1 . 0 0 / D F L O A T ( K - M T O T - L T O L I • 1 ) 4 0 C O N T I N U E C C . . . S P E C I F Y C O L L O C A T I O N P O I N T S C GO TO ( 5 0 . 6 0 , 7 0 . 6 0 . 8 0 . 1 0 0 , 1 1 0 ) , K SO R H O I I I = 0 . 0 0 GO TO 120 6 0 R H 0 I 2 I = . 5 7 7 3 5 0 2 6 9 1 8 B 6 2 5 7 6 4 5 1 D 0 R H O ( 1 ) « - R H 0 1 2 ) GO TO 120 7 0 R H O I 3 ) c . 7 7 4 5 9 6 6 6 9 2 4 1 4 8 3 3 7 7 0 4 D 0 R H 0 I 2 ) = . 0 0 0 R H O I 1 ) = - R H 0 I 3 I GO TO 120 8 0 R H 0 I 1 ) = - . 8 8 1 1 3 8 3 1 1 5 9 4 0 5 2 5 7 5 2 3 D 0 R H O I 2 ) • - . 3 3 9 9 8 1 0 4 3 5 6 4 6 5 6 2 6 4 B 0 D O R H 0 I 3 ) = - R H 0 I 2 ) R H O I 4 ) = - R H O I 1 ) GO TO 120 9 0 R H 0 I 5 ) = . 9 0 6 1 7 9 8 4 5 9 3 8 6 6 3 9 9 2 8 0 0 0 RHOI41 = . 5 3 8 4 6 0 3 1 0 1 0 5 6 6 3 0 0 1 0 4 0 0 R H O I 3 ) = .ODO R H 0 I 2 ) = - R H 0 I 4 I R H 0 I 1 ) = - R H 0 I 5 ) GO TO 120 100 R H 0 I 6 ) = . 9 3 2 4 6 9 5 1 4 2 O 3 1 5 2 0 2 7 8 1 D 0 R H 0 I 5 ! = . 6 6 1 2 0 B 3 8 6 4 B 6 2 6 4 5 1 3 8 6 D 0 R H 0 I 4 ) = . 2 3 8 6 1 0 1 6 6 O 8 3 1 0 6 9 O 8 6 3 O O R H 0 I 3 ) = - R H 0 I 4 I R H 0 I 2 ) = - R H O I S I R H O I 1 ) = - R H O I 6 ) GO TO 120 110 R H 0 I 7 ) = . 9 4 9 1 0 7 9 9 1 2 3 4 2 7 5 6 5 2 4 5 2 0 0 R H 0 I 6 ) = . 7 4 1 5 3 1 1 8 5 5 9 9 3 9 4 4 3 9 8 6 0 0 R H O I 5 I = . 4 0 5 8 4 5 1 5 1 3 7 7 3 8 7 1 6 6 9 0 0 0 R H 0 I 4 ) = O . D O R H O O l • - R H O I 5 ) RHOI S I • - R H 0 I 6 ) R H O I 1 1 ' - R H O I 7 ) 120 C O N T I N U E C C . . . P U T MESH I N D E P E N D E N T B - S P L I N E S V A L U E S AT C O L L O C A T I O N P O I N T C . . . R H O I J I I N T O V N C O L C J ) . J = l K . C 0 0 130 J « 1 . K A M ' . 5 0 0 * I 1 . D O - R H O I J I I C A L L B S P F I X ( A R G . V N C O L I t . J I . K , NCOMP. M l 130 C O N T I N U E C . . . PUT MESH INDEPENDENT B - S P L I N E S V A L U E S AT THE P O I N T S IN U N I T I N -C . . . T E R V A L 0 , 1 / 0 . 1 / 3 . 2 / 3 , 5 / 6 I N T O V N S A V E . T H E S E V A L U E S ARE TO C . . . B E U S E D IN NEHMSH AND ERRCHK . C A L L B S P F I X ( 1 . D 0 , V N S A V E I 1 . i l , K , NCOMP, M l C A L L B S P F I X ( 5 . D O / 6 . D O , V N S A V E I 1 . 2 ) . K . NCOMP, Ml C A L L B S P F I X ( 2 . D O / 3 . D O . V N S A V E ! 1 . 3 ) , K . N C O M P , Ml C A L L B S P F I X ( 1 . 0 0 / 3 . 0 0 . V N S A V E I 1 , 4 1 . K . NCOMP, Ml C A L L B S P F I X ( 1 . D O / 6 . D O . V N S A V E ( I . S ) . K , NCOMP, Ml R E T U R N END S U B R O U T I N E E R R C H K ( I M E S H , X I O L D . A L O I F . V A L S T R . W O R K . M S T A R , I F I N I P U R P O S E D E T E R M I N E THE ERROR E S T I M A T E S AND T E S T TO S E E IF T H E ERROR T O L E R A N C E S A R E S A T I S F I E O . V A R I A B L E S X I O L D • CURRENT MESH P O I N T S V A L S T R - V A L U E S OF THE P R E V I O U S S O L U T I O N WHICH ARE N E E D E O FOR THE E X T R A P O L A T I O N - L I K E ERROR E S T I M A T E . WGTERR - WEIGHTS U S E D I N THE E X T R A P O L A T I O N - L I K E ERROR E S T I M A T E . THE ARRAY V A L U E S ARE A S S I G N E D IN S U B R O U T I N E C O N S T S . E R R E S T - S T O R A G E FOR ERROR E S T I M A T E S ERR - TEMPORARY S T O R A G E U S E D FOR ERROR E S T I M A T E S WORK • S P A C E TO B E U S E D TO S T O R E V A L U E S OF Z AT T H E MESH P O I N T S F O R P R I N T O U T . I T S D I M E N S I O N I S MSTAR * N M A X . Z - A P P R O X I M A T E S O L U T I O N ON MESH XI I F I N - A 0 - 1 V A R I A B L E . I F I M E S H s 2 THEN ON R E T U R N I T I N D I C A T E S WHETHER THE ERROR T O L E R A N C E S WERE S A T I S F I E D . I M E S H • 1 THE CURRENT MESH R E S U L T E D FROM MESH S E L E C T I O N OR I S THE I N I T I A L M E S H , s 2 THE CURRENT M E S H R E S U L T E D FROM D O U B L I N G T H E P R E V I O U S MESH M S H F L G • I S S E T BY ERRCHK TO I N D I C A T E TO NEWMSH WHETHER ANY V A L U E S OF THE CURRENT S O L U T I O N ARE S T O R E D IN THE ARRAY V A L S T R . (0 FOR N O . 1 FOR Y E S ) I M P L I C I T R E A L ' S ( A - H . O - Z ) D I M E N S I O N E R R I 4 0 ) , Z ( 4 0 ) . E R R E S T I 4 0 ) . D U V A L I 20) COMMON / O R D E R / K , N C O M P . M S T R . K O . K O M , M N S U M . M l 201 COMMON / A P P R / N , N O L D . N M A X . N A L P H A , M S H F L G . M S H N U M . M S H L M T . M S H A L T COMMON / S I D E / Z E T A ! 4 0 ) , A L E F T . A R I G H T . I Z E T A , IWR COMMON / E R R O R S / T O L I 4 0 1 , W G T M S H I 4 0 ) . T O L I N I 4 0 1 . R 0 0 T I 4 0 ) . 1 J T 0 L I 4 0 ) . L T 0 L I 4 0 ) , N 1 0 L COMMON / C O L L O C / R H 0 ( 7 1 . W G T E R R ! 4 0 ) COMMON / N O N L N / P R E C I S , N O N L I N , I T E R , L I M I T , I C A R E . I P R I N T , I G U E S S . I F R E E Z COMMON / B S P L I N / V N C O L ( 6 6 , 7 ) , V N S A V E I 6 6 . 5 1 . V N I 6 6 ) D I M E N S I O N X I 0 L 0 I 1 ) . A L D I F I 1 ) , V A L S T R t 1 ) , WORK I M S T A R , 1 ) C I F I N B 1 NOLDP1 s NOLD • 1 C C . . . I F F U L L OUTPUT HAS B E E N R E O U E S T E D . P R I N T V A L U E S OF T H E C . . . S O L U T I O N COMPONENTS 2 AT THE M E S H P O I N T S . C I F ( I P R I N T . G E . 0 ) GO TO 30 DO 10 I t I, NOLD 10 C A L L A P P R O X ! I , X I O L D I I ) . W O R K ! 1 , 1 ) , V N S A V E I 1 . 1 ) . X I O L D . 1 N O L D , A L D I F , K , N C O M P , M, M S T A R , 3 , DUMM, 0 ) C A L L A P P R O X I N O L D , X I 0 L D I N 0 L D P 1 ) , WORK I 1 . N O L D P 1 ) , V N . X I O L D . 1 N O L D . A L D I F , K . N C O M P , M, M S T A R , 2 , DUMM, 0 ) DO 2 0 1 B I, MSTAR W R I T E ! I W R , 1 4 0 ) I 2 0 W R I T E ( I W R , 1 5 0 ) ( W O R K ( I . J ) , J s l , N O L D P 1 ) 3 0 C O N T I N U E I F ( I M E S H . E O . 1 ) R E T U R N C C . . . I M E S H s 2 SO ERROR E S T I M A T E S ARE TO B E G E N E R A T E D AND T E S T E D C . . . TO S E E IF THE T O L E R A N C E R E Q U I R E M E N T S ARE S A T I S F I E O . C DO 40 J s 1 . M S T A R 4 0 E R R E S T ( J ) s O . D O DO 100 I B A C K s 1 . N 0 L D I - NOLD » 1 - I B A C K THE ERROR E S T I M A T E S A R E O B T A I N E D BY COMBINING V A L U E S OF THE N U M E R I C A L S O L U T I O N S F O R TWO M E S H E S . FOR E A C H V A L U E OF I B A C K WE WILL C O N S I D E R THE TWO A P P R O X I M A T I O N S AT 2 P O I N T S IN E A C H OF THE NEW S U B I N T E R V A L S . WE WORK BACKWARDS THROUGH THE S U B I N T E R V A L S O T H A T NEW V A L U E S CAN B E S T O R E D IN V A L S T R IN C A S E T H E Y P R O V E TO BE N E E D E D L A T E R FOR AN ERROR E S T I M A T E . T H E R O U T I N E NEWMSH F I L L E D IN THE N E E O E O V A L U E S OF THE OLD S O L U T I O N IN V A L S T R . M S H F L G « 1 DO 5 0 J s 1 . M S T A R Z I J ) • 0 . 0 0 E R R ! J ) • O . D O 0 0 6 0 J « 1 . 2 J J « S - J KNEW « ( 4 ' < I - 1 I « 3 - J > * MSTAR • 1 K S T O R E = I 2 ' ( I - 1 ) « 2 - J I ' MSTAR • 1 X s X I O L D I I ) • D F L O A T ! 3 - J I / 3 , D O ' I X I O L O ( I ' 1 ) - X I O L D I I ) ) C A L L APPROX I I . X . V A L S T R I K N E W ) , V N S A V E I 1 , J J I , H O L D . N O L D . A L D I F . K . N C O M P . M, M S T A R . 3 . D U M M . 0 1 DO « 0 L r 1 , M S T A R E R R I L ) s E R R I L ) • W G T E R R ( L ) * D A B S I V A L S T R I KNEW) • V A L S T R I K S T O R E ) I B R A N C H A C C O R D I N G TO N O D E GO TO ( 2 0 . 1 3 0 ) . MODE C . . . I I S A BOUNDARY P O I N T 2 0 C A L L B S P O E R ( V N . X I . N . X . I. B A S E F . 2 ) C . . . P R O V I D E C O E F F I C I E N T S OF T H E J - T H L I N E A R I Z E D S I D E C O N D I T I O N . C . . . S P E C I F I C A L L Y , AT X = Z E T A ( J I THE J - T H S I D E C O N D I T I O N READS C . . . D G ( 1 ) * Z ( I I • . . . * D G ( M S T A R ) ' Z ( M S T A R ) . G = 0 C A L L DGSUB I I Z E T A . Z , DG) IF ( I T E R . G E . 1 . O R . N O N L I N . E O . 0 ) GO TO 4 0 V A L U E = 0 . 0 0 0 0 30 J = 1 . M S T A R 30 V A L U E = V A L U E • D G ( J ) ' Z ( J ) A L P H O ( I A L P H O ) c V A L U E 40 10 E 0 IOM = MSTAR IDG = 0 I B A S E F E 0 ID = NC C DO 120 J C 0 M P = 1 . N C O M P M J = M I J C O M P ) MJ1 = M J . 1 K M J e It - M J C . . . I N C O R P O R A T E THE V A L U E S AND D E R I V A T I V E S F O R C . . . THE B - S P L I N E S WHICH A R E NONZERO ON THE P R E C E E D I N G C . . . S U B I N T E R V A L . DO 6 0 L * 1 . M J DO 5 0 J B I . M J 50 0 ( 1 0 . I O * L ) = 0 ( 1 0 , 1 0 ' L I • O G ( I O G ' J ) • 1 B A S E F ( I B A S E F . J ) 6 0 I B A S E F e I B A S E F • MJ1 C C . . . T H E B - S P L I N E S WHICH ARE N O N Z E R O ON THE C U R R E N T C . . . S U B I N T E R V A L O N L Y . C I F ( K M J . L E . 0 ) GO TO 9 0 DO 60 L = 1 , K H J DO 70 J = 1 , M J 70 0 ( 1 0 , I 0 M . L ) « 0 ( 1 0 . I O M * L ) • D G ( I D G * J I • , 1 B A S E F t I B A S E F . J ) 80 I B A S E F = I B A S E F • MJ1 C C . . . THE B - S P L I N E S WHICH ARE N 0 N 2 E R 0 ON THE S U C C E E D I N G C . . . S U B I N T E R V A L AS W E L L . C 9 0 DO 110 L B I . M J DO 100 J E I . M J 100 0 ( 1 0 . I O * K D * L ) = O I I D , I Q * K D * L I « D G ( I D G * J > • 1 B A S E F ( I B A S E F * J ) 110 I B A S E F = I B A S E F • MJ1 C IDG =IOG * MJ 1 0 = 1 0 * M J IOM - IOM * K M J 120 C O N T I N U E R E T U R N C C . . . B U I L D NCOMP ROWS FOR I N T E R I O R C O L L O C A T I O N P O I N T X C . . . THE L I N E A R E X P R E S S I O N S TO B E C O N S T R U C T E D A R E : C . . . ( M ( J J ) ) C " j J 0 F ( J J . 1 I * Z ( 1 ) . . . . - D F 1 J J , M S T A R l ' Z ( M S T A R ) C . . . F O R J J = 1 TO N C O M P . C 130 C A L L B S P D E R ( V N C O L I 1 . L L ) . X I , N , X . I B A S E F 3) C A L L D F S U B ( X , Z . D F ) C C . . . L O O P OVER T H E NCOMP E X P R E S S I O N S TO B E S E T UP FOR THE C . . . C U R R E N T C O L L O C A T I O N P O I N T . C DO 2 4 0 J J * 1 , N C O M P IF ( I T E R . G E . 1 . O R . N O N L I N . E O . 0 ) GO TO 150 I A L P H O E I A L P H O • 1 V A L U E « 0 . 0 0 DO 140 J s | , M S T A R 140 V A L U E E V A L U E • D F ( J J . J ) • Z ( J 1 A L P H O ( I A L P H O ) c A L P H O ( I A L P H O ) - V A L U E 150 ID s J J • NC - 1 1 0 = 0 IOM=MSTAR I D F = 0 I B A S E F = 0 C C . . . N O T E THAT I F J J . E O . JCOMP AN E N T R Y HAS TO B E MADE FOR T H E C . . . M I J C O M P I - T H D E R I V A T I V E OF THE J C O M P - T H COMPONENT. DO 2 3 0 J C O M P B I , N C O M P M J B M I J C O M P ) MJ1 B M J » 1 K M J B K - M J C c - • U S E THE B - S P L I N E S WHICH ARE N O N Z E R O ON THE P R E C E E D I N G C . . . S U B I N T E R V A L . C DO 170 L B I . M J I F ( J C O M P . E O . J J ) O I I D , I O * L ) = B A S E F I I 6 A S E F * M J 1 I D O 160 J B I . M J '•0 0 ( 1 0 . I O * L ) B 0 ( 1 0 . I O * L I - O F I J J . I O F * J I • 1 B A S E F t I B A S E F * J ) 170 I B A S E F B I B A S E F • MJ1 C THE B - S P L I N E S WHICH A R E N O N Z E R O ON THE CURRENT C . . . S U B I N T E R V A L O N L Y . C I F ( K M J . L E . 0 ) GO TO 2 0 0 DO 180 L B I , K M J I F ( J C O M P .EO. J J ) 0 ( 1 0 , I 0 M « L ) « B A S E F ( I B A S E F * M J 1 ) DO 180 J B I , M J " 0 0 ( 1 0 , I O M * L ) B O I I D , I O M » L ) • 1 O F I J J . I O F * J ) • B A S E F I I B A S E F . J ) 190 I B A S E F B I B A S E F • M J 1 C c - - T H E B - S P L I N E S WHICH A R E N O N Z E R O ON T H E S U C C E E D I N G C... S U B I N T E R V A L A S W E L L . C 2 0 0 DO 2 2 0 L - l . U J IF ( J C O U P . E O . J J ) 0 ( 1 0 , I Q X C D ' L ) B B A S E F I I B A S E F . M J 1 ) DO 210 J . 1 . M J 2 1 0 O I I D , I O « K D » L ) • O I I D , I O » K D * L ) • D F I J J . I D F . J ) • 1 B A S E F I I B A S E F . J ) 2 2 0 I B A S E F > I B A S E F • MJ1 C IDF = IDF * MJ 10 = 10 • MJ IOM B IOM . K M J 230 C O N T I N U E 240 C O N T I N U E R E T U R N END P A R T 4 B - S P L I N E R O U T I N E S - - S E E 13) S U B R O U T I N E A P P S L N ( X . 2. F S P A C E . I S P A C E ) S E T UP A STANDARD C A L L TO APPROX TO E V A L U A T E THE A P P R O X I M A T E S O L U T I O N Z « 21 U I X I ) AT A P O I N T X ( I T HAS B E E N COMPUTED BV A C A L L TO C O L S T S ) . THE P A R A M E T E R S N E E D E D FOR APPROX ARE R E T R I E V E D FROM THE WORK ARRAYS I S P A C E AND F S P A C E . I M P L I C I T R E A L ' B ( A H , 0 - 2 ) O I M E N S I O N 2 (1 ) , F S P A C E I I ) , I S P A C E I 1) I S 6 B I S P A C E I 6 ) • 1 I S 5 = I S P A C E ! 1 ) • 2 I • 1 C A L L APPROX ( I . X , 2. F S P A C E I I S 6 ) . F S P A C E . I S P A C E I 1 ) . 1 F S P A C E I I S 5 ) , I S P A C E I 2 ) , I S P A C E I 3 ) , I S P A C E I 8 ) , 2 I S P A C E I 4 ) , 1. DUMM, 0 ) R E T U R N END S U B R O U T I N E A P P R O I I I , X , 2. V N . X I , N . A L D I F . K . N C O M P , 1 II. M S T A R , M O D E , D U V A L . MODHI) P U R P O S E (1) I M 1-I) I M N C O M P - 1 ) E V A L U A T E 2 I U ( X ) ) B | U I X ) , U ( X ) U I X ) U I X ) ) 1 1 1 MNCOMP AT O N E P O I N T X. I F M O O H I B I , E V A L U A T E U J - T H D E R I V A T I V E S TOO. V A R I A B L E S V N - T R I A N G U L A R A R R A Y O F B - S P L I N E V A L U E S F I L L E D I N B Y R O U T I N E S B S P F I X AND B S P V A R X I - T H E C U R R E N T M E S H ( H A V I N G N S U B I N T E R V A L S I A L D I F - T H E A R R A Y OF D I V I D E D D I F F E R E N C E S O F T H E C U R R E N T S O L U T I O N V E C T O R S C O E F F I C I E N T S A L P H A I AND P R E V I O U S L Y D E T E R M I N E D I N T H E R O U T I N E A P P D I F ) MODE - D E T E R M I N E S T H E AMOUNT OF I N I T I A L I Z A T I O N N E E D E D B 5 F O R M S Z I U I X I ) U S I N G A L D I F A N O VN B 3 AS I N B 5 . B U T F I N I S H E S F I L L I N G I N VN U S I N G B S P V A R B 2 AS I N B 3 . B U T S T A R T S F I L L I N G I N V N U S I N G B S P F I X B 1 AS I N B 2 , B U T D E T E R M I N E S I S U C H THAT X I I I ) . L E . X . L T . X I ( I * 1 I ( U N L E S S X = X I ( N » B 4 A S P E C I A L C A S E W H I C H O N L Y D E T E R M I N E S I AS A B O V E D M V A L - A R R A Y O F M J - T H D E R I V A T I V E S O F T H E S O L U T I O N C O M P O N E N T S U J ( E V A L U A T E D I F M O D H I B I ) I M P L I C I T R E A L ' S ( A - H . O - Z ) COMMON / N O N L N / P R E C I S , N O N L I N , I T E R . L I M I T . I C A R E . I P R I N T , I G U E S S . I F R E E Z COMMON / S I D E / Z E T A ( 4 0 ) , A L E F T , A R I G H T , I Z E T A . IWR D I M E N S I O N Z ( 1 ) . V N d l , X I I 11, A L O I F d l , M I D . DMVAL I 11 C GO TO 110. 60. 70. 10. 801. MODE C C . . . MODE = 1 OR 4, L O C A T E I S O X I I I ) . L E . X . L T . X K I . I I C 10 C O N T I N U E I F (X . G E . ( I l l ) - P R E C I S AND. X . L E . XI I N . 1 ) . P R E C I S ) 1 GO TO 20 I F ( I P R I N T L T . II W R I T E I I W R . 1 6 0 I X . X K I ) . XI ( N . 1) I F (X . L T . X I I 1 ) I I B X I I 1) I F (X .01 . X I I N « 1 ) I I B X K N . I I 20 I F ( I . G T . N . O R . I . L T . 11 I B (N»1) / 2 I L E F T r I I F (X . L T . X I ( I L E F T ) ) GO TO 40 DO 30 L B I L E F T . N I B L I F (X L T . X I I L . D ) GO TO 60 30 C O N T I N U E GO TO 60 40 I R I G H T B I L E F T - 1 DO 50 L B I . I R I G H T I B I R I G H T • 1 - L IF I I . G E . X I I I ) ) GO TO 60 50 C O N T I N U E 60 I F (MODE E O 4) R E T U R N C C . . . MOOE B 1 OR 2 B E G I N F I L L I N G IN VN U S I N G B S P F I X . C . . . COMPUTE MESH I N D E P E N D E N T S P L I N E S . C RHOX = 1 X 1 ( 1 * 1 ) • X ) / 1 X 1 ( 1 * 1 ) • 1 1 ( 1 ) 1 C A L L B S P F I X ( R H O X , V N , K , N C O M P . Ml C C . . . MOOE B 1, 2 , OR 3 F I N I S H F I L L I N G IN VN U S I N G B S P V A R C 70 C A L L B S P V A R I I , X . V N . X I . N , K , N C O M P , M) C C . . . MODE N E . 4 D E T E R M I N E Z I U I X I ) C 8 0 DO BO L B 1 , M S T A R 9 0 Z I L ) - 0.00 I N D I F • 0 K 5 « 1 I F ( M O O H 1 . E O . 0 ) GO TO 1 1 0 C . . I N I T I A L I Z E F O R S U B S E Q U E N T E V A L U A T I O N OF U J - T H D E R I V A T I V E S . C I V N H I E K • ( K - 1 ) / 2 0 N X 2 « O F L O A T I K I / I I I I I ' I ) • «'<!>> I N C O M P B 0 DO 1 0 0 J E | , N C O M P 1 0 0 O M V A L ( J ) « 0 . 0 0 c C... E V A L U A T E Z l U I X ) ) . C 1 1 0 DO 1 5 0 J = 1, NCOMP M J = M U I N A L P H J = N • K • M J KMR > ( • U J I V N B KMR • I K M R - 1 1 / 2 DO 1 3 0 NR B 1. M J L E F T = I • K • M J • KMR DO 1 2 0 L • 1. K M R L E F T P L = L E F T • L 1 2 0 Z I K 5 I » Z I K 5 1 • A L D I F I I N D I F ' L E F T P L ) • V N I I V N ' L I KMR r KMR • 1 I V N B I V N • KMR K 5 « K 5 • 1 1 3 0 I N D I F « I N D I F » N A L P H J I F ( M O O H I . E O . 0 ) GO TO 1 5 0 C . . . E V A L U A T E D M V A L I J ) = M J - T H D E R I V A T I V E O F U J . C I N C O M P * I N C O M P • ( U J - l l " N A L P H J L E F T E 1 1 - 1 1 • K • U J - 1 DO 1 4 0 L B 1, K 1 4 0 D M V A L 1 J I B O M V A L I J I • D N K 2 • I A L D I F ! I N C O M P » L E F T « L « 1 1 -1 A L D I F ! I N C O M P * L E F T * L ) ) • V N ( I V N H I ' L ) I N C O M P e I N C O M P • N A L P H J 1 5 0 C O N T I N U E R E T U R N 1 5 0 F O R M A T ! 3 7 H D O M A I N E R R O R I N A P P R O X •••• 1 / 4 H X B . D 2 0 . 1 0 , 1 0 H A L E F T « , 0 2 0 . 1 0 . 2 1 1 H A R I G H T E . 0 2 0 . 1 0 ) E N D S U B R O U T I N E B S P F I X ( R H O X . V N , K. NCOMP. M ) E V A L U A T E T H E M E S H I N D E P E N D E N T B S P L I N E S A T O N E P O I N T VN • T R I A N G U L A R ARRAY O F B - S P L I H E V A L U E S AT X FOR O R D E R S 1 TO K.MINCOMPI WHERE X K I ) . L E . X . L E . X K I ' I ) . COLUMN J HAS L E N G T H J AND C O N T A I N S THE J - T H OROER B - S P L I N E V A L U E S AND B E G I N S IN L O C A T I O N I • J M J - l l / 2 . V A L U E S NOT COMPUTEO HERE ARE COMPUTED IN B S P V A R . C RHOX E I X I ( I * 1 ) - X ) / t X K I * 1 ) - X I ( I ) ) C c c I M P L I C I T R E A L ' S ( A - H . O - Z ) D I M E N S I O N V N ( 1 ) . Ml 1) XRHO B 1 . 0 0 - RHOX IVN B 0 C C . . . COMPUTE F I R S T GROUP OF MESH I N D E P E N D E N T B - S P L I N E V A L U E S C V N ! 1 ) B 1 . 0 0 DO 20 L B I , K IVN B IVN • L VNP B O . D O DO 10 J B I , L R E P B V N ( I V N - L « J ) V N ( I V N . J ) B VNP • R E P • RHOX 10 VNP B R E P • XRHO 2 0 V N I I V N ' L ' 1 ) B VNP C C . . . C O M P U T E S E C O N D GROUP OF MESH I N D E P E N D E N T B - S P L I N E V A L U E S C MD1 B MINCOMPI • 1 I F IMD1 . L E . 0 ) R E T U R N DO 4 0 L B I , M D 1 IVN B IVN • K • L INC B L • 2 VNP B V N I I V N ' 1 - K ) • XRHO I F IK . L T . I N C ) R E T U R N 0 0 30 J B I N C . K R E P B V N I I V N - L - K . J ) V N I I V N . J ) B VNP » R E P • RHOX 3 0 VNP B R E P ' XRHO 4 0 V N ( I V N * K » 1 ) • VNP R E T U R N END S U B R O U T I N E B S P V A R ( I , X , V N . X I . N . K . N C O M P , M l C C c C - P U R P O S E C E V A L U A T E T H E MESH D E P E N D E N T B - S P L I N E S AT ONE P O I N T X C C V A R I A B L E S C VN - T R I A N G U L A R ARRAY OF V A L U E S OF B - S P L I N E S OF O R D E R S 1 C TO K - M I N C O M P I ( D E S C R I B E D I N B S P F I X I C X • S A T I S F I E S X K I ) . L E . X . L E . X K I ' D C C C I M P L I C I T R E A L * * I A - H . O - Z ) D I M E N S I O N V N I 1 ) , X I I I ] , M I D M01 B MINCOMPI -1 I F I M D 1 . L E . 0 ) R E T U R N X I L B X I I II I F ( I G T . 1) X I L B X I I I - 1 1 X I R « X ! ( N < 1 ) I F ( I . L T . N ) X I R B X I I I * 2 ) RH01 B I X I I I . 1 ) • I) / 1 X 1 1 1 * 1 ) - X I I I ) ) RHOJ « i x i i i ' t ) - o / o i d o i • m > RH03 - ( im - I) / ( I IP . -XP.HO I • 1 . 0 0 - RHOI XRH02 « 1 . 0 0 - RH02 XRH03 « 1 .D0 • RH03 I V N • K • ( K » 1 ) / 2 R E C U R S I V E L Y COMPUTE S - S P L I N E V A L U E S . 0 0 3 0 L « 1 . M D 1 IVN « IVN • K • L VHP « 0 . 0 0 DO 1 0 J s l , L R E P • V N I I V N - L - K » J ) V N I I V N ' J ) = VNP • R E P • 1 0 VNP = R E P ' XRH02 V N I I V N « L « 1 ) = VNP » RHOI • VNP = V N I I V N - L ) • XRH01 DO 20 J = 1 , L R E P = V N I 1 V N ' J - L > V N I I V N ' K . J ) e VNP • R E P " 2 0 VNP = R E P • XRH03 30 V N I I V N . K ' L ' l l = VNP R E T U R N END S U B R O U T I N E B S P D E R ( V N . X M E S H , N . V N I I V N - K ' I ) X . I. B A S E F . MODE) E V A L U A T E THE D E R I V A T I V E S OF THE B - S P L I N E S OF A P P R O P R I A T E ORDERS AT ONE P O I N T X ( U S E D TO S E T UP THE C O L L O C A T I O N E Q U A T I O N S . ) VN - T H E T R I A N G U L A R ARRAY OF B - S P L I N E V A L U E S C A L C U L A T E D IN B S P F I X AND B S P V A R B A S E F - B - S P L I N E D E R I V A T I V E S N E E D E D TO S E T UP C O L L O C A T I O N E Q U A T I O N S . V I Z , D E R I V A T I V E S OF ORDERS 0 , 1 M J O F B - S P L I N E S OF ORDER K » M J ( J = l N C O M P ) . T H E S E V A L U E S ARE FOUNO U S I N G V N , A L P H D . AND A L P H N ( S E E B E L O W ) . A L P H D - ARRAY OF D I V I D E D D I F F E R E N C E S C O R R E S P O N D I N G TO D E R I V A -T I V E S OF B - S P L I N E S OF OROER K 'MNCOMP A L P H N - SAME AS A L P H D , BUT FOR OTHER ORDER B - S P L I N E S A L P H D O - D I V I D E D D I F F E R E N C E S OF ONE LOWER O R D E R , U S E D TO D E T E R -MINE A L P H D A L P H N O - D I V I D E D D I F F E R E N C E S OF ONE LOWER O R D E R . U S E D TO D E T E R -MINE A L P H N NO - THE N O . OF D I F F E R E N T I A L E O U A T I O N S OF D I S T I N C T O R D E R S ( S O N O . OF OTHER D I F F E R E N T I A L E O U A T I O N S =NEO = N C O M P - N O ) MND - THE O I S T I N C T ORDERS OF T H E S E ND D I F F E R E N T I A L E Q U A T I O N S XMESH - CURRENT M E S H , WITH X M E S H ( I ) . L E . X L T . X M E S H I I ' I ) ( U N L E K = X M E S H ( N * I) MODE - D E T E R M I N E S THE AMOUNT OF I N I T I A L I Z A T I O N N E E D E O = 4 COMPUTE THE ARRAY B A S E F = 3 AS IN =4 . BUT F I L L IN S U B I N T E R V A L D E P E N D E N T V A L U E S OF VN U S I N G B S P V A R = 2 AS IN =3 . BUT F I L L IN S U B I N T E R V A L I N D E P E N D E N T V A L U E S OF VN U S I N G B S P F I X C = 1 AS IN =2 . BUT C A L C U L A T E C E R T A I N S U B I N T E R V A L D E P E N -C DENT C O N S T A N T S C c c I M P L I C I T R E A L ' S ( A - H . O - Z ) COMMON / O R D E R / K . N C O M P . M S T A R . K D . K D M , MNSUM. M ( 2 0 ) COMMON / H I / D N I , D N 2 , 0N3 C0M40N / E O O R D / I N D ( 5 ) . I N E Q I 2 0 ) . M N D I 5 ) . N O . NEO D I M E N S I O N B A S E F M ) . V N I 1 ) . X M E S H ( I ) D I M E N S I O N A L P H D I S O ) . A L P H D 0 I 8 0 ) . A L P H N I 2 B 0 ) . A L P H N 0 I 2 B 0 ) C GO TO ( 1 0 , 2 0 . 3 0 , 4 0 ) , MODE C C . . . MODE = 1 COMPUTE S U B I N T E R V A L D E P E N D E N T C O N S T A N T S C 10 X I L » X M E S H I 1 ) I F ( I G T . 1) X I L = X M E S H U - 1 ) X IR • X M E S H I N * ! ) IF ( I . L T . N) X I R * X M E S H ( I « 2 ) ON 1 = 1 . 0 0 / ( X M E S H I 1 * 1 ) - X I L ) 0 N 2 = l . D O / I X M E S H I 1 * 1 ) - X M E S H I I ) ) 0 N 3 = l . D O / ( X I R - X M E S H I I M C C . . . MOOE <• 2 COMPUTE S U B I N T E R V A L I N D E P E N D E N T B - S P L I N E S C 2 0 RHOX ts I XMESHI I* 1) - X) • DN2 C A L L B S P F I X ( R H O X . V N . K . NCOMP, M) C C . . . MODE « 3 COMPUTE S U B I N T E R V A L D E P E N D E N T B - S P L I N E S C 3 0 C A L L B S P V A R ( I , I , V N , X M E S H . N , K . N C O M P , M) C C . . . MOOE • 4 C 4 0 MD « MNDIND) KMD « K • MD KMD1 • KMD • 1 MDt • MO • I MD2M2 • MD • 2 - 2 MD2M1 c MD2M2 • 1 INL ' KMD • 2 C C . . . I N I T I A L I Z E A R R A Y S A L P H D O AND A L P H N O C DO 5 0 J B I . K M D A L P H D O ( J ) = O.DO 5 0 A L P H D O I J * K M D ) = l.DO K U P e KMD ' MD 0 0 6 0 J = 1 , K U P 6 0 A L P H D O I J ' I N L ) • O.DO NDM1 « NO • 1 N R E S T c M D 2 M 2 - K I N N £ 0 I F I N R E S T . L E . 0 1 GO TO 1 0 0 I F ( N O .EO. 1 ) GO TO 1 0 0 I N L s 2 • M D 2 M 2 0 0 BO N N s 1.N0M1 MN2 = M N D I N N I • 2 0 0 TO J a 1.MD2M2 70 A L P H N 0 ( J « I N N « M D 2 M 2 ) B 1 . 0 0 K U P • M02M2 ' UNO INN} DO eo JEI.KUP BO A L P H N O I J ' I N N ' I N L ) » O.DO BO I N N » I N N • UN? • MD2M2 100 I N N S » INN C C . . . I N I T I A L I Z E B - S P L I N E D E R I V A T I V E V A L U E S B A S E F C DO 120 J B 1 . N 0 K 1 E I N D ( J ) U J E U N D I J ) K M J = K • UJ U J 1 e U J * 1 IVN B K U J • ( K U J - 1 ) / 2 DO 120 L B I , K U J B A S E F ( K 1 1 B V N ( I V N . L ) DO 110 J J B I . U J 110 B A S E F ! K 1 » J J I B O . D O 120 K 1 > ( l • U J I C C . . . F O R E A C H D E R I V A T I V E NR DO LOOP 310 C 0 0 310 NR=1,UD NR1 B NR • 1 MDR s MD • NR K1 B IHDIND) • NR KMDR B K • MDR IVN B KMDR • ( K M O R - 1 ) / 2 I F (MDR .EO. 0 ) GO TO 1 5 0 C C . . . F I R S T . D E T E R M I N E N R ( T H ) D E R I V A T I V E OF B - S P L I N E S C . . . CORRESPONDING TO THE H I G H E S T ORDER S O L U T I O N COMPONENT C . . . I I .E. OF ORDER M N C O M P B U D ) . C DO 140 J B I . I O R J R B J • N R J I N B JR * NR1 • KMD J I N K B J I N • K DO 130 L B J . J R J I N 1 B J I N - KMD1 J I N K 1 B J I N K - KMD1 A L P H O I J I N ) — DNI • ( A L P H O O I J I N I - A L P H D O I J I N I ) I A L P H D I J I N K ) B 0N3 ' I A L P H D O I J I N K ) - A L P H D O I J I N K 1) ) I N B K 1 . | L - 1 ) • MD1 B A S E F t I N ) B B A S E F ( I N ) • A L P H D I J I N ) • V N I I V N ' J ) I N B IN • K • MD1 B A S E F I I N ) s B A S E F ( I N ) • A L P H D I J I N K ) • V N ( I V N « J < K ) J I N B J I N - KMD 130 J I N K B J INK - KMD 140 C O N T I N U E 150 MDR1 B MDR * 1 I F ( MDR1 .GT. K ) GO TO 180 DO 170 J B M D R 1 , K J R B J . NR J I N B J R • NR1 ' KMD 0 0 180 L B J . J R J I N I B J I N - KMD1 A L P H D I J I N ) B DN2 • ( A L P H D O I J I N ) - A L P H D O I J I N I ) ) IN B K1 • ( L - 1 ) • MD1 B A S E F I I N I = B A S E F t I N ) • A L P H D I J I N ) • V N I I V N . J ) 180 J I N B J I N - KMD 170 C O N T I N U E 180 C O N T I N U E I F ( N O . E O . 1) GO TO 2 3 0 I N N B I N N S C C . . . NOR D E T E R M I N E N R ( T H ) D E R I V A T I V E B A S E F FOR B - S P L I N E S C . . . C O R R E S P O N D I N G TO A L L OTHER S O L U T I O N COMPONENTS INN) C DO 220 N N B 1 , N D M 1 N J B ND - NN MJ B M N D t N J ) INN B INN - I M J » 2 ) • MD2M2 I F {NR . G T . M J ) GO TO 2 3 0 K M J R B K • MJ - NR K l B I N D I N J ) . NR IVN B KMJR • ( K M J R - 1 ) / 2 U J 1 B M J * 1 J R 1 B KMJR - MD * 1 J R 1 B MINO U P ! . MD- I ) C C . . . COMPUTE P O R T I O N OF B - S P L I N E D E R I V A T I V E V A L U E S ( B A S E F ) C . . . US ING D I V I D E D D I F F E R E N C E S P R E V I O U S L Y C A L C U L A T E D FOR THE C . . . H I G H E S T ORDER S O L U T I O N COMPONENT IN A L P H O . C DO 190 J B I . J R I JR B J • NR J I N B JR • NR1 • KMD • MD • MJ DO ISO L B J . J R IN B K l • ( L - l ) • M J 1 B A S E F ( I N ) B B A S E F ( I N ) • A L P H O I J I N ) " V N ( I V N « J ) J I N B J I N - KMD 180 C O N T I N U E DO 200 J B M D . K M J R JR E J * NR J I N E JR • NR1 • KMD DO 2 0 0 L = J . J R IN B K l • ( L - 1 ) ' MJ1 B A S E F ( I N ) B B A S E F ( I N ) « A L P H D ( J I N ) • V N I I V N ' J ) J I N B J I N - KMD 2 0 0 C O N T I N U E C C . . . F I N I S H COMPUTING B - S P L I N E D E R I V A T I V E V A L U E S U S I N G THE C . . . NEK N R ( T H ) D I V I D E D D I F F E R E N C E S A L P H N C J R 2 B UD2M2 - KMJR I F I J R 2 . L E . 0 ) GO TO 2 2 0 DO 210 J J B 1 , J R 2 J B J J • J R 1 J R B J . N R J I N B J R • NR1 • MD2M2 • INN DO 210 L B J . J R J I N I B J I N - MD2U1 A L P H N ( J I N ) = DN2 • ( A L P H N O ( J I N ) - A L P H N O I J I N 1 ) ) IN B K l • I L - 1 ) • M J 1 B A S E F I I N ) o B A S E F ( I N ) • A L P H N ( J I N ) • V N ( I V N . J ) J I N B J I N - UD2M2 2 1 0 C O N T I N U E IN B IN • 1 DO 320 L B I . K M J L B A S E F s I N • ( L - 1 1 • M J 1 B A S E F ( L B A S E F ) s B A S E F ( L B A S E F ) • O F L O A T ( I C O H S ) 3 2 0 C O N T I N U E C C... C O P Y B A S E F V A L U E S C O R R E S P O N D I N G TO E O U A L O R D E R S O L U T I O N C O M P O N E N T S C I F <NEO .EO. 0 1 R E T U R N J O E 1 DO 3 6 0 J B 1 , N E 0 I N I B I N E O ( J ) 3 3 0 I F I I N 1 . L T . I N D C J D ' D I GO TO 340 J O B J O • 1 GO TO 330 3 4 0 M J B M N O ( J D ) NTOT = ( K » M J > M 1 « M J ) I N 2 B I N O ( J D ) DO 350 L = t . N T O T 3 5 0 B A S E F I I N 1 - 1 . L I E B A S E F 1 I N 2 - I - L ) 3 6 0 C O N T I N U E R E T U R N E N D S U B R O U T I N E A P P D I F ( A L D I F . A L P H A , X I . N . K. NCOMP. M. M S T A R ) P U R P O S E C O M P U T E A D I V I D E D D I F F E R E N C E T A B L E B A S E D U P O N T H E V E C T O R OF S O L U T I O N C O M P O N E N T S V A R I A B L E S A L P H A • V E C T O R O F S O L U T I O N C O E F F I C I E N T S ( F O R A L L C O M P O N E N T S ! C O R R E S P O N D I N G TO T H E M E S H X I ( 1 ) X H N ' D A L D I F - T H E D I V I D E D D I F F E R E N C E A R R A Y B A S E D U P O N A L P H A . V I Z . A L D I F ( I . R . J ) = I R - D S T D I V I D E D D I F F E R E N C E O F A L P H A C O R R E S P O N D I N G TO U ( X ) . F O R J I B R K » N « M J ; R B I M J ; J = l N C O M P I M P L I C I T R E A L ' S ( A - H . O - Z I D I M E N S I O N A L D I F ( I ) , A L P H A ( 1 ) . X I I I ) . M i l ) KO B K * NCOMP 1NC0MP = 0 K 3 B 0 K 4 B 0 C C . . . C O N S T R U C T THE D I F F E R E N C E T A B L E FOR E A C H COMPONENT. C 0 0 130 J B I , N C O M P MJ — M ( J ) KMJ = K - MJ MJM1 B M J - 1 KMR s K • M J N A L P H J = N • K • MJ INN B INCOMP K l B MSTAR K 2 B KD 2 2 0 C O N T I N U E 2 3 0 C O N T I N U E C . . . S A V E N R ( T H ) D I V I D E D D I F F E R E N C E V A L U E S . A L P H D AND A L P H N . C . . . TO B E USED TO D E T E R M I N E THE NEXT H I G H E R ORDER D I V I D E D C . . . D I F F E R E N C E S . BY S T O R I N G THEM IN A L P H D O AND ALPHNO I F (NR .EO. MO) GO TO 300 NR2 E NR + 2 I N J B NR 0 0 2 4 0 L B 2 , N R 2 I N J B I N J . KMD DO 2 4 0 J B I .KMDR 2 4 0 A L P H D O ! J « I N J ) B A L P H O I J ' l N J ) IF (ND . E O . 1) GO TO 300 I F ( N R E S T . L E . 0 ) GO TO 300 INN B 0 DO 2 9 0 NN - 1.NDM1 MN B MND(NN) IF (MN . L E . NR) GO TO 280 KMNR B K * MN - NR JR1 B MINO ( K M N R - M D * 1 , M D - 1 ) I N J B NR * INN INL B NR • MD - MN DO 2 5 0 L = 2 , N R 2 I N J B I N J • M02M2 INL B INL • KMD DO 250 J B 1 . J R 1 2 5 0 A L P H N O ! I N J * J I = A L P H O I I N L ' J ) HUP B MINO ( K M N R , MD2M2) I N J B NR * INN INL B NR 0 0 2 6 0 L B 2 . N R 2 I N J B I N J • MD2M2 INL B INL • KMD DO 2 6 0 J c M D . M U P 2 6 0 A L P H N O ! I N J . J ) B A L P H D t I N L ' J ) J R 2 B MD2M2 - KMNR IF ( J R 2 . L E . 0 ) GO TO 2 8 0 I N J B NR • INN 0 0 270 L B 2 , N R 2 I N J B I N J . MD2M2 0 0 270 J J B 1 . J R 2 J I N B I N J . J J . JR1 2 7 0 A L P H N O ! J I N ) B A L P H N ! J I N ) 2 8 0 INN B INN . ( M N . 2 ) ' MD2M2 2 9 0 C O N T I N U E 3 0 0 C O N T I N U E 3 1 0 C O N T I N U E C C . . . P R O P E R L Y N O R M A L I Z E B A S E F V A L U E S C DO 320 J B I . N D I N B I N O ( J ) I C O N S B 1 M J B M H O ( J ) K M J B K • M J MJ1 B M J . 1 DO 3 2 0 NR B 1 , M J I C O N S • I C O N S c c.. . c K 6 > INN • 1 COPY A L P H A I N T O THE F I R S T ROWS INR=0) OF A L O I F OO 10 L - 1 , M J A L 0 I F I K 5 ) « ALPHAIK3 -L) 10 K 5 = K 5 • 1 DO SO I < 1. N I F I K M J . E O . 0 ) 0 0 TO 30 DO 2 0 L = 1. K M J A L D I F I K 5 ) = A L P H A I K 1 - K 4 - L ) 2 0 K 5 = K 5 • 1 30 DO 40 I « 1. MJ A L 0 I F I K 5 ) = A L P H A I K 2 - K 3 - L ) 40 K 5 • K S • 1 K1 = K1 * KD < ! . « ! > KD SO C O N T I N U E C . . . FOR E A C H D E R I V A T I V E NR COMPUTE D I V I D E O D I F F E R E N C E S IF (MJM1 . E O . 01 GO TO 120 0 0 110 NR = 1, MJM1 INN1 = INN • N A L P H J KMR = KMR - 1 MJR = M J - NR KMJR a K • MJR X I P 1 = U l l l DNK2 « O F L O A T I K M R ) / ( X I I 2 ) • X I P 1 ) C . . . FOR X K 1 I . X I I 2 ) , THE D I V I D E D D I F F E R E N C E I S A S P E C I A L C A S E C DO 6 0 L=1,NR 6 0 A L D I F I I N N 1 - L I = O . D O 0 0 70 L = N R , MJM1 L I = L • 1 70 A L D I F ( I N N l - L I ) * I A L O I F I I N N - L 1 1 - A L D I F ( I N N - L ) ) " 1 DNK2 I B E G 1 = MJ I B E G 2 e K • NR C NOW THE D I V I D E D D I F F E R E N C E C A L C U L A T I O N S FOR XI111 ,XI11*11. I"] 1 = 1 N C DO 100 I = 1 . N X I I = X I P 1 X I P 1 = X I ( I * 1 > 0NK1 = O F L O A T I K M R ) / I X I P I • X I I ) IF ( I . L T . N) DNK2 = O F L O A T I K M R ) / IXI (1*21 - X I I ) I F I I . E O . NI DNK2 n 0NK1 C . . . T H E A C T U A L C A L C U L A T I O N S I N V O L V E TWO L O O P S C DO 8 0 L = 1, KMJR L I = I B E G 1 • L BO A L D I F I 1 N N 1 * L 1 1 = I A L D I F I I N N * L 1 I • A L D I F ( I N N + L 1 - 1 ) 1 1 0NK1 0 0 go L - 1, MJR L I = I B E G 2 • L 0 0 A L D I F I I N N I ' L 1 ) = ( A L O I F I I N N - L I I - A L D I F I I N N - L I - 1 ) ) 1 DNK2 I B E G 1 = IBEG1 - K I B E G 2 = I B E G 2 - K 100 C O N T I N U E INN = INN1 110 C O M T I N U E 120 C O N T I N U E K3 * K 3 • MJ K4 c K4 • K M J INCOMP c INCOMP » N A L P H J 130 C O N T I N U E R E T U R N END S U B R O U T I N E HORDER I I . U H I G H , X I O L D . A L O I F ) P U R P O S E D E T E R M I N E H I G H E S T OROER I P I E C E W I S E C O N S T A N T ) D E R I V A T I V E S OF THE CURREN1 C O L L O C A T I O N S O L U T I O N V A R I A B L E S A L D I F - D I V I D E D D I F F E R E N C E S OF THE S O L U T I O N C O E F F I C I E N T S A L P H A U H I G H • THE ARRAY OF H I G H E S T ORDER I P I E C E W I S E C O N S T A N T ) D E R I V A T I V E S OF THE A P P R O X I M A T E S O L U T I O N ON ( X I O L D I I ) , X I O L D I I - l l ) . V I Z , ( K ' M J - 1 ) U H I G H I J ) = U ( X ) ON ( X I O L D I I ) . X I O L O I 1 - 1 ) ) J I M P L I C I T R E A L ' S ( A - H . O - Z ) COMMON / A P P R / N , N O L D , N M A X , N A L P H A , M S H F L G . M S H N U M , M S H L M T , M S H A L T COMMON / O R D E R / K . N C O M P . M S T A R , K D . K D M . M N S U M , M l 20 ) D I M E N S I O N U H I G H ! ! ) , A R I 2 0 ) , A R M 1 I 2 0 ) D I M E N S I O N A L D I F ! 1 ) , X I 0 L 0 I 1 ) ON2 = 1 .DO / ( X I O L D I I - 1 ) - X I O L D ( I ) ) INCOMP = 0 L O O P THROUGH THE NCOMP S O L U T I O N COMPONENTS DO 5 0 J K 1 ,NCOMP M J c M I J ) N A L P H J = K • NOLD « M J K P M J e K - M J KMR * K • 1 MJM1 = M J - 1 INCOMP > INCOMP • MJM1 ' N A L P H J L E F T . I ' K • M J • KMR F U R T H E R D I V I D E O D I F F E R E N C E S OF THE A P P R O P R I A T E A L D I F ( V I Z . O F THE ( M J - 1 I S T O I V I O E D D I F F E R E N C E S OF THE A L P H A ) ARE C A L C U L A T E D TO O B T A I N THE ( K - M J - D S T D I V I D E D D I F F E R E N C E DO 10 L d . K M R L E F T P L = L E F T • L 10 A R M I ( L - M J - I ) = A L D I F I I N C O M P . L E F T P L I INCOMP = INCOMP - N A L P H J C c c.. . c K P H J 1 • Kr l lJ • 1 DO 4 0 MR • M J . K P M J 1 K M R B K M R * 1 D N K 2 B D N 2 * O F L O A T I K M R I DO 2 0 L B l.KMR 2 0 A R I L ' N R ) • D N K 2 ' ( A R M I I L ' N R ) - A R M I I L « M R - 1 > I DO 1 0 L B N R . K P M J I 1 0 A R M I ( L * 1 ) • A R I L ' l l 4 0 C O N T I N U E U H I G H U I • A R I K P M J I 5 0 C O N T I N U E R E T U R N E N D F O R C O N V E N I E N C E O F T H E U S E R WE L I S T H E R E T H E P A C K A G E S O L V E B L O K OF D E BOOR • W E I S S ( 4 ) . U S E D I N C O L S T S . S U B R O U T I N E F C B L O K I B L O K S , I N T E G S . N B L O K S . I P I V O T , S C R T C H . I F L A G I C A L L S S U B R O U T I N E S F A C T R B A N D S H I F T B . F C B L O K S U P E R V I S E S T H E P L U F A C T 0 R 1 2 A T I O N W I T H P I V O T I N G OF S C A L E O ROWS O F THE A L M O S T B L O C K D I A G O N A L M A T R I X S T O R E D I N T H E A R R A Y S B L O K S A N D I N T E G S . F A C T R B B S U B P R O G R A M W H I C H C A R R I E S OUT S T E P S 1 L A S T OF G A U S S E L I M I N A T I O N ( W I T H P I V O T I N G ) F O R A N I N D I V I D U A L B L O C K . S H I F T B B S U B P R O G R A M W H I C H S H I F T S T H E R E M A I N I N G ROWS TO T H E TOP O F T H E N E X T B L O C K P A R A M E T E R S B L O K S AN A R R A Y THAT I N I T I A L L Y C O N T A I N S T H E ALMOST B L O C K O I A G O N A M A T R I X A TO B E F A C T O R E D , A N D ON R E T U R N C O N T A I N S T H E COM-P U T E D F A C T O R I Z A T I O N O F A . I N T E G S A N I N T E G E R A R R A Y D E S C R I B I N G T H E B L O C K S T R U C T U R E OF A . N B L O K S T H E NUMBER OF B L O C K S I N A . I P I V O T A N I N T E G E R A R R A Y OF D I M E N S I O N S U M I I N T E G S I 1 . N I : N = 1 , . . . . N B L O K S ) W H I C H , ON R E T U R N . C O N T A I N S T H E P I V O T I N G S T R A -T E G Y U S E D . S C R T C H WORK A R E A R E Q U I R E D , OF L E N G T H MAX ( I N T E G S I I . N ) ; N = 1 . N B L O K S ) . I F L A G O U T P U T P A R A M E T E R ; B 0 I N C A S E M A T R I X WAS F O U N D TO B E S I N G U L A R . O T H E R W I S E . B I - 1 ) * * ( N U M B E R O F ROW I N T E R C H A N G E S D U R I N G F A C T O R I Z A T I O N ) I N T E G E R I N T E G S [ 3 . N B L O K S ) . I P I V O T ( 1 ) , I F L A G , I . I N D E X . I N D E X B , I N D E X N . 1 L A S T , N C O L , N R O W D O U B L E P R E C I S I O N B L O K S I 1 1 . S C R T C H ! 1 1 I F L A G B l I N D E X B B 1 I N D E X N B 1 I B 1 C C... L O O P O V E R T H E B L O C K S . I I S L O O P I N D E X 1 0 I N D E X B I N D E X N N R O K B I N T E G S I 1 . 1 ) N C O L B I N T E G S I 2 . I ) L A S T > I N T E G S I 3 . I ) C C... C A R R Y OUT E L I M I N A T I O N ON T H E 1-TH B L O C K U N T I L N E X T B L O C K C... E N T E R S . I . E . . F O R C O L U M N S 1 L A S T OF I - T H B L O C K . C C A L L F A C T R B I B L O K S I I N D E X ) . I P I V O T I I N D E X B I . S C R T C H . NROW. 1 N C O L . L A S T . I F L A G ) C C... C H E C K F O R H A V I N G R E A C H E D A S I N G U L A R B L O C K OR T H E L A S T B L O C K C I F ( I F L A G .EQ. 0 .OR. I E O . N B L O K S ) R E T U R N I • 1.1 I N D E X N B N R O W N C O L • I N D E X C C... P U T T H E R E S T O F T H E 1 - T H B L O C K ONTO T H E N E X T B L O C K C C A L L S H I F T B I B L O K S I I N D E X ) , I P I V O T I I N D E X B ) . NROW. N C O L . 1 L A S T , B L O K S I I N D E X N ) , I N T E G S I 1 . 1 ) . I N T E G S I 2 . I ) ) I N D E X B B I N D E X B * NROW GO T O 1 0 E N D S U B R O U T I N E F A C T R B I W, I P I V O T , 0 , NROW. N C O L . L A S T , I F L A G ) A D A P T E D F R O M P . 1 3 2 O F E L E M E N T . N U M E R . A N A L Y S I S B Y C O N T E - O E B O O R C O N S T R U C T S A P A R T I A L P L U F A C T O R I Z A T I O N , C O R R E S P O N D I N G TO S T E P S 1 L A S T I N G A U S S E L I M I N A T I O N , F O R T H E M A T R I X W OF O R D E R I NROW , N C O L I . U S I N G P I V O T I N G O F S C A L E D ROWS. P A R A M E T E R S W C O N T A I N S T H E ( N R O W . N C O L I M A T R I X T O B E P A R T I A L L Y F A C T O R E D ON I N P U T , A N D T H E P A R T I A L F A C T O R I Z A T I O N ON O U T P U T . I P I V O T A N I N T E G E R A R R A Y OF L E N G T H NROW C O N T A I N I N G A R E C O R D O F T H E P I V O T I N G S T R A T E G Y U S E D : ROW I P I V O T I I I I S U S E D D U R I N G T H E I - T H E L I M I N A T I O N S T E P , I B I L A S T . 0 A WORK A R R A Y O F L E N G T H NROW U S E D TO S T O R E ROW S I Z E S T E M P O R A R I L Y . NROW N U M B E R O F ROWS O F W. N C O L N U M B E R O F C O L U M N S OF W. L A S T N U M B E R OF E L I M I N A T I O N S T E P S TO B E C A R R I E D OUT. I F L A G ON O U T P U T . E Q U A L S I F L A G ON I N P U T T I M E S I - 1 1 • • ( N U M B E R O F ROW I N T E R C H A N G E S D U R I N G T H E F A C T O R I Z A T I O N P R O C E S S I . I N C A S E NO Z E R O P I V O T WAS E N C O U N T E R E D . O T H E R W I S E . I F L A G B 0 ON O U T P U T . I N T E G E R 1 P I V 0 T I N R 0 W ) . N C O L . L A S T . I F L A G . I . I P 1 V I . I P I V K . J , K , K P 1 D O U B L E P R E C I S I O N W I N R O W . N C O L I . O I N R O W I . A W I K D I . C O L M A X . R A T I O . R O W U A X D O U B L E P R E C I S I O N D A B S . D M A X 1 I N I T I A L I Z E I P I V O T . D DO 2 0 I B I . N R O W I P I V O T I I ) » X norm*' • o.oo DO 10 JE1,NCOL 10 ROWMAX = D M A X H R O W M A X , D A B S I W I I . J ) ) ) IF (ROWMAX .EO. O . D O ) GO TO SO JO D M ) * RORVUX C . . . G A U S S E L I M I N A T I O N WITH P I V O T I N G OF S C A L E D ROWS. L O O P OVER C . . . K = 1 , . , L A S T K c 1 C . . . AS P I V O T ROW FOR K-TH S T E P , P I C K AMONG THE ROWS NOT Y E T U S E D , C . . . I . E . , FROM ROWS I P I V O T I K ) . . . . . I P I V O T ( N R O W ) , THE ONE WHOSE K - T H C . . . ENTRY (COMPARED TO THE ROW S I Z E ) I S L A R G E S T . T H E N . I F T H I S ROW C . . . DOES NOT TURN OUT TO B E ROW I P I V O T I K ) . R E D E F I N E I P I V O T I K ) A P -C . . . P R O P R I A T E L Y AND RECORD T H I S I N T E R C H A N G E BY CHANGING THE S I G N C . . . OF I F L A G . 30 I P I V K s I P I V O T I K ) I F IK . E O . NROW) GO TO 8 0 J = K KP1 = K » 1 COLMAX = D A B S I W I I P I V K . K D / D I I P I V K ) C C . . . F I N D THE ( R E L A T I V E L Y ) L A R G E S T P I V O T C DO 4 0 1=KP1 ,NR0W I P I V I <s I P I V O T I I ) AWIKDI = O A B S I W I I P I V l . K M / D I I P I V I ) IF (AWIKDI . L E . COLMAX) COLMAX e AWIKDI J = I 4 0 C O N T I N U E IF I J . E O . K ) I P I V K = I P I V O T I J ) I P I V O T I J ) = I P I V O T I K ) I P I V O T I K ) = I P I V K I F L A G u - I F L A G SO C O N T I N U E C C . . . I F P I V O T E L E M E N T I S TOO S M A L L IN A B S O L U T E V A L U E , D E C L A R E C . . . M AT RIX TO B E N O N I N V E R T I B L E AND O U I T . C IF ( D A B S ( W I 1 P I V K . K ) ) » D I I P I V K > . L E . D I I P I V K I I 1 GO TO 90 C C . . . O T H E R W I S E , S U B T R A C T THE A P P R O P R I A T E M U L T I P L E OF THE P I V O T C . . . ROW FROM R E M A I N I N G ROWS. I . E . , THE ROWS I P I V O T I K * ! ) C . . . I P I V O T I N R O W ) . TO MAKE K - T H ENTRY Z E R O . S A V E THE M U L T I P L I E R C . . . IN I T S P L A C E . C DO 6 0 I = K P 1 . N R 0 W I P I V I = I P I V O T I I ) W I I P I V I . K I = W I I P I V I . K I / W I I P I V K . K ) R A T I O = - W ( I P I V I , K I DO 6 0 J = K P 1 , N C O L 6 0 W I I P I V I , J ) = R A T I O ' W I I P I V K . J ) • W I I P I V I . J ) K = K P I C GO TO 4 0 GO TO 50 C . . C CHECK FOR H A V I N G R E A C H E D THE NEXT B L O C K . I F (K . L E . L A S T ) R E T U R N C C . . C . . C C C . C I F L A S T . E O . NROW . CHECK NOW THAT P I V O T E L E M E N T IN L A S T ROW IS N O N Z E R O . 8 0 I F ( 0 A B S I W I I P I V K , N R O W ) ) * O ( I P I V K ) G T . O ( I P I V K ) ) R E T U R N S I N G U L A R I T Y F L A G S E T 9 0 I F L A G = 0 R E T U R N END S U B R O U T I N E S H I F T S ( A l , I P I V O T , NROWI . N C O L I . L A S T , 1 A l l , N R 0 W I 1 , N C O L I 1 ) S H I F T S THE ROWS IN CURRENT B L O C K , A l , NOT U S E D AS P I V O T ROWS, IF A N Y , I . E . . ROWS I P I V O T I L A S T * ! ) I P I V O T I N R O W I ) , ONTO THE F I R S T MMAX = N R O W - L A S T ROWS OF THE NEXT B L O C K , A l l . WITH COLUMN L A S T ' J OF A l G O I N G TO COLUMN J , J s l J M A X = N C O L I - L A S T . THE R E M A I N I N G COLUMNS OF T H E S E ROWS OF A l l A R E Z E R O E D O U T . P I C T U R E O R I G I N A L S I T U A T I O N A F T E R L A S T r 2 COLUMNS H A V E B E E N DONE IN F A C T R B ( A S S U M I N G NO I N T E R C H A N G E S OF ROWS) 1 I I IX X X X 1 0 X 1X X X 0 B L O C K I 1 NROWI n 4 0 0 IX X X 0 N C O L I = 5 1 L A S T = 2 0 0 II X X 0 B L O C K I » 1 NROW11 ci 5 N C O L I U 5 11 X X X X 1 IX X X I X 1 IX X X I I R E S U L T S IN A NEW BLOCK ! • C R E A T E D AND READY 10 BE F A C T O R E D BY NEX1 F A C T R B C A L L . 0 1X 1 0 IX 1 1X 1 IX 1- -NEW B L O C K 1*1 I N T E G E R 1 P I V 0 T I N R 0 W I ) . L A S T , I P , J , J M A X , J M A X P 1 , M , M M A X D O U B L E P R E C I S I O N A l I N R O W I , N C O L I 1 , A I 1 ( N R O W I 1 . N C O L I 1 ) MMAX * NROWI - L A S T JMAX = N C O L I - L A S T I F IMMAX . L T . 1 . O R . JMAX . L T . 1) R E T U R N PUT T H E R E M A I N D E R OF B L O C K I I N T O A l l DO 10 M=1.MMAI I P • I P I V O T ( L A S T . M ) DO 10 J * 1 , J M A I 10 A l K M . J ) = A K I P . L A S T . J ) I F U M A X . E O . N C 0 L I 1 ) R E T U R N C C . . . ZERO OUT T H E U P P E R R I GHT CORNER OF t i l C JMAXP1 = JMAX • 1 DO 20 J = J M A X P 1 , N C 0 L 1 1 0 0 20 M = l . U M A X 2 0 A I 1 I M . J ) « 0 . 0 0 R E T U R N END S U B R O U T I N E S B B L O K ( B L O K S . I N T E G S , N B L O K S . I P I V O T , 6 , X ) C A L L S S U B R O U T I N E S S U B F O R ANO S U B B A K . S U P E R V I S E S THE S O L U T I O N (BV FORWARD AND BACKWARD S U B S T I T U T I O N ) OF THE L I N E A R S Y S T E M A ' X = B FOR X . WITH THE P L U F A C T O R I Z A T I O N OF A A L R E A D Y G E N E R A T E D IN F C B L O K . I N D I V I D U A L B L O C K S OF E O U A T I O N S A R E S O L V E D V I A S U B F O R AND SUBBAK . P A R A M E T E R S B L O K S , I N T E G S , N B L O K S . I P I V O T ARE AS ON R E T U R N FROM F C B L O K . B THE RIGHT S I D E . S T O R E D C O R R E S P O N D I N G TO THE S T O R A G E OF THE E O U A T I O N S . S E E COMMENTS IN S L V B L K FOR D E T A I L S . X S O L U T I O N V E C T O R I N T E G E R I N T E G S I 3 . N B L O K S ) , I P I V O T ! 1 ) , I . I N D E X , I N O E X B . I N D E X X , J . L A S T . 1 N B P 1 , N C O L . N R O W O O U B L E P R E C I S I O N B L O K S ( I ) . B I D , X ( 1 ) C C . . . FORWARD S U B S T I T U T I O N P A S S C INDEX " 1 I N D E X B = 1 INDEXX = 1 DO 10 1 = 1 . N B L O K S NROW = I N T E G S I 1 . 1 ) L A S T = I N T E G S I 3 . I ) C A L L S U B F O R I B L O K S I I N D E X ) , I P I V O T I I N D E X B ) . NROW, L A S T , 1 B I I N D E X B ) , X ( I N D E X X ) I INDEX = N R 0 W - I N T E G S I 2 . i l • INDEX I N D E X B = I N D E X B • NROW 10 INDEXX = INDEXX * L A S T C C . . . BACK S U B S T I T U T I O N P A S S C NBP1 = N B L O K S • 1 0 0 20 J = 1 . N B L O K S I = NBP1 - J NROW = I N T E G S I 1 . i l NCOL = I N T E G S I 2 . i l L A S T = I N T E G S I 3 . I ) INDEX = INDEX • N R O W N C O L INDEXB = I N O E X B - NROW INDEXX = INOEXX - L A S T 2 0 C A L L SUBBAK I B L O K S I I N D E X ) , I P I V O T I I N D E X B ) . NROW, N C O L , 1 L A S T , X I I N D E X X ) ) R E T U R N END S U B R O U T I N E S U B F O R I W, I P I V O T , NROW. L A S T . B . X ) C C c C C A R R I E S OUT THE FORWARO P A S S O F S U B S T I T U T I O N FOR THE CURRENT C B L O C K . I . E . . THE A C T I O N ON THE R IGH T S I D E C O R R E S P O N D I N G TO THE C E L I M I N A T I O N C A R R I E D OUT IN F A C T R B FOR T H I S B L O C K . C AT THE E N D . X I J ) C O N T A I N S THE R IGH T S I D E OF THE T R A N S F O R M E D C I P I V O T I J I - T H E O U A T I O N IN T H I S B L O C K , J=1 NROW. T H E N , S I N C E C FOR 1 = 1 N R O W - L A S T . B ( N R O W « I ) I S GOING TO BE U S E D AS THE RIGHT C S I D E OF E O U A T I O N . I IN THE N E X T B L O C K ( S H I F T E D OVER T H E R E FROM C T H I S B L O C K DURING F A C T O R I Z A T I O N ) , IT IS S E T E O U A L TO X ( L A S T ' I ) C H E R E . C C P A R A M E T E R S C W. I P I V O T . NROW. L A S T ARE AS ON RETURN FROM F A C T R B . C B ( J ) I S E X P E C T E D TO C O N T A I N , ON I N P U T , THE R IGH T S I D E OF J - T H C E O U A T I O N FOR T H I S B L O C K , J=1 NROW. C B ( N R O W . J ) C O N T A I N S , ON O U T P U T , THE A P P R O P R I A T E L Y M O D I F I E D R I G H T C S I D E FOR E O U A T I O N J IN NEXT B L O C K . J=1 N R O W - L A S T . C X I J ) C O N T A I N S , ON O U T P U T , THE A P P R O P R I A T E L Y M O D I F I E D R IGH T C S I D E OF E O U A T I O N I P I V O T I J ) IN T H I S B L O C K , J=1 L A S T C I AND E V E N FOR J = L A S T » 1 NROW) . C c c I N T E G E R I P I V O T I N R O W ) . I P . J M A X . K D O U B L E P R E C I S I O N W I N R O W . L A S T ) , B I 1 1 , X ( N R O W ) , S U M IP = I P I V O T ! 1 ) X I I I = B I I P I I F INROW . E O . 1) GO TO AO DO 2 0 K = 2 . N R 0 W I P = I P I V O T I K I JMAX « M I N O I K - 1 . L A S T I SUM = 0 . 0 0 DO 10 J ' l . J M A X 10 SUM = W I I P . J I - X I J ) • SUM 20 I I K ) = B ( I P ) - SUM C C . . . T R A N S F E R M O D I F I E D R I G H T S I D E S OF E O U A T I O N S I P I V O T ! L A S T ' 1 ) C . . . I P I V O T I N R O W ) TO N E X T B L O C K . C NROWML = NROW • L A S T IF INROWML . E O . 0 ) GO TO 40 L A S T P 1 = L A S T - 1 DO 30 K = L A S T P 1 . N R O W 30 B ( N R O W M L * K I = X I K ) 4 0 R E T U R N END S U B R O U T I N E S U B B A K I W. I P I V O T . NROW. N C O L . L A S T , X ) C C c C C A R R I E S OUT B A C K S U B S T I T U T I O N FOR CURRENT B L O C K . C P A R A M E T E R S M. I P I V O T , NROW, N C O L , L A S T A R E A S ON R E T U R N FROM F A C T R B . I l l ) I ( N C O L ) C O N T A I N S , ON I N P U T , THE R IGH T S I D E FOR THE E O U A T I O N S IN T H I S B L O C K A F T E R B A C K S U B S T I T U T I O N HAS B E E N C A R R I E D UP TO BUT NOT I N C L U D I N G E O U A T I O N I P I V O T I L A S T ) . MEANS THAT I I J ) C O N T A I N S THE RIGHT S I D E OF E O U A T I O N IP1 -V O T ( J ) AS M O D I F I E D D U R I N G E L I M I N A T I O N , J=1 L A S T . WHILE FOR J . O T . L A S T , X I J ) I S A L R E A D Y A COMPONENT OF THE S O L U T I O N V E C T O R . 1 (11 X ( N C O L ) C O N T A I N S . ON O U T P U T , THE COMPONENTS OF THE S O L U T I O N C O R R E S P O N D I N G TO T H E P R E S E N T B L O C K . I N T E G E R I P I V O T I N R O W ) . L A S T , I P . J . K . K P 1 D O U B L E P R E C I S I O N WINROW.NCOL) , I ( N C O L ) , SUM K = L A S T I P = I P I V O T ( K ) SUM E O . D O I F (K . E O . N C O L ) GO TO 30 KP1 = K » t 10 DO 20 J = K P 1 . N C O L 20 SUM E W ( I P . J ) ' X I J ) . SUM 30 M K ) E I K K ) - S U M ) / W ( I P . K ) IF (K . E O . 1) R E T U R N KP1 E K K s K -1 I P E I P I V O T ( K ) SUM E O . D O GO TO 10 END C P R O B L E M 1 - S E E COMPANION P A P E R C I M P L I C I T R E A L ' S ( A - H . O - Z ) R E A L ' S F S P A C E I 2 0 D 0 ) , Z E T A ( 4 ) , T 0 L I 2 ) , Z ( 4 ) . U I 4 ) , E R R I 4 ) I N T E G E R I S P A C E I 2 0 0 I . M I D . IPARI 11], L T 0 L I 2 I E I T E R N A L F S U B . O F S U B . G S U B . D G S U 8 , DUMMY C W R I T E ( 6 . 9 9 ) 9 9 F O R M A T ) 1 H 1 , 35H E X A M P L E OF A S I M P L E P R O B L E M S E T U P . / 4 6 H UNIFORMLY L O A D E D B E A M OF V A R I A B L E S T I F F N E S S . / 32H S I M P L Y S U P P O R T E D AT BOTH E N D S . / ) C C ONE D I F F E R E N T I A L E O U A T I O N OF ORDER 4 . M l D = 4 C G I V E L O C A T I O N OF BOUNDARY C O N D I T I O N S Z E T A I 1 ) E 1 . 0 0 Z E T A I 2 ) E 1 . 0 0 Z E T A I 3 ) E 2 . 0 0 Z E T A I 4 ) E 2 . 0 0 C S E T UP PARAMETER ARRAY C U S E D E F A U L T V A L U E S F O R A L L P A R A M E T E R S E X C E P T F O R I N I T I A L C MESH S I Z E , N O . OF T O L E R A N C E S AND S I Z E S OF WORK A R R A Y S DO 10 1 = 1 . 1 1 10 I P A R I I ) E 0 I P A R I 3 ) E 1 I P A R I 4 ) « 2 I P A R I S ) = 2 0 0 0 I P A R I 6 ) = 200 C TWO ERROR T O L E R A N C E S ION U AND I T S SECOND D E R I V A T I V E ) L T O L I 1 ) = 1 L T 0 L I 2 ) = 3 T 0 L I 1 ) = 1 . D - 7 T 0 L I 2 ) = 1 . 0 - 7 C C A L L C O L S Y S ( 1 . M , 1 . D 0 , 2 . 0 0 , Z E T A , I P A R , L T O L , T O L , F I X P N T , I S P A C E . F S P A C E . I F L A G . F S U B . D F S U B . G S U B . D G S U B . OUMMY) C IF ( I F L A G . N E . 1) S T O P C C A L C U L A T E THE ERROR AT 101 P O I N T S U S I N G THE KNOWN C E X A C T S O L U T I O N X = 1 . 0 0 DO 2 0 1 = 1 . 4 20 E R R ( I ) = O . D O 0 0 40 J = 1 , 1 0 1 C A L L A P P S L N ( X . Z , F S P A C E . I S P A C E ) C A L L E X A C T ( X . U ) DO 30 1 = 1 . 4 30 ERR 11) « D M A X 1 1 E R R I I ) , D A B S I U ( I ) - Z ( I ) ) ) 4 0 I = X • . 0 1 0 0 W R I T E ( e . l O O ) ( E R R ( I ) . 1 = 1 . 4 ) 100 F O R M A T ( / 2 7 H ERROR T O L E R A N C E S S A T I S F I E D / / 2 2 H THE E X A C T E R R O R S A R E , / 7 X . 4 D 1 2 . 4 ) S T O P END S U B R O U T I N E F S U B ( X , Z . F ) R E A L ' S 2(1) , F I D , X F I D « ( 1 . D 0 • 6 . D 0 ' X " 2 ' Z I 4 ) • B . D 0 ' X ' Z I 3 1 ) I X " 3 R E T U R N END S U B R O U T I N E D F S U B I X . Z . O F ) R E A L ' 6 Z I 4 ) . D F ( 1 , 4 ) , X D F I 1 , 1 ) E O . D O 0 F I 1 . 2 I • O . D O D F I 1 . 3 ) • - B . 0 0 / X " 2 D F I 1 .4 ) * - 6 . D O / I R E T U R N END S U B R O U T I N E G S U B ( I , Z . G ) R E A L " 6 Z ( 4 ) , G GO TO ( 1 , 2 , 1, 2 ) , I 1 G = Z( 1) - 0 . 0 0 R E T U R N 2 G = 2 1 3 ) - O . D O R E T U R N END S U B R O U T I N E D G S U B ( I . 2 , DG) R E A L ' 6 2 ( 4 1 , D G ( 4 ) DO 10 J = 1 . 4 10 D G I J ) = 0 . 0 0 GO TO ( 1 . 2 , 1, 2 ) , 1 1 D G I 1 ) = 1 . 0 0 R E T U R N 2 D G I 3 ) = 1 . 0 0 R E T U R N END S U B R O U T I N E E X A C T I X . U ) I M P L I C I T R E A L ' S ( A H , 0 - 2 1 R E A L ' S U I 4 I C E X A C T S O L U T I O N U M ) • . 2 5 0 0 ' U 0 . D O ' O L O G ( 2 . D O ) - 3 . 0 O > • ( t . O O - X ) ' . S C O * 1 1 . 0 0 / 1 ' I J . D O ' X l ' D L O G I X I • I) U ( 2 ) • - . 2 9 0 0 ' 1 1 0 . D 0 ' D L 0 G ( 2 . D O ) • 3 . D O ) • . 6 0 0 * ( - 1 . D 0 / I / X « O L O C ( t ) • ( J . D O - X I / I • 1 . 0 0 ) U ( 3 ) . . 6 0 0 • < 2 . D 0 / X " J • 1 . D 0 / X - 1 . D O / I / I ) U I 4 ) • . 6 0 0 ' ( - 6 D 0 / I " 4 - 1 . D 0 / X / X • 6 . D 0 / I ' * 3 ) R E T U R N END S U B R O U T I N E DUMMY END C P R O B L E M 2 - S E E COMPANION P A P E R C I M P L I C I T R E A L ' S ( A - H . 0 - 2 1 R E A L ' 6 Z E T A 1 4 ) . F S P A C E 1 4 0 0 0 0 ) . T 0 L I 4 ) . 2 ( 4 ) I N T E G E R M ( 2 ) . I P A R I 1 1 ) . I S P A C E ( 2 5 0 0 > . L T 0 L I 4 ) COMMON E P S . OMU. E P S 4 M U , GAMMA, IT E X T E R N A L S O L U T N . F S U B . D F S U B . G S U B . D G S U B C D E F I N E C O N S T A N T S . P R I N T A H E A D I N G . GAMMA » 1 .1D0 E P S • . 0 1 0 0 OMU = E P S E P S 4 M U = E P S " 4 / D M U XT = DSORT ( 2 . D O M GAMMA • 1 DO) / G A M M A ) WRITE 1 6 , 1 0 0 1 GAMMA. X T , E P S . D M U . E P S 4 M U 100 F O R M A T ( 1 H 1 , 2 7 H D I M P L I N G OF S P H E R I C A L C A P S , / 6 H GAMMA = . F 7 . 2 / 6H XT = . 0 1 2 . 5 / 6H E P S = . 0 1 2 . 5 / 6H MU = . 0 1 2 . 5 / 12H E P S " 4 / M U = . 0 1 2 . 5 ) C D E F I N E N O . OF D I F F E R E N T I A L E O U A T I O N S . NCOMP > 2 C O R D E R S Ml 1) « 2 M I 2 ) = 2 C I N T E R V A L ENDS A L E F T « 0 . 0 0 A R I G H T < I .DO C L O C A T I O N S OF S I D E C O N D I T I O N S Z E T A I 1) = O . D O Z E T A I J ) • O . D O 2 E T A I 3 ) = I .DO Z E T A I 4 ) « l . D O C I P A R V A L U E S C A N O N L I N E A R P R O B L E M I P A R I 1 ) » I C 4 C O L L O C A T I O N P O I N T S PER S U B I N T E R V A L I P A R I 2 ) s 4 C I N I T I A L UNIFORM MESH OF 10 S U B I N T E R V A L S I P A R I 3 ) • 10 I P A R I 6 ) * 0 C D I M E N S I O N OF R E A L WORK ARRAY F S P A C E I S 4 0 0 0 0 I P A R I 5 ) = 4 0 0 0 0 C O I M E N S I O N OF I N T E G E R WORK A R R A Y I S P A C E I S 2 5 0 0 I PAR 16 I = 2 5 0 0 C I T H E S E D I M E N S I O N S OF F S P A C E AND I S P A C E C E N A B L E C O L S Y S TO USE M E S H E S OF UP TO 1S2 I N T E R V A L S . ) C P R I N T F U L L O U T P U T . I P A R I 7 I « -1 C I N I T I A L A P P R O X I M A T I O N FOR N O N L I N E A R I T E R A T I O N IS P R O V I D E D C IN S O L U T N I P A R I 9 ) = 1 C A REGULAR P R O B L E M I P A R I 1 0 ) * 0 C NO F I X E D P O I N T S IN THE M E S H I P A R I 1 1 ) = 0 C T O L E R A N C E S ON A L L COMPONENTS I P A R I 4 ) « 4 DO 10 1=1,4 L T O L I I ) • I 10 T O L I I ) » 1 . D - 5 C C A L L C O L S Y S C A L L C O L S Y S ( N C O M P , M, A L E F T . A R I G H T , Z E T A , I P A R . L T O L . T O L . F I X P N T , I S P A C E . F S P A C E , I F L A G . F S U B . D F S U B . G S U B . D G S U B . S O L U T N ) C P R I N T V A L U E S OF THE O B T A I N E D A P P R O X I M A T E S O L U T I O N AT P O I N T S C X = 0 . . 0 5 1. X = O . D O W R I T E ( 6 . 2 0 1 ) 201 FORMAT ( I H 1 . 4 4 H X PH I OPHI 23H P S I D P S I / ) 2 0 2 FORMAT ( 6 1 , F 5 . 2 . 4 X . 6 D 1 5 . 5 ) NP1 = 21 0 0 555 111=1,NPI C A L L A P P S L N ( X , 2 , F S P A C E . I S P A C E ) WRITE ( 6 , 2 0 2 ) X . Z I = X • . 0 5 0 0 5 5 5 C O N T I N U E S T O P END S U B R O U T I N E S O L U T N ( X . Z . D M V A L ) I M P L I C I T R E A L ' S I A - H . 0 - 2 ) COMMON E P S . D M U . E P S 4 M U , GAMMA, XT O I M E N S I O N Z I 4 ) . D M V A L 1 2 ) CONS « GAMMA • X • 1 1 . 0 0 - . 5 D 0 ' X ' X ) DCONS = GAMMA • 1 1 . D O • 1 . 5 D 0 ' X ' X ) D 2 C 0 N S ' - 3 . D 0 • GAMMA • X I F ( I . G T . X T ) GO TO 10 2 ( 1 ) « 2 . 0 0 ' X 2 ( 2 ) • 2 . D O 2 ( 3 ) • - 2 . D 0 ' ! • CONS 2 1 4 ) • - 2 . 0 0 • DCONS D M V A L ( 2 1 • 0 2 C 0 N S GO TO 2 0 10 2 1 1 ) • O . D O 2 ( 2 1 = O . D O 2 ( 3 ) • - C O N S 2 ( 4 ) = - D C O N S 0 U V A L I 2 ) • - D 2 C 0 N S 20 DMVALI 1) • O . D O R E T U R N END S U B R O U T I N E F S U B I I . 2 , F ) I M P L I C I T R E A L ' 6 ( A - H . 0 - 2 ) D I M E N S I O N 2 1 4 ) . F I 2 ) COMMON E P S , DMU. E P S 4 M U . GAMMA, I T F I 1 ) « 2 I D / I / X • 2 I 2 I / X • I Z ( l ) - Z l 3 ) ' I 1 . D O - Z ( 1 ) / I ) -G A M M A ' X ' ( 1 . D 0 I ' X / 2 ) ) / E P S 4 M U F I 2 ) « Z I 3 1 / I / I - Z ( 4 ) / X « 21 D M 1 0 0 - 2 1 0 / 2 . 0 0 / 1 ) / DMU R E T U R N END S U B R O U T I N E O F S U B I X . 2 , O F ) I M P L I C I T R E A L ' S ( A H , 0 - 2 ) D I M E N S I O N 2 ( 4 ) . D F I 2 . 4 ) COMMON E P S , D M U . E P S 4 M U , GAMMA, XT D F I I . I I » 1 . 0 0 / X / X • ( l . D O • 2 ( 3 ) / X ) / E P S 4 M U D F ( 1 , 2 ) « - I . D O / X D F I I . 3 ) * - ! 1 . D 0 - Z I 1 ) / X ) / E P S 4 M U D F ( 1 . 4 ) • O . D O D F I 2 . I ) • ( 1 . 0 0 • 2 ( 1 1 / 1 1 / DMU O F I 2 . 2 I • O . D O 0 F I 2 . 3 ) » 1 . 0 0 / X / X O F I 2 . 4 ) n - 1 . 0 0 / X R E T U R N END S U B R O U T I N E GSUB I I . 2 . G ) I M P L I C I T R E A L ' B ( A - H . O Z ) O I M E N S I O N 2 ( 4 1 GO TO 1 1 . 2 , 1, 3 ) , I 1 G = Z( 11 RETURN 2 G « Z ( 3 ) R E T U R N H : Z I 4 ) - 3 D O ' Z I 3 ) • . 7 0 0 R E T U R N END S U B R O U T I N E DGSUB ( I . Z . DG) I M P L I C I T R E A L ' S ( A - H . O - Z ) O I M E N S I O N 2 ( 4 ) , D G I 4 ) 0 0 10 J = 1 , 4 10 O G I J ) = 0 . DO GO TO ( 1 . 2 . 1, 3 ) , I 1 D G I 1 ) = 1 . 0 0 R E T U R N 2 0 G I 3 ) = 1 . 0 0 R E T U R N 3 0 G I 4 ) • 1 . 0 0 D G I 3 ) = - . 3 0 0 R E T U R N END C P R O B L E M 3 - S E E COMPANION P A P E R C I M P L I C I T R E A L ' S ( A - H . O - Z ) R E A L ' S ZETA(S), F S P A C E ( 4 0 0 0 0 ) , T 0 L I 2 ) , S V A L I 3 ) . E L V A H 3 I I N T E G E R M ( 2 ) , I S P A C E I 2 5 0 0 ) , L T 0 L I 2 ) , I P A R I 1 1 ) R E A L ' S Z I 5 ) COMMON E N , S , E L , CONS E X T E R N A L F S U B . D F S U B , G S U B , D G S U B . S O L U T N D A T A S V A L / . 2 D 0 . . 1 0 0 . . 0 5 D 0 / . E L V A L / 6 0 . D O , 1 2 0 . D O . 2 0 0 . D O / C E N c . 2 0 0 CONS = . 5 0 0 ' ( 3 . 0 0 - E N ) NCOMP r 2 M I D = 2 M I 2 ) = 3 A L E F T - O . D O A R I G H T • l . D O C Z E T A I 1 ) = 0 . 0 0 Z E T A I 2) = 0 . 0 0 Z E T A I 3 ) = 0 . 0 0 Z E T A I 4 ) « 1 .DO Z E T A I 5 ) « l . D O C I P A R I 1) = 1 I P A R I 2 ) « 4 I P A R I 3 ) = 10 I P A R I 4 ) = 2 I P A R I 5 I = 4 0 0 0 0 I P A R I S ) = 2 5 0 0 I P A R I 7 ) = -1 I P A R I S ) = 0 I P A R I S ) = 1 I P A R I 1 0 ) e 0 IPARI 11) <= 0 C L T O L I 1 ) <= 1 L T 0 L I 2 ) = 3 TOLI 1) = l . D - 5 T 0 L I 2 ) = 1 . 0 - 5 C C S O L V E A C H A I N OF 3 P R O B L E M S DO 777 U K = 1 , 3 S = S V A L I U K ) E L = E L V A L ( I J K ) I F ( U K . E O . 1) GO TO 701 C S E T C O N T I N U A T I O N P A R A M E T E R S I P A R I S ) = 3 I P A R I 3 ) e I S P A C E ( 1) 701 C O N T I N U E R R I T E I S . 1 0 0 ) E N , S . E L 100 FORMAT I 1 H 1 , 3 8 H R O T A T I N G FLOW O V E R A S T A T I O N A R Y O I S K . / 1 B H P A R A M E T E R S - N = . F 5 . 2 , BH S = , F 5 . 2 . BH L = . F 6 . I / ) C C A L L C O L S Y S ( N C O M P . M. A L E F T , A R I G H T . Z E T A , I P A R . L T O L . T O L , F I X P N T , I S P A C E . F S P A C E , I F L A G , F S U B . D F S U B , G S U B , D G S U B . S O L U T N ) C IF ( I F L A G N E . 1) S T O P C P R I N T V A L U E S OF T H E O B T A I N E D A P P R O X I M A T E S O L U T I O N AT P O I N T S C X = 0 . 1 , 2 L . I S 6 e I S P A C E ( S ) I S 5 r I S P A C E ! 1 ) • 2 X ° O . D O R R I T E I S . 2 0 1 ) 201 FORMAT ( 1 H 1 . 4 4 H I G OG 38H H OH 0 2 H / 1 202 FORMAT ( 6 D 1 5 . 5 ) NP1 = E L • 1 . 5 D 0 I I = 1 0 0 5 5 5 1 1 1 = 1 . N P 1 C A L L APPROX I I I , X . Z , F S P A C E ( I S 6 ) , F S P A C E ! 1 ) . I S P A C E ! 1 ) , F S P A C E ! I S 5 ) . I S P A C E 1 2 ) , N C O M P , M . I S P A C E ( 4 ) . 1 . D M . O ) XL = I • E L 2 ( 2 ) = 2 ( 2 ) / E L Z I 4 ) o 2 1 4 ] / E L Z ( 5 ) * 2 ( 5 ) / E L / E L WRITE I B , 2 0 2 ) X L . Z X « X • l . D O / E L 5 5 5 C O N T I N U E 777 C O N T I N U E 4 . D O "2 E L " S . O O " E L " " 4 " X • B . D O ' E L " 3 ) S T O P E N D S U B R O U T I N E S O L U T N IX I M P L I C I T R E A L ' S ( A - H . O - Z I COMMON E N . S . E L . CONS R E A L ' S Z I S I . D M V A L 1 2 ) EX « O E X P I - E L ' I ) Z l l ) - 1 . 0 0 • EX Z ( 2 ) " E L ' E X Z I 3 ) = - E L " 2 • X " 2 • EX 2 ( 4 ) « ( E L " 3 ' X " 2 • 2 . D O ' E L 2 ( 5 ) = < - E L " 4 • X " 2 D M V A L ( 1 ) = - E L • 2 ( 2 ) O M V A L ( 2 ) = ( E L " 5 ' I ' X R E T U R N END S U B R O U T I N E F S U B ( X . Z , F ) I M P L I C I T R E A L ' S ( A - H . O - Z ) R E A L ' S Z ( 1 ) , F t 11 COMMON E N , S , E L , CONS F ( 1 ) a - E L " ( C O N S • Z ( 3 ) • 2 1 2 ) • ( E N - 1 . 0 0 ) • E L " 2 ' S ' I Z ( I ) - I . D O ) F ( 2 ) a - E L ' (CONS ' Z ( 3 I • 2 1 5 ) E L " 2 ' S • Z ( 4 ) . E L " 3 R E T U R N END S U B R O U T I N E D F S U B ( X . Z I M P L I C I T R E A L ' S ( A - H . O - Z ) R E A L ' 8 Z l l ) . D F ( 2 , I I COMMON E N , S , E L . CONS - E L ' ( E N - 1 . D 0 I • - E L ' CONS ' Z ( 3 ) • E L • CONS ' Z ( 2 ) - E L ' ( E N - 1 . 0 0 ) • 0 . 0 0 • E L " 3 ' 2 . D O • Z ( 1) O . D O - E L • CONS ' Z I 5 ) - E L • EN • 2 . 0 0 ' 2 ( 4 ) - E L ' CONS ' 2 ( 3 ) 2 . D O ' E L " 2 ) ' E X D F I 1 . 1 ) D F I 1 . 2 ) D F I 1 . 3 ) D F ( 1 , 4 ) D F I 1 , 5 ) D F ( 2 . 1 ) D F I 2 . 2 ) D F 1 2 . 3 ) D F 1 2 . 4 1 0 F I 2 . 5 ) R E T U R N END S U B R O U T I N E GSUB I I , R E A L ' S 2 ( 1 ) , G GO TO ( 1 , 2 . 3 . 1 G a Z l l ) R E T U R N 2 G = 2 ( 3 ) R E T U R N 3 G = 2 ( 4 ) R E T U R N 4 G a Z ( 1) R E T U R N ENO • E N ' 2 ( 4 1 " 1 1 . 0 0 - 2 ( 1 1 " Z I 4 ) • E L " " 2 2 ( 4 ) • Z I D I Z l l ) 4 . 3 ) . I S U B R O U T I N E DGSUB I I . 2 , Z( 1 ) , D G ! 1) R E A L ' S DO 10 J = 1 , 5 O G I J ) a O . D O GO TO I 1, 2 , 3 , 0 G ! 1 ) a l . D O R E T U R N 2 DGI 3) a l .DO R E T U R N 3 D G ( 4 ) a l . D O R E T U R N END 

Cite

Citation Scheme:

        

Citations by CSL (citeproc-js)

Usage Statistics

Share

Embed

Customize your widget with the following options, then copy and paste the code below into the HTML of your page to embed this item in your website.
                        
                            <div id="ubcOpenCollectionsWidgetDisplay">
                            <script id="ubcOpenCollectionsWidget"
                            src="{[{embed.src}]}"
                            data-item="{[{embed.item}]}"
                            data-collection="{[{embed.collection}]}"
                            data-metadata="{[{embed.showMetadata}]}"
                            data-width="{[{embed.width}]}"
                            async >
                            </script>
                            </div>
                        
                    
IIIF logo Our image viewer uses the IIIF 2.0 standard. To load this item in other compatible viewers, use this url:
https://iiif.library.ubc.ca/presentation/dsp.831.1-0098533/manifest

Comment

Related Items