1 /* 2 Copyright (c) 1994 - 2010, Lawrence Livermore National Security, LLC. 3 LLNL-CODE-425250. 4 All rights reserved. 5 6 This file is part of Silo. For details, see silo.llnl.gov. 7 8 Redistribution and use in source and binary forms, with or without 9 modification, are permitted provided that the following conditions 10 are met: 11 12 * Redistributions of source code must retain the above copyright 13 notice, this list of conditions and the disclaimer below. 14 * Redistributions in binary form must reproduce the above copyright 15 notice, this list of conditions and the disclaimer (as noted 16 below) in the documentation and/or other materials provided with 17 the distribution. 18 * Neither the name of the LLNS/LLNL nor the names of its 19 contributors may be used to endorse or promote products derived 20 from this software without specific prior written permission. 21 22 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 23 "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 24 LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 25 A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL LAWRENCE 26 LIVERMORE NATIONAL SECURITY, LLC, THE U.S. DEPARTMENT OF ENERGY OR 27 CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, 28 EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, 29 PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 30 PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 31 LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 32 NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 33 SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 34 35 This work was produced at Lawrence Livermore National Laboratory under 36 Contract No. DE-AC52-07NA27344 with the DOE. 37 38 Neither the United States Government nor Lawrence Livermore National 39 Security, LLC nor any of their employees, makes any warranty, express 40 or implied, or assumes any liability or responsibility for the 41 accuracy, completeness, or usefulness of any information, apparatus, 42 product, or process disclosed, or represents that its use would not 43 infringe privately-owned rights. 44 45 Any reference herein to any specific commercial products, process, or 46 services by trade name, trademark, manufacturer or otherwise does not 47 necessarily constitute or imply its endorsement, recommendation, or 48 favoring by the United States Government or Lawrence Livermore 49 National Security, LLC. The views and opinions of authors expressed 50 herein do not necessarily state or reflect those of the United States 51 Government or Lawrence Livermore National Security, LLC, and shall not 52 be used for advertising or product endorsement purposes. 53 */ 54 #ifndef TAURUS_H 55 #define TAURUS_H 56 57 #define NODAL_VAR 0 58 #define ZONAL_VAR 1 59 60 #define MAX_MESH 5 61 #define MAX_VAL 69 62 63 #define VAR_NORMAL 0 64 #define VAR_SIGX 1 65 #define VAR_SIGY 2 66 #define VAR_SIGZ 3 67 #define VAR_SIGXY 4 68 #define VAR_SIGYZ 5 69 #define VAR_SIGZX 6 70 #define VAR_EPS 7 71 #define VAR_PRESSURE 8 72 #define VAR_SIG_EFF 9 73 #define VAR_DEV_STRESS_1 10 74 #define VAR_DEV_STRESS_2 11 75 #define VAR_DEV_STRESS_3 12 76 #define VAR_MAX_SHEAR_STR 13 77 #define VAR_PRINC_STRESS_1 14 78 #define VAR_PRINC_STRESS_2 15 79 #define VAR_PRINC_STRESS_3 16 80 #define VAR_DISPX 17 81 #define VAR_DISPY 18 82 #define VAR_DISPZ 19 83 #define VAR_DISP_MAG 20 84 #define VAR_VEL_MAG 21 85 #define VAR_ACC_MAG 22 86 #define VAR_SURF_STRESS_1 23 87 #define VAR_SURF_STRESS_2 24 88 #define VAR_SURF_STRESS_3 25 89 #define VAR_SURF_STRESS_4 26 90 #define VAR_SURF_STRESS_5 27 91 #define VAR_SURF_STRESS_6 28 92 #define VAR_UP_STRESS 29 93 #define VAR_LOW_STRESS 30 94 #define VAR_MAX_STRESS 31 95 #define VAR_VORT_MAG 32 96 97 /* 98 * Dyna3d and Nike3d values. 99 */ 100 #define VAL_HEX_SIGX 0 101 #define VAL_HEX_SIGY 1 102 #define VAL_HEX_SIGZ 2 103 #define VAL_HEX_SIGXY 3 104 #define VAL_HEX_SIGYZ 4 105 #define VAL_HEX_SIGZX 5 106 #define VAL_HEX_EPS_EFF 6 107 #define VAL_SHELL_MID_SIGX 7 108 #define VAL_SHELL_MID_SIGY 8 109 #define VAL_SHELL_MID_SIGZ 9 110 #define VAL_SHELL_MID_SIGXY 10 111 #define VAL_SHELL_MID_SIGYZ 11 112 #define VAL_SHELL_MID_SIGZX 12 113 #define VAL_SHELL_MID_EPS_EFF 13 114 #define VAL_SHELL_IN_SIGX 14 115 #define VAL_SHELL_IN_SIGY 15 116 #define VAL_SHELL_IN_SIGZ 16 117 #define VAL_SHELL_IN_SIGXY 17 118 #define VAL_SHELL_IN_SIGYZ 18 119 #define VAL_SHELL_IN_SIGZX 19 120 #define VAL_SHELL_IN_EPS_EFF 20 121 #define VAL_SHELL_OUT_SIGX 21 122 #define VAL_SHELL_OUT_SIGY 23 123 #define VAL_SHELL_OUT_SIGZ 24 124 #define VAL_SHELL_OUT_SIGXY 25 125 #define VAL_SHELL_OUT_SIGYZ 26 126 #define VAL_SHELL_OUT_SIGZX 27 127 #define VAL_SHELL_OUT_EPS_EFF 28 128 #define VAL_SHELL_RES1 29 129 #define VAL_SHELL_RES2 30 130 #define VAL_SHELL_RES3 31 131 #define VAL_SHELL_RES4 32 132 #define VAL_SHELL_RES5 33 133 #define VAL_SHELL_RES6 34 134 #define VAL_SHELL_RES7 35 135 #define VAL_SHELL_RES8 36 136 #define VAL_SHELL_THICKNESS 37 137 #define VAL_SHELL_ELDEP1 38 138 #define VAL_SHELL_ELDEP2 39 139 #define VAL_SHELL_INT_ENG 40 140 #define VAL_SHELL_EPSX_IN 41 141 #define VAL_SHELL_EPSY_IN 42 142 #define VAL_SHELL_EPSZ_IN 43 143 #define VAL_SHELL_EPSXY_IN 44 144 #define VAL_SHELL_EPSYZ_IN 45 145 #define VAL_SHELL_EPSZX_IN 46 146 #define VAL_SHELL_EPSX_OUT 47 147 #define VAL_SHELL_EPSY_OUT 48 148 #define VAL_SHELL_EPSZ_OUT 49 149 #define VAL_SHELL_EPSXY_OUT 50 150 #define VAL_SHELL_EPSYZ_OUT 51 151 #define VAL_SHELL_EPSZX_OUT 52 152 #define VAL_COORDX 53 153 #define VAL_COORDY 54 154 #define VAL_COORDZ 55 155 #define VAL_VELX 56 156 #define VAL_VELY 57 157 #define VAL_VELZ 58 158 #define VAL_ACCX 59 159 #define VAL_ACCY 60 160 #define VAL_ACCZ 61 161 #define VAL_TEMPX 62 162 #define VAL_TEMPY 63 163 #define VAL_TEMPZ 64 164 165 /* 166 * Topaz3d values. 167 */ 168 #define VAL_TEMP 0 169 #define VAL_FLUXX 1 170 #define VAL_FLUXY 2 171 #define VAL_FLUXZ 3 172 173 /* 174 * Hydra values. 175 * 176 * Note: VAL_VELX, VAL_VELY and VAL_VELZ already defined above. 177 * 178 */ 179 #define VAL_VORTX 0 180 #define VAL_VORTY 1 181 #define VAL_VORTZ 2 182 #define VAL_PRESSURE 3 183 184 typedef struct { 185 /* 186 * File information. 187 */ 188 int ifile; /* The number of the currently open file */ 189 char title[48]; /* The title associated with the file */ 190 int fd; /* File descriptor of currently open file */ 191 char *basename; /* The file root name */ 192 char *filename; /* The name of the currently open file */ 193 int nfiles; /* The number of files in the family */ 194 int *filesize; /* The size of each file in the family */ 195 /* 196 * State information. 197 */ 198 int state; /* The current state, -1 if not in one */ 199 int nstates; /* The number of states */ 200 int *state_file; /* The file that each state is in */ 201 int *state_loc; /* The address of each state */ 202 float *state_time; /* The time of each state */ 203 int idir; /* The current directory within a state */ 204 /* 205 * Variable information. 206 */ 207 int var_start[MAX_VAL]; /* The starting location relative to a state 208 */ 209 int var_len[MAX_VAL]; /* The length of the variable */ 210 int var_offset[MAX_VAL]; /* The offset in the vector */ 211 int var_ncomps[MAX_VAL]; /* The number of components to a vector */ 212 /* 213 * Mesh information. 214 */ 215 int mesh_read; /* 1 if the mesh information has been read */ 216 int nhex; /* The number of hex elements */ 217 int nhex_faces; /* The number of hex face elements */ 218 int nshell; /* The number of shell elements */ 219 int nbeam; /* The number of beam elements */ 220 int *hex_nodelist; /* The node list for the hex elements */ 221 int *shell_nodelist; /* The node list for the shell elements */ 222 int *beam_nodelist; /* The node list for the beam elements */ 223 int *hex_facelist; /* The face list for the hex elements */ 224 int *hex_zoneno; /* The zone number of each hex face */ 225 int *hex_matlist; /* The material list for the hex elements */ 226 int *shell_matlist; /* The material list for the shell elements */ 227 int *beam_matlist; /* The material list for the beam elements */ 228 int *hex_activ; /* The activity data for the hex elements */ 229 int *shell_activ; /* The activity data for the shell elements */ 230 int *beam_activ; /* The activity data for the beam elements */ 231 int coord_state; /* The state associated with the coordinates */ 232 float **coords; /* The mesh coordinates */ 233 float min_extents[3]; /* The minimum extents */ 234 float max_extents[3]; /* The maximum extents */ 235 int nmat; /* The number of materials present */ 236 int *matnos; /* The material numbers present */ 237 /* 238 * Header information. 239 */ 240 int ndim; /* Dimension of data */ 241 int numnp; /* The number of nodes */ 242 int icode; /* Flag for old or new database */ 243 int nglbv; /* Number of global variables for each state */ 244 int it; /* Tempuratures included flag */ 245 int iu; /* Current geometry included flag */ 246 int iv; /* Current velocity flag */ 247 int ia; /* Current acceleration flag */ 248 int nel8; /* Number of brick elements */ 249 int nummat8; /* Number of materials used by brick elements */ 250 int nv3d; /* Number of variables for each brick element */ 251 int nel2; /* Number of beam elements */ 252 int nummat2; /* Number of materials used by beam elements */ 253 int nv1d; /* Number of variables for each beam element */ 254 int nel4; /* Number of shell elements */ 255 int nummat4; /* Number of materials used by shell elements */ 256 int nv2d; /* Number of variables for each shell element */ 257 int activ; /* Element activity included flag */ 258 } TAURUSfile; 259 260 typedef struct { 261 char *name; 262 char *mesh; 263 int idir; 264 int centering; 265 int ival; 266 int ivar; 267 } var_list_s; 268 269 extern var_list_s taur_var_list[]; 270 271 #endif 272