Exodus  7.22
ex_get_elem_num_map.c File Reference
#include "exodusII.h"

Functions

int ex_get_elem_num_map (int exoid, void_int *elem_map)
 

Function Documentation

◆ ex_get_elem_num_map()

int ex_get_elem_num_map ( int  exoid,
void_int elem_map 
)
Deprecated:
Use ex_get_id_map()(exoid, EX_ELEM_MAP, elem_map)

The function ex_get_elem_num_map() reads the optional element number map from the database. See Section LocalElementIds for a description of the element number map. If an element number map is not stored in the data file, a default array (1,2,3,. .. num_elem) is returned. Memory must be allocated for the element number map array ({num_elem} in length) before this call is made.

Returns
In case of an error, ex_get_elem_num_map() returns a negative number; a warning will return a positive number. Possible causes of errors include:
  • data file not properly opened with call to ex_create() or ex_open()
  • if an element number map is not stored, a default map and a warning value are returned.
Parameters
[in]exoidexodus file ID returned from a previous call to ex_create() or ex_open().
[out]elem_mapReturned element number map.

The following code will read an element number map from an open exodus file :

int *elem_map, error, exoid;
/* read element number map */
elem_map = (int *) calloc(num_elem, sizeof(int));
/* Equivalent using non-deprecated function */
error
error
Definition: ex_put_elem_var_tab.c:115
ex__obj_stats::exoid
int exoid
Definition: exodusII_int.h:666
EX_ELEM_MAP
Definition: exodusII.h:266
ex_get_elem_num_map
SEACAS_DEPRECATED int ex_get_elem_num_map(int exoid, void_int *elem_map)
Definition: ex_get_elem_num_map.c:86
ex_get_id_map
int ex_get_id_map(int exoid, ex_entity_type map_type, void_int *map)
Definition: ex_get_id_map.c:55