C INTERNATIONAL AVS CENTER C (This disclaimer must remain at the top of all files) C C WARRANTY DISCLAIMER C C This module and the files associated with it are distributed free of charge. C It is placed in the public domain and permission is granted for anyone to use, C duplicate, modify, and redistribute it unless otherwise noted. Some modules C may be copyrighted. You agree to abide by the conditions also included in C the AVS Licensing Agreement, version 1.0, located in the main module C directory located at the International AVS Center ftp site and to include C the AVS Licensing Agreement when you distribute any files downloaded from C that site. C C The International AVS Center, MCNC, the AVS Consortium and the individual C submitting the module and files associated with said module provide absolutely C NO WARRANTY OF ANY KIND with respect to this software. The entire risk as to C the quality and performance of this software is with the user. IN NO EVENT C WILL The International AVS Center, MCNC, the AVS Consortium and the individual C submitting the module and files associated with said module BE LIABLE TO C ANYONE FOR ANY DAMAGES ARISING FROM THE USE OF THIS SOFTWARE, INCLUDING, C WITHOUT LIMITATION, DAMAGES RESULTING FROM LOST DATA OR LOST PROFITS, OR ANY C SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES. C C This AVS module and associated files are public domain software unless C otherwise noted. Permission is hereby granted to do whatever you like with C it, subject to the conditions that may exist in copyrighted materials. Should C you wish to make a contribution toward the improvement, modification, or C general performance of this module, please send us your comments: why you C liked or disliked it, how you use it, and most important, how it helps your C work. We will receive your comments at avs@ncsc.org. C C Please send AVS module bug reports to avs@ncsc.org. C C "@(#)readg.f 1.1 Stardent 90/03/23" C Copyright (c) 1989 by C Stardent Computer Inc. C All Rights Reserved C C This software comprises unpublished confidential information of C Stardent Computer Inc. and may not be used, copied or made C available to anyone, except in accordance with the license C under which it is furnished. C C This file is under sccs control at Stardent in: C /sccs/avs/user_modules/data/read_dyna3d/src/s.readg.f C C c *--------------------------------------------------------* c * * c * * c * readg.f * c *--------------------------------------------------------* subroutine read_geom (num_nodes, nodes, num_1d_elems, elem_1d, & num_2d_elems, elem_2d, num_3d_elems, elem_3d, & num_node_data, node_data_labels, model_extent, & bin_file) include 'read_dyna3d.h' integer num_nodes, num_node_data, num_1d_elems, num_2d_elems, & num_3d_elems, elem_1d(num_1d_elems, n1d), elem_2d(num_2d_elems, & n2d), elem_3d(num_3d_elems, n3d), bin_file character node_data_labels(num_node_data)*max_label_size real nodes(3, num_nodes), model_extent(6) character*7 dummy, string*180 integer i, j, k, state_num, state, index real time, xmin, xmax, ymin, ymax, zmin, zmax, vmax, vmin, x, y, z, mag c ************** c *** body *** c ************** if (bin_file) then read (input) node_data_labels, model_extent else do i = 1, num_node_data - 4 read (input, *) node_data_labels(i) write (0, *) node_data_labels(i) end do end if if (num_node_data .eq. 4) then string = 'mag disp.x disp.y disp.z disp' else string = 'mag disp.x disp.y disp.z disp.' j = 31 end if do i = 1, num_node_data - 4 k = 1 do while (node_data_labels(i)(k:k) .ne. ' ') string(j:j) = node_data_labels(i)(k:k) j = j + 1 k = k + 1 end do if (i .ne. (num_node_data - 4)) then string(j:j) = '.' j = j + 1 end if end do call AVSmodify_parameter ('contour type', 7, 'mag disp', & string, '.') if (bin_file) then read (input) nodes, elem_1d, elem_2d, elem_3d else do i = 1, num_nodes read (input, *) nodes(1, i), nodes(2, i), nodes(3, i) if (i .eq. 1) then xmin = nodes(1, i) xmax = xmin ymin = nodes(2, i) ymax = ymin zmin = nodes(3, i) zmax = zmin else if (xmin .gt. nodes(1, i)) xmin = nodes(1, i) if (xmax .lt. nodes(1, i)) xmax = nodes(1, i) if (ymin .gt. nodes(2, i)) ymin = nodes(2, i) if (ymax .lt. nodes(2, i)) ymax = nodes(2, i) if (zmin .gt. nodes(3, i)) zmin = nodes(3, i) if (zmax .lt. nodes(3, i)) zmax = nodes(3, i) end if end do model_extent(1) = xmin model_extent(2) = xmax model_extent(3) = ymin model_extent(4) = ymax model_extent(5) = zmin model_extent(6) = zmax c read element connectivity and material code (index into color table). do i = 1, num_3d_elems read (input, *) (elem_3d(i, j), j = 1, n3d) if (elem_3d(i, 9) .eq. 0) then elem_3d(i, 9) = 1 else elem_3d(i, 9) = mod(elem_3d(i, 9) - 1, max_material_types & + 1) + 1 end if end do do i = 1, num_1d_elems read (input, *) (elem_1d(i, j), j = 1, n1d) if (elem_1d(i, 3) .eq. 0) then elem_1d(i, 3) = 1 else elem_1d(i, 3) = mod(elem_1d(i, 3) - 1, max_material_types) & + 1 end if end do do i = 1, num_2d_elems read (input, *) (elem_2d(i, j), j = 1, n2d) if (elem_2d(i, 5) .eq. 0) then elem_2d(i, 5) = 1 else elem_2d(i, 5) = mod(elem_2d(i, 5) - 1, max_material_types) & + 1 end if end do end if return end