The following code generates a default element number map and outputs it to an open exodus file. This is a trivial case and included just for illustration. Since this map is optional, it should be written out only if it contains something other than the default map.
int error, exoid;
int *elem_map = (int *)calloc(num_elem, sizeof(int));
for (i=1; i <= num_elem; i++)
elem_map[i-1] = i;
\comment{Equivalent using non-deprecated function}
@ EX_ELEM_MAP
Definition exodusII.h:280
SEACAS_DEPRECATED int ex_put_elem_num_map(int exoid, const void_int *elem_map)
Definition ex_put_elem_num_map.c:51
int ex_put_id_map(int exoid, ex_entity_type map_type, const void_int *map)
Definition ex_put_id_map.c:37