2 This package may be broken. Please use the VECT package on
3 the SHARE directory. - JPG 6/5/78
5 This is a package of vector operators designed to make vector
6 operations convenient. Several vector operators are included.
7 The coordinate system may be specified by the user. Included in
8 the system are Cartesian, cylindrical and spherical coordinates in
9 three dimensions. Rectangular and polar coordinates are included
10 in two dimensions. The user is able to specify a new system to be
11 used, such as elliptical, in either two or three dimensions. A
12 function is included to change from any coordinate system to another
13 predefined system, or to another new system. This system is designed
14 only to handle orthogonal curvilinear coordinate systems.
16 The vectors used in the system may be either lists or
17 one-dimensional matrices. When an operation on a vector returns a
18 vector, then a one-dimensional matrix is returned if the arguments
19 are matrices. If any argument is a list, then a list is returned.
20 When an operation on a scalar returns a vector, then the value of
21 the global variable "vector" determines the form of the answer.
22 When vector has a value of "list", a list is returned. Otherwise
23 a one-dimensional matrix is returned. When a two-dimensional sys-
24 tem is specified, a scalar may be used where a vector is required,
25 in which case the scalar is considered to be a vector pointing out
30 Currently only three pre-defined three-dimensional coordinate
31 systems are included. Eight additional systems that lead to sep-
32 arable forms for the wave equation are: elliptic cylinder, prolate
33 spheroidal, oblate spheroidal, parabolic-cylinder, parabolic, coni-
34 cal, ellipsoidal, and paraboloidal.
36 1. Description of Global Variables.
39 Variable Value Explanation
40 -------- ------- -----------
42 coordsystem cartesian Coordinate system to be used.
44 dimension 3 Number of dimensions of coordinate
47 coordvar [x, y, z] Variables varying along axes of
48 coordinate system being used.
50 scalefactor [1, 1, 1] Scale factors associated with
51 coordinate system being used.
53 vector list Vectors to be used are lists, rather
54 than one-dimensional matrices.
56 2. Description of Pre-defined Coordinate Systems.
58 Coordsystem Dimension Coordvar Scalefactor
59 ----------- --------- -------- -----------
61 rectangular 2 [x, y] [1, 1]
62 polar 2 [r, th] [1, r]
63 cartesian 3 [x, y, z] [1, 1, 1]
64 cylindrical 3 [r, ph, z] [1, r, 1]
65 spherical 3 [r, th, ph] [1, r, r*SIN(th)]
67 coordsystem(arg) Specifies that coordinate system arg is to be set
68 up to be used by the vector operators in this package.
69 When arg is one of the values possible in the preced-
70 ing table for the global variable coordsystem, the
71 specified coordinate system is set up. All the global
72 variables are changed to new values as indicated by
75 3. Specification of Other Coordinate Systems.
79 Coordsystem(arg) specifies that coordinate system arg is to
80 be set up. When arg is not one of the pre-defined systems,
81 then the program asks the user to specify the new values of
82 the global variables. Thus any coordinate system may be
83 specified by the user.
87 The user may also set the values of the global variables di-
88 rectly. This may be useful in, for example, a BATCH file
89 if the user does not desire to type the new coordinate sys-
90 tem each time the program is BATCHed. The variable
91 coordsystem should be set to a name corresponding to the
92 coordinate system being specified. The global variables
93 dimension, coordvar and scalefactor must be set to appropriate
94 values. Note that just setting coordsystem does not cause
95 other global variables to be changed.
97 4. Description of Vector Operators Available.
100 --------- -----------
102 vectorp(a) A predicate that returns TRUE if a is a matrix or a
103 list. Thus A is characterized by both magnitude and
104 direction, quantities computed from the components of
107 a cross b Cross product of arguments a and b.
109 grad s Gradient of scalar s, or the vector with a magnitude
110 and direction of the maximum directional derivative.
112 div v Divergence of vector v, or the scalar product of the
113 vector v with the outward drawn normal.
115 curl a Curl of vector a, or the vector product of vector a
116 with the outward drawn normal.
118 laplacian a The Laplacian of a, or the divergence of the gradient
119 of a. If a is a scalar, then the result is a scalar.
120 The Laplacian of vector a is defined as
121 grad div a - curl curl a.
123 v dotdel b Directional derivative of vector v in the direction of
124 b. Result is a scalar if b is a scalar, and is a
125 vector if b is a vector. Christoffel symbols are
128 christoffel Defines the Christoffel symbols for use with the
129 directional derivative, dotdel.
130 curlgrad s Curl of the gradient of scalar a, which is zero.
132 graddiv v Gradient of the divergence of vector v.
134 divcurl v Divergence of the curl of vector v, which is zero.
136 curlcurl v Curl of the curl of vector v.
139 This system has been written by Martin Cole. Suggested improve-
140 ments may be incorporated into this package. Any comments or sug-
141 gestions should be mailed to MSC@MIT-MC.