1 /***************************************************************************** 2 * Copyright (c) 2019 FrontISTR Commons 3 * This software is released under the MIT License, see LICENSE.txt 4 *****************************************************************************/ 5 6 #ifndef HECMW_STRUCT_INCLUDED 7 #define HECMW_STRUCT_INCLUDED 8 9 #include "hecmw_util.h" 10 11 struct hecmwST_section { 12 int n_sect; 13 14 int *sect_type; 15 #define HECMW_SECT_TYPE_SOLID 1 /* 1:SOLID */ 16 #define HECMW_SECT_TYPE_SHELL 2 /* 2:SHELL */ 17 #define HECMW_SECT_TYPE_BEAM 3 /* 3:BEAM */ 18 #define HECMW_SECT_TYPE_INTERFACE 4 /* 4:INTERFACE */ 19 20 int *sect_opt; 21 #define HECMW_SECT_OPT_PSTRESS 0 /* plane stress */ 22 #define HECMW_SECT_OPT_PSTRAIN 1 /* plane strain */ 23 #define HECMW_SECT_OPT_ASYMMETRY 2 /* axial symmetry */ 24 #define HECMW_SECT_OPT_PSTRESS_RI 10 /* plane stress & reduced integral */ 25 #define HECMW_SECT_OPT_PSTRAIN_RI 11 /* plane strain & reduced integral */ 26 #define HECMW_SECT_OPT_ASYMMETRY_RI 12 /* axial symmetry & reduced integral */ 27 int *sect_mat_ID_index; 28 int *sect_mat_ID_item; 29 int *sect_I_index; 30 int *sect_I_item; 31 int *sect_R_index; 32 double *sect_R_item; 33 }; 34 35 struct hecmwST_material { 36 int n_mat; 37 int n_mat_item; 38 int n_mat_subitem; 39 int n_mat_table; 40 char **mat_name; 41 int *mat_item_index; 42 int *mat_subitem_index; 43 int *mat_table_index; 44 double *mat_val; 45 double *mat_temp; 46 }; 47 48 struct hecmwST_mpc { 49 int n_mpc; 50 int *mpc_index; 51 int *mpc_item; 52 int *mpc_dof; 53 double *mpc_val; 54 double *mpc_const; 55 }; 56 57 struct hecmwST_amplitude { 58 int n_amp; 59 char **amp_name; 60 61 int *amp_type_definition; 62 #define HECMW_AMP_TYPEDEF_TABULAR 1 /* 1:TABULAR(default) */ 63 64 int *amp_type_time; 65 #define HECMW_AMP_TYPETIME_STEP 1 /* 1:STEP_TIME(default) */ 66 67 int *amp_type_value; 68 #define HECMW_AMP_TYPEVAL_RELATIVE 1 /* 1:RELATIVE(default) */ 69 #define HECMW_AMP_TYPEVAL_ABSOLUTE 2 /* 2:ABSOLUTE */ 70 int *amp_index; 71 double *amp_val; 72 double *amp_table; 73 }; 74 75 struct hecmwST_node_grp { 76 int n_grp; 77 char **grp_name; 78 int *grp_index; 79 int *grp_item; 80 81 int n_bc; 82 int *bc_grp_ID; 83 84 int *bc_grp_type; 85 #define HECMW_BCGRPTYPE_DISPALCEMENT 1 /* 1:displacement */ 86 #define HECMW_BCGRPTYPE_FLUX 2 /* 2:flux */ 87 int *bc_grp_index; 88 int *bc_grp_dof; 89 double *bc_grp_val; 90 }; 91 92 struct hecmwST_elem_grp { 93 int n_grp; 94 char **grp_name; 95 int *grp_index; 96 int *grp_item; 97 98 int n_bc; 99 int *bc_grp_ID; 100 101 int *bc_grp_type; 102 int *bc_grp_index; 103 double *bc_grp_val; 104 }; 105 106 struct hecmwST_surf_grp { 107 int n_grp; 108 char **grp_name; 109 int *grp_index; 110 111 int *grp_item; 112 int n_bc; 113 int *bc_grp_ID; 114 115 int *bc_grp_type; 116 117 int *bc_grp_index; 118 double *bc_grp_val; 119 }; 120 121 struct hecmwST_contact_pair { 122 int n_pair; 123 char **name; 124 int *type; 125 #define HECMW_CONTACT_TYPE_NODE_SURF 1 /* 1:NODE_SURF */ 126 #define HECMW_CONTACT_TYPE_SURF_SURF 2 /* 2:SURF_SURF */ 127 int *slave_grp_id; 128 int *slave_orisgrp_id; 129 int *master_grp_id; 130 }; 131 132 struct hecmwST_refine_origin { 133 int *index; 134 int *item_index; 135 int *item_item; 136 }; 137 138 struct hecmwST_local_mesh { 139 int hecmw_flag_adapt; 140 int hecmw_flag_initcon; 141 int hecmw_flag_parttype; 142 #define HECMW_FLAG_PARTTYPE_UNKNOWN 0 /* 0:unknown */ 143 #define HECMW_FLAG_PARTTYPE_NODEBASED 1 /* 1:Node-based */ 144 #define HECMW_FLAG_PARTTYPE_ELEMBASED 2 /* 2:Element-based */ 145 int hecmw_flag_partdepth; 146 int hecmw_flag_version; 147 int hecmw_flag_partcontact; 148 #define HECMW_FLAG_PARTCONTACT_UNKNOWN 0 /* 0:unknown */ 149 #define HECMW_FLAG_PARTCONTACT_AGGREGATE 1 /* 1:aggregate */ 150 #define HECMW_FLAG_PARTCONTACT_DISTRIBUTE 2 /* 2:distribute */ 151 #define HECMW_FLAG_PARTCONTACT_SIMPLE 3 /* 3:simple */ 152 153 char gridfile[HECMW_FILENAME_LEN + 1]; 154 int hecmw_n_file; 155 char **files; 156 char header[HECMW_HEADER_LEN + 1]; 157 double zero_temp; 158 159 /* Node */ 160 int n_node; 161 int n_node_gross; 162 int nn_middle; 163 int nn_internal; 164 int *node_internal_list; 165 166 int *node_ID; 167 int *global_node_ID; 168 169 double *node; 170 int n_dof; 171 int n_dof_grp; 172 int n_dof_tot; 173 int *node_dof_index; 174 int *node_dof_item; 175 176 int *node_val_index; 177 double *node_val_item; 178 179 int *node_init_val_index; 180 double *node_init_val_item; 181 182 /* Element */ 183 int n_elem; 184 int n_elem_gross; 185 int ne_internal; 186 int *elem_internal_list; 187 188 int *elem_ID; 189 int *global_elem_ID; 190 int *elem_type; 191 int n_elem_type; 192 int *elem_type_index; 193 int *elem_type_item; 194 int *elem_node_index; 195 int *elem_node_item; 196 int *section_ID; 197 int *elem_mat_ID_index; 198 int *elem_mat_ID_item; 199 int n_elem_mat_ID; 200 201 int *elem_mat_int_index; 202 double *elem_mat_int_val; 203 int *elem_val_index; 204 double *elem_val_item; 205 206 /* PE & Communication */ 207 int zero; 208 HECMW_Comm HECMW_COMM; 209 int PETOT; 210 int PEsmpTOT; 211 int my_rank; 212 int errnof; 213 int n_subdomain; 214 int n_neighbor_pe; 215 int *neighbor_pe; 216 int *import_index; 217 int *import_item; 218 int *export_index; 219 int *export_item; 220 int *shared_index; 221 int *shared_item; 222 223 /* Adaptation */ 224 int coarse_grid_level; 225 int n_adapt; 226 int *when_i_was_refined_node; 227 int *when_i_was_refined_elem; 228 int *adapt_parent_type; 229 int *adapt_type; 230 int *adapt_level; 231 232 int *adapt_parent; 233 int *adapt_children_index; 234 int *adapt_children_item; 235 236 /* Refinement */ 237 int n_refine; 238 int *node_old2new; 239 int *node_new2old; 240 int *elem_old2new; 241 int *elem_new2old; 242 int *n_node_refine_hist; 243 244 struct hecmwST_section *section; 245 struct hecmwST_material *material; 246 struct hecmwST_mpc *mpc; 247 struct hecmwST_amplitude *amp; 248 struct hecmwST_node_grp *node_group; 249 struct hecmwST_elem_grp *elem_group; 250 struct hecmwST_surf_grp *surf_group; 251 struct hecmwST_contact_pair *contact_pair; 252 struct hecmwST_refine_origin *refine_origin; 253 }; 254 255 #endif 256