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 "@(#)write_bin.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 * **** write_bin **** * c * * c * write out the dyna3d ascii file as a binary file. * c * * c * referenced by: read_dyna3d.f * c * * c * write_bin.f * c *--------------------------------------------------------* subroutine write_bin (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) include 'read_dyna3d.h' character*(*) file_name character title*80 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), num_states, & num_node_values character node_data_labels(num_node_data)*max_label_size real nodes(3, num_nodes), node_data(num_nodes, num_node_data, & num_states), model_extent(6), def_fact, data_ranges(2, & num_node_data, num_states) integer num_vals c ************** c *** body *** c ************** if ((num_1d_elems + num_2d_elems + num_3d_elems) .gt. 0) then write (0, *) 'bin file:', file_name open (unit = output, file = file_name, form = 'unformatted') write (output) title c subtract four from 'num_node_data' since there are always four c values per node (disp mag, x, y and z). write (output) num_nodes, num_node_data - 4, num_1d_elems, & num_2d_elems, num_3d_elems, num_states write (output) node_data_labels, model_extent write (output) nodes, elem_1d, elem_2d, elem_3d write (output) node_data, data_ranges close (output) end if return end