1 /***************************************************************************** 2 * Copyright (c) 2019 FrontISTR Commons 3 * This software is released under the MIT License, see LICENSE.txt 4 *****************************************************************************/ 5 6 #ifndef HECMW_IO_STRUCT_INCLUDED 7 #define HECMW_IO_STRUCT_INCLUDED 8 9 #include "hecmw_config.h" 10 #include "hecmw_set_int.h" 11 12 struct hecmw_io_id_array { 13 int n; 14 int *id; 15 }; 16 17 struct hecmw_io_id { 18 int id; 19 struct hecmw_io_id *next; 20 }; 21 22 struct hecmw_io_header { 23 char header[HECMW_HEADER_LEN + 1]; 24 }; 25 26 struct hecmw_io_zero { 27 double zero; 28 }; 29 30 struct hecmw_io_node { 31 double x; 32 double y; 33 double z; 34 }; 35 36 struct hecmw_io_element { 37 int type; 38 int *node; 39 int nmatitem; 40 double *matitem; 41 char matname[HECMW_NAME_LEN + 1]; /* created material name */ 42 int mpc_matid; /* for element type 9XX */ 43 int mpc_sectid; /* for element type 9XX */ 44 }; 45 46 struct hecmw_io_ngrp { 47 char name[HECMW_NAME_LEN + 1]; 48 struct hecmw_set_int *node; 49 struct hecmw_io_ngrp *next; 50 }; 51 52 struct hecmw_io_egrp { 53 char name[HECMW_NAME_LEN + 1]; 54 struct hecmw_set_int *elem; 55 struct hecmw_io_egrp *next; 56 }; 57 58 struct hecmw_io_sgrp { 59 char name[HECMW_NAME_LEN + 1]; 60 struct hecmw_set_int *item; 61 struct hecmw_io_sgrp *next; 62 }; 63 64 struct hecmw_io_mpc { 65 int neq; 66 double cnst; 67 68 struct hecmw_io_mpcitem { 69 char ngrp[HECMW_NAME_LEN + 1]; /* valid if node == -1 */ 70 int node; 71 int dof; 72 double a; 73 } * item; /* neq */ 74 struct hecmw_io_mpc *next; 75 }; 76 77 struct hecmw_io_amplitude { 78 char name[HECMW_NAME_LEN + 1]; 79 int type_def; 80 int type_time; 81 int type_val; 82 83 struct hecmw_io_amplitude_item { 84 double val; 85 double table; 86 struct hecmw_io_amplitude_item *next; 87 } * item; 88 struct hecmw_io_amplitude_item *last; 89 struct hecmw_io_amplitude *next; 90 }; 91 92 struct hecmw_io_initial { 93 int type; 94 #define HECMW_INITIAL_TYPE_TEMPERATURE 1 95 int node; 96 char ngrp[HECMW_NAME_LEN + 1]; /* valid if node == -1 */ 97 double val; 98 struct hecmw_io_initial *next; 99 }; 100 101 struct hecmw_io_material { 102 char name[HECMW_NAME_LEN + 1]; 103 int nitem; 104 105 struct hecmw_io_matitem { 106 int item; 107 int nval; 108 109 struct hecmw_io_matsubitem { 110 double *val; 111 double temp; 112 struct hecmw_io_matsubitem *next; 113 } * subitem; 114 } * item; 115 struct hecmw_io_material *next; 116 }; 117 118 struct hecmw_io_section { 119 char egrp[HECMW_NAME_LEN + 1]; 120 char material[HECMW_NAME_LEN + 1]; 121 int composite; 122 int secopt; 123 int type; 124 125 union hecmw_io_section_item { 126 struct hecmw_io_section_solid { 127 double thickness; 128 } solid; 129 130 struct hecmw_io_section_shell { 131 double thickness; 132 int integpoints; 133 } shell; 134 135 struct hecmw_io_section_beam { 136 double vxyz[3]; 137 double area; 138 double Iyy; 139 double Izz; 140 double Jx; 141 } beam; 142 143 struct hecmw_io_section_interface { 144 double thickness; 145 double gapcon; 146 double gaprad1; 147 double gaprad2; 148 } interface; 149 } sect; 150 struct hecmw_io_section *next; 151 }; 152 153 struct hecmw_io_contact { 154 char name[HECMW_NAME_LEN + 1]; 155 int type; 156 char master_grp[HECMW_NAME_LEN + 1]; 157 char slave_grp[HECMW_NAME_LEN + 1]; 158 char slave_orisgrp[HECMW_NAME_LEN + 1]; 159 struct hecmw_io_contact *next; 160 }; 161 162 #endif 163