| 1 |
/* |
| 2 |
* Copyright(C) 1999-2020 National Technology & Engineering Solutions |
| 3 |
* of Sandia, LLC (NTESS). Under the terms of Contract DE-NA0003525 with |
| 4 |
* NTESS, the U.S. Government retains certain rights in this software. |
| 5 |
* |
| 6 |
* See packages/seacas/LICENSE for details |
| 7 |
*/ |
| 8 |
#include <exodusII.h> |
| 9 |
#include <exodusII_int.h> |
| 10 |
#include <ne_nemesisI.h> |
| 11 |
|
| 12 |
/*============================================================================= |
| 13 |
* Initial Information Routines |
| 14 |
*===========================================================================*/ |
| 15 |
int ne_get_init_info(int neid, /* NemesisI file ID */ |
| 16 |
int *num_proc, /* Number of processors */ |
| 17 |
int *num_proc_in_f, /* Number of procs in this file */ |
| 18 |
char *ftype) |
| 19 |
{ |
| 20 |
return ex_get_init_info(neid, num_proc, num_proc_in_f, ftype); |
| 21 |
} |
| 22 |
|
| 23 |
int ne_put_init_info(int neid, /* NemesisI file ID */ |
| 24 |
int num_proc, /* Number of processors */ |
| 25 |
int num_proc_in_f, /* Number of procs in this file */ |
| 26 |
char *ftype) |
| 27 |
{ |
| 28 |
return ex_put_init_info(neid, num_proc, num_proc_in_f, ftype); |
| 29 |
} |
| 30 |
|
| 31 |
int ne_get_init_global(int neid, /* NemesisI file ID */ |
| 32 |
void_int *num_nodes_g, /* Number of global FEM nodes */ |
| 33 |
void_int *num_elems_g, /* Number of global FEM elements */ |
| 34 |
void_int *num_elem_blks_g, /* Number of global elem blocks */ |
| 35 |
void_int *num_node_sets_g, /* Number of global node sets */ |
| 36 |
void_int *num_side_sets_g /* Number of global side sets */ |
| 37 |
) |
| 38 |
{ |
| 39 |
return ex_get_init_global(neid, num_nodes_g, num_elems_g, num_elem_blks_g, num_node_sets_g, |
| 40 |
num_side_sets_g); |
| 41 |
} |
| 42 |
|
| 43 |
int ne_put_init_global(int neid, /* NemesisI file ID */ |
| 44 |
int64_t num_nodes_g, /* Number of global FEM nodes */ |
| 45 |
int64_t num_elems_g, /* Number of global FEM elements */ |
| 46 |
int64_t num_elem_blks_g, /* Number of global elem blocks */ |
| 47 |
int64_t num_node_sets_g, /* Number of global node sets */ |
| 48 |
int64_t num_side_sets_g /* Number of global side sets */ |
| 49 |
) |
| 50 |
{ |
| 51 |
return ex_put_init_global(neid, num_nodes_g, num_elems_g, num_elem_blks_g, num_node_sets_g, |
| 52 |
num_side_sets_g); |
| 53 |
} |
| 54 |
|
| 55 |
int ne_put_version(int neid) { return exi_put_nemesis_version(neid); } |
| 56 |
|
| 57 |
/*============================================================================= |
| 58 |
* Loadbalance Parameter Routines |
| 59 |
*===========================================================================*/ |
| 60 |
int ne_get_loadbal_param(int neid, /* NetCDF/Exodus file ID */ |
| 61 |
void_int *num_int_nodes, /* Number of internal FEM nodes */ |
| 62 |
void_int *num_bor_nodes, /* Number of border FEM nodes */ |
| 63 |
void_int *num_ext_nodes, /* Number of external FEM nodes */ |
| 64 |
void_int *num_int_elems, /* Number of internal FEM elems */ |
| 65 |
void_int *num_bor_elems, /* Number of border FEM elems */ |
| 66 |
void_int *num_node_cmaps, /* Number of nodal comm maps */ |
| 67 |
void_int *num_elem_cmaps, /* Number of elemental comm maps */ |
| 68 |
int processor /* Processor ID */ |
| 69 |
) |
| 70 |
{ |
| 71 |
return ex_get_loadbal_param(neid, num_int_nodes, num_bor_nodes, num_ext_nodes, num_int_elems, |
| 72 |
num_bor_elems, num_node_cmaps, num_elem_cmaps, processor); |
| 73 |
} |
| 74 |
|
| 75 |
int ne_put_loadbal_param(int neid, /* NemesisI file ID */ |
| 76 |
int64_t num_int_nodes, /* Number of internal FEM nodes */ |
| 77 |
int64_t num_bor_nodes, /* Number of border FEM nodes */ |
| 78 |
int64_t num_ext_nodes, /* Number of external FEM nodes */ |
| 79 |
int64_t num_int_elems, /* Number of internal FEM elems */ |
| 80 |
int64_t num_bor_elems, /* Number of border FEM elems */ |
| 81 |
int64_t num_node_cmaps, /* Number of nodal comm maps */ |
| 82 |
int64_t num_elem_cmaps, /* Number of elemental comm maps */ |
| 83 |
int processor /* Processor ID */ |
| 84 |
) |
| 85 |
{ |
| 86 |
return ex_put_loadbal_param(neid, num_int_nodes, num_bor_nodes, num_ext_nodes, num_int_elems, |
| 87 |
num_bor_elems, num_node_cmaps, num_elem_cmaps, processor); |
| 88 |
} |
| 89 |
|
| 90 |
int ne_put_loadbal_param_cc(int neid, /* NetCDF/Exodus file ID */ |
| 91 |
void_int *num_int_nodes, /* Number of internal node IDs */ |
| 92 |
void_int *num_bor_nodes, /* Number of border node IDs */ |
| 93 |
void_int *num_ext_nodes, /* Number of external node IDs */ |
| 94 |
void_int *num_int_elems, /* Number of internal elem IDs */ |
| 95 |
void_int *num_bor_elems, /* Number of border elem IDs */ |
| 96 |
void_int *num_node_cmaps, /* Number of nodal comm maps */ |
| 97 |
void_int *num_elem_cmaps /* Number of elem comm maps */ |
| 98 |
) |
| 99 |
{ |
| 100 |
return ex_put_loadbal_param_cc(neid, num_int_nodes, num_bor_nodes, num_ext_nodes, num_int_elems, |
| 101 |
num_bor_elems, num_node_cmaps, num_elem_cmaps); |
| 102 |
} |
| 103 |
|
| 104 |
/*============================================================================= |
| 105 |
* NS, SS & EB Global Parameter Routines |
| 106 |
*===========================================================================*/ |
| 107 |
int ne_get_ns_param_global(int neid, /* NetCDF/Exodus file ID */ |
| 108 |
void_int *ns_ids_glob, /* Global IDs of node sets */ |
| 109 |
void_int *ns_n_cnt_glob, /* Count of nodes in node sets */ |
| 110 |
void_int *ns_df_cnt_glob /* Count of dist. factors in ns */ |
| 111 |
) |
| 112 |
{ |
| 113 |
return ex_get_ns_param_global(neid, ns_ids_glob, ns_n_cnt_glob, ns_df_cnt_glob); |
| 114 |
} |
| 115 |
|
| 116 |
int ne_put_ns_param_global(int neid, /* NemesisI file ID */ |
| 117 |
void_int *global_ids, /* Vector of global node-set IDs */ |
| 118 |
void_int *global_n_cnts, /* Vector of node counts in node-sets */ |
| 119 |
void_int *global_df_cnts /* Vector of dist factor counts in node-sets */ |
| 120 |
) |
| 121 |
{ |
| 122 |
return ex_put_ns_param_global(neid, global_ids, global_n_cnts, global_df_cnts); |
| 123 |
} |
| 124 |
|
| 125 |
int ne_get_ss_param_global(int neid, /* NetCDF/Exodus file ID */ |
| 126 |
void_int *ss_ids_glob, /* Global side-set IDs */ |
| 127 |
void_int *ss_s_cnt_glob, /* Global side count */ |
| 128 |
void_int *ss_df_cnt_glob /* Global dist. factor count */ |
| 129 |
) |
| 130 |
{ |
| 131 |
return ex_get_ss_param_global(neid, ss_ids_glob, ss_s_cnt_glob, ss_df_cnt_glob); |
| 132 |
} |
| 133 |
|
| 134 |
int ne_put_ss_param_global(int neid, /* NemesisI file ID */ |
| 135 |
void_int *global_ids, /* Vector of global side-set IDs */ |
| 136 |
void_int *global_el_cnts, /* Vector of element/side */ |
| 137 |
/* counts in each side set */ |
| 138 |
void_int *global_df_cnts /* Vector of dist. factor */ |
| 139 |
/* counts in each side set */ |
| 140 |
) |
| 141 |
{ |
| 142 |
return ex_put_ss_param_global(neid, global_ids, global_el_cnts, global_df_cnts); |
| 143 |
} |
| 144 |
|
| 145 |
int ne_get_eb_info_global(int neid, /* NemesisI file ID */ |
| 146 |
void_int *el_blk_ids, /* Vector of global element IDs */ |
| 147 |
void_int *el_blk_cnts /* Vector of global element counts */ |
| 148 |
) |
| 149 |
{ |
| 150 |
return ex_get_eb_info_global(neid, el_blk_ids, el_blk_cnts); |
| 151 |
} |
| 152 |
|
| 153 |
int ne_put_eb_info_global(int neid, /* NemesisI file ID */ |
| 154 |
void_int *el_blk_ids, /* Vector of global element IDs */ |
| 155 |
void_int *el_blk_cnts /* Vector of global element counts */ |
| 156 |
) |
| 157 |
{ |
| 158 |
return ex_put_eb_info_global(neid, el_blk_ids, el_blk_cnts); |
| 159 |
} |
| 160 |
|
| 161 |
/*============================================================================= |
| 162 |
* NS, SS & EB Subset Routines |
| 163 |
*===========================================================================*/ |
| 164 |
int ne_get_n_side_set(int neid, /* NetCDF/Exodus file ID */ |
| 165 |
ex_entity_id side_set_id, /* Side-set ID to read */ |
| 166 |
int64_t start_side_num, /* Starting element number */ |
| 167 |
int64_t num_sides, /* Number of sides to read */ |
| 168 |
void_int *side_set_elem_list, /* List of element IDs */ |
| 169 |
void_int *side_set_side_list /* List of side IDs */ |
| 170 |
) |
| 171 |
{ |
| 172 |
return ex_get_partial_set(neid, EX_SIDE_SET, side_set_id, start_side_num, num_sides, |
| 173 |
side_set_elem_list, side_set_side_list); |
| 174 |
} |
| 175 |
|
| 176 |
int ne_put_n_side_set(int neid, /* NetCDF/Exodus file ID */ |
| 177 |
ex_entity_id side_set_id, /* Side-set ID to write */ |
| 178 |
int64_t start_side_num, /* Starting element number */ |
| 179 |
int64_t num_sides, /* Number of sides to write */ |
| 180 |
const void_int *side_set_elem_list, /* List of element IDs */ |
| 181 |
const void_int *side_set_side_list /* List of side IDs */ |
| 182 |
) |
| 183 |
{ |
| 184 |
return ex_put_partial_set(neid, EX_SIDE_SET, side_set_id, start_side_num, num_sides, |
| 185 |
side_set_elem_list, side_set_side_list); |
| 186 |
} |
| 187 |
|
| 188 |
int ne_get_n_side_set_df(int neid, /* NetCDF/Exodus file ID */ |
| 189 |
ex_entity_id side_set_id, /* Side-set ID */ |
| 190 |
int64_t start_num, /* Starting df number */ |
| 191 |
int64_t num_df_to_get, /* Number of df's to read */ |
| 192 |
void *side_set_df /* Distribution factors */ |
| 193 |
) |
| 194 |
{ |
| 195 |
return ex_get_partial_set_dist_fact(neid, EX_SIDE_SET, side_set_id, start_num, num_df_to_get, |
| 196 |
side_set_df); |
| 197 |
} |
| 198 |
|
| 199 |
int ne_put_n_side_set_df(int neid, /* NetCDF/Exodus file ID */ |
| 200 |
ex_entity_id side_set_id, /* Side-set ID */ |
| 201 |
int64_t start_num, /* Starting df number */ |
| 202 |
int64_t num_df_to_get, /* Number of df's to write */ |
| 203 |
void *side_set_df /* Distribution factors */ |
| 204 |
) |
| 205 |
{ |
| 206 |
return ex_put_partial_set_dist_fact(neid, EX_SIDE_SET, side_set_id, start_num, num_df_to_get, |
| 207 |
side_set_df); |
| 208 |
} |
| 209 |
|
| 210 |
int ne_get_n_node_set(int neid, /* NetCDF/Exodus file ID */ |
| 211 |
ex_entity_id node_set_id, /* Node set ID */ |
| 212 |
int64_t start_node_num, /* Node index to start reading at */ |
| 213 |
int64_t num_node, /* Number of nodes to read */ |
| 214 |
void_int *node_set_node_list /* List of nodes in node set */ |
| 215 |
) |
| 216 |
{ |
| 217 |
return ex_get_partial_set(neid, EX_NODE_SET, node_set_id, start_node_num, num_node, |
| 218 |
node_set_node_list, NULL); |
| 219 |
} |
| 220 |
|
| 221 |
int ne_put_n_node_set(int neid, /* NetCDF/Exodus file ID */ |
| 222 |
ex_entity_id node_set_id, /* Node set ID */ |
| 223 |
int64_t start_node_num, /* Node index to start writing at */ |
| 224 |
int64_t num_node, /* Number of nodes to write */ |
| 225 |
const void_int *node_set_node_list /* List of nodes in node set */ |
| 226 |
) |
| 227 |
{ |
| 228 |
return ex_put_partial_set(neid, EX_NODE_SET, node_set_id, start_node_num, num_node, |
| 229 |
node_set_node_list, NULL); |
| 230 |
} |
| 231 |
|
| 232 |
int ne_get_n_node_set_df(int neid, /* NetCDF/Exodus file ID */ |
| 233 |
ex_entity_id node_set_id, /* Node-set ID */ |
| 234 |
int64_t start_num, /* Starting df number */ |
| 235 |
int64_t num_df_to_get, /* Number of df's to read */ |
| 236 |
void *node_set_df /* Distribution factors */ |
| 237 |
) |
| 238 |
{ |
| 239 |
return ex_get_partial_set_dist_fact(neid, EX_NODE_SET, node_set_id, start_num, num_df_to_get, |
| 240 |
node_set_df); |
| 241 |
} |
| 242 |
|
| 243 |
int ne_put_n_node_set_df(int neid, /* NetCDF/Exodus file ID */ |
| 244 |
ex_entity_id node_set_id, /* Node-set ID */ |
| 245 |
int64_t start_num, /* Starting df number */ |
| 246 |
int64_t num_df_to_get, /* Number of df's to write */ |
| 247 |
void *node_set_df /* Distribution factors */ |
| 248 |
) |
| 249 |
{ |
| 250 |
return ex_put_partial_set_dist_fact(neid, EX_NODE_SET, node_set_id, start_num, num_df_to_get, |
| 251 |
node_set_df); |
| 252 |
} |
| 253 |
|
| 254 |
int ne_get_n_coord(int neid, /* NetCDF/Exodus file ID */ |
| 255 |
int64_t start_node_num, /* Starting position to read from */ |
| 256 |
int64_t num_nodes, /* Number of coords to read */ |
| 257 |
void *x_coor, /* Vector of X coordinates */ |
| 258 |
void *y_coor, /* Vector of Y coordinates */ |
| 259 |
void *z_coor /* Vector of Z coordinates */ |
| 260 |
) |
| 261 |
{ |
| 262 |
return ex_get_partial_coord(neid, start_node_num, num_nodes, x_coor, y_coor, z_coor); |
| 263 |
} |
| 264 |
|
| 265 |
int ne_put_n_coord(int neid, /* NetCDF/Exodus file ID */ |
| 266 |
int64_t start_node_num, /* Starting position to write to */ |
| 267 |
int64_t num_nodes, /* Number of coords to write */ |
| 268 |
void *x_coor, /* Vector of X coordinates */ |
| 269 |
void *y_coor, /* Vector of Y coordinates */ |
| 270 |
void *z_coor /* Vector of Z coordinates */ |
| 271 |
) |
| 272 |
{ |
| 273 |
return ex_put_partial_coord(neid, start_node_num, num_nodes, x_coor, y_coor, z_coor); |
| 274 |
} |
| 275 |
|
| 276 |
int ne_get_n_elem_conn(int neid, /* NetCDF/Exodus file ID */ |
| 277 |
ex_entity_id elem_blk_id, /* Element block ID */ |
| 278 |
int64_t start_elem_num, /* Starting position to read from */ |
| 279 |
int64_t num_elems, /* Number of elements to read */ |
| 280 |
void_int *connect /* Connectivity vector */ |
| 281 |
) |
| 282 |
{ |
| 283 |
return ex_get_partial_conn(neid, EX_ELEM_BLOCK, elem_blk_id, start_elem_num, num_elems, connect, |
| 284 |
NULL, NULL); |
| 285 |
} |
| 286 |
|
| 287 |
int ne_put_n_elem_conn(int neid, /* NetCDF/Exodus file ID */ |
| 288 |
ex_entity_id elem_blk_id, /* Element block ID */ |
| 289 |
int64_t start_elem_num, /* Starting position to write to */ |
| 290 |
int64_t num_elems, /* Number of elements to write */ |
| 291 |
const void_int *connect /* Connectivity vector */ |
| 292 |
) |
| 293 |
{ |
| 294 |
return ex_put_partial_conn(neid, EX_ELEM_BLOCK, elem_blk_id, start_elem_num, num_elems, connect, |
| 295 |
NULL, NULL); |
| 296 |
} |
| 297 |
|
| 298 |
int ne_get_n_elem_attr(int neid, /* NetCDF/Exodus file ID */ |
| 299 |
ex_entity_id elem_blk_id, /* Element block ID */ |
| 300 |
int64_t start_elem_num, /* Starting position to read from */ |
| 301 |
int64_t num_elems, /* Number of elements to read */ |
| 302 |
void *attrib /* Attribute */ |
| 303 |
) |
| 304 |
{ |
| 305 |
return ex_get_partial_attr(neid, EX_ELEM_BLOCK, elem_blk_id, start_elem_num, num_elems, attrib); |
| 306 |
} |
| 307 |
|
| 308 |
int ne_put_n_elem_attr(int neid, /* NetCDF/Exodus file ID */ |
| 309 |
ex_entity_id elem_blk_id, /* Element block ID */ |
| 310 |
int64_t start_elem_num, /* Starting position to write to */ |
| 311 |
int64_t num_elems, /* Number of elements to write */ |
| 312 |
void *attrib /* Attribute */ |
| 313 |
) |
| 314 |
{ |
| 315 |
return ex_put_partial_attr(neid, EX_ELEM_BLOCK, elem_blk_id, start_elem_num, num_elems, attrib); |
| 316 |
} |
| 317 |
|
| 318 |
int ne_get_elem_type(int neid, /* NetCDF/Exodus file ID */ |
| 319 |
ex_entity_id elem_blk_id, /* Element block ID */ |
| 320 |
char *elem_type /* The name of the element type */ |
| 321 |
) |
| 322 |
{ |
| 323 |
return ex_get_elem_type(neid, elem_blk_id, elem_type); |
| 324 |
} |
| 325 |
|
| 326 |
/*============================================================================= |
| 327 |
* Variable Routines |
| 328 |
*===========================================================================*/ |
| 329 |
int ne_get_n_elem_var(int neid, /* NetCDF/Exodus file ID */ |
| 330 |
int time_step, /* time index */ |
| 331 |
int elem_var_index, /* elemental variable index */ |
| 332 |
ex_entity_id elem_blk_id, /* elemental block id */ |
| 333 |
int64_t num_elem_this_blk, /* number of elements in block */ |
| 334 |
int64_t start_elem_num, /* Starting position for read */ |
| 335 |
int64_t num_elem, /* Number of elements to read */ |
| 336 |
void *elem_var_vals /* variable values */ |
| 337 |
) |
| 338 |
{ |
| 339 |
return ex_get_partial_var(neid, time_step, EX_ELEM_BLOCK, elem_var_index, elem_blk_id, |
| 340 |
start_elem_num, num_elem, elem_var_vals); |
| 341 |
} |
| 342 |
|
| 343 |
int ne_put_elem_var_slab(int neid, /* NetCDF/Exodus file ID */ |
| 344 |
int time_step, /* time index */ |
| 345 |
int elem_var_index, /* elemental variable index */ |
| 346 |
ex_entity_id elem_blk_id, /* elemental block id */ |
| 347 |
int64_t start_pos, /* Starting position to write to */ |
| 348 |
int64_t num_vals, /* Number of elements to write */ |
| 349 |
void *elem_var_vals /* variable values */ |
| 350 |
) |
| 351 |
{ |
| 352 |
return ex_put_partial_var(neid, time_step, EX_ELEM_BLOCK, elem_var_index, elem_blk_id, start_pos, |
| 353 |
num_vals, elem_var_vals); |
| 354 |
} |
| 355 |
|
| 356 |
int ne_get_n_nodal_var(int neid, /* NetCDF/Exodus file ID */ |
| 357 |
int time_step, /* whole time step number */ |
| 358 |
int nodal_var_index, /* index of desired nodal var */ |
| 359 |
int64_t start_node_num, /* starting node number */ |
| 360 |
int64_t num_nodes, /* number of nodes to read */ |
| 361 |
void *nodal_vars /* array of nodal var values */ |
| 362 |
) |
| 363 |
{ |
| 364 |
return ex_get_partial_var(neid, time_step, EX_NODAL, nodal_var_index, 1, start_node_num, |
| 365 |
num_nodes, nodal_vars); |
| 366 |
} |
| 367 |
|
| 368 |
int ne_put_nodal_var_slab(int neid, /* NetCDF/Exodus file ID */ |
| 369 |
int time_step, /* The time step index */ |
| 370 |
int nodal_var_index, /* Nodal variable index */ |
| 371 |
int64_t start_pos, /* Start position for write */ |
| 372 |
int64_t num_vals, /* Number of nodal variables */ |
| 373 |
void *nodal_var_vals /* Nodal variable values */ |
| 374 |
) |
| 375 |
{ |
| 376 |
return ex_put_partial_var(neid, time_step, EX_NODAL, nodal_var_index, 1, start_pos, num_vals, |
| 377 |
nodal_var_vals); |
| 378 |
} |
| 379 |
|
| 380 |
/*============================================================================= |
| 381 |
* Number Map Routines |
| 382 |
*===========================================================================*/ |
| 383 |
int ne_get_n_elem_num_map(int neid, /* NetCDF/Exodus file ID */ |
| 384 |
int64_t start_ent, /* Starting position to read from */ |
| 385 |
int64_t num_ents, /* Number of elements to read */ |
| 386 |
void_int *elem_map /* element map numbers */ |
| 387 |
) |
| 388 |
{ |
| 389 |
return ex_get_partial_id_map(neid, EX_ELEM_MAP, start_ent, num_ents, elem_map); |
| 390 |
} |
| 391 |
|
| 392 |
int ne_put_n_elem_num_map(int neid, /* NetCDF/Exodus file ID */ |
| 393 |
int64_t start_ent, /* Starting position to read from */ |
| 394 |
int64_t num_ents, /* Number of elements to read */ |
| 395 |
const void_int *elem_map /* element map numbers */ |
| 396 |
) |
| 397 |
{ |
| 398 |
return ex_put_partial_id_map(neid, EX_ELEM_MAP, start_ent, num_ents, elem_map); |
| 399 |
} |
| 400 |
|
| 401 |
int ne_get_n_node_num_map(int neid, /* NetCDF/Exodus file ID */ |
| 402 |
int64_t start_ent, /* starting node number */ |
| 403 |
int64_t num_ents, /* number of nodes to read */ |
| 404 |
void_int *node_map /* vector for node map */ |
| 405 |
) |
| 406 |
{ |
| 407 |
return ex_get_partial_id_map(neid, EX_NODE_MAP, start_ent, num_ents, node_map); |
| 408 |
} |
| 409 |
|
| 410 |
int ne_put_n_node_num_map(int neid, /* NetCDF/Exodus file ID */ |
| 411 |
int64_t start_ent, /* starting node number */ |
| 412 |
int64_t num_ents, /* number of nodes to read */ |
| 413 |
const void_int *node_map /* vector for node map */ |
| 414 |
) |
| 415 |
{ |
| 416 |
return ex_put_partial_id_map(neid, EX_NODE_MAP, start_ent, num_ents, node_map); |
| 417 |
} |
| 418 |
|
| 419 |
int ne_get_node_map(int neid, /* NetCDF/Exodus file ID */ |
| 420 |
void_int *node_mapi, /* Internal FEM node IDs */ |
| 421 |
void_int *node_mapb, /* Border FEM node IDs */ |
| 422 |
void_int *node_mape, /* External FEM node IDs */ |
| 423 |
int processor /* Processor IDs */ |
| 424 |
) |
| 425 |
{ |
| 426 |
return ex_get_processor_node_maps(neid, node_mapi, node_mapb, node_mape, processor); |
| 427 |
} |
| 428 |
|
| 429 |
int ne_put_node_map(int neid, /* NetCDF/Exodus file ID */ |
| 430 |
void_int *node_mapi, /* Internal FEM node IDs */ |
| 431 |
void_int *node_mapb, /* Border FEM node IDs */ |
| 432 |
void_int *node_mape, /* External FEM node IDs */ |
| 433 |
int processor /* This processor ID */ |
| 434 |
) |
| 435 |
{ |
| 436 |
return ex_put_processor_node_maps(neid, node_mapi, node_mapb, node_mape, processor); |
| 437 |
} |
| 438 |
|
| 439 |
int ne_get_elem_map(int neid, /* NetCDF/Exodus file ID */ |
| 440 |
void_int *elem_mapi, /* Internal element IDs */ |
| 441 |
void_int *elem_mapb, /* Border element IDs */ |
| 442 |
int processor /* Processor ID */ |
| 443 |
) |
| 444 |
{ |
| 445 |
return ex_get_processor_elem_maps(neid, elem_mapi, elem_mapb, processor); |
| 446 |
} |
| 447 |
|
| 448 |
int ne_put_elem_map(int neid, /* NetCDF/Exodus file ID */ |
| 449 |
void_int *elem_mapi, /* Internal FEM element IDs */ |
| 450 |
void_int *elem_mapb, /* Border FEM element IDs */ |
| 451 |
int processor /* This processor ID */ |
| 452 |
) |
| 453 |
{ |
| 454 |
return ex_put_processor_elem_maps(neid, elem_mapi, elem_mapb, processor); |
| 455 |
} |
| 456 |
|
| 457 |
/*============================================================================= |
| 458 |
* Communications Maps Routines |
| 459 |
*===========================================================================*/ |
| 460 |
|
| 461 |
int ne_get_cmap_params(int neid, /* NetCDF/Exodus file ID */ |
| 462 |
void_int *node_cmap_ids, /* Nodal comm. map IDs */ |
| 463 |
void_int *node_cmap_node_cnts, /* Number of nodes in each map */ |
| 464 |
void_int *elem_cmap_ids, /* Elemental comm. map IDs */ |
| 465 |
void_int *elem_cmap_elem_cnts, /* Number of elems in each map */ |
| 466 |
int processor /* This processor ID */ |
| 467 |
) |
| 468 |
{ |
| 469 |
return ex_get_cmap_params(neid, node_cmap_ids, node_cmap_node_cnts, elem_cmap_ids, |
| 470 |
elem_cmap_elem_cnts, processor); |
| 471 |
} |
| 472 |
|
| 473 |
int ne_put_cmap_params(int neid, /* NetCDF/Exodus file ID */ |
| 474 |
void_int *node_map_ids, /* Node map IDs */ |
| 475 |
void_int *node_map_node_cnts, /* Nodes in nodal comm */ |
| 476 |
void_int *elem_map_ids, /* Elem map IDs */ |
| 477 |
void_int *elem_map_elem_cnts, /* Elems in elemental comm */ |
| 478 |
int64_t processor /* This processor ID */ |
| 479 |
) |
| 480 |
{ |
| 481 |
return ex_put_cmap_params(neid, node_map_ids, node_map_node_cnts, elem_map_ids, |
| 482 |
elem_map_elem_cnts, processor); |
| 483 |
} |
| 484 |
|
| 485 |
int ne_put_cmap_params_cc(int neid, /* NetCDF/Exodus file ID */ |
| 486 |
void_int *node_map_ids, /* Node map IDs */ |
| 487 |
void_int *node_map_node_cnts, /* Nodes in nodal comm */ |
| 488 |
void_int *node_proc_ptrs, /* Pointer into array for */ |
| 489 |
/* node maps */ |
| 490 |
void_int *elem_map_ids, /* Elem map IDs */ |
| 491 |
void_int *elem_map_elem_cnts, /* Elems in elemental comm */ |
| 492 |
void_int *elem_proc_ptrs /* Pointer into array for */ |
| 493 |
/* elem maps */ |
| 494 |
) |
| 495 |
{ |
| 496 |
return ex_put_cmap_params_cc(neid, node_map_ids, node_map_node_cnts, node_proc_ptrs, elem_map_ids, |
| 497 |
elem_map_elem_cnts, elem_proc_ptrs); |
| 498 |
} |
| 499 |
|
| 500 |
int ne_get_node_cmap(int neid, /* NetCDF/Exodus file ID */ |
| 501 |
ex_entity_id map_id, /* Map ID */ |
| 502 |
void_int *node_ids, /* FEM node IDs */ |
| 503 |
void_int *proc_ids, /* Processor IDs */ |
| 504 |
int processor /* This processor ID */ |
| 505 |
) |
| 506 |
{ |
| 507 |
return ex_get_node_cmap(neid, map_id, node_ids, proc_ids, processor); |
| 508 |
} |
| 509 |
|
| 510 |
int ne_put_node_cmap(int neid, /* NetCDF/Exodus file ID */ |
| 511 |
ex_entity_id map_id, /* Nodal comm map ID */ |
| 512 |
void_int *node_ids, /* FEM node IDs */ |
| 513 |
void_int *proc_ids, /* Processor IDs */ |
| 514 |
int processor /* This processor ID */ |
| 515 |
) |
| 516 |
{ |
| 517 |
return ex_put_node_cmap(neid, map_id, node_ids, proc_ids, processor); |
| 518 |
} |
| 519 |
|
| 520 |
int ne_get_elem_cmap(int neid, /* NetCDF/Exodus file ID */ |
| 521 |
ex_entity_id map_id, /* Elemental comm map ID */ |
| 522 |
void_int *elem_ids, /* Element IDs */ |
| 523 |
void_int *side_ids, /* Element side IDs */ |
| 524 |
void_int *proc_ids, /* Processor IDs */ |
| 525 |
int processor /* This processor ID */ |
| 526 |
) |
| 527 |
{ |
| 528 |
return ex_get_elem_cmap(neid, map_id, elem_ids, side_ids, proc_ids, processor); |
| 529 |
} |
| 530 |
|
| 531 |
int ne_put_elem_cmap(int neid, /* NetCDF/Exodus file ID */ |
| 532 |
ex_entity_id map_id, /* Elemental comm map ID */ |
| 533 |
void_int *elem_ids, /* Vector of element IDs */ |
| 534 |
void_int *side_ids, /* Vector of side IDs */ |
| 535 |
void_int *proc_ids, /* Vector of processor IDs */ |
| 536 |
int processor /* This processor ID */ |
| 537 |
) |
| 538 |
{ |
| 539 |
return ex_put_elem_cmap(neid, map_id, elem_ids, side_ids, proc_ids, processor); |
| 540 |
} |
| 541 |
|
| 542 |
int ne_get_idx(int neid, /* NetCDF/Exodus file ID */ |
| 543 |
const char *ne_var_name, /* Nemesis index variable name */ |
| 544 |
int64_t *index, /* array of length 2 to hold results */ |
| 545 |
int pos /* position of this proc/cmap in index */ |
| 546 |
) |
| 547 |
{ |
| 548 |
return ex_get_idx(neid, ne_var_name, index, pos); |
| 549 |
} |