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 "@(#)read_data.f 1.1 Stardent 90/03/23" C Copyright (c) 1989 by C Stardent Computer Inc. C All Rights Reserved C C c *--------------------------------------------------------* c * * c * * c * read_data.f * c *--------------------------------------------------------* subroutine read_data (file_name, num_nodes, nodes, num_1d_elems, & elem_1d, num_2d_elems, elem_2d, num_3d_elems, elem_3d, & num_states, node_data, model_extent, data_ranges, & num_node_values, num_node_data, node_data_labels, & title, material_table) include 'read_dyna3d.h' character*(*) file_name character title*80 integer num_nodes, nodes, num_1d_elems, elem_1d, num_2d_elems, & elem_2d, num_3d_elems, elem_3d, num_states, node_data, & model_extent, data_ranges, num_node_values, num_node_data, & node_data_labels real material_table(3, max_material_types) character*7 dummy, string*180 integer i, j, k, state_num, state, index, malloc, bin_file real time, xmin, xmax, ymin, ymax, zmin, zmax, vmax, vmin, & x, y, z, mag c ************** c *** body *** c ************** write (0, *) 'ascii file:', file_name call read_header (file_name, title, num_nodes, num_3d_elems, & num_1d_elems, num_2d_elems, num_node_data, num_states, & bin_file) call define_material_table (material_table) c the data structures for each element contain the element c connectiveity and the element material code. num_node_data = num_node_data + 4 ! add four for disp (mag, x, y, z). elem_3d = malloc(num_3d_elems * 4 * n3d) elem_2d = malloc(num_2d_elems * 4 * n2d) elem_1d = malloc(num_1d_elems * 4 * n1d) nodes = malloc(num_nodes * 4 * 3) node_data_labels = malloc(num_node_data * max_label_size) call read_geom (num_nodes, %val(nodes), num_1d_elems, & %val(elem_1d), num_2d_elems, %val(elem_2d), num_3d_elems, & %val(elem_3d), num_node_data, %val(node_data_labels), & model_extent, bin_file) node_data = malloc(num_states * num_node_data * num_nodes * 4) data_ranges = malloc(num_states * num_node_data * 2 * 4) call read_states (num_nodes, num_states, %val(node_data), & %val(data_ranges), num_node_values, & num_node_data, bin_file) call redefine_states (num_states) return end