Merge lp:~fluidity-core/fluidity/fix_coord_transformations into lp:fluidity
- fix_coord_transformations
- Merge into dev-trunk
Status: | Merged |
---|---|
Approved by: | Simon Mouradian |
Approved revision: | 4078 |
Merged at revision: | 4095 |
Proposed branch: | lp:~fluidity-core/fluidity/fix_coord_transformations |
Merge into: | lp:fluidity |
Diff against target: | 28922 lines |
To merge this branch: | bzr merge lp:~fluidity-core/fluidity/fix_coord_transformations |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Simon Mouradian | Needs Fixing | ||
Stephan Kramer | Needs Fixing | ||
Jon Hill | Pending | ||
Review via email: mp+114691@code.launchpad.net |
Commit message
Description of the change
Corrections to coordinate transformation routines and addition of new routines for vector and tensor change of basis.
- 4051. By Alexandros Avdis
-
Merge from buoyancy adjustment branch, affecting fix of buoyancy adjustment on the sphere, and removing some commented-out code.
- 4052. By Alexandros Avdis
-
Removed some redundant, commented-out code.
- 4053. By Alexandros Avdis
-
Merge-commit from from fluidity trunk, in order to keep present branch up to date.
Alexandros Avdis (alexandros-avdis) wrote : | # |
Thanks! I think the problematic code was a result of an un-intended merge from another branch. I fixed the commented-out code and it should now also treat a problem we have been having with buouancy adjustmen on the sphere.
- 4054. By Alexandros Avdis
-
Committing some aesthetical improvements to in-code comments. Also removed some code writing information to output, as it was bloating the log-files in large-scale tests.
- 4055. By Alexandros Avdis
-
Added vector_
lon_lat_ height_ 2_cartesian_ c to header file. - 4056. By Alexandros Avdis
-
Tiding-up some modifications, also the momentum flux components (surface stress) are now correctly transformed back into Cartesian.
- 4057. By Alexandros Avdis
-
Commit following merging in trunk, in order to keep present branch up to date.
- 4058. By Alexandros Avdis
-
Commit following merge from trunk, to keep present branch up to date.
- 4059. By Alexandros Avdis
-
Removed code addressing Buoyancy adjustment on the sphere corrections, as it belongs to another branch; it was entered here after incorrect merge.
- 4060. By Alexandros Avdis
-
Corrections to ERA40-forcing routines: lon-lat to Cartesian coordinate conversion is needed even when the -problem is not "on the sphere". Added C-inter-operable version of routine converting lon-lat into Cartesian coordinates and made some grammatical corrections to in-code comments in femtools/
Coordinates. F90 - 4061. By Alexandros Avdis
-
Added C-inter-operable routine for converting Cartesian coordinates into lon-lat-height. Also added function prototypes in include/
coordinates. h . - 4062. By Alexandros Avdis
-
Some "aesthetic" modifications to ocean_forcing/
forcingERA40. cpp, and changed some lines of ocean_forcing/ tests/test_ coare_ocean_ fluxes. cpp to use the new transformations routines. - 4063. By Jon Hill
-
Fixing forcing unit tests. The coordinate transform had a bug in it when used via c - the output variables weren't set. THis is now fixed and the UTs moved over to the new projection functions
- 4064. By Simon Mouradian
-
Minor typo corrections.
- 4065. By Alexandros Avdis
-
Merge-in of trunk, to keep present branch up to date.
- 4066. By Simon Mouradian
-
Change FORTRAN to Fortran
- 4067. By Simon Mouradian
-
Comment correction
- 4068. By Simon Mouradian
-
Fix typo
- 4069. By Simon Mouradian
-
Further comment correction
Simon Mouradian (mouradian) wrote : | # |
In femtools/
subroutine spherical_
-) Distance from referenceRadius (if referenceRadius is present)
-) Distance from center (i.e. equal to the radius) if referenceRadius is absent.
This behavious is inconsistent with the inverse routine lon_lat_
- 4070. By Simon Mouradian
-
Small bug fix in cartesian_
2_lon_lat_ height_ c and more comment corrections
Simon Mouradian (mouradian) wrote : | # |
In femtools/
subroutine transformation_
Simon Mouradian (mouradian) wrote : | # |
In femtools/
The intent for each subroutine argument should be specified.
Perhaps it would also be a good idea to have an assertion here that the two fields are on the same function space, before looping over all the nodes?
Simon Mouradian (mouradian) wrote : | # |
In femtools/
Ther subroutine vector_
Simon Mouradian (mouradian) wrote : | # |
In femtools/
The function rotate_
mesh_dim(
- 4071. By Simon Mouradian
-
Minor cleanup
Simon Mouradian (mouradian) wrote : | # |
I'm uncertain as to why the tests need to write results to vtu. I think this is just producing data that is never used.
- 4072. By Simon Mouradian
-
fix typo
- 4073. By Alexandros Avdis
-
Merging back, tiding-up.
Simon Mouradian (mouradian) wrote : | # |
Possibly no test for vector_
- 4074. By Simon Mouradian
-
Changes to address review. Thanks to Avdis for help.
- 4075. By Alexandros Avdis
-
Merging in additions to manual.
- 4076. By Alexandros Avdis
-
Modified the python version of the vector change of basis to use numpy rather than scipy.
- 4077. By Alexandros Avdis
-
Moved the python module containing the tensor basis change and coordinate transformation routines to a more central directory as it will be used by simulations (python diagnostics in flmls).
- 4078. By Simon Mouradian
-
merge trunk
Preview Diff
1 | === modified file 'femtools/Coordinates.F90' |
2 | --- femtools/Coordinates.F90 2012-05-15 18:17:00 +0000 |
3 | +++ femtools/Coordinates.F90 2012-10-19 14:09:23 +0000 |
4 | @@ -37,6 +37,8 @@ |
5 | use halos_base |
6 | use sparse_tools_petsc |
7 | use state_module |
8 | + use global_parameters, only: surface_radius |
9 | + use iso_c_binding |
10 | |
11 | implicit none |
12 | |
13 | @@ -48,9 +50,19 @@ |
14 | |
15 | public:: & |
16 | LongitudeLatitude, & |
17 | - ll2r3_rotate, rotate2ll, & |
18 | + spherical_polar_2_cartesian, cartesian_2_spherical_polar, & |
19 | + spherical_polar_2_cartesian_c, cartesian_2_spherical_polar_c, & |
20 | + ll2r3_rotate, & |
21 | + lon_lat_height_2_spherical_polar, spherical_polar_2_lon_lat_height, & |
22 | + lon_lat_height_2_cartesian, cartesian_2_lon_lat_height, & |
23 | + lon_lat_height_2_cartesian_c, cartesian_2_lon_lat_height_c, & |
24 | + vector_spherical_polar_2_cartesian, vector_cartesian_2_spherical_polar, & |
25 | + vector_lon_lat_height_2_cartesian, vector_cartesian_2_lon_lat_height, & |
26 | + vector_lon_lat_height_2_cartesian_c, vector_cartesian_2_lon_lat_height_c, & |
27 | + tensor_spherical_polar_2_cartesian, & |
28 | higher_order_sphere_projection, & |
29 | sphere_inward_normal_at_quad_ele, sphere_inward_normal_at_quad_face, & |
30 | + rotate_diagonal_to_cartesian_gi, rotate_diagonal_to_cartesian_face, & |
31 | rotate_diagonal_to_sphere_gi, rotate_diagonal_to_sphere_face, & |
32 | rotate_ct_m_sphere, rotate_momentum_to_sphere, & |
33 | rotate_velocity_sphere, rotate_velocity_back_sphere, & |
34 | @@ -60,6 +72,26 @@ |
35 | module procedure LongitudeLatitude_single, LongitudeLatitude_multiple |
36 | end interface |
37 | |
38 | + interface spherical_polar_2_cartesian |
39 | + module procedure spherical_polar_2_cartesian, & |
40 | + spherical_polar_2_cartesian_field |
41 | + end interface |
42 | + |
43 | + interface cartesian_2_spherical_polar |
44 | + module procedure cartesian_2_spherical_polar, & |
45 | + cartesian_2_spherical_polar_field |
46 | + end interface |
47 | + |
48 | + interface vector_spherical_polar_2_cartesian |
49 | + module procedure vector_spherical_polar_2_cartesian, & |
50 | + vector_spherical_polar_2_cartesian_field |
51 | + end interface |
52 | + |
53 | + interface vector_cartesian_2_spherical_polar |
54 | + module procedure vector_cartesian_2_spherical_polar, & |
55 | + vector_cartesian_2_spherical_polar_field |
56 | + end interface |
57 | + |
58 | contains |
59 | |
60 | subroutine LongitudeLatitude_single(xyz, longitude, latitude) |
61 | @@ -107,19 +139,856 @@ |
62 | |
63 | end subroutine ll2r3_rotate |
64 | |
65 | - ! rotates vector in cartesian to align with lat/long |
66 | - elemental subroutine rotate2ll(longitude, latitude, r3u, r3v, r3w, u, v) |
67 | - real, intent(in) :: longitude, latitude, r3u, r3v, r3w |
68 | - real, intent(out) :: u, v |
69 | - real lat |
70 | - real long |
71 | - lat = deg_to_rad*latitude |
72 | - long = deg_to_rad*longitude |
73 | - |
74 | - u = -(r3u*sin(long)) + r3v*cos(long) |
75 | - v = -r3u*cos(long)*sin(lat) - r3v*sin(long)*sin(lat) + r3w*cos(lat) |
76 | - |
77 | - end subroutine rotate2ll |
78 | + subroutine spherical_polar_2_cartesian(radius,theta,phi,x,y,z) |
79 | + !Subroutine for calculation of Cartesian coordinates from spherical-polar |
80 | + ! coordinates. |
81 | + implicit none |
82 | + |
83 | + real, intent(in) :: radius !Distance from centre of sphere |
84 | + real, intent(in) :: theta !Polar angle, in radians |
85 | + real, intent(in) :: phi !Azimuthal angle, in radians |
86 | + real, intent(out) :: x,y,z !Cartesian coordinates |
87 | + |
88 | + x = radius*sin(theta)*cos(phi) |
89 | + y = radius*sin(theta)*sin(phi) |
90 | + z = radius*cos(theta) |
91 | + |
92 | + end subroutine spherical_polar_2_cartesian |
93 | + |
94 | + subroutine spherical_polar_2_cartesian_c(radius,theta,phi,x,y,z) bind(c) |
95 | + !C-inter-operable subroutine for calculation of Cartesian coordinates |
96 | + ! from spherical-polar coordinates. |
97 | + implicit none |
98 | + |
99 | + real(kind=c_double) :: radius !Distance from centre of sphere |
100 | + real(kind=c_double) :: theta !Polar angle, in radians |
101 | + real(kind=c_double) :: phi !Azimuthal angle, in radians |
102 | + real(kind=c_double) :: x,y,z !Cartesian coordinates |
103 | + |
104 | + real :: radius_f |
105 | + real :: theta_f |
106 | + real :: phi_f |
107 | + real :: x_f,y_f,z_f |
108 | + |
109 | + !Cast input variables to Fortran intrinsic types. |
110 | + radius_f = real(radius) |
111 | + theta_f = real(theta) |
112 | + phi_f = real(phi) |
113 | + |
114 | + !Convert coordinates |
115 | + call spherical_polar_2_cartesian(radius_f,theta_f,phi_f,x_f,y_f,z_f) |
116 | + |
117 | + !Cast output variables to C-inter-operable types. |
118 | + x = real(x_f, kind=c_double) |
119 | + y = real(y_f, kind=c_double) |
120 | + z = real(z_f, kind=c_double) |
121 | + |
122 | + end subroutine spherical_polar_2_cartesian_c |
123 | + |
124 | + subroutine cartesian_2_spherical_polar(x,y,z,radius,theta,phi) |
125 | + !Subroutine for calculation of spherical-polar coordinates from cartesian. |
126 | + implicit none |
127 | + |
128 | + real, intent(in) :: x,y,z !cartesian coordinates |
129 | + real, intent(out) :: radius !Distance from centre of sphere |
130 | + real, intent(out) :: theta !Polar angle, in radians |
131 | + real, intent(out) :: phi !Azimuthal angle, in radians |
132 | + |
133 | + radius = sqrt(x**2 + y**2 + z**2) |
134 | + theta = acos(z/radius) |
135 | + phi = atan2(y,x) |
136 | + |
137 | + end subroutine cartesian_2_spherical_polar |
138 | + |
139 | + subroutine cartesian_2_spherical_polar_c(x, y, z, radius, theta, phi) bind(c) |
140 | + !C-inter-operable subroutine for calculation of spherical-polar coordinates |
141 | + ! from Cartesian coordinates. |
142 | + implicit none |
143 | + |
144 | + real(kind=c_double) :: x,y,z !cartesian coordinates |
145 | + real(kind=c_double) :: radius !Distance from centre of sphere |
146 | + real(kind=c_double) :: theta !Polar angle, in radians |
147 | + real(kind=c_double) :: phi !Azimuthal angle, in radians |
148 | + |
149 | + real :: x_f,y_f,z_f |
150 | + real :: radius_f |
151 | + real :: theta_f |
152 | + real :: phi_f |
153 | + |
154 | + !Cast input variables to fortran intrinsic types. |
155 | + x_f = real(x) |
156 | + y_f = real(y) |
157 | + z_f = real(z) |
158 | + |
159 | + !Convert coordinates |
160 | + call cartesian_2_spherical_polar(x_f, y_f, z_f, radius_f, theta_f, phi_f) |
161 | + |
162 | + !Cast output variables to C-inter-operable types. |
163 | + radius = real(radius_f, kind=c_double) |
164 | + theta = real(theta_f, kind=c_double) |
165 | + phi = real(phi_f, kind=c_double) |
166 | + |
167 | + end subroutine cartesian_2_spherical_polar_c |
168 | + |
169 | + subroutine spherical_polar_2_cartesian_field(spherical_polar_coordinate_field, & |
170 | + cartesian_coordinate_field) |
171 | + !Subroutine for conversion of a spherical-polar coordinate field into a cartesian |
172 | + ! coordinate field. |
173 | + implicit none |
174 | + |
175 | + type(vector_field) :: spherical_polar_coordinate_field |
176 | + type(vector_field) :: cartesian_coordinate_field |
177 | + integer :: node |
178 | + real, dimension(3) :: XYZ, RTP !arrays containing a single node's position vector |
179 | + ! in cartesian & spherical-polar bases |
180 | + |
181 | + do node=1,node_count(spherical_polar_coordinate_field) |
182 | + RTP = node_val(spherical_polar_coordinate_field, node) |
183 | + call spherical_polar_2_cartesian(RTP(1), RTP(2), RTP(3), XYZ(1), XYZ(2), XYZ(3)) |
184 | + call set(cartesian_coordinate_field, node, XYZ) |
185 | + enddo |
186 | + |
187 | + end subroutine spherical_polar_2_cartesian_field |
188 | + |
189 | + subroutine cartesian_2_spherical_polar_field(cartesian_coordinate_field, & |
190 | + spherical_polar_coordinate_field) |
191 | + !Subroutine for conversion of a cartesian coordinate field into a spherical-polar |
192 | + ! coordinate field. |
193 | + implicit none |
194 | + |
195 | + type(vector_field) :: cartesian_coordinate_field |
196 | + type(vector_field) :: spherical_polar_coordinate_field |
197 | + integer :: node |
198 | + real, dimension(3) :: XYZ, RTP !arrays containing a single node's position vector |
199 | + ! components in cartesian & spherical-polar bases |
200 | + |
201 | + do node=1,node_count(cartesian_coordinate_field) |
202 | + XYZ = node_val(cartesian_coordinate_field, node) |
203 | + call cartesian_2_spherical_polar(XYZ(1), XYZ(2), XYZ(3), RTP(1), RTP(2), RTP(3)) |
204 | + call set(spherical_polar_coordinate_field, node, RTP) |
205 | + enddo |
206 | + |
207 | + end subroutine cartesian_2_spherical_polar_field |
208 | + |
209 | + subroutine lon_lat_height_2_spherical_polar(longitude, latitude, height, & |
210 | + radius, theta, phi, & |
211 | + referenceRadius) |
212 | + !Subroutine for conversion of longitude-latitude-height coordinates on a |
213 | + ! sphere to spherical-polar coordinates. Longitude and latitude must be |
214 | + ! in degrees, polar coordinates are returned into radians |
215 | + implicit none |
216 | + |
217 | + real, intent(in) :: longitude !in degrees |
218 | + real, intent(in) :: latitude !in degrees |
219 | + real, intent(in) :: height |
220 | + real, intent(out) :: radius !Distance from centre of sphere |
221 | + real, intent(out) :: theta !Polar angle, in radians |
222 | + real, intent(out) :: phi !Azimuthal angle, in radians |
223 | + real, intent(in), optional :: referenceRadius !Distance form the centre of |
224 | + ! the sphere to its surface |
225 | + real :: pi |
226 | + |
227 | + pi=4*atan(1.0) |
228 | + |
229 | + !Convert longitude to azimuthal angle and latitude in polar angle; in radians. |
230 | + phi = longitude*pi/180. |
231 | + theta = (90.- latitude)*pi/180. |
232 | + |
233 | + !Convert height to distance from origin |
234 | + ! Check if referenceRadius is present. If not use default value |
235 | + ! of surface radius, available in global_parameters module |
236 | + if(present(referenceRadius)) then |
237 | + radius = height + referenceRadius |
238 | + else |
239 | + radius = height + surface_radius |
240 | + endif |
241 | + |
242 | + end subroutine lon_lat_height_2_spherical_polar |
243 | + |
244 | + subroutine spherical_polar_2_lon_lat_height(radius, theta, phi, & |
245 | + longitude, latitude, height, & |
246 | + referenceRadius) |
247 | + !Subroutine for conversion of spherical-polar coordinates to |
248 | + ! longitude-latitude-height coordinates. The polar coordinates must |
249 | + ! be given in radians. Longitude and latitude are returned in |
250 | + ! degrees. If referenceRadius is specified, height is measured as the |
251 | + ! radial distance relative to that radius, ie it is the distance relative to the |
252 | + ! surface of the sphere. if referenceRadius is absent height is the distance |
253 | + ! from the center of the sphere. |
254 | + implicit none |
255 | + |
256 | + real, intent(in) :: radius !Distance from centre of sphere |
257 | + real, intent(in) :: theta !Polar angle, in radians |
258 | + real, intent(in) :: phi !Azimuthal angle, in radians |
259 | + real, intent(out) :: longitude !in degrees |
260 | + real, intent(out) :: latitude !in degrees |
261 | + real, intent(out) :: height |
262 | + real, intent(in), optional :: referenceRadius !distance form the centre of |
263 | + ! the sphere to its surface |
264 | + real :: pi |
265 | + |
266 | + pi=4*atan(1.0) |
267 | + |
268 | + longitude = phi*180.0/pi |
269 | + latitude = (pi/2 - theta)*180.0/pi |
270 | + |
271 | + !If referenceRadius is present, subtract it from the radial distance |
272 | + if(present(referenceRadius)) then |
273 | + height = radius - referenceRadius |
274 | + else |
275 | + height = radius - surface_radius |
276 | + endif |
277 | + |
278 | + end subroutine spherical_polar_2_lon_lat_height |
279 | + |
280 | + subroutine lon_lat_height_2_cartesian(longitude, latitude, height, & |
281 | + x, y, z, & |
282 | + referenceRadius) |
283 | + !Subroutine for conversion of longitude-latitude-height coordinates into |
284 | + ! Cartesian coordinates. If referenceRadius is specified, height is measured |
285 | + ! as the radial distance relative to that radius, i.e. it is the distance |
286 | + ! relative to the surface of the sphere. |
287 | + implicit none |
288 | + |
289 | + real, intent(in) :: longitude !in degrees |
290 | + real, intent(in) :: latitude !in degrees |
291 | + real, intent(in) :: height |
292 | + real, intent(out) :: x,y,z !Cartesian coordinates |
293 | + real, intent(in), optional :: referenceRadius |
294 | + |
295 | + real :: radius !Distance from centre of sphere |
296 | + real :: theta !Polar angle, in radians |
297 | + real :: phi !Azimuthal angle, in radians |
298 | + |
299 | + !Convert longitude-latitude-height into spherical-polar coordinates. |
300 | + ! Check if referenceRadius is present. If not use default value |
301 | + ! of surface radius, available in global_parameters module |
302 | + if(present(referenceRadius)) then |
303 | + call lon_lat_height_2_spherical_polar(longitude, latitude, height, & |
304 | + radius, theta, phi, & |
305 | + referenceRadius) |
306 | + else |
307 | + call lon_lat_height_2_spherical_polar(longitude, latitude, height, & |
308 | + radius, theta, phi, & |
309 | + surface_radius) |
310 | + endif |
311 | + |
312 | + |
313 | + !convert spherical-polar coordinates to Cartesian |
314 | + call spherical_polar_2_cartesian(radius,theta,phi,x,y,z) |
315 | + |
316 | + end subroutine lon_lat_height_2_cartesian |
317 | + |
318 | + subroutine lon_lat_height_2_cartesian_c(longitude, latitude, height, & |
319 | + x, y, z, & |
320 | + referenceRadius) bind(c) |
321 | + !C-inter-operable subroutine for conversion of longitude-latitude-height into |
322 | + ! spherical-polar coordinates. referenceRadius must be specified, i.e. height |
323 | + ! is always measured as the radial distance relative to that radius and denotes |
324 | + ! the distance from the surface of the sphere. |
325 | + implicit none |
326 | + |
327 | + real(kind=c_double) :: longitude !Longitude, in radians. |
328 | + real(kind=c_double) :: latitude !Latitude, in radians. |
329 | + real(kind=c_double) :: height !Distance from surface of sphere. |
330 | + real(kind=c_double) :: x,y,z !Cartesian coordinates. |
331 | + real(kind=c_double) :: referenceRadius !Sphere radius. |
332 | + |
333 | + real :: longitude_f |
334 | + real :: latitude_f |
335 | + real :: height_f |
336 | + real :: x_f,y_f,z_f |
337 | + real :: referenceRadius_f |
338 | + |
339 | + !Cast input variables to Fortran intrinsic types. |
340 | + longitude_f = real(longitude) |
341 | + latitude_f = real(latitude) |
342 | + height_f = real(height) |
343 | + referenceRadius_f = real(referenceRadius) |
344 | + |
345 | + !Convert coordinates |
346 | + call lon_lat_height_2_cartesian(longitude_f, latitude_f, height_f, & |
347 | + x_f, y_f, z_f, & |
348 | + referenceRadius_f) |
349 | + |
350 | + !Cast output variables to C-inter-operable types. |
351 | + x = real(x_f, kind=c_double) |
352 | + y = real(y_f, kind=c_double) |
353 | + z = real(z_f, kind=c_double) |
354 | + |
355 | + end subroutine lon_lat_height_2_cartesian_c |
356 | + |
357 | + subroutine cartesian_2_lon_lat_height(x, y, z, longitude, latitude, height, & |
358 | + referenceRadius) |
359 | + !Subroutine for conversion of Cartesian coordinates into longitude-latitude-height |
360 | + ! If referenceRadius is specified, height is measures as the radial distance relative |
361 | + ! to that radius. |
362 | + implicit none |
363 | + |
364 | + real, intent(in) :: x,y,z !Cartesian coordinates |
365 | + real, intent(out) :: longitude !in degrees |
366 | + real, intent(out) :: latitude !in degrees |
367 | + real, intent(out) :: height |
368 | + real, intent(in), optional :: referenceRadius |
369 | + real :: radius !Distance from centre of sphere |
370 | + real :: theta !Polar angle, in radians |
371 | + real :: phi !Azimuthal angle, in radians |
372 | + |
373 | + !convert Cartesian coordinates to spherical-polar |
374 | + call cartesian_2_spherical_polar(x,y,z,radius,theta,phi) |
375 | + |
376 | + !Convert polar angle into latitude and azimuthal angle into longitude; in radians. |
377 | + if(present(referenceRadius)) then |
378 | + call spherical_polar_2_lon_lat_height(radius, theta, phi, & |
379 | + longitude, latitude, height, & |
380 | + referenceRadius) |
381 | + else |
382 | + call spherical_polar_2_lon_lat_height(radius, theta, phi, & |
383 | + longitude, latitude, height) |
384 | + endif |
385 | + |
386 | + |
387 | + end subroutine cartesian_2_lon_lat_height |
388 | + |
389 | + subroutine cartesian_2_lon_lat_height_c(x, y, z, longitude, latitude, height, & |
390 | + referenceRadius) bind(c) |
391 | + !C-inter-operable subroutine for conversion of Cartesian coordinates into |
392 | + ! longitude-latitude-height. |
393 | + implicit none |
394 | + |
395 | + real(kind=c_double) :: x,y,z !Cartesian coordinates |
396 | + real(kind=c_double) :: longitude !in degrees |
397 | + real(kind=c_double) :: latitude !in degrees |
398 | + real(kind=c_double) :: height |
399 | + real(kind=c_double) :: referenceRadius |
400 | + |
401 | + real :: x_f,y_f,z_f |
402 | + real :: longitude_f |
403 | + real :: latitude_f |
404 | + real :: height_f |
405 | + real :: referenceRadius_f |
406 | + |
407 | + !Cast input variables to Fortran intrinsic types. |
408 | + x_f = real(x) |
409 | + y_f = real(y) |
410 | + z_f = real(z) |
411 | + |
412 | + referenceRadius_f = real(referenceRadius) |
413 | + |
414 | + !Convert coordinates |
415 | + call cartesian_2_lon_lat_height(x_f, y_f, z_f, longitude_f, latitude_f, height_f, & |
416 | + referenceRadius_f) |
417 | + |
418 | + !Cast output variables to C-inter-operable types. |
419 | + longitude = real(longitude_f, kind=c_double) |
420 | + latitude = real(latitude_f, kind=c_double) |
421 | + height = real(height_f, kind=c_double) |
422 | + |
423 | + end subroutine cartesian_2_lon_lat_height_c |
424 | + |
425 | + subroutine transformation_matrix_cartesian_2_spherical_polar(xCoord, yCoord, zCoord, R, RT) |
426 | + !Subroutine calculating transformation matrix for spherical-polar to/from Cartesian |
427 | + ! tensor transformations. The routine also returns the transposed transformation matrix |
428 | + implicit none |
429 | + |
430 | + real, intent(in) :: xCoord !x-component of position vector |
431 | + real, intent(in) :: yCoord !y-component of position vector |
432 | + real, intent(in) :: zCoord !z-component of position vector |
433 | + real, dimension(3,3), intent(out) :: R !Transformation matrix |
434 | + real, dimension(3,3), intent(out) :: RT !Transposed transformation matrix |
435 | + |
436 | + real :: radius !Distance from centre of sphere |
437 | + real :: theta !Polar angle, in radians |
438 | + real :: phi !Azimuthal angle, in radians |
439 | + |
440 | + !Calculate position-vector components in spherical-polar basis |
441 | + call cartesian_2_spherical_polar(xCoord, yCoord, zCoord, radius, theta, phi) |
442 | + |
443 | + R(1,1)=sin(theta)*cos(phi) |
444 | + R(1,2)=sin(theta)*sin(phi) |
445 | + R(1,3)=cos(theta) |
446 | + R(2,1)=cos(theta)*cos(phi) |
447 | + R(2,2)=cos(theta)*sin(phi) |
448 | + R(2,3)=-sin(theta) |
449 | + R(3,1)=-sin(phi) |
450 | + R(3,2)=cos(phi) |
451 | + R(3,3)=0.0 |
452 | + |
453 | + RT = TRANSPOSE(R) |
454 | + |
455 | + end subroutine transformation_matrix_cartesian_2_spherical_polar |
456 | + |
457 | + subroutine vector_spherical_polar_2_cartesian(radial, polar, azimuthal, & |
458 | + radius, theta, phi, & |
459 | + xComp, yComp, zComp, & |
460 | + xCoord, yCoord, zCoord) |
461 | + !Subroutine for vector change of basis: from spherical-polar to cartesian. The |
462 | + ! coordinates of the position vector are also transformed |
463 | + implicit none |
464 | + |
465 | + real, intent(in) :: radial !Radial component of vector |
466 | + real, intent(in) :: polar !Polar component of vector |
467 | + real, intent(in) :: azimuthal !Azimuthal component of vector |
468 | + real, intent(in) :: radius !Distance from centre of sphere |
469 | + real, intent(in) :: theta !Polar angle, in radians |
470 | + real, intent(in) :: phi !Azimuthal angle, in radians |
471 | + real, intent(out) :: xComp !1st vector component in cartesian basis |
472 | + real, intent(out) :: yComp !2nd vector component in cartesian basis |
473 | + real, intent(out) :: zComp !3rd vector component in cartesian basis |
474 | + real, intent(out) :: xCoord !1st vector component of position vector in cartesian basis |
475 | + real, intent(out) :: yCoord !2nd vector component of position vector in cartesian basis |
476 | + real, intent(out) :: zCoord !3rd vector component of position vector in cartesian basis |
477 | + |
478 | + real, dimension(3) :: cartesianComponents |
479 | + real, dimension(3,3) :: R !Transformation matrix |
480 | + real, dimension(3,3) :: RT !Transposed transformation matrix |
481 | + |
482 | + !Calculate position-vector components in cartesian system |
483 | + call spherical_polar_2_cartesian(radius, theta, phi, xCoord, yCoord, zCoord) |
484 | + |
485 | + !Calculate transformation matrix |
486 | + call transformation_matrix_cartesian_2_spherical_polar(xCoord, yCoord, zCoord, R, RT) |
487 | + |
488 | + !Evaluate vector components in Cartesian basis |
489 | + cartesianComponents = matmul(RT,(/radial, polar, azimuthal/)) |
490 | + xComp = cartesianComponents(1) |
491 | + yComp = cartesianComponents(2) |
492 | + zComp = cartesianComponents(3) |
493 | + |
494 | + end subroutine vector_spherical_polar_2_cartesian |
495 | + |
496 | + subroutine vector_cartesian_2_spherical_polar(xComp, yComp, zComp, & |
497 | + xCoord, yCoord, zCoord, & |
498 | + radial, polar, azimuthal, & |
499 | + radius, theta, phi) |
500 | + !Subroutine for vector change of basis: from Cartesian to spherical-polar. The |
501 | + ! coordinates of the position vector are also transformed |
502 | + implicit none |
503 | + |
504 | + real, intent(in) :: xComp !1st vector component in cartesian basis |
505 | + real, intent(in) :: yComp !2nd vector component in cartesian basis |
506 | + real, intent(in) :: zComp !3rd vector component in cartesian basis |
507 | + real, intent(in) :: xCoord !1st vector component of position vector in cartesian basis |
508 | + real, intent(in) :: yCoord !2nd vector component of position vector in cartesian basis |
509 | + real, intent(in) :: zCoord !3rd vector component of position vector in cartesian basis |
510 | + real, intent(out) :: radial !Radial component of vector |
511 | + real, intent(out) :: polar !Polar component of vector |
512 | + real, intent(out) :: azimuthal !Azimuthal component of vector |
513 | + real, intent(out) :: radius !Distance from centre of sphere |
514 | + real, intent(out) :: theta !Polar angle, in radians |
515 | + real, intent(out) :: phi !Azimuthal angle, in radians |
516 | + |
517 | + real, dimension(3) :: sphericalPolarComponents |
518 | + real, dimension(3,3) :: R !Transformation matrix |
519 | + real, dimension(3,3) :: RT !Transposed transformation matrix |
520 | + |
521 | + !Calculate position-vector components in spherical-polar system |
522 | + call cartesian_2_spherical_polar(xCoord, yCoord, zCoord, radius, theta, phi) |
523 | + |
524 | + !Calculate transformation matrix |
525 | + call transformation_matrix_cartesian_2_spherical_polar(xCoord, yCoord, zCoord, R, RT) |
526 | + |
527 | + !Evaluate vector components in spherical-polar basis |
528 | + sphericalPolarComponents = matmul(R,(/xComp, yComp, zComp/)) |
529 | + radial = sphericalPolarComponents(1) |
530 | + polar = sphericalPolarComponents(2) |
531 | + azimuthal = sphericalPolarComponents(3) |
532 | + |
533 | + end subroutine vector_cartesian_2_spherical_polar |
534 | + |
535 | + subroutine vector_lon_lat_height_2_cartesian(zonalComponent,& |
536 | + meridionalComponent,& |
537 | + verticalComponent, & |
538 | + longitude, & |
539 | + latitude, & |
540 | + height, & |
541 | + xComp, yComp, zComp, & |
542 | + xCoord, yCoord, zCoord, & |
543 | + referenceRadius) |
544 | + !Subroutine for change of basis of a vector from meridional-zonal-vertical |
545 | + ! components to cartesian components. |
546 | + implicit none |
547 | + |
548 | + real, intent(in) :: zonalComponent !Vector component tangential to parallel |
549 | + real, intent(in) :: meridionalComponent !Vector component tangential to meridian |
550 | + real, intent(in) :: verticalComponent !Vecor component in the vertical (radial) |
551 | + real, intent(in) :: longitude |
552 | + real, intent(in) :: latitude |
553 | + real, intent(in) :: height |
554 | + real, intent(out) :: xComp !1st vector component in cartesian basis |
555 | + real, intent(out) :: yComp !2nd vector component in cartesian basis |
556 | + real, intent(out) :: zComp !3rd vector component in cartesian basis |
557 | + real, intent(out) :: xCoord !1st vector component of position vector |
558 | + ! in Cartesian basis |
559 | + real, intent(out) :: yCoord !2nd vector component of position vector |
560 | + ! in Cartesian basis |
561 | + real, intent(out) :: zCoord !3rd vector component of position vector |
562 | + ! in Cartesian basis |
563 | + real, intent(in), optional :: referenceRadius |
564 | + real :: radial !Radial component of vector |
565 | + real :: polar !Polar component of vector |
566 | + real :: azimuthal !Azimuthal component of vector |
567 | + real :: radius !Distance from centre of sphere |
568 | + real :: theta !Polar angle, in radians |
569 | + real :: phi !Azimuthal angle, in radians |
570 | + |
571 | + !Convert zonal-meridional-vertical components to spherical-polar |
572 | + azimuthal = zonalComponent |
573 | + polar = -meridionalComponent |
574 | + radial = verticalComponent |
575 | + !Convert longitude-latitude-height to spherical-polar. |
576 | + ! If referenceRadius is present then pass that to coordinate conversion routine, |
577 | + ! height then is the radial distance of a point from the sphere with radius= |
578 | + ! referenceRadius. Otherwise height is simply the distance from the Cartesian |
579 | + ! coordinate origin. |
580 | + if(present(referenceRadius)) then |
581 | + call lon_lat_height_2_spherical_polar(longitude, latitude, height, & |
582 | + radius, theta, phi, & |
583 | + referenceRadius) |
584 | + else |
585 | + call lon_lat_height_2_spherical_polar(longitude, latitude, height, & |
586 | + radius, theta, phi) |
587 | + endif |
588 | + !convert spherical-polar components to cartesian. |
589 | + call vector_spherical_polar_2_cartesian(radial, polar, azimuthal, & |
590 | + radius, theta, phi, & |
591 | + xComp, yComp, zComp, & |
592 | + xCoord, yCoord, zCoord) |
593 | + |
594 | + end subroutine vector_lon_lat_height_2_cartesian |
595 | + |
596 | + subroutine vector_cartesian_2_lon_lat_height(xComp, yComp, zComp, & |
597 | + xCoord, yCoord, zCoord, & |
598 | + zonalComponent,& |
599 | + meridionalComponent,& |
600 | + verticalComponent, & |
601 | + longitude, & |
602 | + latitude, & |
603 | + height, & |
604 | + referenceRadius) |
605 | + !Subroutine for change of basis of a vector from cartesian to |
606 | + ! meridional-zonal-vertical. |
607 | + implicit none |
608 | + |
609 | + real, intent(in) :: xComp !1st vector component in cartesian basis |
610 | + real, intent(in) :: yComp !2nd vector component in cartesian basis |
611 | + real, intent(in) :: zComp !3rd vector component in cartesian basis |
612 | + real, intent(in) :: xCoord !1st vector component of position vector |
613 | + ! in Cartesian basis |
614 | + real, intent(in) :: yCoord !2nd vector component of position vector |
615 | + ! in Cartesian basis |
616 | + real, intent(in) :: zCoord !3rd vector component of position vector |
617 | + ! in Cartesian basis |
618 | + real, intent(out) :: zonalComponent !Vector component tangential to parallel |
619 | + real, intent(out) :: meridionalComponent !Vector component tangential to meridian |
620 | + real, intent(out) :: verticalComponent !Vector component in the vertical (radial) |
621 | + real, intent(out) :: longitude |
622 | + real, intent(out) :: latitude |
623 | + real, intent(out) :: height |
624 | + real, intent(in), optional :: referenceRadius |
625 | + real :: radial !Radial component of vector |
626 | + real :: polar !Polar component of vector |
627 | + real :: azimuthal !Azimuthal component of vector |
628 | + real :: radius !Distance from centre of sphere |
629 | + real :: theta !Polar angle, in radians |
630 | + real :: phi !Azimuthal angle, in radians |
631 | + |
632 | + !Convert cartesian components to spherical-polar |
633 | + call vector_cartesian_2_spherical_polar(xComp, yComp, zComp, & |
634 | + xCoord, yCoord, zCoord, & |
635 | + radial, polar, azimuthal, & |
636 | + radius, theta, phi) |
637 | + !Convert cartesian coordinates to longitude-latitude-radius |
638 | + if(present(referenceRadius)) then |
639 | + call cartesian_2_lon_lat_height(xCoord, yCoord, zCoord, & |
640 | + longitude, latitude, height, & |
641 | + referenceRadius) |
642 | + else |
643 | + call cartesian_2_lon_lat_height(xCoord, yCoord, zCoord, & |
644 | + longitude, latitude, height) |
645 | + endif |
646 | + !Convert spherical-polar components to zonal-meridional-vertical |
647 | + zonalComponent = azimuthal |
648 | + meridionalComponent = -polar |
649 | + verticalComponent = radial |
650 | + |
651 | + end subroutine vector_cartesian_2_lon_lat_height |
652 | + |
653 | + subroutine vector_lon_lat_height_2_cartesian_c(zonalComponent,& |
654 | + meridionalComponent,& |
655 | + verticalComponent, & |
656 | + longitude, & |
657 | + latitude, & |
658 | + height, & |
659 | + xComp, yComp, zComp, & |
660 | + xCoord, yCoord, zCoord, & |
661 | + referenceRadius) bind(c) |
662 | + !C-interoperable subroutine for change of basis of a vector from |
663 | + ! meridional-zonal-vertical components to cartesian components. Note that |
664 | + ! unlike the Fortran version of the present routine, referenceRadius is |
665 | + ! a mandatory argument. |
666 | + implicit none |
667 | + |
668 | + real(kind=c_double), intent(in) :: zonalComponent !Vector component tangential |
669 | + ! to parallel |
670 | + real(kind=c_double), intent(in) :: meridionalComponent !Vector component tangential |
671 | + ! to meridian |
672 | + real(kind=c_double), intent(in) :: verticalComponent !Vecor component in the |
673 | + ! vertical (radial) |
674 | + real(kind=c_double), intent(in) :: longitude |
675 | + real(kind=c_double), intent(in) :: latitude |
676 | + real(kind=c_double), intent(in) :: height |
677 | + real(kind=c_double), intent(out) :: xComp !1st vector component in |
678 | + ! cartesian basis |
679 | + real(kind=c_double), intent(out) :: yComp !2nd vector component in |
680 | + ! cartesian basis |
681 | + real(kind=c_double), intent(out) :: zComp !3rd vector component in |
682 | + ! cartesian basis |
683 | + real(kind=c_double), intent(out) :: xCoord !1st vector component of |
684 | + ! position vector in cartesian basis |
685 | + real(kind=c_double), intent(out) :: yCoord !2nd vector component of |
686 | + ! position vector in cartesian basis |
687 | + real(kind=c_double), intent(out) :: zCoord !3rd vector component of |
688 | + ! position vector in cartesian basis |
689 | + real(kind=c_double), intent(in) :: referenceRadius |
690 | + |
691 | + real :: zonalComponent_f !Vector component tangential to parallel |
692 | + real :: meridionalComponent_f !Vector component tangential to meridian |
693 | + real :: verticalComponent_f !Vecor component in the vertical (radial) |
694 | + real :: longitude_f |
695 | + real :: latitude_f |
696 | + real :: height_f |
697 | + real :: xComp_f !1st vector component in cartesian basis |
698 | + real :: yComp_f !2nd vector component in cartesian basis |
699 | + real :: zComp_f !3rd vector component in cartesian basis |
700 | + real :: xCoord_f !1st vector component of position vector in cartesian basis |
701 | + real :: yCoord_f !2nd vector component of position vector in cartesian basis |
702 | + real :: zCoord_f !3rd vector component of position vector in cartesian basis |
703 | + real :: referenceRadius_f |
704 | + |
705 | + !Convert C-types in to Fortran intrinsic types. |
706 | + zonalComponent_f = real(zonalComponent) |
707 | + meridionalComponent_f = real(meridionalComponent) |
708 | + verticalComponent_f = real(verticalComponent) |
709 | + longitude_f = real(longitude) |
710 | + latitude_f = real(latitude) |
711 | + height_f = real(height) |
712 | + referenceRadius_f = real(referenceRadius) |
713 | + |
714 | + !Convert coordinates and components. |
715 | + call vector_lon_lat_height_2_cartesian(zonalComponent_f,& |
716 | + meridionalComponent_f,& |
717 | + verticalComponent_f, & |
718 | + longitude_f, & |
719 | + latitude_f, & |
720 | + height_f, & |
721 | + xComp_f, yComp_f, zComp_f, & |
722 | + xCoord_f, yCoord_f, zCoord_f, & |
723 | + referenceRadius_f) |
724 | + |
725 | + !Convert Fortran intrinsic types to C-types. |
726 | + xComp = real(xComp_f, kind=c_double) |
727 | + yComp = real(yComp_f, kind=c_double) |
728 | + zComp = real(zComp_f, kind=c_double) |
729 | + xCoord = real(xCoord_f, kind=c_double) |
730 | + yCoord = real(yCoord_f, kind=c_double) |
731 | + zCoord = real(zCoord_f, kind=c_double) |
732 | + |
733 | + end subroutine vector_lon_lat_height_2_cartesian_c |
734 | + |
735 | + subroutine vector_cartesian_2_lon_lat_height_c(xComp, yComp, zComp, & |
736 | + xCoord, yCoord, zCoord, & |
737 | + zonalComponent,& |
738 | + meridionalComponent,& |
739 | + verticalComponent, & |
740 | + longitude, & |
741 | + latitude, & |
742 | + height, & |
743 | + referenceRadius) bind (c) |
744 | + !C inter-operable subroutine for change of basis of a vector from Cartesian to |
745 | + ! meridional-zonal-vertical. Note that |
746 | + ! unlike the Fortran version of the present routine, referenceRadius is |
747 | + ! a mandatory argument. |
748 | + implicit none |
749 | + |
750 | + real(kind=c_double), intent(in) :: xComp !1st vector component in |
751 | + ! cartesian basis |
752 | + real(kind=c_double), intent(in) :: yComp !2nd vector component in |
753 | + ! cartesian basis |
754 | + real(kind=c_double), intent(in) :: zComp !3rd vector component in |
755 | + ! cartesian basis |
756 | + real(kind=c_double), intent(in) :: xCoord !1st vector component of position |
757 | + ! vector in Cartesian basis |
758 | + real(kind=c_double), intent(in) :: yCoord !2nd vector component of position |
759 | + ! vector in Cartesian basis |
760 | + real(kind=c_double), intent(in) :: zCoord !3rd vector component of position |
761 | + ! vector in Cartesian basis |
762 | + real(kind=c_double), intent(out) :: zonalComponent !Vector component tangential |
763 | + ! to parallel |
764 | + real(kind=c_double), intent(out) :: meridionalComponent !Vector component tangential |
765 | + ! to meridian |
766 | + real(kind=c_double), intent(out) :: verticalComponent !Vector component in the |
767 | + ! vertical (radial) |
768 | + real(kind=c_double), intent(out) :: longitude |
769 | + real(kind=c_double), intent(out) :: latitude |
770 | + real(kind=c_double), intent(out) :: height |
771 | + real(kind=c_double), intent(in) :: referenceRadius |
772 | + |
773 | + real :: xComp_f !1st vector component in cartesian basis |
774 | + real :: yComp_f !2nd vector component in cartesian basis |
775 | + real :: zComp_f !3rd vector component in cartesian basis |
776 | + real :: xCoord_f !1st vector component of position vector |
777 | + ! in Cartesian basis |
778 | + real :: yCoord_f !2nd vector component of position vector |
779 | + ! in Cartesian basis |
780 | + real :: zCoord_f !3rd vector component of position vector |
781 | + ! in Cartesian basis |
782 | + real :: zonalComponent_f !Vector component tangential to parallel |
783 | + real :: meridionalComponent_f !Vector component tangential to meridian |
784 | + real :: verticalComponent_f !Vector component in the vertical (radial) |
785 | + real :: longitude_f |
786 | + real :: latitude_f |
787 | + real :: height_f |
788 | + real :: referenceRadius_f |
789 | + |
790 | + !Convert C-types in to Fortran intrinsic types. |
791 | + xComp_f = real(xComp) |
792 | + yComp_f = real(yComp) |
793 | + zComp_f = real(zComp) |
794 | + xCoord_f = real(xCoord) |
795 | + yCoord_f = real(yCoord) |
796 | + zCoord_f = real(zCoord) |
797 | + referenceRadius_f = real(referenceRadius) |
798 | + |
799 | + !Convert coordinates and components. |
800 | + call vector_cartesian_2_lon_lat_height(xComp_f, yComp_f, zComp_f, & |
801 | + xCoord_f, yCoord_f, zCoord_f, & |
802 | + zonalComponent_f, & |
803 | + meridionalComponent_f, & |
804 | + verticalComponent_f, & |
805 | + longitude_f, & |
806 | + latitude_f, & |
807 | + height_f, & |
808 | + referenceRadius_f) |
809 | + |
810 | + !Convert Fortran intrinsic types to C-types. |
811 | + zonalComponent = real(zonalComponent_f, kind=c_double) |
812 | + meridionalComponent = real(meridionalComponent_f, kind=c_double) |
813 | + verticalComponent = real(verticalComponent_f, kind=c_double) |
814 | + longitude = real(longitude_f, kind=c_double) |
815 | + latitude = real(latitude_f, kind=c_double) |
816 | + height = real(height_f, kind=c_double) |
817 | + |
818 | + end subroutine vector_cartesian_2_lon_lat_height_c |
819 | + |
820 | + subroutine vector_spherical_polar_2_cartesian_field(spherical_polar_vector_field, & |
821 | + spherical_polar_coordinate_field, & |
822 | + cartesian_vector_field, & |
823 | + cartesian_coordinate_field) |
824 | + !Subroutine for change of basis of a cartesian vector field into a spherical-polar |
825 | + ! vector field. This routine also converts and returns the position vector component |
826 | + ! fields |
827 | + implicit none |
828 | + |
829 | + type(vector_field) :: spherical_polar_vector_field |
830 | + type(vector_field) :: spherical_polar_coordinate_field |
831 | + type(vector_field) :: cartesian_vector_field |
832 | + type(vector_field) :: cartesian_coordinate_field |
833 | + integer :: node |
834 | + real, dimension(3) :: XYZ, RTP !arrays containing a signel node's position vector |
835 | + ! in cartesian & spherical-polar bases |
836 | + real, dimension(3) :: cartesianComponents, sphericalPolarComponents |
837 | + |
838 | + assert(node_count(spherical_polar_coordinate_field) == node_count(cartesian_coordinate_field)) |
839 | + |
840 | + do node=1,node_count(spherical_polar_coordinate_field) |
841 | + RTP = node_val(spherical_polar_coordinate_field, node) |
842 | + sphericalPolarComponents = node_val(spherical_polar_vector_field, node) |
843 | + call vector_spherical_polar_2_cartesian(sphericalPolarComponents(1), & |
844 | + sphericalPolarComponents(2), & |
845 | + sphericalPolarComponents(3), & |
846 | + RTP(1), RTP(2), RTP(3), & |
847 | + cartesianComponents(1), & |
848 | + cartesianComponents(2), & |
849 | + cartesianComponents(3), & |
850 | + XYZ(1), XYZ(2), XYZ(3)) |
851 | + call set(cartesian_coordinate_field, node, XYZ) |
852 | + call set(cartesian_vector_field, node, cartesianComponents) |
853 | + enddo |
854 | + end subroutine vector_spherical_polar_2_cartesian_field |
855 | + |
856 | + subroutine vector_cartesian_2_spherical_polar_field(cartesian_vector_field, & |
857 | + cartesian_coordinate_field, & |
858 | + spherical_polar_vector_field, & |
859 | + spherical_polar_coordinate_field) |
860 | + !Subroutine for change of basis of a cartesian vector field into a spherical-polar |
861 | + ! vector field. This routine also converts and returns the position vector component |
862 | + ! fields |
863 | + implicit none |
864 | + |
865 | + type(vector_field) :: cartesian_vector_field |
866 | + type(vector_field) :: cartesian_coordinate_field |
867 | + type(vector_field) :: spherical_polar_vector_field |
868 | + type(vector_field) :: spherical_polar_coordinate_field |
869 | + integer :: node |
870 | + real, dimension(3) :: XYZ, RTP !arrays containing a signel node's position vector |
871 | + ! in cartesian & spherical-polar bases |
872 | + real, dimension(3) :: cartesianComponents, sphericalPolarComponents |
873 | + |
874 | + assert(node_count(spherical_polar_coordinate_field) == node_count(cartesian_coordinate_field) ) |
875 | + |
876 | + do node=1,node_count(spherical_polar_coordinate_field) |
877 | + XYZ = node_val(cartesian_coordinate_field, node) |
878 | + cartesianComponents = node_val(cartesian_vector_field, node) |
879 | + call vector_cartesian_2_spherical_polar(cartesianComponents(1), & |
880 | + cartesianComponents(2), & |
881 | + cartesianComponents(3), & |
882 | + XYZ(1), XYZ(2), XYZ(3), & |
883 | + sphericalPolarComponents(1), & |
884 | + sphericalPolarComponents(2), & |
885 | + sphericalPolarComponents(3), & |
886 | + RTP(1), RTP(2), RTP(3)) |
887 | + call set(spherical_polar_coordinate_field, node, RTP) |
888 | + call set(spherical_polar_vector_field, node, sphericalPolarComponents) |
889 | + enddo |
890 | + end subroutine vector_cartesian_2_spherical_polar_field |
891 | + |
892 | + subroutine tensor_spherical_polar_2_cartesian(sphericalPolarComponents, & |
893 | + radius, theta, phi, & |
894 | + cartesianComponents, & |
895 | + xCoord, yCoord, zCoord) |
896 | + !Subroutine for tensor change of basis: From spherical-polar to cartesian. The |
897 | + ! coordinates of the position vector are also transformed. The tensor must |
898 | + ! be a 3x3 tensor. |
899 | + implicit none |
900 | + |
901 | + real, intent(in), dimension(3,3) :: sphericalPolarComponents !Tensor |
902 | + ! components in spherical-polar basis |
903 | + real, intent(in) :: radius !Distance from centre of sphere |
904 | + real, intent(in) :: theta !Polar angle, in radians |
905 | + real, intent(in) :: phi !Azimuthal angle, in radians |
906 | + real, intent(out), dimension(3,3) :: cartesianComponents !Tensor |
907 | + ! components in Cartesian bisis |
908 | + real, intent(out) :: xCoord !1st vector component of position vector |
909 | + ! in cartesian basis |
910 | + real, intent(out) :: yCoord !2nd vector component of position vector |
911 | + ! in cartesian basis |
912 | + real, intent(out) :: zCoord !3rd vector component of position vector |
913 | + ! in cartesian basis |
914 | + |
915 | + real, dimension(3,3) :: R !Transformation matrix |
916 | + real, dimension(3,3) :: RT !Transposed transformation matrix |
917 | + |
918 | + !Calculate position-vector components in cartesian system |
919 | + call spherical_polar_2_cartesian(radius, theta, phi, xCoord, yCoord, zCoord) |
920 | + |
921 | + !Calculate transformation matrix |
922 | + call transformation_matrix_cartesian_2_spherical_polar(xCoord, yCoord, zCoord, R, RT) |
923 | + |
924 | + !Evaluate vector components in Cartesian basis |
925 | + cartesianComponents = matmul(matmul(RT, sphericalPolarComponents), R) |
926 | + |
927 | + end subroutine tensor_spherical_polar_2_cartesian |
928 | |
929 | subroutine higher_order_sphere_projection(positions, s_positions) |
930 | !!< Given a P1 'positions' field and a Pn 's_positions' field, bends the |
931 | @@ -186,17 +1055,106 @@ |
932 | |
933 | end function sphere_inward_normal_at_quad_face |
934 | |
935 | + function rotate_diagonal_to_cartesian_gi(positions, ele_number, diagonal) result(quad_val) |
936 | + ! Given the diagonal of a tensor in spherical coordinates, this function transforms the |
937 | + ! tensor components to a cartesian system at all quadrature points of an element. |
938 | + ! This result is given by R(diagonal)R^T where R is the transformation matrix. |
939 | + type(vector_field), intent(in) :: positions |
940 | + integer, intent(in) :: ele_number |
941 | + real, dimension(mesh_dim(positions),ele_ngi(positions,ele_number)), intent(in) :: diagonal |
942 | + real, dimension(mesh_dim(positions),ele_ngi(positions,ele_number)) :: X_quad |
943 | + real, dimension(mesh_dim(positions),mesh_dim(positions)) :: R, RT |
944 | + real, dimension(mesh_dim(positions),mesh_dim(positions),ele_ngi(positions,ele_number)) :: diagonal_T, quad_val |
945 | + real :: radius, theta, phi !distance form origin, polar angle, azimuthal angle |
946 | + integer :: i |
947 | + |
948 | + assert(mesh_dim(positions)==3) |
949 | + |
950 | + X_quad=ele_val_at_quad(positions, ele_number) |
951 | + |
952 | + diagonal_T=0.0 |
953 | + do i=1,mesh_dim(positions) |
954 | + diagonal_T(i,i,:)=diagonal(i,:) |
955 | + end do |
956 | + |
957 | + do i=1,ele_ngi(positions,ele_number) |
958 | + ! Calculate the spherical-polar coordinates of the point |
959 | + call cartesian_2_spherical_polar(X_quad(1,i), X_quad(2,i), X_quad(3,i), radius, theta, phi) |
960 | + |
961 | + R(1,1)=sin(theta)*cos(phi) |
962 | + R(1,2)=cos(theta)*cos(phi) |
963 | + R(1,3)=-sin(phi) |
964 | + R(2,1)=sin(theta)*sin(phi) |
965 | + R(2,2)=cos(theta)*sin(phi) |
966 | + R(2,3)=cos(phi) |
967 | + R(3,1)=cos(theta) |
968 | + R(3,2)=-sin(theta) |
969 | + R(3,3)=0.0 |
970 | + |
971 | + RT = TRANSPOSE(R) |
972 | + |
973 | + quad_val(:,:,i)=matmul((matmul(R,diagonal_T(:,:,i))),RT) |
974 | + |
975 | + end do |
976 | + |
977 | + end function rotate_diagonal_to_cartesian_gi |
978 | + |
979 | + function rotate_diagonal_to_cartesian_face(positions, face_number, diagonal) result(quad_val) |
980 | + ! Given the diagonal of a tensor in spherical coordinates, this function transforms the |
981 | + ! tensor components to a cartesian system at all quadrature points of an face. |
982 | + ! This result is given by R(diagonal)R^T where R is the transformation matrix. |
983 | + type(vector_field), intent(in) :: positions |
984 | + integer, intent(in) :: face_number |
985 | + real, dimension(positions%dim,face_ngi(positions,face_number)), intent(in) :: diagonal |
986 | + real, dimension(positions%dim,face_ngi(positions,face_number)) :: X_quad |
987 | + real, dimension(positions%dim,positions%dim) :: R, RT |
988 | + real, dimension(positions%dim,positions%dim,face_ngi(positions,face_number)) :: diagonal_T, quad_val |
989 | + real :: radius, theta, phi !distance form origin, polar angle, azimuthal angle |
990 | + integer :: i |
991 | + |
992 | + assert(positions%dim==3) |
993 | + |
994 | + X_quad=face_val_at_quad(positions, face_number) |
995 | + |
996 | + diagonal_T=0.0 |
997 | + do i=1,positions%dim |
998 | + diagonal_T(i,i,:)=diagonal(i,:) |
999 | + end do |
1000 | + |
1001 | + do i=1,ele_ngi(positions,face_number) |
1002 | + ! Calculate the spherical-polar coordinates of the point |
1003 | + call cartesian_2_spherical_polar(X_quad(1,i), X_quad(2,i), X_quad(3,i), radius, theta, phi) |
1004 | + |
1005 | + R(1,1)=sin(theta)*cos(phi) |
1006 | + R(1,2)=cos(theta)*cos(phi) |
1007 | + R(1,3)=-sin(phi) |
1008 | + R(2,1)=sin(theta)*sin(phi) |
1009 | + R(2,2)=cos(theta)*sin(phi) |
1010 | + R(2,3)=cos(phi) |
1011 | + R(3,1)=cos(theta) |
1012 | + R(3,2)=-sin(theta) |
1013 | + R(3,3)=0.0 |
1014 | + |
1015 | + RT = TRANSPOSE(R) |
1016 | + |
1017 | + quad_val(:,:,i)=matmul((matmul(R,diagonal_T(:,:,i))),RT) |
1018 | + |
1019 | + end do |
1020 | + |
1021 | + end function rotate_diagonal_to_cartesian_face |
1022 | + |
1023 | function rotate_diagonal_to_sphere_gi(positions, ele_number, diagonal) result(quad_val) |
1024 | - ! Given the diagonal of a tensor, this function rotates it to a spherical coordinate system. |
1025 | - ! This result is given by R(diagonal)R^T where R is the matrix of Eigen vectors of the |
1026 | - ! spherical coordinate system. |
1027 | + ! Given the diagonal of a tensor in cartesian coordinates, this function |
1028 | + ! transforms the tensor components to a spherical-polar basis. This result |
1029 | + ! is given by R(diagonal)R^T where R is the matrix of Eigen vectors of the |
1030 | + ! spherical-polar basis, expressed in the cartesian basis. |
1031 | type(vector_field), intent(in) :: positions |
1032 | integer, intent(in) :: ele_number |
1033 | real, dimension(positions%dim,ele_ngi(positions,ele_number)), intent(in) :: diagonal |
1034 | real, dimension(positions%dim,ele_ngi(positions,ele_number)) :: X_quad |
1035 | real, dimension(positions%dim,positions%dim) :: R, RT |
1036 | real, dimension(positions%dim,positions%dim,ele_ngi(positions,ele_number)) :: diagonal_T, quad_val |
1037 | - real :: rad, phi, theta |
1038 | + real :: radius, theta, phi !distance form origin, polar angle, azimuthal angle |
1039 | integer :: i |
1040 | |
1041 | assert(positions%dim==3) |
1042 | @@ -209,22 +1167,21 @@ |
1043 | end do |
1044 | |
1045 | do i=1,ele_ngi(positions,ele_number) |
1046 | - rad=sqrt(sum(X_quad(:,i)**2)) |
1047 | - phi=atan2(X_quad(2,i),X_quad(1,i)) |
1048 | - theta=acos(X_quad(3,i)/rad) |
1049 | + ! Calculate the spherical-polar coordinates of the point |
1050 | + call cartesian_2_spherical_polar(X_quad(1,i), X_quad(2,i), X_quad(3,i), radius, theta, phi) |
1051 | |
1052 | - R(1,1)=-sin(phi) |
1053 | - R(1,2)=cos(theta)*cos(phi) |
1054 | - R(1,3)=sin(theta)*cos(phi) |
1055 | - R(2,1)=cos(phi) |
1056 | + R(1,1)=sin(theta)*cos(phi) |
1057 | + R(1,2)=sin(theta)*sin(phi) |
1058 | + R(1,3)=cos(theta) |
1059 | + R(2,1)=cos(theta)*cos(phi) |
1060 | R(2,2)=cos(theta)*sin(phi) |
1061 | - R(2,3)=sin(theta)*sin(phi) |
1062 | - R(3,1)=0 |
1063 | - R(3,2)=-sin(theta) |
1064 | - R(3,3)=cos(theta) |
1065 | - |
1066 | - RT=R |
1067 | - call invert(RT) |
1068 | + R(2,3)=-sin(theta) |
1069 | + R(3,1)=-sin(phi) |
1070 | + R(3,2)=cos(phi) |
1071 | + R(3,3)=0.0 |
1072 | + |
1073 | + RT = TRANSPOSE(R) |
1074 | + |
1075 | quad_val(:,:,i)=matmul((matmul(R,diagonal_T(:,:,i))),RT) |
1076 | |
1077 | end do |
1078 | @@ -232,16 +1189,17 @@ |
1079 | end function rotate_diagonal_to_sphere_gi |
1080 | |
1081 | function rotate_diagonal_to_sphere_face(positions, face_number, diagonal) result(quad_val) |
1082 | - ! Given the diagonal of a tensor, this function rotates it to a spherical coordinate system. |
1083 | - ! This result is given by R(diagonal)R^T where R is the matrix of Eigen vectors of the |
1084 | - ! spherical coordinate system. |
1085 | + ! Given the diagonal of a tensor in cartesian coordinates, this function |
1086 | + ! transforms the tensor components to a spherical-polar basis. This result |
1087 | + ! is given by R(diagonal)R^T ! where R is the matrix of Eigen vectors of the |
1088 | + ! spherical-polar basis, expressed in the cartesian basis. |
1089 | type(vector_field), intent(in) :: positions |
1090 | integer, intent(in) :: face_number |
1091 | real, dimension(positions%dim,face_ngi(positions,face_number)), intent(in) :: diagonal |
1092 | real, dimension(positions%dim,face_ngi(positions,face_number)) :: X_quad |
1093 | real, dimension(positions%dim,positions%dim) :: R, RT |
1094 | real, dimension(positions%dim,positions%dim,face_ngi(positions,face_number)) :: diagonal_T, quad_val |
1095 | - real :: rad, phi, theta |
1096 | + real :: radius, theta, phi !distance form origin, polar angle, azimuthal angle |
1097 | integer :: i |
1098 | |
1099 | assert(positions%dim==3) |
1100 | @@ -254,22 +1212,21 @@ |
1101 | end do |
1102 | |
1103 | do i=1,face_ngi(positions,face_number) |
1104 | - rad=sqrt(sum(X_quad(:,i)**2)) |
1105 | - phi=atan2(X_quad(2,i),X_quad(1,i)) |
1106 | - theta=acos(X_quad(3,i)/rad) |
1107 | + ! Calculate the spherical-polar coordinates of the point |
1108 | + call cartesian_2_spherical_polar(X_quad(1,i), X_quad(2,i), X_quad(3,i), radius, theta, phi) |
1109 | |
1110 | - R(1,1)=-sin(phi) |
1111 | - R(1,2)=cos(theta)*cos(phi) |
1112 | - R(1,3)=sin(theta)*cos(phi) |
1113 | - R(2,1)=cos(phi) |
1114 | + R(1,1)=sin(theta)*cos(phi) |
1115 | + R(1,2)=sin(theta)*sin(phi) |
1116 | + R(1,3)=cos(theta) |
1117 | + R(2,1)=cos(theta)*cos(phi) |
1118 | R(2,2)=cos(theta)*sin(phi) |
1119 | - R(2,3)=sin(theta)*sin(phi) |
1120 | - R(3,1)=0 |
1121 | - R(3,2)=-sin(theta) |
1122 | - R(3,3)=cos(theta) |
1123 | - |
1124 | - RT=R |
1125 | - call invert(RT) |
1126 | + R(2,3)=-sin(theta) |
1127 | + R(3,1)=-sin(phi) |
1128 | + R(3,2)=cos(phi) |
1129 | + R(3,3)=0.0 |
1130 | + |
1131 | + RT = TRANSPOSE(R) |
1132 | + |
1133 | quad_val(:,:,i)=matmul((matmul(R,diagonal_T(:,:,i))),RT) |
1134 | |
1135 | end do |
1136 | @@ -292,7 +1249,7 @@ |
1137 | type(vector_field), pointer :: position |
1138 | type(vector_field) :: u_position |
1139 | real, dimension(u%dim) :: x, node_normal, node_tangent1, node_tangent2 |
1140 | - real :: phi, theta, rad |
1141 | + real :: radius, theta, phi !distance form origin, polar angle, azimuthal angle |
1142 | |
1143 | ewrite(1,*) "Inside rotate_ct_m_sphere" |
1144 | |
1145 | @@ -314,15 +1271,15 @@ |
1146 | |
1147 | do node=1, node_count(u) |
1148 | |
1149 | + !Extract the cartesian coordinates of the node. |
1150 | x=node_val(u_position, node) |
1151 | |
1152 | - rad=sqrt(sum(x(:)**2)) |
1153 | - phi=atan2(x(2),x(1)) |
1154 | - theta=acos(x(3)/rad) |
1155 | + !Calculate spherical-polar coordinates. |
1156 | + call cartesian_2_spherical_polar(x(1),x(2),x(3),radius,theta,phi) |
1157 | |
1158 | node_normal=(/sin(theta)*cos(phi),sin(theta)*sin(phi),cos(theta)/) |
1159 | - node_tangent1=(/-sin(phi),cos(phi),0.0/) |
1160 | - node_tangent2=(/cos(theta)*cos(phi),cos(theta)*sin(phi),-sin(theta)/) |
1161 | + node_tangent1=(/cos(theta)*cos(phi),cos(theta)*sin(phi),-sin(theta)/) |
1162 | + node_tangent2=(/-sin(phi),cos(phi),0.0/) |
1163 | |
1164 | call set(sphere_normal, node, node_normal) |
1165 | call set(sphere_tangent1, node, node_tangent1) |
1166 | @@ -341,9 +1298,9 @@ |
1167 | do j=1, size(rowcol) |
1168 | rotated_node=rowcol(j) |
1169 | ! construct local rotation matrix |
1170 | - local_rotation(1,:)=node_val(sphere_tangent1, rotated_node) |
1171 | - local_rotation(2,:)=node_val(sphere_tangent2, rotated_node) |
1172 | - local_rotation(3,:)=node_val(sphere_normal, rotated_node) |
1173 | + local_rotation(1,:)=node_val(sphere_normal, rotated_node) |
1174 | + local_rotation(2,:)=node_val(sphere_tangent1, rotated_node) |
1175 | + local_rotation(3,:)=node_val(sphere_tangent2, rotated_node) |
1176 | |
1177 | ! look up ct_m values of row i, column rowcol(j) in xyz orientation |
1178 | do k=1, blocks(ct_m,2) |
1179 | @@ -431,7 +1388,7 @@ |
1180 | type(halo_type), pointer:: halo |
1181 | type(vector_field) :: sphere_normal, sphere_tangent1, sphere_tangent2 |
1182 | real, dimension(u%dim) :: x, node_normal, node_tangent1, node_tangent2 |
1183 | - real :: rad, phi, theta |
1184 | + real :: radius, theta, phi !distance form origin, polar angle, azimuthal angle |
1185 | real, dimension(u%dim, u%dim):: local_rotation |
1186 | integer, dimension(:), allocatable:: dnnz, onnz |
1187 | integer:: node, nodes, mynodes |
1188 | @@ -477,15 +1434,15 @@ |
1189 | |
1190 | do node=1, mynodes |
1191 | |
1192 | + !Extract the cartesian coordinates of the node. |
1193 | x=node_val(u_position, node) |
1194 | |
1195 | - rad=sqrt(sum(x(:)**2)) |
1196 | - phi=atan2(x(2),x(1)) |
1197 | - theta=acos(x(3)/rad) |
1198 | + !Calculate spherical-polar coordinates. |
1199 | + call cartesian_2_spherical_polar(x(1),x(2),x(3),radius,theta,phi) |
1200 | |
1201 | node_normal=(/sin(theta)*cos(phi),sin(theta)*sin(phi),cos(theta)/) |
1202 | - node_tangent1=(/-sin(phi),cos(phi),0.0/) |
1203 | - node_tangent2=(/cos(theta)*cos(phi),cos(theta)*sin(phi),-sin(theta)/) |
1204 | + node_tangent1=(/cos(theta)*cos(phi),cos(theta)*sin(phi),-sin(theta)/) |
1205 | + node_tangent2=(/-sin(phi),cos(phi),0.0/) |
1206 | |
1207 | call set(sphere_normal, node, node_normal) |
1208 | call set(sphere_tangent1, node, node_tangent1) |
1209 | @@ -494,9 +1451,9 @@ |
1210 | end do |
1211 | |
1212 | do node=1, mynodes |
1213 | - local_rotation(:,1)=node_val(sphere_tangent1, node) |
1214 | - local_rotation(:,2)=node_val(sphere_tangent2, node) |
1215 | - local_rotation(:,3)=node_val(sphere_normal, node) |
1216 | + local_rotation(:,1)=node_val(sphere_normal, node) |
1217 | + local_rotation(:,2)=node_val(sphere_tangent1, node) |
1218 | + local_rotation(:,3)=node_val(sphere_tangent2, node) |
1219 | |
1220 | call addto(rotation_sphere, node, node, local_rotation) |
1221 | end do |
1222 | @@ -515,7 +1472,6 @@ |
1223 | type(vector_field), intent(inout):: vfield |
1224 | type(state_type), intent(inout):: state |
1225 | |
1226 | - type(vector_field), pointer:: u |
1227 | type(vector_field):: result |
1228 | type(petsc_csr_matrix), pointer:: rotation_sphere |
1229 | integer :: stat |
1230 | @@ -523,8 +1479,7 @@ |
1231 | rotation_sphere => extract_petsc_csr_matrix(state, "RotationMatrixSphere", stat=stat) |
1232 | if (stat/=0) then |
1233 | allocate(rotation_sphere) |
1234 | - u => extract_vector_field(state, "Velocity") |
1235 | - call create_rotation_matrix_sphere(rotation_sphere, u, state) |
1236 | + call create_rotation_matrix_sphere(rotation_sphere, vfield, state) |
1237 | call insert(state, rotation_sphere, "RotationMatrixSphere") |
1238 | end if |
1239 | |
1240 | @@ -551,8 +1506,7 @@ |
1241 | rotation_sphere => extract_petsc_csr_matrix(state, "RotationMatrixSphere", stat=stat) |
1242 | if (stat/=0) then |
1243 | allocate(rotation_sphere) |
1244 | - u => extract_vector_field(state, "Velocity") |
1245 | - call create_rotation_matrix_sphere(rotation_sphere, u, state) |
1246 | + call create_rotation_matrix_sphere(rotation_sphere, vfield, state) |
1247 | call insert(state, rotation_sphere, "RotationMatrixSphere") |
1248 | end if |
1249 | |
1250 | |
1251 | === added file 'femtools/doc/coordinate_transformations.png' |
1252 | Binary files femtools/doc/coordinate_transformations.png 1970-01-01 00:00:00 +0000 and femtools/doc/coordinate_transformations.png 2012-10-19 14:09:23 +0000 differ |
1253 | === modified file 'femtools/doc/femtools_manual.pdf' |
1254 | --- femtools/doc/femtools_manual.pdf 2012-04-25 16:21:34 +0000 |
1255 | +++ femtools/doc/femtools_manual.pdf 2012-10-19 14:09:23 +0000 |
1256 | @@ -229,670 +229,676 @@ |
1257 | (Topological and data dimension) |
1258 | endobj |
1259 | 153 0 obj |
1260 | -<< /S /GoTo /D (chapter.9) >> |
1261 | +<< /S /GoTo /D (section.8.6) >> |
1262 | endobj |
1263 | 156 0 obj |
1264 | -(State dictionaries) |
1265 | +(Changing coordinates and bases) |
1266 | endobj |
1267 | 157 0 obj |
1268 | -<< /S /GoTo /D (section.9.1) >> |
1269 | +<< /S /GoTo /D (chapter.9) >> |
1270 | endobj |
1271 | 160 0 obj |
1272 | -(Inserting and extracting objects in states) |
1273 | +(State dictionaries) |
1274 | endobj |
1275 | 161 0 obj |
1276 | -<< /S /GoTo /D (section.9.2) >> |
1277 | +<< /S /GoTo /D (section.9.1) >> |
1278 | endobj |
1279 | 164 0 obj |
1280 | -(Aliased fields and listing the same field in multiple state dictionaries) |
1281 | +(Inserting and extracting objects in states) |
1282 | endobj |
1283 | 165 0 obj |
1284 | -<< /S /GoTo /D (chapter.10) >> |
1285 | +<< /S /GoTo /D (section.9.2) >> |
1286 | endobj |
1287 | 168 0 obj |
1288 | -(Reference counting) |
1289 | +(Aliased fields and listing the same field in multiple state dictionaries) |
1290 | endobj |
1291 | 169 0 obj |
1292 | -<< /S /GoTo /D (section.10.1) >> |
1293 | +<< /S /GoTo /D (chapter.10) >> |
1294 | endobj |
1295 | 172 0 obj |
1296 | -(Creating and destroying references) |
1297 | +(Reference counting) |
1298 | endobj |
1299 | 173 0 obj |
1300 | -<< /S /GoTo /D (subsection.10.1.1) >> |
1301 | +<< /S /GoTo /D (section.10.1) >> |
1302 | endobj |
1303 | 176 0 obj |
1304 | -(Allocate) |
1305 | +(Creating and destroying references) |
1306 | endobj |
1307 | 177 0 obj |
1308 | -<< /S /GoTo /D (subsection.10.1.2) >> |
1309 | +<< /S /GoTo /D (subsection.10.1.1) >> |
1310 | endobj |
1311 | 180 0 obj |
1312 | -(Deallocate) |
1313 | +(Allocate) |
1314 | endobj |
1315 | 181 0 obj |
1316 | -<< /S /GoTo /D (subsection.10.1.3) >> |
1317 | +<< /S /GoTo /D (subsection.10.1.2) >> |
1318 | endobj |
1319 | 184 0 obj |
1320 | -(Inserting into state) |
1321 | +(Deallocate) |
1322 | endobj |
1323 | 185 0 obj |
1324 | -<< /S /GoTo /D (subsection.10.1.4) >> |
1325 | +<< /S /GoTo /D (subsection.10.1.3) >> |
1326 | endobj |
1327 | 188 0 obj |
1328 | -(Extracting from states) |
1329 | +(Inserting into state) |
1330 | endobj |
1331 | 189 0 obj |
1332 | -<< /S /GoTo /D (subsection.10.1.5) >> |
1333 | +<< /S /GoTo /D (subsection.10.1.4) >> |
1334 | endobj |
1335 | 192 0 obj |
1336 | -(Incref) |
1337 | +(Extracting from states) |
1338 | endobj |
1339 | 193 0 obj |
1340 | -<< /S /GoTo /D (section.10.2) >> |
1341 | +<< /S /GoTo /D (subsection.10.1.5) >> |
1342 | endobj |
1343 | 196 0 obj |
1344 | -(Creating new reference counted data types) |
1345 | +(Incref) |
1346 | endobj |
1347 | 197 0 obj |
1348 | -<< /S /GoTo /D (section.10.3) >> |
1349 | +<< /S /GoTo /D (section.10.2) >> |
1350 | endobj |
1351 | 200 0 obj |
1352 | -(Memory accounting diagnostics) |
1353 | +(Creating new reference counted data types) |
1354 | endobj |
1355 | 201 0 obj |
1356 | -<< /S /GoTo /D (subsection.10.3.1) >> |
1357 | +<< /S /GoTo /D (section.10.3) >> |
1358 | endobj |
1359 | 204 0 obj |
1360 | -(Memory statistics in the .stat file) |
1361 | +(Memory accounting diagnostics) |
1362 | endobj |
1363 | 205 0 obj |
1364 | -<< /S /GoTo /D (part.3) >> |
1365 | +<< /S /GoTo /D (subsection.10.3.1) >> |
1366 | endobj |
1367 | 208 0 obj |
1368 | -(III Procedure reference) |
1369 | +(Memory statistics in the .stat file) |
1370 | endobj |
1371 | 209 0 obj |
1372 | -<< /S /GoTo /D (chapter.11) >> |
1373 | +<< /S /GoTo /D (part.3) >> |
1374 | endobj |
1375 | 212 0 obj |
1376 | -(General principles for procedures) |
1377 | +(III Procedure reference) |
1378 | endobj |
1379 | 213 0 obj |
1380 | -<< /S /GoTo /D (section.11.1) >> |
1381 | +<< /S /GoTo /D (chapter.11) >> |
1382 | endobj |
1383 | 216 0 obj |
1384 | -(Field, mesh and matrix interfaces) |
1385 | +(General principles for procedures) |
1386 | endobj |
1387 | 217 0 obj |
1388 | -<< /S /GoTo /D (section.11.2) >> |
1389 | +<< /S /GoTo /D (section.11.1) >> |
1390 | endobj |
1391 | 220 0 obj |
1392 | -(Status arguments) |
1393 | +(Field, mesh and matrix interfaces) |
1394 | endobj |
1395 | 221 0 obj |
1396 | -<< /S /GoTo /D (chapter.12) >> |
1397 | +<< /S /GoTo /D (section.11.2) >> |
1398 | endobj |
1399 | 224 0 obj |
1400 | -(Field and mesh methods) |
1401 | +(Status arguments) |
1402 | endobj |
1403 | 225 0 obj |
1404 | -<< /S /GoTo /D (section.12.1) >> |
1405 | +<< /S /GoTo /D (chapter.12) >> |
1406 | endobj |
1407 | 228 0 obj |
1408 | -(Global field and mesh enquiry routines) |
1409 | +(Field and mesh methods) |
1410 | endobj |
1411 | 229 0 obj |
1412 | -<< /S /GoTo /D (subsection.12.1.1) >> |
1413 | +<< /S /GoTo /D (section.12.1) >> |
1414 | endobj |
1415 | 232 0 obj |
1416 | -(mesh\137dim) |
1417 | +(Global field and mesh enquiry routines) |
1418 | endobj |
1419 | 233 0 obj |
1420 | -<< /S /GoTo /D (subsection.12.1.2) >> |
1421 | +<< /S /GoTo /D (subsection.12.1.1) >> |
1422 | endobj |
1423 | 236 0 obj |
1424 | -(mesh\137periodic) |
1425 | +(mesh\137dim) |
1426 | endobj |
1427 | 237 0 obj |
1428 | -<< /S /GoTo /D (subsection.12.1.3) >> |
1429 | +<< /S /GoTo /D (subsection.12.1.2) >> |
1430 | endobj |
1431 | 240 0 obj |
1432 | -(node\137count) |
1433 | +(mesh\137periodic) |
1434 | endobj |
1435 | 241 0 obj |
1436 | -<< /S /GoTo /D (subsection.12.1.4) >> |
1437 | +<< /S /GoTo /D (subsection.12.1.3) >> |
1438 | endobj |
1439 | 244 0 obj |
1440 | -(element\137count) |
1441 | +(node\137count) |
1442 | endobj |
1443 | 245 0 obj |
1444 | -<< /S /GoTo /D (subsection.12.1.5) >> |
1445 | +<< /S /GoTo /D (subsection.12.1.4) >> |
1446 | endobj |
1447 | 248 0 obj |
1448 | -(surface\137element\137count) |
1449 | +(element\137count) |
1450 | endobj |
1451 | 249 0 obj |
1452 | -<< /S /GoTo /D (subsection.12.1.6) >> |
1453 | +<< /S /GoTo /D (subsection.12.1.5) >> |
1454 | endobj |
1455 | 252 0 obj |
1456 | -(face\137count) |
1457 | +(surface\137element\137count) |
1458 | endobj |
1459 | 253 0 obj |
1460 | -<< /S /GoTo /D (subsection.12.1.7) >> |
1461 | +<< /S /GoTo /D (subsection.12.1.6) >> |
1462 | endobj |
1463 | 256 0 obj |
1464 | -(aliased) |
1465 | +(face\137count) |
1466 | endobj |
1467 | 257 0 obj |
1468 | -<< /S /GoTo /D (section.12.2) >> |
1469 | +<< /S /GoTo /D (subsection.12.1.7) >> |
1470 | endobj |
1471 | 260 0 obj |
1472 | -(Element enquiry routines) |
1473 | +(aliased) |
1474 | endobj |
1475 | 261 0 obj |
1476 | -<< /S /GoTo /D (subsection.12.2.1) >> |
1477 | +<< /S /GoTo /D (section.12.2) >> |
1478 | endobj |
1479 | 264 0 obj |
1480 | -(ele\137loc) |
1481 | +(Element enquiry routines) |
1482 | endobj |
1483 | 265 0 obj |
1484 | -<< /S /GoTo /D (subsection.12.2.2) >> |
1485 | +<< /S /GoTo /D (subsection.12.2.1) >> |
1486 | endobj |
1487 | 268 0 obj |
1488 | -(ele\137and\137faces\137loc) |
1489 | +(ele\137loc) |
1490 | endobj |
1491 | 269 0 obj |
1492 | -<< /S /GoTo /D (subsection.12.2.3) >> |
1493 | +<< /S /GoTo /D (subsection.12.2.2) >> |
1494 | endobj |
1495 | 272 0 obj |
1496 | -(ele\137vertices) |
1497 | +(ele\137and\137faces\137loc) |
1498 | endobj |
1499 | 273 0 obj |
1500 | -<< /S /GoTo /D (subsection.12.2.4) >> |
1501 | +<< /S /GoTo /D (subsection.12.2.3) >> |
1502 | endobj |
1503 | 276 0 obj |
1504 | -(ele\137ngi) |
1505 | +(ele\137vertices) |
1506 | endobj |
1507 | 277 0 obj |
1508 | -<< /S /GoTo /D (subsection.12.2.5) >> |
1509 | +<< /S /GoTo /D (subsection.12.2.4) >> |
1510 | endobj |
1511 | 280 0 obj |
1512 | -(ele\137nodes) |
1513 | +(ele\137ngi) |
1514 | endobj |
1515 | 281 0 obj |
1516 | -<< /S /GoTo /D (section.12.3) >> |
1517 | +<< /S /GoTo /D (subsection.12.2.5) >> |
1518 | endobj |
1519 | 284 0 obj |
1520 | -(Face enquiry routines) |
1521 | +(ele\137nodes) |
1522 | endobj |
1523 | 285 0 obj |
1524 | -<< /S /GoTo /D (subsection.12.3.1) >> |
1525 | +<< /S /GoTo /D (section.12.3) >> |
1526 | endobj |
1527 | 288 0 obj |
1528 | -(face\137loc) |
1529 | +(Face enquiry routines) |
1530 | endobj |
1531 | 289 0 obj |
1532 | -<< /S /GoTo /D (subsection.12.3.2) >> |
1533 | +<< /S /GoTo /D (subsection.12.3.1) >> |
1534 | endobj |
1535 | 292 0 obj |
1536 | -(face\137vertices) |
1537 | +(face\137loc) |
1538 | endobj |
1539 | 293 0 obj |
1540 | -<< /S /GoTo /D (subsection.12.3.3) >> |
1541 | +<< /S /GoTo /D (subsection.12.3.2) >> |
1542 | endobj |
1543 | 296 0 obj |
1544 | -(face\137ngi) |
1545 | +(face\137vertices) |
1546 | endobj |
1547 | 297 0 obj |
1548 | -<< /S /GoTo /D (subsection.12.3.4) >> |
1549 | +<< /S /GoTo /D (subsection.12.3.3) >> |
1550 | endobj |
1551 | 300 0 obj |
1552 | -(face\137local\137nodes) |
1553 | +(face\137ngi) |
1554 | endobj |
1555 | 301 0 obj |
1556 | -<< /S /GoTo /D (subsection.12.3.5) >> |
1557 | +<< /S /GoTo /D (subsection.12.3.4) >> |
1558 | endobj |
1559 | 304 0 obj |
1560 | -(face\137global\137nodes) |
1561 | +(face\137local\137nodes) |
1562 | endobj |
1563 | 305 0 obj |
1564 | -<< /S /GoTo /D (section.12.4) >> |
1565 | +<< /S /GoTo /D (subsection.12.3.5) >> |
1566 | endobj |
1567 | 308 0 obj |
1568 | -(Data retrieval routines) |
1569 | +(face\137global\137nodes) |
1570 | endobj |
1571 | 309 0 obj |
1572 | -<< /S /GoTo /D (subsection.12.4.1) >> |
1573 | +<< /S /GoTo /D (section.12.4) >> |
1574 | endobj |
1575 | 312 0 obj |
1576 | -(ele\137val) |
1577 | +(Data retrieval routines) |
1578 | endobj |
1579 | 313 0 obj |
1580 | -<< /S /GoTo /D (subsection.12.4.2) >> |
1581 | +<< /S /GoTo /D (subsection.12.4.1) >> |
1582 | endobj |
1583 | 316 0 obj |
1584 | -(ele\137val\137at\137quad) |
1585 | +(ele\137val) |
1586 | endobj |
1587 | 317 0 obj |
1588 | -<< /S /GoTo /D (subsection.12.4.3) >> |
1589 | +<< /S /GoTo /D (subsection.12.4.2) >> |
1590 | endobj |
1591 | 320 0 obj |
1592 | -(face\137val) |
1593 | +(ele\137val\137at\137quad) |
1594 | endobj |
1595 | 321 0 obj |
1596 | -<< /S /GoTo /D (subsection.12.4.4) >> |
1597 | +<< /S /GoTo /D (subsection.12.4.3) >> |
1598 | endobj |
1599 | 324 0 obj |
1600 | -(node\137val) |
1601 | +(face\137val) |
1602 | endobj |
1603 | 325 0 obj |
1604 | -<< /S /GoTo /D (section.12.5) >> |
1605 | +<< /S /GoTo /D (subsection.12.4.4) >> |
1606 | endobj |
1607 | 328 0 obj |
1608 | -(Data setting routines) |
1609 | +(node\137val) |
1610 | endobj |
1611 | 329 0 obj |
1612 | -<< /S /GoTo /D (subsection.12.5.1) >> |
1613 | +<< /S /GoTo /D (section.12.5) >> |
1614 | endobj |
1615 | 332 0 obj |
1616 | -(addto) |
1617 | +(Data setting routines) |
1618 | endobj |
1619 | 333 0 obj |
1620 | -<< /S /GoTo /D (subsection.12.5.2) >> |
1621 | +<< /S /GoTo /D (subsection.12.5.1) >> |
1622 | endobj |
1623 | 336 0 obj |
1624 | -(scale) |
1625 | +(addto) |
1626 | endobj |
1627 | 337 0 obj |
1628 | -<< /S /GoTo /D (subsection.12.5.3) >> |
1629 | +<< /S /GoTo /D (subsection.12.5.2) >> |
1630 | endobj |
1631 | 340 0 obj |
1632 | -(set) |
1633 | +(scale) |
1634 | endobj |
1635 | 341 0 obj |
1636 | -<< /S /GoTo /D (subsection.12.5.4) >> |
1637 | +<< /S /GoTo /D (subsection.12.5.3) >> |
1638 | endobj |
1639 | 344 0 obj |
1640 | -(zero) |
1641 | +(set) |
1642 | endobj |
1643 | 345 0 obj |
1644 | -<< /S /GoTo /D (chapter.13) >> |
1645 | +<< /S /GoTo /D (subsection.12.5.4) >> |
1646 | endobj |
1647 | 348 0 obj |
1648 | -(State dictionary methods) |
1649 | +(zero) |
1650 | endobj |
1651 | 349 0 obj |
1652 | -<< /S /GoTo /D (section.13.1) >> |
1653 | +<< /S /GoTo /D (chapter.13) >> |
1654 | endobj |
1655 | 352 0 obj |
1656 | -(Inserting objects in states) |
1657 | +(State dictionary methods) |
1658 | endobj |
1659 | 353 0 obj |
1660 | -<< /S /GoTo /D (subsection.13.1.1) >> |
1661 | +<< /S /GoTo /D (section.13.1) >> |
1662 | endobj |
1663 | 356 0 obj |
1664 | -(insert) |
1665 | +(Inserting objects in states) |
1666 | endobj |
1667 | 357 0 obj |
1668 | -<< /S /GoTo /D (section.13.2) >> |
1669 | +<< /S /GoTo /D (subsection.13.1.1) >> |
1670 | endobj |
1671 | 360 0 obj |
1672 | -(Extracting objects from states) |
1673 | +(insert) |
1674 | endobj |
1675 | 361 0 obj |
1676 | -<< /S /GoTo /D (subsection.13.2.1) >> |
1677 | +<< /S /GoTo /D (section.13.2) >> |
1678 | endobj |
1679 | 364 0 obj |
1680 | -(Extracting objects by name) |
1681 | +(Extracting objects from states) |
1682 | endobj |
1683 | 365 0 obj |
1684 | -<< /S /GoTo /D (subsection.13.2.2) >> |
1685 | +<< /S /GoTo /D (subsection.13.2.1) >> |
1686 | endobj |
1687 | 368 0 obj |
1688 | -(Extracting objects by index) |
1689 | +(Extracting objects by name) |
1690 | endobj |
1691 | 369 0 obj |
1692 | -<< /S /GoTo /D (section.13.3) >> |
1693 | +<< /S /GoTo /D (subsection.13.2.2) >> |
1694 | endobj |
1695 | 372 0 obj |
1696 | -(Auxiliary state routines) |
1697 | +(Extracting objects by index) |
1698 | endobj |
1699 | 373 0 obj |
1700 | -<< /S /GoTo /D (subsection.13.3.1) >> |
1701 | +<< /S /GoTo /D (section.13.3) >> |
1702 | endobj |
1703 | 376 0 obj |
1704 | -(deallocate) |
1705 | +(Auxiliary state routines) |
1706 | endobj |
1707 | 377 0 obj |
1708 | -<< /S /GoTo /D (subsection.13.3.2) >> |
1709 | +<< /S /GoTo /D (subsection.13.3.1) >> |
1710 | endobj |
1711 | 380 0 obj |
1712 | -(remove object) |
1713 | +(deallocate) |
1714 | endobj |
1715 | 381 0 obj |
1716 | -<< /S /GoTo /D (subsection.13.3.3) >> |
1717 | +<< /S /GoTo /D (subsection.13.3.2) >> |
1718 | endobj |
1719 | 384 0 obj |
1720 | -(object counts) |
1721 | +(remove object) |
1722 | endobj |
1723 | 385 0 obj |
1724 | -<< /S /GoTo /D (chapter.14) >> |
1725 | +<< /S /GoTo /D (subsection.13.3.3) >> |
1726 | endobj |
1727 | 388 0 obj |
1728 | -(Element methods) |
1729 | +(object counts) |
1730 | endobj |
1731 | 389 0 obj |
1732 | -<< /S /GoTo /D (section.14.1) >> |
1733 | +<< /S /GoTo /D (chapter.14) >> |
1734 | endobj |
1735 | 392 0 obj |
1736 | -(Quadrature methods) |
1737 | +(Element methods) |
1738 | endobj |
1739 | 393 0 obj |
1740 | -<< /S /GoTo /D (subsection.14.1.1) >> |
1741 | +<< /S /GoTo /D (section.14.1) >> |
1742 | endobj |
1743 | 396 0 obj |
1744 | -(make\137quadrature) |
1745 | +(Quadrature methods) |
1746 | endobj |
1747 | 397 0 obj |
1748 | -<< /S /GoTo /D (subsection.14.1.2) >> |
1749 | +<< /S /GoTo /D (subsection.14.1.1) >> |
1750 | endobj |
1751 | 400 0 obj |
1752 | -(deallocate) |
1753 | +(make\137quadrature) |
1754 | endobj |
1755 | 401 0 obj |
1756 | -<< /S /GoTo /D (section.14.2) >> |
1757 | +<< /S /GoTo /D (subsection.14.1.2) >> |
1758 | endobj |
1759 | 404 0 obj |
1760 | -(Shape function methods) |
1761 | +(deallocate) |
1762 | endobj |
1763 | 405 0 obj |
1764 | -<< /S /GoTo /D (subsection.14.2.1) >> |
1765 | +<< /S /GoTo /D (section.14.2) >> |
1766 | endobj |
1767 | 408 0 obj |
1768 | -(make\137element\137shape) |
1769 | +(Shape function methods) |
1770 | endobj |
1771 | 409 0 obj |
1772 | -<< /S /GoTo /D (subsection.14.2.2) >> |
1773 | +<< /S /GoTo /D (subsection.14.2.1) >> |
1774 | endobj |
1775 | 412 0 obj |
1776 | -(deallocate) |
1777 | +(make\137element\137shape) |
1778 | endobj |
1779 | 413 0 obj |
1780 | +<< /S /GoTo /D (subsection.14.2.2) >> |
1781 | +endobj |
1782 | +416 0 obj |
1783 | +(deallocate) |
1784 | +endobj |
1785 | +417 0 obj |
1786 | << /S /GoTo /D (subsection.14.2.3) >> |
1787 | endobj |
1788 | -416 0 obj |
1789 | +420 0 obj |
1790 | (local\137coords) |
1791 | endobj |
1792 | -417 0 obj |
1793 | +421 0 obj |
1794 | << /S /GoTo /D (subsection.14.2.4) >> |
1795 | endobj |
1796 | -420 0 obj |
1797 | +424 0 obj |
1798 | (local\137coord\137count) |
1799 | endobj |
1800 | -421 0 obj |
1801 | +425 0 obj |
1802 | << /S /GoTo /D (subsection.14.2.5) >> |
1803 | endobj |
1804 | -424 0 obj |
1805 | +428 0 obj |
1806 | (eval\137shape) |
1807 | endobj |
1808 | -425 0 obj |
1809 | +429 0 obj |
1810 | << /S /GoTo /D (chapter.15) >> |
1811 | endobj |
1812 | -428 0 obj |
1813 | +432 0 obj |
1814 | (Functions implementing integrals over elements) |
1815 | endobj |
1816 | -429 0 obj |
1817 | +433 0 obj |
1818 | << /S /GoTo /D (section.15.1) >> |
1819 | endobj |
1820 | -432 0 obj |
1821 | +436 0 obj |
1822 | (Bilinear forms) |
1823 | endobj |
1824 | -433 0 obj |
1825 | +437 0 obj |
1826 | << /S /GoTo /D (subsection.15.1.1) >> |
1827 | endobj |
1828 | -436 0 obj |
1829 | +440 0 obj |
1830 | (shape\137shape) |
1831 | endobj |
1832 | -437 0 obj |
1833 | +441 0 obj |
1834 | << /S /GoTo /D (subsection.15.1.2) >> |
1835 | endobj |
1836 | -440 0 obj |
1837 | +444 0 obj |
1838 | (shape\137shape\137vector) |
1839 | endobj |
1840 | -441 0 obj |
1841 | +445 0 obj |
1842 | << /S /GoTo /D (subsection.15.1.3) >> |
1843 | endobj |
1844 | -444 0 obj |
1845 | +448 0 obj |
1846 | (shape\137shape\137tensor) |
1847 | endobj |
1848 | -445 0 obj |
1849 | +449 0 obj |
1850 | << /S /GoTo /D (subsection.15.1.4) >> |
1851 | endobj |
1852 | -448 0 obj |
1853 | +452 0 obj |
1854 | (shape\137shape\137vector\137outer\137vector) |
1855 | endobj |
1856 | -449 0 obj |
1857 | +453 0 obj |
1858 | << /S /GoTo /D (subsection.15.1.5) >> |
1859 | endobj |
1860 | -452 0 obj |
1861 | +456 0 obj |
1862 | (shape\137dshape) |
1863 | endobj |
1864 | -453 0 obj |
1865 | +457 0 obj |
1866 | << /S /GoTo /D (subsection.15.1.6) >> |
1867 | endobj |
1868 | -456 0 obj |
1869 | +460 0 obj |
1870 | (dshape\137shape) |
1871 | endobj |
1872 | -457 0 obj |
1873 | +461 0 obj |
1874 | << /S /GoTo /D (subsection.15.1.7) >> |
1875 | endobj |
1876 | -460 0 obj |
1877 | +464 0 obj |
1878 | (shape\137vector\137dot\137dshape) |
1879 | endobj |
1880 | -461 0 obj |
1881 | +465 0 obj |
1882 | << /S /GoTo /D (subsection.15.1.8) >> |
1883 | endobj |
1884 | -464 0 obj |
1885 | +468 0 obj |
1886 | (dshape\137dot\137vector\137shape) |
1887 | endobj |
1888 | -465 0 obj |
1889 | +469 0 obj |
1890 | << /S /GoTo /D (subsection.15.1.9) >> |
1891 | endobj |
1892 | -468 0 obj |
1893 | +472 0 obj |
1894 | (dshape\137dot\137tensor\137shape) |
1895 | endobj |
1896 | -469 0 obj |
1897 | +473 0 obj |
1898 | << /S /GoTo /D (subsection.15.1.10) >> |
1899 | endobj |
1900 | -472 0 obj |
1901 | +476 0 obj |
1902 | (shape\137vector\137outer\137dshape) |
1903 | endobj |
1904 | -473 0 obj |
1905 | +477 0 obj |
1906 | << /S /GoTo /D (subsection.15.1.11) >> |
1907 | endobj |
1908 | -476 0 obj |
1909 | +480 0 obj |
1910 | (dshape\137outer\137vector\137shape) |
1911 | endobj |
1912 | -477 0 obj |
1913 | +481 0 obj |
1914 | << /S /GoTo /D (subsection.15.1.12) >> |
1915 | endobj |
1916 | -480 0 obj |
1917 | +484 0 obj |
1918 | (dshape\137dot\137dshape) |
1919 | endobj |
1920 | -481 0 obj |
1921 | +485 0 obj |
1922 | << /S /GoTo /D (subsection.15.1.13) >> |
1923 | endobj |
1924 | -484 0 obj |
1925 | +488 0 obj |
1926 | (dshape\137tensor\137dshape) |
1927 | endobj |
1928 | -485 0 obj |
1929 | +489 0 obj |
1930 | << /S /GoTo /D (subsection.15.1.14) >> |
1931 | endobj |
1932 | -488 0 obj |
1933 | +492 0 obj |
1934 | (dshape\137outer\137dshape) |
1935 | endobj |
1936 | -489 0 obj |
1937 | +493 0 obj |
1938 | << /S /GoTo /D (subsection.15.1.15) >> |
1939 | endobj |
1940 | -492 0 obj |
1941 | +496 0 obj |
1942 | (shape\137curl\137shape\1372d) |
1943 | endobj |
1944 | -493 0 obj |
1945 | +497 0 obj |
1946 | << /S /GoTo /D (section.15.2) >> |
1947 | endobj |
1948 | -496 0 obj |
1949 | +500 0 obj |
1950 | (Linear Forms) |
1951 | endobj |
1952 | -497 0 obj |
1953 | +501 0 obj |
1954 | << /S /GoTo /D (subsection.15.2.1) >> |
1955 | endobj |
1956 | -500 0 obj |
1957 | +504 0 obj |
1958 | (shape\137rhs) |
1959 | endobj |
1960 | -501 0 obj |
1961 | +505 0 obj |
1962 | << /S /GoTo /D (subsection.15.2.2) >> |
1963 | endobj |
1964 | -504 0 obj |
1965 | +508 0 obj |
1966 | (shape\137vector\137rhs) |
1967 | endobj |
1968 | -505 0 obj |
1969 | +509 0 obj |
1970 | << /S /GoTo /D (subsection.15.2.3) >> |
1971 | endobj |
1972 | -508 0 obj |
1973 | +512 0 obj |
1974 | (shape\137tensor\137rhs) |
1975 | endobj |
1976 | -509 0 obj |
1977 | +513 0 obj |
1978 | << /S /GoTo /D (subsection.15.2.4) >> |
1979 | endobj |
1980 | -512 0 obj |
1981 | +516 0 obj |
1982 | (shape\137tensor\137dot\137vector\137rhs) |
1983 | endobj |
1984 | -513 0 obj |
1985 | +517 0 obj |
1986 | << /S /GoTo /D (subsection.15.2.5) >> |
1987 | endobj |
1988 | -516 0 obj |
1989 | +520 0 obj |
1990 | (dshape\137rhs) |
1991 | endobj |
1992 | -517 0 obj |
1993 | +521 0 obj |
1994 | << /S /GoTo /D (subsection.15.2.6) >> |
1995 | endobj |
1996 | -520 0 obj |
1997 | +524 0 obj |
1998 | (dshape\137dot\137vector\137rhs) |
1999 | endobj |
2000 | -521 0 obj |
2001 | +525 0 obj |
2002 | << /S /GoTo /D (subsection.15.2.7) >> |
2003 | endobj |
2004 | -524 0 obj |
2005 | +528 0 obj |
2006 | (dshape\137dot\137tensor\137rhs) |
2007 | endobj |
2008 | -525 0 obj |
2009 | +529 0 obj |
2010 | << /S /GoTo /D (section.15.3) >> |
2011 | endobj |
2012 | -528 0 obj |
2013 | +532 0 obj |
2014 | (Auxiliary form functions) |
2015 | endobj |
2016 | -529 0 obj |
2017 | +533 0 obj |
2018 | << /S /GoTo /D (subsection.15.3.1) >> |
2019 | endobj |
2020 | -532 0 obj |
2021 | +536 0 obj |
2022 | (dshape\137loc) |
2023 | endobj |
2024 | -533 0 obj |
2025 | +537 0 obj |
2026 | << /S /GoTo /D (subsection.15.3.2) >> |
2027 | endobj |
2028 | -536 0 obj |
2029 | +540 0 obj |
2030 | (dshape\137ngi) |
2031 | endobj |
2032 | -537 0 obj |
2033 | +541 0 obj |
2034 | << /S /GoTo /D (subsection.15.3.3) >> |
2035 | endobj |
2036 | -540 0 obj |
2037 | +544 0 obj |
2038 | (dshape\137dim) |
2039 | endobj |
2040 | -541 0 obj |
2041 | +545 0 obj |
2042 | << /S /GoTo /D (subsection.15.3.4) >> |
2043 | endobj |
2044 | -544 0 obj |
2045 | +548 0 obj |
2046 | (vector\137dim) |
2047 | endobj |
2048 | -545 0 obj |
2049 | +549 0 obj |
2050 | << /S /GoTo /D (subsection.15.3.5) >> |
2051 | endobj |
2052 | -548 0 obj |
2053 | +552 0 obj |
2054 | (tensor\137dim) |
2055 | endobj |
2056 | -549 0 obj |
2057 | +553 0 obj |
2058 | << /S /GoTo /D (chapter.16) >> |
2059 | endobj |
2060 | -552 0 obj |
2061 | +556 0 obj |
2062 | (Diagnostic statistics) |
2063 | endobj |
2064 | -553 0 obj |
2065 | +557 0 obj |
2066 | << /S /GoTo /D (section.16.1) >> |
2067 | endobj |
2068 | -556 0 obj |
2069 | +560 0 obj |
2070 | (Diagnostic I/O routines) |
2071 | endobj |
2072 | -557 0 obj |
2073 | +561 0 obj |
2074 | << /S /GoTo /D (section.16.2) >> |
2075 | endobj |
2076 | -560 0 obj |
2077 | +564 0 obj |
2078 | (Memory statistics) |
2079 | endobj |
2080 | -561 0 obj |
2081 | +565 0 obj |
2082 | << /S /GoTo /D (subsection.16.2.1) >> |
2083 | endobj |
2084 | -564 0 obj |
2085 | +568 0 obj |
2086 | (print\137current\137memory\137stats) |
2087 | endobj |
2088 | -565 0 obj |
2089 | +569 0 obj |
2090 | << /S /GoTo /D (subsection.16.2.2) >> |
2091 | endobj |
2092 | -568 0 obj |
2093 | +572 0 obj |
2094 | (print\137memory\137stats) |
2095 | endobj |
2096 | -569 0 obj |
2097 | +573 0 obj |
2098 | << /S /GoTo /D (subsection.16.2.3) >> |
2099 | endobj |
2100 | -572 0 obj |
2101 | +576 0 obj |
2102 | (reset\137memory\137logs) |
2103 | endobj |
2104 | -573 0 obj |
2105 | +577 0 obj |
2106 | << /S /GoTo /D (section.16.3) >> |
2107 | endobj |
2108 | -576 0 obj |
2109 | +580 0 obj |
2110 | (Register diagnostics in the .stat file) |
2111 | endobj |
2112 | -577 0 obj |
2113 | -<< /S /GoTo /D [578 0 R /Fit ] >> |
2114 | +581 0 obj |
2115 | +<< /S /GoTo /D [582 0 R /Fit ] >> |
2116 | endobj |
2117 | -580 0 obj << |
2118 | -/Length 132 |
2119 | +584 0 obj << |
2120 | +/Length 131 |
2121 | /Filter /FlateDecode |
2122 | >> |
2123 | stream |
2124 | -xÚ3PHW0Ppç2 @;…pé»›+šëšš(„¤)ê™+˜Å,,,BR¢5ÜRsKòósŠ5u�L |
2125 | 4róJs4cC¼ š |
2126 | õ,MM�Àš-õLÌ-t-ÌôŒ- Z}‹4 |
2127 | -4’3 z-t ´‘�¡È |
2128 | '¹†p jJ)ã |
2129 | +xÚ3PHW0Ppç2 @;…pé»›+šëšš(„¤)ê™+˜Å,,,BR¢5ÜRsKòósŠ5u�L |
2130 | 4róJs4cC¼ š |
2131 | õ,MM�Àš�ôLŒLt-ÌôŒ- Zý“Kò“R‹ : |
2132 | Ít |
2133 | #C#�.r |
2134 | á Uú*+ |
2135 | endstream |
2136 | endobj |
2137 | -578 0 obj << |
2138 | -/Type /Page |
2139 | -/Contents 580 0 R |
2140 | -/Resources 579 0 R |
2141 | -/MediaBox [0 0 595.276 841.89] |
2142 | -/Parent 584 0 R |
2143 | ->> endobj |
2144 | -581 0 obj << |
2145 | -/D [578 0 R /XYZ 55.693 817.952 null] |
2146 | ->> endobj |
2147 | 582 0 obj << |
2148 | -/D [578 0 R /XYZ 56.693 785.197 null] |
2149 | ->> endobj |
2150 | -579 0 obj << |
2151 | -/Font << /F37 583 0 R >> |
2152 | +/Type /Page |
2153 | +/Contents 584 0 R |
2154 | +/Resources 583 0 R |
2155 | +/MediaBox [0 0 595.276 841.89] |
2156 | +/Parent 588 0 R |
2157 | +>> endobj |
2158 | +585 0 obj << |
2159 | +/D [582 0 R /XYZ 55.693 817.952 null] |
2160 | +>> endobj |
2161 | +586 0 obj << |
2162 | +/D [582 0 R /XYZ 56.693 785.197 null] |
2163 | +>> endobj |
2164 | +583 0 obj << |
2165 | +/Font << /F37 587 0 R >> |
2166 | /ProcSet [ /PDF /Text ] |
2167 | >> endobj |
2168 | -587 0 obj << |
2169 | +591 0 obj << |
2170 | /Length 68 |
2171 | /Filter /FlateDecode |
2172 | >> |
2173 | @@ -901,21 +907,21 @@ |
2174 | áÒw36W04г4°4TIS05Ó3³4V°00ѳ´4SIQˆÖ0ÒŒ |
2175 | ñâ2€jB§]C¸ ”ê' |
2176 | endstream |
2177 | endobj |
2178 | -586 0 obj << |
2179 | +590 0 obj << |
2180 | /Type /Page |
2181 | -/Contents 587 0 R |
2182 | -/Resources 585 0 R |
2183 | +/Contents 591 0 R |
2184 | +/Resources 589 0 R |
2185 | /MediaBox [0 0 595.276 841.89] |
2186 | -/Parent 584 0 R |
2187 | ->> endobj |
2188 | -588 0 obj << |
2189 | -/D [586 0 R /XYZ 55.693 817.952 null] |
2190 | ->> endobj |
2191 | -585 0 obj << |
2192 | -/Font << /F37 583 0 R >> |
2193 | +/Parent 588 0 R |
2194 | +>> endobj |
2195 | +592 0 obj << |
2196 | +/D [590 0 R /XYZ 55.693 817.952 null] |
2197 | +>> endobj |
2198 | +589 0 obj << |
2199 | +/Font << /F37 587 0 R >> |
2200 | /ProcSet [ /PDF /Text ] |
2201 | >> endobj |
2202 | -619 0 obj << |
2203 | +623 0 obj << |
2204 | /Length 1083 |
2205 | /Filter /FlateDecode |
2206 | >> |
2207 | @@ -929,1171 +935,1173 @@ |
2208 | :W7R›îr¿ïÀó+Å!ŠöÏA?¬§ÄLåÁn*ØþîåüâŽYŠ² |
2209 | endstream |
2210 | endobj |
2211 | -618 0 obj << |
2212 | +622 0 obj << |
2213 | /Type /Page |
2214 | -/Contents 619 0 R |
2215 | -/Resources 617 0 R |
2216 | +/Contents 623 0 R |
2217 | +/Resources 621 0 R |
2218 | /MediaBox [0 0 595.276 841.89] |
2219 | -/Parent 584 0 R |
2220 | -/Annots [ 589 0 R 590 0 R 591 0 R 592 0 R 593 0 R 594 0 R 595 0 R 596 0 R 597 0 R 598 0 R 599 0 R 600 0 R 601 0 R 602 0 R 603 0 R 604 0 R 605 0 R 606 0 R 607 0 R 608 0 R 609 0 R 610 0 R 611 0 R 612 0 R 613 0 R 614 0 R 615 0 R ] |
2221 | +/Parent 588 0 R |
2222 | +/Annots [ 593 0 R 594 0 R 595 0 R 596 0 R 597 0 R 598 0 R 599 0 R 600 0 R 601 0 R 602 0 R 603 0 R 604 0 R 605 0 R 606 0 R 607 0 R 608 0 R 609 0 R 610 0 R 611 0 R 612 0 R 613 0 R 614 0 R 615 0 R 616 0 R 617 0 R 618 0 R 619 0 R ] |
2223 | >> endobj |
2224 | -589 0 obj << |
2225 | +593 0 obj << |
2226 | /Type /Annot |
2227 | /Subtype /Link |
2228 | /Border[0 0 0]/H/I/C[1 0 0] |
2229 | /Rect [55.697 630.532 218.736 641.329] |
2230 | /A << /S /GoTo /D (part.1) >> |
2231 | >> endobj |
2232 | -590 0 obj << |
2233 | +594 0 obj << |
2234 | /Type /Annot |
2235 | /Subtype /Link |
2236 | /Border[0 0 0]/H/I/C[1 0 0] |
2237 | /Rect [55.697 597.791 246.448 610.436] |
2238 | /A << /S /GoTo /D (chapter.1) >> |
2239 | >> endobj |
2240 | -591 0 obj << |
2241 | +595 0 obj << |
2242 | /Type /Annot |
2243 | /Subtype /Link |
2244 | /Border[0 0 0]/H/I/C[1 0 0] |
2245 | /Rect [72.06 581.988 242.05 592.102] |
2246 | /A << /S /GoTo /D (section.1.1) >> |
2247 | >> endobj |
2248 | -592 0 obj << |
2249 | +596 0 obj << |
2250 | /Type /Annot |
2251 | /Subtype /Link |
2252 | /Border[0 0 0]/H/I/C[1 0 0] |
2253 | /Rect [72.06 563.544 220.212 573.658] |
2254 | /A << /S /GoTo /D (section.1.2) >> |
2255 | >> endobj |
2256 | -593 0 obj << |
2257 | +597 0 obj << |
2258 | /Type /Annot |
2259 | /Subtype /Link |
2260 | /Border[0 0 0]/H/I/C[1 0 0] |
2261 | /Rect [72.06 545.101 194.019 555.215] |
2262 | /A << /S /GoTo /D (section.1.3) >> |
2263 | >> endobj |
2264 | -594 0 obj << |
2265 | +598 0 obj << |
2266 | /Type /Annot |
2267 | /Subtype /Link |
2268 | /Border[0 0 0]/H/I/C[1 0 0] |
2269 | /Rect [72.06 523.756 206.498 536.772] |
2270 | /A << /S /GoTo /D (section.1.4) >> |
2271 | >> endobj |
2272 | -595 0 obj << |
2273 | +599 0 obj << |
2274 | /Type /Annot |
2275 | /Subtype /Link |
2276 | /Border[0 0 0]/H/I/C[1 0 0] |
2277 | /Rect [97.151 505.312 292.745 518.328] |
2278 | /A << /S /GoTo /D (subsection.1.4.1) >> |
2279 | >> endobj |
2280 | -596 0 obj << |
2281 | +600 0 obj << |
2282 | /Type /Annot |
2283 | /Subtype /Link |
2284 | /Border[0 0 0]/H/I/C[1 0 0] |
2285 | /Rect [97.151 486.869 343.014 499.885] |
2286 | /A << /S /GoTo /D (subsection.1.4.2) >> |
2287 | >> endobj |
2288 | -597 0 obj << |
2289 | +601 0 obj << |
2290 | /Type /Annot |
2291 | /Subtype /Link |
2292 | /Border[0 0 0]/H/I/C[1 0 0] |
2293 | /Rect [72.06 471.327 222.371 481.442] |
2294 | /A << /S /GoTo /D (section.1.5) >> |
2295 | >> endobj |
2296 | -598 0 obj << |
2297 | +602 0 obj << |
2298 | /Type /Annot |
2299 | /Subtype /Link |
2300 | /Border[0 0 0]/H/I/C[1 0 0] |
2301 | /Rect [55.697 438.459 274.735 451.191] |
2302 | /A << /S /GoTo /D (chapter.2) >> |
2303 | >> endobj |
2304 | -599 0 obj << |
2305 | +603 0 obj << |
2306 | /Type /Annot |
2307 | /Subtype /Link |
2308 | /Border[0 0 0]/H/I/C[1 0 0] |
2309 | /Rect [72.06 419.841 227.378 432.857] |
2310 | /A << /S /GoTo /D (section.2.1) >> |
2311 | >> endobj |
2312 | -600 0 obj << |
2313 | +604 0 obj << |
2314 | /Type /Annot |
2315 | /Subtype /Link |
2316 | /Border[0 0 0]/H/I/C[1 0 0] |
2317 | /Rect [97.151 401.397 214.059 414.413] |
2318 | /A << /S /GoTo /D (subsection.2.1.1) >> |
2319 | >> endobj |
2320 | -601 0 obj << |
2321 | +605 0 obj << |
2322 | /Type /Annot |
2323 | /Subtype /Link |
2324 | /Border[0 0 0]/H/I/C[1 0 0] |
2325 | /Rect [97.151 382.954 258.011 395.97] |
2326 | /A << /S /GoTo /D (subsection.2.1.2) >> |
2327 | >> endobj |
2328 | -602 0 obj << |
2329 | +606 0 obj << |
2330 | /Type /Annot |
2331 | /Subtype /Link |
2332 | /Border[0 0 0]/H/I/C[1 0 0] |
2333 | /Rect [72.06 367.412 307.788 377.527] |
2334 | /A << /S /GoTo /D (section.2.2) >> |
2335 | >> endobj |
2336 | -603 0 obj << |
2337 | +607 0 obj << |
2338 | /Type /Annot |
2339 | /Subtype /Link |
2340 | /Border[0 0 0]/H/I/C[1 0 0] |
2341 | /Rect [97.151 348.969 239.324 359.083] |
2342 | /A << /S /GoTo /D (subsection.2.2.1) >> |
2343 | >> endobj |
2344 | -604 0 obj << |
2345 | +608 0 obj << |
2346 | /Type /Annot |
2347 | /Subtype /Link |
2348 | /Border[0 0 0]/H/I/C[1 0 0] |
2349 | /Rect [55.697 318.806 224.641 328.833] |
2350 | /A << /S /GoTo /D (chapter.3) >> |
2351 | >> endobj |
2352 | -605 0 obj << |
2353 | +609 0 obj << |
2354 | /Type /Annot |
2355 | /Subtype /Link |
2356 | /Border[0 0 0]/H/I/C[1 0 0] |
2357 | /Rect [72.06 297.483 284.465 310.499] |
2358 | /A << /S /GoTo /D (section.3.1) >> |
2359 | >> endobj |
2360 | -606 0 obj << |
2361 | +610 0 obj << |
2362 | /Type /Annot |
2363 | /Subtype /Link |
2364 | /Border[0 0 0]/H/I/C[1 0 0] |
2365 | /Rect [72.06 279.039 232.844 292.055] |
2366 | /A << /S /GoTo /D (section.3.2) >> |
2367 | >> endobj |
2368 | -607 0 obj << |
2369 | +611 0 obj << |
2370 | /Type /Annot |
2371 | /Subtype /Link |
2372 | /Border[0 0 0]/H/I/C[1 0 0] |
2373 | /Rect [55.697 235.158 183.863 248.92] |
2374 | /A << /S /GoTo /D (part.2) >> |
2375 | >> endobj |
2376 | -608 0 obj << |
2377 | +612 0 obj << |
2378 | /Type /Annot |
2379 | /Subtype /Link |
2380 | /Border[0 0 0]/H/I/C[1 0 0] |
2381 | /Rect [55.697 208 233.728 218.027] |
2382 | /A << /S /GoTo /D (chapter.4) >> |
2383 | >> endobj |
2384 | -609 0 obj << |
2385 | +613 0 obj << |
2386 | /Type /Annot |
2387 | /Subtype /Link |
2388 | /Border[0 0 0]/H/I/C[1 0 0] |
2389 | /Rect [72.06 186.677 282.818 199.693] |
2390 | /A << /S /GoTo /D (section.4.1) >> |
2391 | >> endobj |
2392 | -610 0 obj << |
2393 | +614 0 obj << |
2394 | /Type /Annot |
2395 | /Subtype /Link |
2396 | /Border[0 0 0]/H/I/C[1 0 0] |
2397 | /Rect [72.06 168.233 256.691 181.249] |
2398 | /A << /S /GoTo /D (section.4.2) >> |
2399 | >> endobj |
2400 | -611 0 obj << |
2401 | +615 0 obj << |
2402 | /Type /Annot |
2403 | /Subtype /Link |
2404 | /Border[0 0 0]/H/I/C[1 0 0] |
2405 | /Rect [72.06 149.79 318.337 162.806] |
2406 | /A << /S /GoTo /D (section.4.3) >> |
2407 | >> endobj |
2408 | -612 0 obj << |
2409 | +616 0 obj << |
2410 | /Type /Annot |
2411 | /Subtype /Link |
2412 | /Border[0 0 0]/H/I/C[1 0 0] |
2413 | /Rect [55.697 120.718 131.62 132.555] |
2414 | /A << /S /GoTo /D (chapter.5) >> |
2415 | >> endobj |
2416 | -613 0 obj << |
2417 | +617 0 obj << |
2418 | /Type /Annot |
2419 | /Subtype /Link |
2420 | /Border[0 0 0]/H/I/C[1 0 0] |
2421 | /Rect [55.697 92.387 120.1 102.414] |
2422 | /A << /S /GoTo /D (chapter.6) >> |
2423 | >> endobj |
2424 | -614 0 obj << |
2425 | +618 0 obj << |
2426 | /Type /Annot |
2427 | /Subtype /Link |
2428 | /Border[0 0 0]/H/I/C[1 0 0] |
2429 | /Rect [72.06 71.064 277.701 84.08] |
2430 | /A << /S /GoTo /D (section.6.1) >> |
2431 | >> endobj |
2432 | -615 0 obj << |
2433 | +619 0 obj << |
2434 | /Type /Annot |
2435 | /Subtype /Link |
2436 | /Border[0 0 0]/H/I/C[1 0 0] |
2437 | /Rect [72.06 52.62 320.584 65.636] |
2438 | /A << /S /GoTo /D (section.6.2) >> |
2439 | >> endobj |
2440 | +624 0 obj << |
2441 | +/D [622 0 R /XYZ 55.693 817.952 null] |
2442 | +>> endobj |
2443 | +626 0 obj << |
2444 | +/D [622 0 R /XYZ 56.693 649.543 null] |
2445 | +>> endobj |
2446 | +621 0 obj << |
2447 | +/Font << /F50 625 0 R /F37 587 0 R >> |
2448 | +/ProcSet [ /PDF /Text ] |
2449 | +>> endobj |
2450 | +664 0 obj << |
2451 | +/Length 1339 |
2452 | +/Filter /FlateDecode |
2453 | +>> |
2454 | +stream |
2455 | +xÚíZËr£FÝë+XJU¡§ß�eâØ.Oeœd¬ÊÆ™†¶LŠ‡PÍÌߧy4 EÏ©‰-m |
2456 | 2¨�ÓçÞs/ |
2457 | �™�ÛÑ/ÓÑ»" |
2458 | �‚ |
2459 | +9Óg‡qÀq$¤@)îLçqL'Ÿ¦ïßÝ0²z#ÅpIÌ8Õ=W¿ßO¯ï§å#ØŒÍ_ädå‡òäãí`:—BRŽK LÖƒq@&.‚ |
2460 | ŽK}/š¸Øœ&i ›³Eü¤³0™u&s |
2461 | ]ÎùL\ák:P¥N6XD1 |
2462 | ¶…st‘„c |
2463 | ?mà¿zñ’Y t…»Ÿ¦ÙÉq&^¡óþdêU¢JBß |
2464 | v$�ÌòçÔq±‚КQbæø ó—>òT˜/Kd•HDsy»ö |
2465 | ‰.ù †üûVp^Ô':Ò±NŠ-2$Tœ«ÔÄžR 7hdžÙêË×ÓÑçj¾‚°¡È,.•¡J:~<zü�À\|ï@@”t¾T·ÆX”á8r |
2466 | F® |
2467 | í |
2468 | s.ª±(jBmñm®û?Epøz…ücÑA‹a |� F=åËFù7¡Ž‚-ÊWG)_¶Êÿk‚k¿0ñ¾ |
2469 | +�äöŸCˆ‡Ïôhžž^òÀp5¨]C²tØÐPQ_c |
2470 | x…×0a„;€žSu>š; -î±eëM¯Ò$/<› |
2471 | 7«��]4< |
2472 | 3hof¬m�¾èuŽµCÔÀ´y¡äô”0KÉDáq:O£t¶%]›V–a-�ÁÌÃ4TJž��< |
Hey, is this still up for review? There seems to be some commented out code and print statements in here...