Exodus 7.21

/exodus_for/test/testrd1.f
1 C Copyright (c) 2005-2017 National Technology & Engineering Solutions
2 C of Sandia, LLC (NTESS). Under the terms of Contract DE-NA0003525 with
3 C NTESS, the U.S. Government retains certain rights in this software.
4 C
5 C Redistribution and use in source and binary forms, with or without
6 C modification, are permitted provided that the following conditions are
7 C met:
8 C
9 C * Redistributions of source code must retain the above copyright
10 C notice, this list of conditions and the following disclaimer.
11 C
12 C * Redistributions in binary form must reproduce the above
13 C copyright notice, this list of conditions and the following
14 C disclaimer in the documentation and/or other materials provided
15 C with the distribution.
16 C
17 C * Neither the name of NTESS nor the names of its
18 C contributors may be used to endorse or promote products derived
19 C from this software without specific prior written permission.
20 C
21 C THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
22 C "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
23 C LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
24 C A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
25 C OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
26 C SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
27 C LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
28 C DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
29 C THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
30 C (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
31 C OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
32 C
33
34 program testrd1
35
36 c
37 c This is a test program for the Fortran binding of the EXODUS II
38 c database read routines
39 c
40 c 09/07/93 V.R. Yarberry - Modified for API 2.00
41 implicit none
42
43 include 'exodusII.inc'
44
45 integer iin, iout, ierr
46 integer exoid, num_dim, num_nodes, num_elem, num_elem_blk
47 integer num_node_sets
48 integer num_side_sets
49 integer i, j, k, elem_map(10), connect(10), node_list(100)
50 integer elem_list(100), side_list(100), ids(10), node_map(100)
51 integer num_elem_per_set(10), num_nodes_per_set(10)
52 integer num_df_per_set(10)
53 integer num_df_in_set, num_sides_in_set
54 integer df_ind(10),node_ind(10),elem_ind(10),num_qa_rec,num_info
55 integer num_glo_vars, num_nod_vars, num_ele_vars
56 integer truth_tab(3,7)
57 integer num_time_steps
58 integer num_elem_in_block(10), num_nodes_per_elem(10)
59 integer num_attr(10), node_ctr_list(10), node_ctr
60 integer num_nodes_in_set, num_elem_in_set
61 integer df_list_len, list_len, elem_list_len, node_list_len
62 integer node_num, time_step, var_index, beg_time, end_time
63 integer elem_num
64 integer cpu_ws,io_ws
65 integer num_props, prop_value, n_node_map, n_elem_map
66 integer ival
67
68 real time_value, time_values(100), var_values(100)
69 real x(100), y(100), z(100)
70 real attrib(100), dist_fact(100)
71 real vers
72
73 character*(MXSTLN) coord_names(3), qa_record(4,2), var_names(3)
74 character*(MXLNLN) inform(3), titl
75 character typ*(MXSTLN)
76 character*(MXSTLN) prop_names(3)
77 character*(MXSTLN) attrib_names(100)
78 data iin /5/, iout /6/
79
80 c call exopts (EXVRBS, ierr)
81 c write (iout, '(/"after exopts, error = ", i3)' ) ierr
82
83 c
84 c open EXODUS II files
85 c
86
87 cpu_ws = 0
88 io_ws = 0
89
90 exoid = exopen("test.exo", exread, cpu_ws, io_ws, vers, ierr)
91 write (iout, '(/"after exopen, error = ",i3)')
92 1 ierr
93
94 write (iout, '("test.exo is an EXODUSII file; version ",
95 1 f4.2)') vers
96 write (iout, '(" I/O word size",i2)') io_ws
97
98 c
99 c read database parameters
100 c
101
102 call exgini (exoid, titl, num_dim, num_nodes, num_elem,
103 1 num_elem_blk, num_node_sets, num_side_sets, ierr)
104 write (iout, '(/"after exgini, error = ", i3)' ) ierr
105
106 write (iout, '("database parameters:"/
107 1 "title = ", a81 /
108 2 "num_dim = ", i3 /
109 3 "num_nodes = ", i3 /
110 4 "num_elem = ", i3 /
111 5 "num_elem_blk = ", i3 /
112 6 "num_node_sets = ", i3 /
113 7 "num_side_sets = ", i3)')
114 8 titl,num_dim, num_nodes, num_elem,
115 9 num_elem_blk,num_node_sets, num_side_sets
116
117
118 c
119 c read nodal coordinates values and names from database
120 c
121
122 call exgcor (exoid, x, y, z, ierr)
123 write (iout, '(/"after exgcor, error = ", i3)' ) ierr
124
125 write (iout, '("x coords = ")')
126 do 10 i = 1, num_nodes
127 write (iout, '(f5.1)') x(i)
128 10 continue
129
130 write (iout, '("y coords = ")')
131 do 20 i = 1, num_nodes
132 write (iout, '(f5.1)') y(i)
133 20 continue
134
135 if (num_dim .gt. 2) then
136 write (iout, '("z coords = ")')
137 do 22 i = 1, num_nodes
138 write (iout, '(f5.1)') z(i)
139 22 continue
140 endif
141
142 call exgcon (exoid, coord_names, ierr)
143 write (iout, '(/"after exgcon, error = ", i3)' ) ierr
144
145 write (iout, '("x coord name = ", a9)') coord_names(1)
146 write (iout, '("y coord name = ", a9)') coord_names(2)
147
148 c
149 c read map parameters
150 c
151
152 call exgmp (exoid, n_node_map, n_elem_map, ierr)
153 write (iout, '(/"after exgmp, error = ", i3)' ) ierr
154
155 c
156 c read element maps
157 c
158
159 call exgpa (exoid, exemap, "ID", ids, ierr)
160 write (iout, '(/"after exgpa, error = ", i3)' ) ierr
161
162 do 26 j = 1,n_elem_map
163
164 call exgem (exoid, ids(j), elem_map, ierr)
165 write (iout, '(/"after exgem, error = ", i3)' ) ierr
166
167 write (iout, '(/"element map id = ", i3)' ) ids(j)
168
169 do 24 i = 1, num_elem
170 write (iout, '("elem_map(",i3,") = ", i3)') i, elem_map(i)
171 C .. test reading partial element maps...
172 call exgpem(exoid, ids(j), i, 1, ival, ierr)
173 if (ival .ne. elem_map(i)) then
174 write (iout, '("bad value found for map ",
175 * " element ", i3)') i, elem_map(i)
176 end if
177 24 continue
178
179 26 continue
180
181 c
182 c read element map properties
183 c
184
185 num_props = exinqi(exoid, exnemp)
186 write (iout,
187 1 '(/"There are ",i2," properties for each element map")')
188 2 num_props
189
190
191 call exgpn(exoid, exemap, prop_names, ierr)
192 write (iout, '("after exgpn, error = ", i3)' ) ierr
193
194 do 30 i = 1, num_props
195 do 28 j = 1, n_elem_map
196 call exgp(exoid, exemap,ids(j),prop_names(i),prop_value,ierr)
197 if (ierr .eq. 0) then
198 write( iout,
199 1 '("elem map ",i2," property(",i2,"): ",a," = ",i5)' )
200 2 j, i, prop_names(i), prop_value
201 else
202 write (iout, '(/"after exgp, error = ", i3)' ) ierr
203 endif
204 28 continue
205 30 continue
206
207 c
208 c read node maps
209 c
210
211 call exgpa (exoid, exnmap, "ID", ids, ierr)
212 write (iout, '(/"after exgpa, error = ", i3)' ) ierr
213
214 do 34 j = 1,n_node_map
215
216 call exgnm (exoid, ids(j), node_map, ierr)
217 write (iout, '(/"after exgnm, error = ", i3)' ) ierr
218
219 write (iout, '(/"node map id = ", i3)' ) ids(j)
220
221 do 32 i = 1, num_nodes
222 write (iout, '("node_map(",i3,") = ", i3)') i, node_map(i)
223 32 continue
224
225 34 continue
226
227 c
228 c read node map properties
229 c
230
231 num_props = exinqi(exoid, exnnmp)
232 write (iout,
233 1 '(/"There are ",i2," properties for each node map")')
234 2 num_props
235
236
237 call exgpn(exoid, exnmap, prop_names, ierr)
238 write (iout, '("after exgpn, error = ", i3)' ) ierr
239
240 do 38 i = 1, num_props
241 do 36 j = 1, n_node_map
242 call exgp(exoid, exnmap,ids(j),prop_names(i),prop_value,ierr)
243 if (ierr .eq. 0) then
244 write( iout,
245 1 '("node map ",i2," property(",i2,"): ",a," = ",i5)' )
246 2 j, i, prop_names(i), prop_value
247 else
248 write (iout, '(/"after exgp, error = ", i3)' ) ierr
249 endif
250 36 continue
251 38 continue
252
253 c
254 c read element block parameters
255 c
256 c
257 call exgebi (exoid, ids, ierr)
258 write (iout, '(/"after exgebi, error = ", i3)' ) ierr
259
260 do 40 i = 1, num_elem_blk
261
262 call exgelb (exoid, ids(i), typ, num_elem_in_block(i),
263 1 num_nodes_per_elem(i), num_attr(i), ierr)
264 write (iout, '(/"after exgelb, error = ", i3)' ) ierr
265
266 write (iout, '("element block id = ", i2,/
267 1 "element type = ", a9,/
268 2 "num_elem_in_block = ", i2,/
269 3 "num_nodes_per_elem = ", i2,/
270 4 "num_attr = ", i2)')
271 5 ids(i), typ, num_elem_in_block(i),
272 6 num_nodes_per_elem(i), num_attr(i)
273
274 40 continue
275
276 c read element block properties
277
278 num_props = exinqi(exoid, exnebp)
279 write (iout,
280 1 '(/"There are ",i2," properties for each element block")')
281 2 num_props
282
283
284 call exgpn(exoid, exeblk, prop_names, ierr)
285 write (iout, '("after exgpn, error = ", i3)' ) ierr
286
287 do 47 i = 1, num_props
288 do 45 j = 1, num_elem_blk
289 call exgp(exoid, exeblk,ids(j),prop_names(i),prop_value,ierr)
290 if (ierr .eq. 0) then
291 write( iout,
292 1 '("elem block ",i2," property(",i2,"): ",a," = ",i5)' )
293 2 j, i, prop_names(i), prop_value
294 else
295 write (iout, '(/"after exgp, error = ", i3)' ) ierr
296 endif
297 45 continue
298 47 continue
299
300 c
301 c read element connectivity
302 c
303
304 do 60 i = 1, num_elem_blk
305
306 call exgelc (exoid, ids(i), connect, ierr)
307 write (iout, '(/"after exgelc, error = ", i3)' ) ierr
308
309 write (iout, '("connect array for elem block ", i2)') ids(i)
310
311 do 50 j = 1, num_nodes_per_elem(i)
312 write (iout, '(i3)') connect(j)
313 50 continue
314
315 60 continue
316
317 c
318 c read element block attributes
319 c
320
321 do 70 i = 1, num_elem_blk
322
323 call exgeat (exoid, ids(i), attrib, ierr)
324 write (iout, '(/"after exgeat, error = ", i3)' ) ierr
325
326 call exgean (exoid, ids(i), num_attr(i), attrib_names, ierr)
327 write (iout, '(/"after exgean, error = ", i3)' ) ierr
328
329 write (iout,
330 * '("element block ", i2, " has ",i2," attribute(s) and ",
331 * i2, " element(s):")')
332 1 ids(i), num_attr(i), num_elem_in_block(i)
333 do j=1, num_attr(i)
334 write (iout, 69) attrib_names(j),
335 * (attrib(k),k= j, num_attr(i)*num_elem_in_block(i),
336 * num_attr(i))
337 end do
338 69 format(a32," = ", 10(f6.4,2x))
339 70 continue
340
341 c
342 c read individual node sets
343 c
344 if (num_node_sets .gt. 0) then
345 call exgnsi (exoid, ids, ierr)
346 write (iout, '(/"after exgnsi, error = ", i3)' ) ierr
347 endif
348
349 do 100 i = 1, num_node_sets
350
351 call exgnp (exoid, ids(i), num_nodes_in_set,
352 1 num_df_in_set, ierr)
353 write (iout, '(/"after exgnp, error = ", i3)' ) ierr
354
355 write (iout, '(/"node set ", i2, " parameters: ",/
356 2 "num_nodes = ", i2)') ids(i), num_nodes_in_set
357
358 call exgns (exoid, ids(i), node_list, ierr)
359 write (iout, '(/"after exgns, error = ", i3)' ) ierr
360
361 if (num_df_in_set .gt. 0) then
362 call exgnsd (exoid, ids(i), dist_fact, ierr)
363 write (iout, '(/"after exgnsd, error = ", i3)' ) ierr
364 endif
365
366 write (iout, '(/"node list for node set ", i2)') ids(i)
367
368 do 80 j = 1, num_nodes_in_set
369 write (iout, '(i3)') node_list(j)
370 80 continue
371
372 if (num_df_in_set .gt. 0) then
373 write (iout, '("dist factors for node set ", i2)') ids(i)
374 do 90 j = 1, num_nodes_in_set
375 write (iout, '(f5.2)') dist_fact(j)
376 90 continue
377 else
378 write (iout, '("no dist factors for node set ", i2)') ids(i)
379 endif
380
381 100 continue
382
383 c read node set properties
384
385 num_props = exinqi(exoid, exnnsp)
386 write (iout,
387 1 '(/"There are ",i2," properties for each node set")')
388 2 num_props
389
390
391 call exgpn(exoid, exnset, prop_names, ierr)
392 write (iout, '("after exgpn, error = ", i3)' ) ierr
393
394 do 107 i = 1, num_props
395 do 105 j = 1, num_node_sets
396 call exgp(exoid,exnset,ids(j),prop_names(i),prop_value,ierr)
397 if (ierr .eq. 0) then
398 write( iout,
399 1 '("node set ",i2," property(",i2,"): ",a," = ",i5)' )
400 2 j, i, prop_names(i), prop_value
401 else
402 write (iout, '(/"after exgp, error = ", i3)' ) ierr
403 endif
404 105 continue
405 107 continue
406
407 c
408 c read concatenated node sets; this produces the same information as
409 c the above code which reads individual node sets
410 c
411 num_node_sets = exinqi(exoid, exnods)
412 if (num_node_sets .gt. 0) then
413 list_len = exinqi(exoid, exnsnl)
414 write(iout,'(/"after EXNSNL =",i3," exinq, error = ",i3)')
415 1 list_len,ierr
416
417 list_len = exinqi(exoid, exnsdf)
418 write(iout,'(/"after EXNSDF =",i3," exinq, error = ",i3)')
419 1 list_len,ierr
420
421 call exgcns (exoid, ids, num_nodes_per_set, num_df_per_set,
422 1 node_ind, df_ind, node_list, dist_fact, ierr)
423 write (iout, '(/"after exgcns, error = ", i3)' ) ierr
424
425 write (iout, '(/"concatenated node set info")')
426
427 write (iout, '("ids = ")')
428
429 do 110 i = 1, num_node_sets
430 write (iout, '(i3)') ids(i)
431 110 continue
432
433 write (iout, '("num_nodes_per_set = ")')
434
435 do 120 i = 1, num_node_sets
436 write (iout, '(i3)') num_nodes_per_set(i)
437 120 continue
438
439 write (iout, '("node_ind = ")')
440
441 do 130 i = 1, num_node_sets
442 write (iout, '(i3)') node_ind(i)
443 130 continue
444
445 write (iout, '("node_list = ")')
446
447 do 140 i = 1, list_len
448 write (iout, '(i3)') node_list(i)
449 140 continue
450
451 write (iout, '("dist_fact = ")')
452
453 do 150 i = 1, list_len
454 write (iout, '(f5.3)') dist_fact(i)
455 150 continue
456 endif
457
458 c
459 c read individual side sets
460 c
461 if (num_side_sets .gt. 0) then
462 call exgssi (exoid, ids, ierr)
463 write (iout, '(/"after exgssi, error = ", i3)' ) ierr
464 endif
465
466 do 190 i = 1, num_side_sets
467
468 call exgsp (exoid, ids(i), num_sides_in_set, num_df_in_set,
469 1 ierr)
470 write (iout, '(/"after exgsp, error = ", i3)' ) ierr
471
472 write (iout, '("side set ", i2, " parameters:",/
473 2 "num_sides = ", i3,/
474 3 "num_dist_factors = ", i3)')
475 4 ids(i), num_sides_in_set, num_df_in_set
476
477 call exgss (exoid, ids(i), elem_list, side_list, ierr)
478 write (iout, '(/"after exgss, error = ", i3)' ) ierr
479
480 call exgssn (exoid, ids(i), node_ctr_list, node_list, ierr)
481 write (iout, '(/"after exgssn, error = ", i3)' ) ierr
482
483 if (num_df_in_set .gt. 0) then
484 call exgssd (exoid, ids(i), dist_fact, ierr)
485 write (iout, '(/"after exgssd, error = ", i3)' ) ierr
486 endif
487
488 write (iout, '(/"element list for side set ", i2)') ids(i)
489
490 num_elem_in_set = num_sides_in_set
491 do 160 j = 1, num_elem_in_set
492 write (iout, '(i3)') elem_list(j)
493 160 continue
494
495 write (iout, '("side list for side set ", i2)') ids(i)
496
497 do 170 j = 1, num_sides_in_set
498 write (iout, '(i3)') side_list(j)
499 170 continue
500
501 node_ctr = 0
502 write (iout, '("node list for side set ", i2)') ids(i)
503 do 178 k=1, num_elem_in_set
504 do 175 j=1, node_ctr_list(k)
505 write (iout, '(i3)') node_list(j+node_ctr)
506 175 continue
507 node_ctr = node_ctr+node_ctr_list(k)
508 178 continue
509
510 if (num_df_in_set .gt. 0) then
511 write (iout, '("dist factors for side set ", i2)') ids(i)
512 do 180 j = 1, num_df_in_set
513 write (iout, '(f6.3)') dist_fact(j)
514 180 continue
515 else
516 write (iout, '("no dist factors for side set ", i2)') ids(i)
517 endif
518
519 190 continue
520
521 c read side set properties
522
523 num_props = exinqi(exoid, exnssp)
524 write (iout,
525 1 '(/"There are ",i2," properties for each side set")')
526 2 num_props
527
528
529 call exgpn(exoid, exsset, prop_names, ierr)
530 write (iout, '("after exgpn, error = ", i3)' ) ierr
531
532 do 197 i = 1, num_props
533 do 195 j = 1, num_side_sets
534 call exgp(exoid, exsset,ids(j),prop_names(i),prop_value,ierr)
535 if (ierr .eq. 0) then
536 write( iout,
537 1 '("side set ",i2," property(",i2,"): ",a," = ",i5)' )
538 2 j, i, prop_names(i), prop_value
539 else
540 write (iout, '(/"after exgp, error = ", i3)' ) ierr
541 endif
542 195 continue
543 197 continue
544
545 num_side_sets = exinqi(exoid, exsids)
546 write (iout, '(/"after exinq: EXSIDS =",i3,", error = ",i3)')
547 1 num_side_sets,ierr
548
549 if (num_side_sets .gt. 0) then
550 elem_list_len = exinqi(exoid, exssel)
551 write (iout, '(/"after exinq: EXSSEL =",i3,", error = ",i3)')
552 1 elem_list_len,ierr
553
554 node_list_len = exinqi(exoid, exssnl)
555 write (iout, '(/"after exinq: EXSSNL =",i3,", error = ",i3)')
556 1 node_list_len,ierr
557
558 df_list_len = exinqi(exoid, exssdf)
559 write (iout, '(/"after exinq: EXSSDF =",i3,", error = ",i3)')
560 1 df_list_len,ierr
561 c
562 c read concatenated side sets; this produces the same information as
563 c the above code which reads individual side sets
564 c
565 call exgcss (exoid, ids, num_elem_per_set, num_df_per_set,
566 1 elem_ind, df_ind, elem_list, side_list, dist_fact,
567 2 ierr)
568 write (iout, '(/"after exgcss, error = ", i3)' ) ierr
569
570 write (iout, '("concatenated side set info")')
571
572 write (iout, '("ids = ")')
573
574 do 200 i = 1, num_side_sets
575 write (iout, '(i3)') ids(i)
576 200 continue
577
578 write (iout, '("num_elem_per_set = ")')
579
580 do 210 i = 1, num_side_sets
581 write (iout, '(i3)') num_elem_per_set(i)
582 210 continue
583
584 write (iout, '("num_df_per_set = ")')
585
586 do 220 i = 1, num_side_sets
587 write (iout, '(i3)') num_df_per_set(i)
588 220 continue
589
590 write (iout, '("elem_ind = ")')
591
592 do 230 i = 1, num_side_sets
593 write (iout, '(i3)') elem_ind(i)
594 230 continue
595
596 write (iout, '("df_ind = ")')
597
598 do 240 i = 1, num_side_sets
599 write (iout, '(i3)') df_ind(i)
600 240 continue
601
602 write (iout, '("elem_list = ")')
603
604 do 250 i = 1, elem_list_len
605 write (iout, '(i3)') elem_list(i)
606 250 continue
607
608 write (iout, '("side_list = ")')
609
610 do 260 i = 1, elem_list_len
611 write (iout, '(i3)') side_list(i)
612 260 continue
613
614 write (iout, '("dist_fact = ")')
615
616 do 270 i = 1, df_list_len
617 write (iout, '(f6.3)') dist_fact(i)
618 270 continue
619 endif
620
621 c
622 c read QA records
623 c
624 num_qa_rec = exinqi(exoid, exqa)
625 call exgqa (exoid, qa_record, ierr)
626 write (iout, '(/"after exgqa, error = ", i3)' ) ierr
627
628 write (iout, '("QA records = ")')
629
630 do 290 i = 1, num_qa_rec
631 do 280 j = 1, 4
632 write (iout, '(a)') qa_record(j,i)
633 280 continue
634 290 continue
635
636 c
637 c read information records
638 c
639 num_info = exinqi(exoid, exinfo)
640 call exginf (exoid, inform, ierr)
641 write (iout, '(/"after exginf, error = ", i3)' ) ierr
642
643 write (iout, '("info records = ")')
644
645 do 300 i = 1, num_info
646 write (iout, '(a81)') inform(i)
647 300 continue
648
649 c
650 c read global variables parameters and names
651 c
652 call exgvp (exoid, "g", num_glo_vars, ierr)
653 write (iout, '(/"after exgvp, error = ", i3)' ) ierr
654
655 call exgvnm (exoid, "g", 1, var_names(1), ierr)
656 write (iout, '(/"after exgvnm, error = ", i3)' ) ierr
657
658 write (iout, '("There are ",i2," global variables; their names ",
659 1 "are :")') num_glo_vars
660
661 do 320 i = 1, num_glo_vars
662 write (iout, '(a9)') var_names(i)
663 320 continue
664
665 c
666 c read nodal variables parameters and names
667 c
668 call exgvp (exoid, "n", num_nod_vars, ierr)
669 write (iout, '(/"after exgvp, error = ", i3)' ) ierr
670
671 call exgvan (exoid, "n", num_nod_vars, var_names, ierr)
672 write (iout, '(/"after exgvan, error = ", i3)' ) ierr
673
674 write (iout, '("There are ",i2," nodal variables; their names ",
675 1 "are :")') num_nod_vars
676
677 do 330 i = 1, num_nod_vars
678 write (iout, '(a9)') var_names(i)
679 330 continue
680
681 c
682 c read element variables parameters and names
683 c
684 call exgvp (exoid, "e", num_ele_vars, ierr)
685 write (iout, '(/"after exgvp, error = ", i3)' ) ierr
686
687 call exgvan (exoid, "e", num_ele_vars, var_names, ierr)
688 write (iout, '(/"after exgvan, error = ", i3)' ) ierr
689
690 write (iout, '("There are ",i2," element variables; their names ",
691 1 "are :")') num_ele_vars
692
693 do 340 i = 1, num_ele_vars
694 write (iout, '(a9)') var_names(i)
695 340 continue
696
697 c
698 c read element variable truth table
699 c
700 call exgvtt (exoid, num_elem_blk, num_ele_vars, truth_tab, ierr)
701 write (iout, '(/"after exgvtt, error = ", i3)' ) ierr
702
703 write (iout, '("This is the element variable truth table:")')
704
705 do 360 i = 1, num_elem_blk
706 do 350 j = 1, num_ele_vars
707 write (iout, '(i2)') truth_tab(j,i)
708 350 continue
709 360 continue
710
711 c
712 c determine how many time steps are stored
713 c
714 num_time_steps = exinqi(exoid, extims)
715 write (iout, '("There are ",i2," time steps in the database.")')
716 1 num_time_steps
717 c
718 c read time value at one time step
719 c
720 time_step = 3
721 call exgtim (exoid, time_step, time_value, ierr)
722 write (iout, '(/"after exgtim, error = ", i3)' ) ierr
723
724 write (iout, '("time value at time step ",i2," = ", f5.3)')
725 1 time_step, time_value
726 c
727 c read time values at all time steps
728 c
729 call exgatm (exoid, time_values, ierr)
730 write (iout, '(/"after exgatm, error = ", i3)' ) ierr
731
732 write (iout, '("time values at all time steps are:")')
733
734 do 370 i = 1, num_time_steps
735 write (iout, '(f5.3)') time_values(i)
736 370 continue
737
738 var_index = 1
739 beg_time = 1
740 end_time = -1
741 c
742 c read all global variables at one time step
743 c
744 call exggv (exoid, time_step, num_glo_vars, var_values, ierr)
745 write (iout, '(/"after exggv, error = ", i3)' ) ierr
746
747 write (iout, '("global variable values at time step ",i2)')
748 1 time_step
749
750 do 400 i = 1, num_glo_vars
751 write (iout, '(f5.3)') var_values(i)
752 400 continue
753
754 c
755 c read a single global variable through time
756 c
757 call exggvt (exoid, var_index, beg_time, end_time, var_values,
758 1 ierr)
759 write (iout, '(/"after exggvt, error = ", i3)' ) ierr
760
761 write (iout, '("global variable ",i2," values through time:")')
762 1 var_index
763
764 do 410 i = 1, num_time_steps
765 write (iout, '(f5.3)') var_values(i)
766 410 continue
767
768 c
769 c read a nodal variable at one time step
770 c
771 call exgnv (exoid, time_step, var_index, num_nodes, var_values,
772 1 ierr)
773 write (iout, '(/"after exgnv, error = ", i3)' ) ierr
774
775 write (iout, '("nodal variable ",i2," values at time step ",i2)')
776 1 var_index, time_step
777
778 do 420 i = 1, num_nodes
779 write (iout, '(f5.3)') var_values(i)
780 420 continue
781
782 c
783 c read a nodal variable through time
784 c
785 node_num = 1
786
787 call exgnvt (exoid, var_index, node_num, beg_time, end_time,
788 1 var_values, ierr)
789 write (iout, '(/"after exgnvt, error = ", i3)' ) ierr
790
791 write (iout, '("nodal variable ",i2," values for node ",i2,
792 1 " through time:")') var_index, node_num
793
794 do 430 i = 1, num_time_steps
795 write (iout, '(f5.3)') var_values(i)
796 430 continue
797
798 c
799 c read an element variable at one time step
800 c
801 call exgebi (exoid, ids, ierr)
802 write (iout, '(/"after exgebi, error = ", i3)' ) ierr
803
804 do 450 i = 1, num_elem_blk
805
806 call exgev (exoid, time_step, var_index, ids(i),
807 1 num_elem_in_block(i), var_values, ierr)
808 write (iout, '(/"after exgev, error = ", i3)' ) ierr
809
810 if (ierr .eq. 0) then
811 write (iout, '("element variable ",i2," values of element ",
812 1 "block ",i2," at time step ",i2)')
813 2 var_index, ids(i), time_step
814 endif
815
816 do 440 j = 1, num_elem_in_block(i)
817 write (iout, '(f6.3)') var_values(j)
818 440 continue
819
820 450 continue
821
822 c
823 c read an element variable through time
824 c
825 var_index = 2
826 elem_num = 2
827
828 call exgevt (exoid, var_index, elem_num, beg_time, end_time,
829 1 var_values, ierr)
830 write (iout, '(/"after exgevt, error = ", i3)' ) ierr
831
832 write (iout, '("element variable ",i2," values for element ",i2,
833 1 " through time:")') var_index, elem_num
834
835 do 460 i = 1, num_time_steps
836 write (iout, '(f5.3)') var_values(i)
837 460 continue
838
839 call exclos (exoid, ierr)
840 write (iout, '(/"after exclos, error = ", i3)' ) ierr
841
842 stop
843 end
844