Debian Codegraph @

packages/seacas/libraries/exodus/src/deprecated/ex_get_elem_num_map.c

raw
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 /*****************************************************************************
9 *
10 * exgenm - ex_get_elem_num_map
11 *
12 * entry conditions -
13 * input parameters:
14 * int exoid exodus file id
15 *
16 * exit conditions -
17 * int* elem_map element number map array
18 *
19 * revision history -
20 *
21 *****************************************************************************/
22
23 #include "exodusII.h"
24
25 /*!
26 \deprecated Use ex_get_id_map()(exoid, EX_ELEM_MAP, elem_map)
27
28 The function ex_get_elem_num_map() reads the optional element number
29 map from the database. See Section LocalElementIds for a description of
30 the element number map. If an element number map is not stored in the
31 data file, a default array (1,2,3,. .. num_elem) is
32 returned. Memory must be allocated for the element number map array
33 ({num_elem} in length) before this call is made.
34
35 \return In case of an error, ex_get_elem_num_map() returns a negative
36 number; a warning will return a positive number. Possible causes of
37 errors include:
38 - data file not properly opened with call to ex_create() or ex_open()
39 - if an element number map is not stored, a default map and a warning value
40 are returned.
41
42 \param[in] exoid exodus file ID returned from a previous call to
43 ex_create() or ex_open().
44 \param[out] elem_map Returned element number map.
45
46 The following code will read an element number map from an
47 open exodus file :
48 ~~~{.c}
49 int *elem_map, error, exoid;
50
51 \comment{read element number map}
52 elem_map = (int *) calloc(num_elem, sizeof(int));
53 error = ex_get_elem_num_map (exoid, elem_map);
54
55 \comment{Equivalent using non-deprecated function}
56 error = ex_get_id_map(exoid, EX_ELEM_MAP, elem_map);
57 ~~~
58 */
59
60 int ex_get_elem_num_map(int exoid, void_int *elem_map)
61 {
62 return ex_get_id_map(exoid, EX_ELEM_MAP, elem_map);
63 }