Exodus 8.24
Loading...
Searching...
No Matches
/exodus_for/test/testwtm.f
1C Copyright(C) 1999-2020 National Technology & Engineering Solutions
2C of Sandia, LLC (NTESS). Under the terms of Contract DE-NA0003525 with
3C NTESS, the U.S. Government retains certain rights in this software.
4C
5C See packages/seacas/LICENSE for details
6
7 program testwtm
8
9c This is a test program for the Fortran binding of the EXODUS II
10c database write routines. It tests multiple simultaneous output files.
11
12c 09/07/93 V.R. Yarberry - Revised for 2.00 API
13
14 include 'exodusII.inc'
15
16 integer iin, iout
17 integer exoid, num_dim, num_nodes, num_elem, num_elem_blk
18 integer exoidm(10),num_dim2,num_nodes2,num_elem2,num_elem_blk2
19 integer num_elem_in_block(2), num_node_sets
20 integer num_elem_in_block2(2), num_node_sets2
21 integer num_side_sets
22 integer num_side_sets2
23 integer nexofiles
24 integer i, j, k, m, elem_map(2), connect(4)
25 integer elem_map2(2), connect2(4)
26 integer node_list(10), elem_list(10), side_list(10)
27 integer node_list2(10), elem_list2(10), side_list2(10)
28 integer ebids(2),ids(2), num_nodes_per_set(2), num_elem_per_set(2)
29 integer ebids2(2)
30 integer num_df_per_set(2)
31 integer df_ind(2), node_ind(2), elem_ind(2), num_qa_rec, num_info
32 integer num_qa_rec2,num_info2
33 integer num_glo_vars, num_nod_vars, num_ele_vars
34 integer num_glo_vars2, num_nod_vars2, num_ele_vars2
35 integer truth_tab(3,2)
36 integer whole_time_step, num_time_steps
37 integer cpu_word_size, io_word_size
38 integer prop_array(2)
39
40 real glob_var_vals(10), nodal_var_vals(8)
41 real time_value, elem_var_vals(20)
42 real time_value2
43 real x(8), y(8), dummy(1)
44 real x2(8), y2(8)
45 real attrib(1), dist_fact(8)
46 real attrib2(1), dist_fact2(8)
47
48 character*(MXLNLN) title
49 character*(MXLNLN) title2
50 character*(MXSTLN) coord_names(3)
51 character*(MXSTLN) coord_names2(3)
52 character*(MXSTLN) cname
53 character*(MXSTLN) cname2
54 character*(MXSTLN) var_names(3)
55 character*(MXSTLN) var_names2(3)
56 character*(MXSTLN) qa_record(4,2)
57 character*(MXSTLN) qa_record2(4,2)
58 character*(MXLNLN) inform(3)
59 character*(MXLNLN) inform2(3)
60 character*(MXSTLN) prop_names(2)
61 character*(MXSTLN) exofname
62
63 data iin /5/, iout /6/, nexofiles /5/
64
65c create EXODUS II files
66
67 cpu_word_size = 0
68 io_word_size = 4
69
70 exoid = excre("test.exo",
71 1 exclob, cpu_word_size, io_word_size, ierr)
72 write (iout,'("after excre for test.exo,id: ",i4,", err=",i3)')
73 1 exoid, ierr
74 write (iout,'(" cpu word size: ",i4," io word size: ",i4)')
75 1 cpu_word_size, io_word_size
76 write (iout, '("after excre, error = ", i4)' ) ierr
77
78 do 1000 i=1,nexofiles
79 write(exofname,'("test",i1,".exo")')i
80 exoidm(i)= excre(exofname,
81 1 exclob, cpu_word_size, io_word_size, ierr)
82 write (iout,
83 1 '("after excre for test",i1,".exo,id: ",i4,", err=",i3)')
84 2 i, exoidm(i), ierr
85 write (iout, '("after excre (",i1,"), error = ", i4)' )
86 1 i, ierr
871000 continue
88
89c initialize file with parameters
90
91 title = "This is test m"
92 num_dim = 2
93 num_nodes = 8
94 num_elem = 2
95 num_elem_blk = 2
96 num_node_sets = 2
97 num_side_sets = 2
98
99 call expini (exoid, title, num_dim, num_nodes,
100 1 num_elem, num_elem_blk, num_node_sets,
101 2 num_side_sets, ierr)
102
103 write (iout, '("after expini, error = ", i4)' ) ierr
104
105 title2 = "This is test m"
106 num_dim2 = 2
107 num_nodes2 = 8
108 num_elem2 = 2
109 num_elem_blk2 = 2
110 num_node_sets2 = 2
111 num_side_sets2 = 2
112
113 do 1001 i=1,nexofiles
114 call expini (exoidm(i), title2, num_dim2, num_nodes2,
115 1 num_elem2, num_elem_blk2, num_node_sets2,
116 2 num_side_sets2, ierr)
117
118 write (iout, '("after expini (",i1,"), error = ", i4)' )
119 1 i, ierr
1201001 continue
121
122c write nodal coordinates values and names to database
123
124 x(1) = 0.0
125 x(2) = 1.0
126 x(3) = 1.0
127 x(4) = 0.0
128 x(5) = 1.0
129 x(6) = 2.0
130 x(7) = 2.0
131 x(8) = 1.0
132 y(1) = 0.0
133 y(2) = 0.0
134 y(3) = 1.0
135 y(4) = 1.0
136 y(5) = 0.0
137 y(6) = 0.0
138 y(7) = 1.0
139 y(8) = 1.0
140
141 call expcor (exoid, x, y, dummy, ierr)
142 write (iout, '("after expcor, error = ", i4)' ) ierr
143
144 x2(1) = 0.0
145 x2(2) = 1.0
146 x2(3) = 1.0
147 x2(4) = 0.0
148 x2(5) = 1.0
149 x2(6) = 2.0
150 x2(7) = 2.0
151 x2(8) = 1.0
152 y2(1) = 0.0
153 y2(2) = 0.0
154 y2(3) = 1.0
155 y2(4) = 1.0
156 y2(5) = 0.0
157 y2(6) = 0.0
158 y2(7) = 1.0
159 y2(8) = 1.0
160
161 do 1002 i=1,nexofiles
162 call expcor (exoidm(i), x2, y2, dummy, ierr)
163 write (iout, '("after expcor (",i1,"), error = ", i4)')
164 1 i, ierr
1651002 continue
166
167 coord_names(1) = "xcoor"
168 coord_names(2) = "ycoor"
169
170 call expcon (exoid, coord_names, ierr)
171 write (iout, '("after expcon, error = ", i4)' ) ierr
172
173 coord_names2(1) = "xcoor"
174 coord_names2(2) = "ycoor"
175
176 do 1003 i=1,nexofiles
177 call expcon (exoidm(i), coord_names2, ierr)
178 write (iout, '("after expcon (",i1,"), error = ", i4)')
179 1 i, ierr
1801003 continue
181
182c write element order map
183
184 do 10 i = 1, num_elem
185 elem_map(i) = i
18610 continue
187
188 call expmap (exoid, elem_map, ierr)
189 write (iout, '("after expmap, error = ", i4)' ) ierr
190
191 do 12 i = 1, num_elem2
192 elem_map2(i) = i
19312 continue
194
195 do 1004 i=1,nexofiles
196 call expmap (exoidm(i), elem_map2, ierr)
197 write (iout, '("after expmap (",i1,"), error = ", i4)')
198 1 i, ierr
1991004 continue
200
201c write element block parameters
202
203 num_elem_in_block(1) = 1
204 num_elem_in_block(2) = 1
205
206 ebids(1) = 10
207 ebids(2) = 11
208
209 cname = "quad"
210
211 call expelb (exoid,ebids(1),cname,num_elem_in_block(1)
212 1 ,4,1,ierr)
213 write (iout, '("after expelb, error = ", i4)' ) ierr
214
215 call expelb (exoid,ebids(2),cname,num_elem_in_block(2),
216 1 4,1,ierr)
217 write (iout, '("after expelb, error = ", i4)' ) ierr
218
219 num_elem_in_block2(1) = 1
220 num_elem_in_block2(2) = 1
221
222 ebids2(1) = 10
223 ebids2(2) = 11
224
225 cname2 = "quad2"
226
227 do 1005 i=1,nexofiles
228 call expelb(exoidm(i),ebids2(1),cname2,num_elem_in_block2(1),
229 1 4,1,ierr)
230 write (iout, '("after expelb (",i1,"), error = ", i4)')
231 1 i, ierr
232
233 call expelb(exoidm(i),ebids2(2),cname2,num_elem_in_block2(2),
234 1 4,1,ierr)
235 write (iout, '("after expelb (",i1,"), error = ", i4)')
236 1 i, ierr
2371005 continue
238
239c write element block properties
240
241 prop_names(1) = "MATL"
242 prop_names(2) = "DENSITY"
243 call exppn(exoid,exeblk,2,prop_names,ierr)
244 write (iout, '("after exppn, error = ", i4)' ) ierr
245
246 call expp(exoid, exeblk, ebids(1), "MATL", 10, ierr)
247 write (iout, '("after expp, error = ", i4)' ) ierr
248 call expp(exoid, exeblk, ebids(2), "MATL", 20, ierr)
249 write (iout, '("after expp, error = ", i4)' ) ierr
250
251 do 1006 i=1,nexofiles
252 call exppn(exoidm(i),exeblk,2,prop_names,ierr)
253 write (iout, '("after exppn (",i1,"), error = ", i4)')
254 1 i, ierr
255
256 call expp(exoidm(i), exeblk, ebids(1), "MATL", 10, ierr)
257 write (iout, '("after expp (",i1,"), error = ", i4)')
258 1 i, ierr
259 call expp(exoidm(i), exeblk, ebids(2), "MATL", 20, ierr)
260 write (iout, '("after expp (",i1,"), error = ", i4)')
261 1 i, ierr
2621006 continue
263
264c write element connectivity
265
266 connect(1) = 1
267 connect(2) = 2
268 connect(3) = 3
269 connect(4) = 4
270
271 call expelc (exoid, ebids(1), connect, ierr)
272 write (iout, '("after expelc, error = ", i4)' ) ierr
273
274 connect(1) = 5
275 connect(2) = 6
276 connect(3) = 7
277 connect(4) = 8
278
279 call expelc (exoid, ebids(2), connect, ierr)
280 write (iout, '("after expelc, error = ", i4)' ) ierr
281
282 connect2(1) = 1
283 connect2(2) = 2
284 connect2(3) = 3
285 connect2(4) = 4
286
287 do 1007 i=1,nexofiles
288 call expelc (exoidm(i), ebids2(1), connect2, ierr)
289 write (iout, '("after expelc (",i1,"), error = ", i4)')
290 1 i, ierr
2911007 continue
292
293 connect2(1) = 5
294 connect2(2) = 6
295 connect2(3) = 7
296 connect2(4) = 8
297
298 do 1008 i=1,nexofiles
299 call expelc (exoidm(i), ebids2(2), connect2, ierr)
300 write (iout, '("after expelc (",i1,"), error = ", i4)')
301 1 i, ierr
3021008 continue
303
304c write element block attributes
305
306 attrib(1) = 3.14159
307 call expeat (exoid, ebids(1), attrib, ierr)
308 write (iout, '("after expeat, error = ", i4)' ) ierr
309
310 attrib(1) = 6.14159
311 call expeat (exoid, ebids(2), attrib, ierr)
312 write (iout, '("after expeat, error = ", i4)' ) ierr
313
314 attrib2(1) = 3.
315 do 1009 i=1,nexofiles
316 call expeat (exoidm(i), ebids2(1), attrib2, ierr)
317 write (iout, '("after expeat (",i1,"), error = ", i4)')
318 1 i, ierr
3191009 continue
320
321 attrib2(1) = 6.
322 do 1010 i=1,nexofiles
323 call expeat (exoidm(i), ebids2(2), attrib2, ierr)
324 write (iout, '("after expeat (",i1,"), error = ", i4)')
325 1 i, ierr
3261010 continue
327
328c write individual node sets
329
330 call expnp (exoid, 20, 5, 5, ierr)
331 write (iout, '("after expnp, error = ", i4)' ) ierr
332
333 node_list(1) = 100
334 node_list(2) = 101
335 node_list(3) = 102
336 node_list(4) = 103
337 node_list(5) = 104
338
339 dist_fact(1) = 1.0
340 dist_fact(2) = 2.0
341 dist_fact(3) = 3.0
342 dist_fact(4) = 4.0
343 dist_fact(5) = 5.0
344
345 call expns (exoid, 20, node_list, ierr)
346 write (iout, '("after expns, error = ", i4)' ) ierr
347 call expnsd (exoid, 20, dist_fact, ierr)
348 write (iout, '("after expnsd, error = ", i4)' ) ierr
349
350 call expnp (exoid, 21, 3, 3, ierr)
351 write (iout, '("after expnp, error = ", i4)' ) ierr
352
353 node_list(1) = 200
354 node_list(2) = 201
355 node_list(3) = 202
356
357 dist_fact(1) = 1.1
358 dist_fact(2) = 2.1
359 dist_fact(3) = 3.1
360
361 call expns (exoid, 21, node_list, ierr)
362 write (iout, '("after expns, error = ", i4)' ) ierr
363 call expnsd (exoid, 21, dist_fact, ierr)
364 write (iout, '("after expnsd, error = ", i4)' ) ierr
365
366 prop_names(1) = "FACE"
367 call expp(exoid, exnset, 20, prop_names(1), 4, ierr)
368 write (iout, '("after expp, error = ", i4)' ) ierr
369
370 call expp(exoid, exnset, 21, prop_names(1), 5, ierr)
371 write (iout, '("after expp, error = ", i4)' ) ierr
372
373 prop_array(1) = 1000
374 prop_array(2) = 2000
375
376 prop_names(1) = "VELOCITY"
377 call exppa(exoid, exnset, prop_names(1), prop_array, ierr)
378 write (iout, '("after exppa, error = ", i4)' ) ierr
379
380C**** file 2
381
382 node_list2(1) = 2100
383 node_list2(2) = 2101
384 node_list2(3) = 2102
385 node_list2(4) = 2103
386 node_list2(5) = 2104
387
388 dist_fact2(1) = 21.0
389 dist_fact2(2) = 22.0
390 dist_fact2(3) = 23.0
391 dist_fact2(4) = 24.0
392 dist_fact2(5) = 25.0
393
394 do 1011 i=1,nexofiles
395 call expnp (exoidm(i), 20, 5, 5, ierr)
396 write (iout, '("after expnp (",i1,"), error = ", i4)')
397 1 i, ierr
398
399 call expns (exoidm(i), 20, node_list, ierr)
400 write (iout, '("after expns (",i1,"), error = ", i4)')
401 1 i, ierr
402 call expnsd (exoidm(i), 20, dist_fact, ierr)
403 write (iout, '("after expnsd (",i1,"), error = ", i4)')
404 1 i, ierr
405
406 call expnp (exoidm(i), 21, 3, 3, ierr)
407 write (iout, '("after expnp (",i1,"), error = ", i4)')
408 1 i, ierr
4091011 continue
410
411 node_list2(1) = 2200
412 node_list2(2) = 2201
413 node_list2(3) = 2202
414
415 dist_fact2(1) = 21.1
416 dist_fact2(2) = 22.1
417 dist_fact2(3) = 23.1
418
419 do 1012 i=1,nexofiles
420 call expns (exoidm(i), 21, node_list, ierr)
421 write (iout, '("after expns (",i1,"), error = ", i4)')
422 1 i, ierr
423 call expnsd (exoidm(i), 21, dist_fact, ierr)
424 write (iout, '("after expnsd (",i1,"), error = ", i4)')
425 1 i, ierr
4261012 continue
427
428c write concatenated node sets; this produces the same information as
429c the above code which writes individual node sets
430
431 ids(1) = 20
432 ids(2) = 21
433
434 num_nodes_per_set(1) = 5
435 num_nodes_per_set(2) = 3
436
437 node_ind(1) = 1
438 node_ind(2) = 6
439
440 node_list(1) = 100
441 node_list(2) = 101
442 node_list(3) = 102
443 node_list(4) = 103
444 node_list(5) = 104
445 node_list(6) = 200
446 node_list(7) = 201
447 node_list(8) = 202
448
449 dist_fact(1) = 1.0
450 dist_fact(2) = 2.0
451 dist_fact(3) = 3.0
452 dist_fact(4) = 4.0
453 dist_fact(5) = 5.0
454 dist_fact(6) = 1.1
455 dist_fact(7) = 2.1
456 dist_fact(8) = 3.1
457
458c call expcns (exoid, ids, num_nodes_per_set, node_ind, node_list,
459c 1 dist_fact, ierr)
460c write (iout, '("after expcns, error = ", i4)' ) ierr
461
462 do 1013 i=1,nexofiles
463 prop_names(1) = "FACE"
464 call expp(exoidm(i), exnset, 20, prop_names(1), 4, ierr)
465 write (iout, '("after expp (",i1,"), error = ", i4)')
466 1 i, ierr
467
468 call expp(exoidm(i), exnset, 21, prop_names(1), 5, ierr)
469 write (iout, '("after expp (",i1,"), error = ", i4)')
470 1 i, ierr
471
472 prop_array(1) = 1000
473 prop_array(2) = 2000
474
475 prop_names(1) = "VELOCITY"
476 call exppa(exoidm(i), exnset, prop_names(1), prop_array, ierr)
477 write (iout, '("after exppa (",i1,"), error = ", i4)')
478 1 i, ierr
4791013 continue
480
481c write individual side sets
482
483 elem_list(1) = 11
484 elem_list(2) = 12
485
486 node_list(1) = 1
487 node_list(2) = 2
488 node_list(3) = 3
489 node_list(4) = 4
490
491 dist_fact(1) = 30.0
492 dist_fact(2) = 30.1
493 dist_fact(3) = 30.2
494 dist_fact(4) = 30.3
495
496 call expsp (exoid, 30, 2, 4, ierr)
497 write (iout, '("after expsp, error = ", i4)' ) ierr
498
499 call expss (exoid, 30, elem_list, node_list, ierr)
500 write (iout, '("after expss, error = ", i4)' ) ierr
501
502 call expssd (exoid, 30, dist_fact, ierr)
503 write (iout, '("after expssd, error = ", i4)' ) ierr
504
505 elem_list(1) = 13
506 elem_list(2) = 14
507
508 side_list(1) = 3
509 side_list(2) = 4
510
511 dist_fact(1) = 31.0
512 dist_fact(2) = 31.1
513 dist_fact(3) = 31.2
514 dist_fact(4) = 31.3
515
516 call expsp (exoid, 31, 2, 4, ierr)
517 write (iout, '("after expsp, error = ", i3)' ) ierr
518
519 call expss (exoid, 31, elem_list, side_list, ierr)
520 write (iout, '("after expss, error = ", i3)' ) ierr
521
522 call expssd (exoid, 31, dist_fact, ierr)
523 write (iout, '("after expssd, error = ", i3)' ) ierr
524
525 elem_list2(1) = 11
526 elem_list2(2) = 12
527
528 node_list2(1) = 1
529 node_list2(2) = 2
530 node_list2(3) = 3
531 node_list2(4) = 4
532
533 dist_fact2(1) = 1.1
534 dist_fact2(2) = 2.1
535 dist_fact2(3) = 3.1
536 dist_fact2(4) = 4.1
537
538 do 1014 i=1,nexofiles
539 call expsp (exoidm(i), 30, 2, 4, ierr)
540 write (iout, '("after expsp (",i1,"), error = ", i4)')
541 1 i, ierr
542
543 call expss (exoidm(i), 30, elem_list2, node_list2, ierr)
544 write (iout, '("after expss (",i1,"), error = ", i4)')
545 1 i, ierr
546
547 call expssd (exoidm(i), 30, dist_fact2, ierr)
548 write (iout, '("after expssd (",i1,"), error = ", i4)')
549 1 i, ierr
5501014 continue
551
552 elem_list2(1) = 13
553 elem_list2(2) = 14
554
555 side_list2(1) = 3
556 side_list2(2) = 4
557
558 dist_fact2(1) = 31.0
559 dist_fact2(2) = 31.1
560 dist_fact2(3) = 31.2
561 dist_fact2(4) = 31.3
562
563 do 1015 i=1,nexofiles
564 call expsp (exoidm(i), 31, 2, 4, ierr)
565 write (iout, '("after expsp (",i1,"), error = ", i3)')
566 1 i, ierr
567
568 call expss (exoidm(i), 31, elem_list2, side_list2, ierr)
569 write (iout, '("after expss (",i1,"), error = ", i3)')
570 1 i, ierr
571
572 call expssd (exoidm(i), 31, dist_fact2, ierr)
573 write (iout, '("after expssd (",i1,"), error = ", i3)')
574 1 i, ierr
5751015 continue
576
577c write concatenated side sets; this produces the same information as
578c the above code which writes individual side sets
579
580 ids(1) = 30
581 ids(2) = 31
582
583 num_elem_per_set(1) = 2
584 num_elem_per_set(2) = 2
585
586 num_df_per_set(1) = 4
587 num_df_per_set(2) = 4
588
589 elem_ind(1) = 1
590 elem_ind(2) = 3
591
592 df_ind(1) = 1
593 df_ind(2) = 5
594
595 elem_list(1) = 11
596 elem_list(2) = 12
597 elem_list(3) = 13
598 elem_list(4) = 14
599
600 side_list(1) = 1
601 side_list(2) = 2
602 side_list(3) = 3
603 side_list(4) = 4
604
605 dist_fact(1) = 30.0
606 dist_fact(2) = 30.1
607 dist_fact(3) = 30.2
608 dist_fact(4) = 30.3
609 dist_fact(5) = 31.0
610 dist_fact(6) = 31.1
611 dist_fact(7) = 31.2
612 dist_fact(8) = 31.3
613
614c call expcss (exoid, ids, num_elem_per_set, num_df_per_set,
615c 1 elem_ind, df_ind, elem_list, side_list, dist_fact,
616c 2 ierr)
617c write (iout, '("after expcss, error = ", i4)' ) ierr
618
619c call expcss (exoidm(i), ids, num_elem_per_set, num_df_per_set,
620c 1 elem_ind, df_ind, elem_list, side_list, dist_fact,
621c 2 ierr)
622c write (iout, '("after expcss (",i1,"), error = ", i4)' ) ierr
623
624 prop_names(1) = "COLOR"
625 call expp(exoid, exsset, 30, prop_names(1), 100, ierr)
626 write (iout, '("after expp, error = ", i4)' ) ierr
627
628 call expp(exoid, exsset, 31, prop_names(1), 101, ierr)
629 write (iout, '("after expp, error = ", i4)' ) ierr
630
631 do 1016 i=1,nexofiles
632 prop_names(1) = "COLOR"
633 call expp(exoidm(i), exsset, 30, prop_names(1), 100, ierr)
634 write (iout, '("after expp (",i1,"), error = ", i4)')
635 1 i, ierr
636
637 call expp(exoidm(i), exsset, 31, prop_names(1), 101, ierr)
638 write (iout, '("after expp (",i1,"), error = ", i4)')
639 1 i, ierr
6401016 continue
641
642c write QA records
643
644 num_qa_rec = 2
645
646 qa_record(1,1) = "TESTWTM fortran version"
647 qa_record(2,1) = "testwtm"
648 qa_record(3,1) = "07/07/93"
649 qa_record(4,1) = "15:41:33"
650 qa_record(1,2) = "FASTQ"
651 qa_record(2,2) = "fastq"
652 qa_record(3,2) = "07/07/93"
653 qa_record(4,2) = "16:41:33"
654
655 call expqa (exoid, num_qa_rec, qa_record, ierr)
656 write (iout, '("after expqa, error = ", i4)' ) ierr
657
658 num_qa_rec2 = 2
659
660 qa_record2(1,1) = "TESTWTM fortran version"
661 qa_record2(2,1) = "testwtm"
662 qa_record2(3,1) = "07/07/93"
663 qa_record2(4,1) = "15:41:33"
664 qa_record2(1,2) = "FASTQ"
665 qa_record2(2,2) = "fastq"
666 qa_record2(3,2) = "07/07/93"
667 qa_record2(4,2) = "16:41:33"
668
669 do 1017 i=1,nexofiles
670 call expqa (exoidm(i), num_qa_rec2, qa_record2, ierr)
671 write (iout, '("after expqa (",i1,"), error = ", i4)')
672 1 i, ierr
6731017 continue
674
675c write information records
676
677 num_info = 3
678
679 inform(1) = "This is the first information record."
680 inform(2) = "This is the second information record."
681 inform(3) = "This is the third information record."
682
683 call expinf (exoid, num_info, inform, ierr)
684 write (iout, '("after expinf, error = ", i4)' ) ierr
685
686 num_info2 = 3
687
688 inform2(1) = "This is the first info record."
689 inform2(2) = "This is the second info record."
690 inform2(3) = "This is the third info record."
691
692 do 1018 i=1,nexofiles
693 call expinf (exoidm(i), num_info2, inform2, ierr)
694 write (iout, '("after expinf (",i1,"), error = ", i4)')
695 1 i, ierr
6961018 continue
697
698c write results variables parameters and names
699
700 num_glo_vars = 1
701
702 var_names(1) = "glo_vars"
703
704 call expvp (exoid, "g", num_glo_vars, ierr)
705 write (iout, '("after expvp, error = ", i4)' ) ierr
706 call expvan (exoid, "g", num_glo_vars, var_names, ierr)
707 write (iout, '("after expvan, error = ", i4)' ) ierr
708
709 num_glo_vars2 = 1
710
711 var_names2(1) = "glovars2"
712
713 do 1019 i=1,nexofiles
714 call expvp (exoidm(i), "g", num_glo_vars2, ierr)
715 write (iout, '("after expvp (",i1,"), error = ", i4)')
716 1 i, ierr
717 call expvan (exoidm(i), "g", num_glo_vars2, var_names2, ierr)
718 write (iout, '("after expvan (",i1,"), error = ", i4)')
719 1 i, ierr
7201019 continue
721
722 num_nod_vars = 2
723
724 var_names(1) = "nod_var0"
725 var_names(2) = "nod_var1"
726
727 call expvp (exoid, "n", num_nod_vars, ierr)
728 write (iout, '("after expvp, error = ", i4)' ) ierr
729 call expvan (exoid, "n", num_nod_vars, var_names, ierr)
730 write (iout, '("after expvan, error = ", i4)' ) ierr
731
732 num_nod_vars2 = 2
733
734 var_names2(1) = "nodvar20"
735 var_names2(2) = "nodvar21"
736
737 do 1020 i=1,nexofiles
738 call expvp (exoidm(i), "n", num_nod_vars2, ierr)
739 write (iout, '("after expvp (",i1,"), error = ", i4)')
740 1 i, ierr
741 call expvan (exoidm(i), "n", num_nod_vars2, var_names2, ierr)
742 write (iout, '("after expvan (",i1,"), error = ", i4)')
743 1 i, ierr
7441020 continue
745
746 num_ele_vars = 3
747
748 var_names(1) = "ele_var0"
749 var_names(2) = "ele_var1"
750 var_names(3) = "ele_var2"
751
752 call expvp (exoid, "e", num_ele_vars, ierr)
753 write (iout, '("after expvp, error = ", i4)' ) ierr
754 call expvan (exoid, "e", num_ele_vars, var_names, ierr)
755 write (iout, '("after expvan, error = ", i4)' ) ierr
756
757 num_ele_vars2 = 3
758
759 var_names2(1) = "elevar20"
760 var_names2(2) = "elevar21"
761 var_names2(3) = "elevar22"
762
763 do 1021 i=1,nexofiles
764 call expvp (exoidm(i), "e", num_ele_vars2, ierr)
765 write (iout, '("after expvp (",i1,"), error = ", i4)')
766 1 i, ierr
767 call expvan (exoidm(i), "e", num_ele_vars2, var_names2, ierr)
768 write (iout, '("after expvan (",i1,"), error = ", i4)')
769 1 i, ierr
7701021 continue
771
772c write element variable truth table
773
774 k = 0
775
776 do 30 i = 1,num_elem_blk
777 do 20 j = 1,num_ele_vars
778 truth_tab(j,i) = 1
77920 continue
78030 continue
781
782 call exgebi (exoid, ebids, ierr)
783 write (iout, '("after exgebi, error = ", i4)' ) ierr
784 call expvtt (exoid, num_elem_blk, num_ele_vars, truth_tab, ierr)
785 write (iout, '("after expvtt, error = ", i4)' ) ierr
786
787 do 1022 i=1,nexofiles
788 call exgebi (exoidm(i), ebids2, ierr)
789 write (iout, '("after exgebi (",i1,"), error = ", i4)')
790 1 i, ierr
791 call expvtt (exoidm(i),num_elem_blk,num_ele_vars,truth_tab,ierr)
792 write (iout, '("after expvtt (",i1,"), error = ", i4)')
793 1 i, ierr
7941022 continue
795
796c for each time step, write the analysis results;
797c the code below fills the arrays glob_var_vals,
798c nodal_var_vals, and elem_var_vals with values for debugging purposes;
799c obviously the analysis code will populate these arrays
800
801 whole_time_step = 1
802 num_time_steps = 10
803
804 do 110 iii = 1, num_time_steps
805 time_value = real(iii)/100
806 time_value2 = real(iii)/100
807
808c write time value to regular file
809
810 call exptim (exoid, whole_time_step, time_value, ierr)
811 write (iout, '("after exptim, error = ", i4)' ) ierr
812
813 do 1023 i=1,nexofiles
814 call exptim (exoidm(i), whole_time_step, time_value2, ierr)
815 write (iout, '("after exptim (",i1,"), error = ", i4)')
816 1 i, ierr
8171023 continue
818
819c write global variables
820
821 do 50 j = 1, num_glo_vars
822 glob_var_vals(j) = real(j+1) * time_value
82350 continue
824
825 call expgv (exoid, whole_time_step, num_glo_vars,
826 1 glob_var_vals, ierr)
827 write (iout, '("after expgv, error = ", i4)' ) ierr
828
829 do 1024 i=1,nexofiles
830 call expgv (exoidm(i), whole_time_step, num_glo_vars,
831 1 glob_var_vals, ierr)
832 write (iout, '("after expgv (",i1,"), error = ", i4)')
833 1 i, ierr
8341024 continue
835
836c write nodal variables
837
838 do 70 k = 1, num_nod_vars
839 do 60 j = 1, num_nodes
840
841 nodal_var_vals(j) = real(k) + (real(j) * time_value)
842
84360 continue
844
845 call expnv (exoid, whole_time_step, k, num_nodes,
846 1 nodal_var_vals, ierr)
847 write (iout, '("after expnv, error = ", i4)' ) ierr
848
849 do 1025 i=1,nexofiles
850 call expnv (exoidm(i), whole_time_step, k, num_nodes,
851 1 nodal_var_vals, ierr)
852 write (iout, '("after expnv (",i1,"), error = ", i4)')
853 1 i, ierr
8541025 continue
855
85670 continue
857
858c write element variables
859
860 do 100 k = 1, num_ele_vars
861 do 90 j = 1, num_elem_blk
862 do 80 m = 1, num_elem_in_block(j)
863
864 elem_var_vals(m) = real(k+1) + real(j+1) +
865 1 (real(m)*time_value)
866
86780 continue
868
869 call expev (exoid, whole_time_step, k, ebids(j),
870 1 num_elem_in_block(j), elem_var_vals, ierr)
871 write (iout, '("after expev, error = ", i4)' ) ierr
872 do 1026 i=1,nexofiles
873 call expev (exoidm(i), whole_time_step, k, ebids(j),
874 1 num_elem_in_block(j), elem_var_vals, ierr)
875 write (iout, '("after expev (",i1,"), error = ", i4)')
876 1 i, ierr
8771026 continue
878
87990 continue
880100 continue
881
882 whole_time_step = whole_time_step + 1
883
884c update the data file; this should be done at the end of every time
885c step to ensure that no data is lost if the analysis dies
886
887 call exupda (exoid, ierr)
888 write (iout, '("after exupda, error = ", i4)' ) ierr
889 do 1027 i=1,nexofiles
890 call exupda (exoidm(i), ierr)
891 write (iout, '("after exupda (",i1,"), error = ", i4)')
892 1 i, ierr
8931027 continue
894
895110 continue
896
897c close the EXODUS files
898
899 call exclos (exoid, ierr)
900 write (iout, '("after exclos, error = ", i4)' ) ierr
901
902 do 1028 i=1,nexofiles
903 call exclos (exoidm(i), ierr)
904 write (iout, '("after exclos (",i1,"), error = ", i4)')
905 1 i, ierr
9061028 continue
907
908 stop
909 end
#define real
Definition exo_jack-windows.c:59
void expgv(int *idexo, int *time_step, int *num_glob_vars, real *glob_var_vals, int *ierr)
Definition exo_jack.c:2184
int excre(char *path, int *clobmode, int *cpu_word_size, int *io_word_size, int *ierr, int pathlen)
Definition exo_jack.c:179
void expini(int *idexo, char *title, void_int *num_dim, void_int *num_nodes, void_int *num_elem, void_int *num_elem_blk, void_int *num_node_sets, void_int *num_side_sets, int *ierr, int titlelen)
Definition exo_jack.c:242
void exgebi(int *idexo, void_int *elem_blk_ids, int *ierr)
Definition exo_jack.c:837
void expcor(int *idexo, real *x_coor, real *y_coor, real *z_coor, int *ierr)
Definition exo_jack.c:558
void expnp(int *idexo, entity_id *node_set_id, void_int *num_nodes_in_set, void_int *num_dist_in_set, int *ierr)
Definition exo_jack.c:1505
void expssd(int *idexo, entity_id *side_set_id, real *side_set_dist_fact, int *ierr)
Definition exo_jack.c:1744
void expnv(int *idexo, int *time_step, int *nodal_var_index, void_int *num_nodes, real *nodal_var_vals, int *ierr)
Definition exo_jack.c:2215
void expsp(int *idexo, entity_id *side_set_id, void_int *num_sides_in_set, void_int *num_df_in_set, int *ierr)
Definition exo_jack.c:1686
void expvan(int *idexo, char *var_type, int *num_vars, char *var_names, int *ierr, int var_typelen, int var_nameslen)
Definition exo_jack.c:1942
void expqa(int *idexo, int *num_qa_records, char *qa_record, int *ierr, int qa_recordlen)
Definition exo_jack.c:313
void expeat(int *idexo, entity_id *elem_blk_id, real *attrib, int *ierr)
Definition exo_jack.c:928
void exclos(int *idexo, int *ierr)
Definition exo_jack.c:230
void expnsd(int *idexo, entity_id *node_set_id, real *node_set_dist_fact, int *ierr)
Definition exo_jack.c:1543
void expev(int *idexo, int *time_step, int *elem_var_index, entity_id *elem_blk_id, void_int *num_elem_this_blk, real *elem_var_vals, int *ierr)
Definition exo_jack.c:2270
void expp(int *idexo, int *obj_type, entity_id *obj_id, char *prop_name, entity_id *value, int *ierr, int prop_namelen)
Definition exo_jack.c:1369
void expss(int *idexo, entity_id *side_set_id, void_int *side_set_elem_list, void_int *side_set_side_list, int *ierr)
Definition exo_jack.c:1724
void expelb(int *idexo, entity_id *elem_blk_id, char *elem_type, void_int *num_elem_this_blk, void_int *num_nodes_per_elem, void_int *num_attr, int *ierr, int elem_typelen)
Definition exo_jack.c:764
void exppn(int *idexo, int *obj_type, int *num_props, char *prop_names, int *ierr, int prop_nameslen)
Definition exo_jack.c:1228
void expvtt(int *idexo, int *num_entity, int *num_var, int *var_tab, int *ierr)
Definition exo_jack.c:2062
void expns(int *idexo, entity_id *node_set_id, void_int *node_set_node_list, int *ierr)
Definition exo_jack.c:1534
void expmap(int *idexo, void_int *elem_map, int *ierr)
Definition exo_jack.c:695
void expelc(int *idexo, entity_id *elem_blk_id, void_int *connect, int *ierr)
Definition exo_jack.c:846
void expcon(int *idexo, char *coord_names, int *ierr, int coord_nameslen)
Definition exo_jack.c:576
void expinf(int *idexo, int *num_info, char *info, int *ierr, int infolen)
Definition exo_jack.c:449
void expvp(int *idexo, char *var_type, int *num_vars, int *ierr, int var_typelen)
Definition exo_jack.c:1920
void exppa(int *idexo, int *obj_type, char *prop_name, void_int *values, int *ierr, int prop_namelen)
Definition exo_jack.c:1471
void exupda(int *idexo, int *ierr)
Definition exo_jack.c:236
void exptim(int *idexo, int *time_step, real *time_value, int *ierr)
Definition exo_jack.c:2399