Exodus 7.10

Functions
ex_get_map.c File Reference
`#include "exodusII.h"`
`#include "exodusII_int.h"`
`#include "netcdf.h"`
`#include <stddef.h>`
`#include <stdio.h>`
`#include <sys/types.h>`

## Functions
int | ex_get_map (int exoid, void_int *elem_map)

## Function Documentation

## ◆ ex_get_map()

int ex_get_map | ( | int | exoid,
|  | void_int * | elem_map
| ) |  |

The function ex_get_map() reads the element order map from the database. See #ElementOrderMap for a description of the element order map. If an element order 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 map array ({num_elem} in length) before this call is made.

Returns
  In case of an error, ex_get_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 order map is not stored, a default map and a warning value are returned.

Parameters

  [in] | exoid | exodus file ID returned from a previous call to ex_create() or ex_open().
  [out] | elem_map | Returned element order map.

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

int *elem_map, error, exoid;
/* read element order map */
elem_map = (int *)calloc(num_elem, sizeof(int));
error = ex_get_map(exoid, elem_map);