Exodus 7.21

/exodus_for/test/testrd.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 testrd
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(5), connect(10), node_list(100)
50 integer elem_list(100), side_list(100), ids(10)
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,5)
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, mod_sz
65 integer num_props, prop_value
66 integer mxalnmlen, mxusnmlen
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*(MXSTLN) name
75 character*(MXSTLN) blk_names(5)
76 character*(MXSTLN) nset_names(2)
77 character*(MXSTLN) sset_names(5)
78 character*(MXLNLN) inform(3), titl
79 character typ*(MXSTLN)
80 character*(MXSTLN) prop_names(3)
81 character*(MXSTLN) attrib_names(100)
82
83 data iin /5/, iout /6/
84
85
86 c
87 c open EXODUS II files
88 c
89
90 cpu_ws = 0
91 io_ws = 0
92
93 exoid = excre("test.exo", exnocl, cpu_ws, io_ws, ierr)
94
95 exoid = exopen("test.exo", exread, cpu_ws, io_ws, vers, ierr)
96 write (iout, '(/"after exopen, error = ",i3)')
97 1 ierr
98
99 write (iout, '("test.exo is an EXODUSII file; version ",
100 1 f4.2)') vers
101 write (iout, '(" I/O word size",i2)') io_ws
102
103 mod_sz = exlgmd(exoid)
104 write (iout, '(" Model Size",i2)') mod_sz
105
106 num_props = exinqi(exoid, exnebp)
107 mxalnmlen = exinqi(exoid, exdbmxalnm)
108 mxusnmlen = exinqi(exoid, exdbmxusnm)
109 write (iout, '(" Maximum Allowed/Used DB Name Size ",i4,i4)')
110 * mxalnmlen, mxusnmlen
111
112 c
113 c read database parameters
114 c
115
116 call exgini (exoid, titl, num_dim, num_nodes, num_elem,
117 1 num_elem_blk, num_node_sets, num_side_sets, ierr)
118 write (iout, '(/"after exgini, error = ", i3)' ) ierr
119
120 write (iout, '("database parameters:"/
121 1 "title = ", a81 /
122 2 "num_dim = ", i3 /
123 3 "num_nodes = ", i3 /
124 4 "num_elem = ", i3 /
125 5 "num_elem_blk = ", i3 /
126 6 "num_node_sets = ", i3 /
127 7 "num_side_sets = ", i3)')
128 8 titl,num_dim, num_nodes, num_elem,
129 9 num_elem_blk,num_node_sets, num_side_sets
130
131
132 c
133 c read nodal coordinates values and names from database
134 c
135
136 call exgcor (exoid, x, y, z, ierr)
137 write (iout, '(/"after exgcor, error = ", i3)' ) ierr
138
139 write (iout, '("x coords = ")')
140 do 10 i = 1, num_nodes
141 write (iout, '(f5.1)') x(i)
142 10 continue
143
144 write (iout, '("y coords = ")')
145 do 20 i = 1, num_nodes
146 write (iout, '(f5.1)') y(i)
147 20 continue
148
149 if (num_dim .gt. 2) then
150 write (iout, '("z coords = ")')
151 do 22 i = 1, num_nodes
152 write (iout, '(f5.1)') z(i)
153 22 continue
154 endif
155
156 call exgcon (exoid, coord_names, ierr)
157 write (iout, '(/"after exgcon, error = ", i3)' ) ierr
158
159 write (iout, '("x coord name = ", a9)') coord_names(1)
160 write (iout, '("y coord name = ", a9)') coord_names(2)
161
162 c
163 c read element order map
164 c
165
166 call exgmap (exoid, elem_map, ierr)
167 write (iout, '(/"after exgmap, error = ", i3)' ) ierr
168
169 do 30 i = 1, num_elem
170 write (iout, '("elem_map(",i1,") = ", i1)') i, elem_map(i)
171 30 continue
172
173 c
174 c read element block parameters
175 c
176 c
177 call exgebi (exoid, ids, ierr)
178 write (iout, '(/"after exgebi, error = ", i3)' ) ierr
179
180 do 40 i = 1, num_elem_blk
181
182 call exgelb (exoid, ids(i), typ, num_elem_in_block(i),
183 1 num_nodes_per_elem(i), num_attr(i), ierr)
184 write (iout, '(/"after exgelb, error = ", i3)' ) ierr
185
186 call exgnam (exoid, exeblk, ids(i), name, ierr)
187 write (iout, '("element block id = ", i2,/
188 1 "element type = ", a9,/
189 * "block name = ", a32,/
190 2 "num_elem_in_block = ", i2,/
191 3 "num_nodes_per_elem = ", i2,/
192 4 "num_attr = ", i2)')
193 5 ids(i), typ, name,
194 * num_elem_in_block(i),
195 6 num_nodes_per_elem(i), num_attr(i)
196
197 40 continue
198
199 c read element block properties */
200
201 num_props = exinqi(exoid, exnebp)
202 write (iout,
203 1 '(/"There are ",i2," properties for each element block")')
204 2 num_props
205
206
207 call exgpn(exoid, exeblk, prop_names, ierr)
208 write (iout, '("after exgpn, error = ", i3)' ) ierr
209
210 do 47 i = 1, num_props
211 do 45 j = 1, num_elem_blk
212 call exgp(exoid, exeblk,ids(j),prop_names(i),prop_value,ierr)
213 if (ierr .eq. 0) then
214 write( iout,
215 1 '("elem block ",i2," property(",i2,"): ",a," = ",i5)' )
216 2 j, i, prop_names(i), prop_value
217 else
218 write (iout, '(/"after exgp, error = ", i3)' ) ierr
219 endif
220 45 continue
221 47 continue
222
223 c
224 c read element connectivity
225 c
226
227 do 60 i = 1, num_elem_blk
228
229 call exgelc (exoid, ids(i), connect, ierr)
230 write (iout, '(/"after exgelc, error = ", i3)' ) ierr
231
232 write (iout, '("connect array for elem block ", i2)') ids(i)
233
234 do 50 j = 1, num_nodes_per_elem(i)
235 write (iout, '(i3)') connect(j)
236 50 continue
237
238 60 continue
239
240 c
241 c read element block names
242 c
243 call exgnams(exoid, exeblk, num_elem_blk, blk_names, ierr)
244 write (iout, '(/"after exgnams, error = ", i3)' ) ierr
245 do i=1, num_elem_blk
246 write (iout, '("element block ",i2," name: ",a)' )
247 2 i, blk_names(i)
248 end do
249
250 c
251 c read element block attributes
252 c
253
254 do 70 i = 1, num_elem_blk
255
256 call exgeat (exoid, ids(i), attrib, ierr)
257 write (iout, '(/"after exgeat, error = ", i3)' ) ierr
258
259 call exgean (exoid, ids(i), num_attr(i), attrib_names, ierr)
260 write (iout, '(/"after exgean, error = ", i3)' ) ierr
261
262 write (iout,
263 * '("element block ", i2, " has ",i2," attribute(s) and ",
264 * i2, " element(s):")')
265 * ids(i), num_attr(i), num_elem_in_block(i)
266 do j=1, num_attr(i)
267 write (iout, 69) attrib_names(j),
268 * (attrib(k),k= j, num_attr(i)*num_elem_in_block(i),
269 * num_attr(i))
270 end do
271 69 format(a32," = ", 10(f6.4,2x))
272 70 continue
273
274 c
275 c read individual node sets
276 c
277 if (num_node_sets .gt. 0) then
278 call exgnsi (exoid, ids, ierr)
279 write (iout, '(/"after exgnsi, error = ", i3)' ) ierr
280 endif
281
282 do 100 i = 1, num_node_sets
283
284 call exgnp (exoid, ids(i), num_nodes_in_set,
285 1 num_df_in_set, ierr)
286 write (iout, '(/"after exgnp, error = ", i3)' ) ierr
287
288 write (iout, '(/"node set ", i2, " parameters: ",/
289 2 "num_nodes = ", i2)') ids(i), num_nodes_in_set
290
291 call exgns (exoid, ids(i), node_list, ierr)
292 write (iout, '(/"after exgns, error = ", i3)' ) ierr
293
294 if (num_df_in_set .gt. 0) then
295 call exgnsd (exoid, ids(i), dist_fact, ierr)
296 write (iout, '(/"after exgnsd, error = ", i3)' ) ierr
297 endif
298
299 write (iout, '(/"node list for node set ", i2)') ids(i)
300
301 do 80 j = 1, num_nodes_in_set
302 write (iout, '(i3)') node_list(j)
303 80 continue
304
305 if (num_df_in_set .gt. 0) then
306 write (iout, '("dist factors for node set ", i2)') ids(i)
307 do 90 j = 1, num_nodes_in_set
308 write (iout, '(f5.2)') dist_fact(j)
309 90 continue
310 else
311 write (iout, '("no dist factors for node set ", i2)') ids(i)
312 endif
313
314 100 continue
315
316 c
317 c read node set names
318 c
319 call exgnams(exoid, exnset, num_node_sets, nset_names, ierr)
320 write (iout, '(/"after exgnams, error = ", i3)' ) ierr
321 do i=1, num_node_sets
322 write (iout, '("node set ",i2," name: ",a)' )
323 2 i, nset_names(i)
324 end do
325
326
327 c read node set properties
328
329 num_props = exinqi(exoid, exnnsp)
330 write (iout,
331 1 '(/"There are ",i2," properties for each node set")')
332 2 num_props
333
334
335 call exgpn(exoid, exnset, prop_names, ierr)
336 write (iout, '("after exgpn, error = ", i3)' ) ierr
337
338 do 107 i = 1, num_props
339 do 105 j = 1, num_node_sets
340 call exgp(exoid,exnset,ids(j),prop_names(i),prop_value,ierr)
341 if (ierr .eq. 0) then
342 write( iout,
343 1 '("node set ",i2," property(",i2,"): ",a," = ",i5)' )
344 2 j, i, prop_names(i), prop_value
345 else
346 write (iout, '(/"after exgp, error = ", i3)' ) ierr
347 endif
348 105 continue
349 107 continue
350
351 c
352 c read concatenated node sets; this produces the same information as
353 c the above code which reads individual node sets
354 c
355 num_node_sets = exinqi(exoid, exnods)
356
357 if (num_node_sets .gt. 0) then
358 list_len = exinqi(exoid, exnsnl)
359 write(iout,'(/"after EXNSNL =",i3," exinq, error = ",i3)')
360 1 list_len,ierr
361
362 list_len = exinqi(exoid, exnsdf)
363 write(iout,'(/"after EXNSDF =",i3," exinq, error = ",i3)')
364 1 list_len,ierr
365
366 call exgcns (exoid, ids, num_nodes_per_set, num_df_per_set,
367 1 node_ind, df_ind, node_list, dist_fact, ierr)
368 write (iout, '(/"after exgcns, error = ", i3)' ) ierr
369
370 write (iout, '(/"concatenated node set info")')
371
372 write (iout, '("ids = ")')
373
374 do 110 i = 1, num_node_sets
375 write (iout, '(i3)') ids(i)
376 110 continue
377
378 write (iout, '("num_nodes_per_set = ")')
379
380 do 120 i = 1, num_node_sets
381 write (iout, '(i3)') num_nodes_per_set(i)
382 120 continue
383
384 write (iout, '("node_ind = ")')
385
386 do 130 i = 1, num_node_sets
387 write (iout, '(i3)') node_ind(i)
388 130 continue
389
390 write (iout, '("node_list = ")')
391
392 do 140 i = 1, list_len
393 write (iout, '(i3)') node_list(i)
394 140 continue
395
396 write (iout, '("dist_fact = ")')
397
398 do 150 i = 1, list_len
399 write (iout, '(f5.3)') dist_fact(i)
400 150 continue
401 endif
402
403 c
404 c read individual side sets
405 c
406 if (num_side_sets .gt. 0) then
407 call exgssi (exoid, ids, ierr)
408 write (iout, '(/"after exgssi, error = ", i3)' ) ierr
409 endif
410
411 do 190 i = 1, num_side_sets
412
413 call exgsp (exoid, ids(i), num_sides_in_set, num_df_in_set,
414 1 ierr)
415 write (iout, '(/"after exgsp, error = ", i3)' ) ierr
416
417 write (iout, '("side set ", i2, " parameters:",/
418 2 "num_sides = ", i3,/
419 3 "num_dist_factors = ", i3)')
420 4 ids(i), num_sides_in_set, num_df_in_set
421
422 call exgss (exoid, ids(i), elem_list, side_list, ierr)
423 write (iout, '(/"after exgss, error = ", i3)' ) ierr
424
425 call exgssn (exoid, ids(i), node_ctr_list, node_list, ierr)
426 write (iout, '(/"after exgssn, error = ", i3)' ) ierr
427
428 if (num_df_in_set .gt. 0) then
429 call exgssd (exoid, ids(i), dist_fact, ierr)
430 write (iout, '(/"after exgssd, error = ", i3)' ) ierr
431 endif
432
433 write (iout, '(/"element list for side set ", i2)') ids(i)
434
435 num_elem_in_set = num_sides_in_set
436 do 160 j = 1, num_elem_in_set
437 write (iout, '(i3)') elem_list(j)
438 160 continue
439
440 write (iout, '("side list for side set ", i2)') ids(i)
441
442 do 170 j = 1, num_sides_in_set
443 write (iout, '(i3)') side_list(j)
444 170 continue
445
446 node_ctr = 0
447 write (iout, '("node list for side set ", i2)') ids(i)
448 do 178 k=1, num_elem_in_set
449 do 175 j=1, node_ctr_list(k)
450 write (iout, '(i3)') node_list(j+node_ctr)
451 175 continue
452 node_ctr = node_ctr+node_ctr_list(k)
453 178 continue
454
455 if (num_df_in_set .gt. 0) then
456 write (iout, '("dist factors for side set ", i2)') ids(i)
457 do 180 j = 1, num_df_in_set
458 write (iout, '(f6.3)') dist_fact(j)
459 180 continue
460 else
461 write (iout, '("no dist factors for side set ", i2)') ids(i)
462 endif
463
464 190 continue
465
466 c
467 c read side set names
468 c
469 call exgnams(exoid, exsset, num_side_sets, sset_names, ierr)
470 write (iout, '(/"after exgnams, error = ", i3)' ) ierr
471 do i=1, num_side_sets
472 write (iout, '("side set ",i2," name: ",a)' )
473 2 i, sset_names(i)
474 end do
475
476 c read side set properties
477
478 num_props = exinqi(exoid, exnssp)
479 write (iout,
480 1 '(/"There are ",i2," properties for each side set")')
481 2 num_props
482
483
484 call exgpn(exoid, exsset, prop_names, ierr)
485 write (iout, '("after exgpn, error = ", i3)' ) ierr
486
487 do 197 i = 1, num_props
488 do 195 j = 1, num_side_sets
489 call exgp(exoid, exsset,ids(j),prop_names(i),prop_value,ierr)
490 if (ierr .eq. 0) then
491 write( iout,
492 1 '("side set ",i2," property(",i2,"): ",a," = ",i5)' )
493 2 j, i, prop_names(i), prop_value
494 else
495 write (iout, '(/"after exgp, error = ", i3)' ) ierr
496 endif
497 195 continue
498 197 continue
499
500 num_side_sets = exinqi(exoid, exsids)
501 write (iout, '(/"after exinq: EXSIDS =",i3,", error = ",i3)')
502 1 num_side_sets,ierr
503
504 if (num_side_sets .gt. 0) then
505 elem_list_len = exinqi(exoid, exssel)
506 write (iout, '(/"after exinq: EXSSEL =",i3,", error = ",i3)')
507 1 elem_list_len,ierr
508
509 node_list_len = exinqi(exoid, exssnl)
510 write (iout, '(/"after exinq: EXSSNL =",i3,", error = ",i3)')
511 1 node_list_len,ierr
512
513 df_list_len = exinqi(exoid, exssdf)
514 write (iout, '(/"after exinq: EXSSDF =",i3,", error = ",i3)')
515 1 df_list_len,ierr
516 c
517 c read concatenated side sets; this produces the same information as
518 c the above code which reads individual side sets
519 c
520 call exgcss (exoid, ids, num_elem_per_set, num_df_per_set,
521 1 elem_ind, df_ind, elem_list, side_list, dist_fact,
522 2 ierr)
523 write (iout, '(/"after exgcss, error = ", i3)' ) ierr
524
525 write (iout, '("concatenated side set info")')
526
527 write (iout, '("ids = ")')
528
529 do 200 i = 1, num_side_sets
530 write (iout, '(i3)') ids(i)
531 200 continue
532
533 write (iout, '("num_elem_per_set = ")')
534
535 do 210 i = 1, num_side_sets
536 write (iout, '(i3)') num_elem_per_set(i)
537 210 continue
538
539 write (iout, '("num_df_per_set = ")')
540
541 do 220 i = 1, num_side_sets
542 write (iout, '(i3)') num_df_per_set(i)
543 220 continue
544
545 write (iout, '("elem_ind = ")')
546
547 do 230 i = 1, num_side_sets
548 write (iout, '(i3)') elem_ind(i)
549 230 continue
550
551 write (iout, '("df_ind = ")')
552
553 do 240 i = 1, num_side_sets
554 write (iout, '(i3)') df_ind(i)
555 240 continue
556
557 write (iout, '("elem_list = ")')
558
559 do 250 i = 1, elem_list_len
560 write (iout, '(i3)') elem_list(i)
561 250 continue
562
563 write (iout, '("side_list = ")')
564
565 do 260 i = 1, elem_list_len
566 write (iout, '(i3)') side_list(i)
567 260 continue
568
569 write (iout, '("dist_fact = ")')
570
571 do 270 i = 1, df_list_len
572 write (iout, '(f6.3)') dist_fact(i)
573 270 continue
574 endif
575
576 c
577 c read QA records
578 c
579 num_qa_rec = exinqi(exoid, exqa)
580 call exgqa (exoid, qa_record, ierr)
581 write (iout, '(/"after exgqa, error = ", i3)' ) ierr
582
583 write (iout, '("QA records = ")')
584
585 do 290 i = 1, num_qa_rec
586 do 280 j = 1, 4
587 write (iout, '(a)') qa_record(j,i)
588 280 continue
589 290 continue
590
591 c
592 c read information records
593 c
594 num_info = exinqi(exoid, exinfo)
595 call exginf (exoid, inform, ierr)
596 write (iout, '(/"after exginf, error = ", i3)' ) ierr
597
598 write (iout, '("info records = ")')
599
600 do 300 i = 1, num_info
601 write (iout, '(a81)') inform(i)
602 300 continue
603
604 c
605 c read global variables parameters and names
606 c
607 call exgvp (exoid, "g", num_glo_vars, ierr)
608 write (iout, '(/"after exgvp, error = ", i3)' ) ierr
609
610 call exgvan (exoid, "g", num_glo_vars, var_names, ierr)
611 write (iout, '(/"after exgvan, error = ", i3)' ) ierr
612
613 write (iout, '("There are ",i2," global variables; their names ",
614 1 "are :")') num_glo_vars
615
616 do 320 i = 1, num_glo_vars
617 write (iout, '(a9)') var_names(i)
618 320 continue
619
620 c
621 c read nodal variables parameters and names
622 c
623 call exgvp (exoid, "n", num_nod_vars, ierr)
624 write (iout, '(/"after exgvp, error = ", i3)' ) ierr
625
626 call exgvan (exoid, "n", num_nod_vars, var_names, ierr)
627 write (iout, '(/"after exgvan, error = ", i3)' ) ierr
628
629 write (iout, '("There are ",i2," nodal variables; their names ",
630 1 "are :")') num_nod_vars
631
632 do 330 i = 1, num_nod_vars
633 write (iout, '(a9)') var_names(i)
634 330 continue
635
636 c
637 c read element variables parameters and names
638 c
639 call exgvp (exoid, "e", num_ele_vars, ierr)
640 write (iout, '(/"after exgvp, error = ", i3)' ) ierr
641
642 call exgvan (exoid, "e", num_ele_vars, var_names, ierr)
643 write (iout, '(/"after exgvan, error = ", i3)' ) ierr
644
645 write (iout, '("There are ",i2," element variables; their names ",
646 1 "are :")') num_ele_vars
647
648 do 340 i = 1, num_ele_vars
649 write (iout, '(a9)') var_names(i)
650 340 continue
651
652 c
653 c read element variable truth table
654 c
655 call exgvtt (exoid, num_elem_blk, num_ele_vars, truth_tab, ierr)
656 write (iout, '(/"after exgvtt, error = ", i3)' ) ierr
657
658 write (iout, '("This is the element variable truth table:")')
659
660 do 360 i = 1, num_elem_blk
661 do 350 j = 1, num_ele_vars
662 write (iout, '(i2)') truth_tab(j,i)
663 350 continue
664 360 continue
665
666 c
667 c determine how many time steps are stored
668 c
669 num_time_steps = exinqi(exoid, extims)
670 write (iout, '("There are ",i2," time steps in the database.")')
671 1 num_time_steps
672 c
673 c read time value at one time step
674 c
675 time_step = 3
676 call exgtim (exoid, time_step, time_value, ierr)
677 write (iout, '(/"after exgtim, error = ", i3)' ) ierr
678
679 write (iout, '("time value at time step ",i2," = ", f5.3)')
680 1 time_step, time_value
681 c
682 c read time values at all time steps
683 c
684 call exgatm (exoid, time_values, ierr)
685 write (iout, '(/"after exgatm, error = ", i3)' ) ierr
686
687 write (iout, '("time values at all time steps are:")')
688
689 do 370 i = 1, num_time_steps
690 write (iout, '(f5.3)') time_values(i)
691 370 continue
692
693 var_index = 1
694 beg_time = 1
695 end_time = -1
696 c
697 c read all global variables at one time step
698 c
699 call exggv (exoid, time_step, num_glo_vars, var_values, ierr)
700 write (iout, '(/"after exggv, error = ", i3)' ) ierr
701
702 write (iout, '("global variable values at time step ",i2)')
703 1 time_step
704
705 do 400 i = 1, num_glo_vars
706 write (iout, '(f5.3)') var_values(i)
707 400 continue
708
709 c
710 c read a single global variable through time
711 c
712 call exggvt (exoid, var_index, beg_time, end_time, var_values,
713 1 ierr)
714 write (iout, '(/"after exggvt, error = ", i3)' ) ierr
715
716 write (iout, '("global variable ",i2," values through time:")')
717 1 var_index
718
719 do 410 i = 1, num_time_steps
720 write (iout, '(f5.3)') var_values(i)
721 410 continue
722
723 c
724 c read a nodal variable at one time step
725 c
726 call exgnv (exoid, time_step, var_index, num_nodes, var_values,
727 1 ierr)
728 write (iout, '(/"after exgnv, error = ", i3)' ) ierr
729
730 write (iout, '("nodal variable ",i2," values at time step ",i2)')
731 1 var_index, time_step
732
733 do 420 i = 1, num_nodes
734 write (iout, '(f5.3)') var_values(i)
735 420 continue
736
737 c
738 c read a nodal variable through time
739 c
740 node_num = 1
741
742 call exgnvt (exoid, var_index, node_num, beg_time, end_time,
743 1 var_values, ierr)
744 write (iout, '(/"after exgnvt, error = ", i3)' ) ierr
745
746 write (iout, '("nodal variable ",i2," values for node ",i2,
747 1 " through time:")') var_index, node_num
748
749 do 430 i = 1, num_time_steps
750 write (iout, '(f5.3)') var_values(i)
751 430 continue
752
753 c
754 c read an element variable at one time step
755 c
756 call exgebi (exoid, ids, ierr)
757 write (iout, '(/"after exgebi, error = ", i3)' ) ierr
758
759 do 450 i = 1, num_elem_blk
760
761 call exgev (exoid, time_step, var_index, ids(i),
762 1 num_elem_in_block(i), var_values, ierr)
763 write (iout, '(/"after exgev, error = ", i3)' ) ierr
764
765 if (ierr .eq. 0) then
766 write (iout, '("element variable ",i2," values of element ",
767 1 "block ",i2," at time step ",i2)')
768 2 var_index, ids(i), time_step
769 endif
770
771 do 440 j = 1, num_elem_in_block(i)
772 write (iout, '(f5.3)') var_values(j)
773 440 continue
774
775 450 continue
776
777 c
778 c read an element variable through time
779 c
780 var_index = 2
781 elem_num = 2
782
783 call exgevt (exoid, var_index, elem_num, beg_time, end_time,
784 1 var_values, ierr)
785 write (iout, '(/"after exgevt, error = ", i3)' ) ierr
786
787 write (iout, '("element variable ",i2," values for element ",i2,
788 1 " through time:")') var_index, elem_num
789
790 do 460 i = 1, num_time_steps
791 write (iout, '(f5.3)') var_values(i)
792 460 continue
793
794 call exclos (exoid, ierr)
795 write (iout, '(/"after exclos, error = ", i3)' ) ierr
796
797 stop
798 end
799