Debian Codegraph @

packages/seacas/libraries/exodus/src/deprecated/ex_get_elem_blk_ids.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 #include "exodusII.h"
10
11 /*!
12 \deprecated Use ex_get_ids()(exoid, EX_ELEM_BLOCK, ids) instead
13
14 The function ex_get_elem_blk_ids() reads the IDs of all of the element
15 blocks. Memory must be allocated for the returned array of
16 ({num_elem_blk}) IDs before this function is invoked. The required
17 size(num_elem_blk) can be determined via a call to ex_inquire() or
18 ex_inquire_int().
19
20 \return In case of an error, ex_get_elem_blk_ids() returns a negative
21 number; a warning will return a positive number. Possible causes of
22 errors include:
23 - data file not properly opened with call to ex_create() or ex_open()
24
25 \param[in] exoid exodus file ID returned from a previous call to
26 ex_create() or ex_open().
27 \param[out] ids Returned array of the element blocks IDs. The order
28 of the IDs in this
29 array reflects the sequence that the element blocks
30 were introduced
31 into the file.
32
33 The following code segment reads all the element block IDs:
34
35 ~~~{.c}
36 int error, exoid, *idelbs, num_elem_blk;
37 idelbs = (int *) calloc(num_elem_blk, sizeof(int));
38
39 error = ex_get_elem_blk_ids (exoid, idelbs);
40
41 \comment{Same result using non-deprecated functions}
42 error = ex_get_ids (exoid, EX_ELEM_BLOCK, idelbs);
43
44 ~~~
45
46 */
47
48 int ex_get_elem_blk_ids(int exoid, void_int *ids)
49 {
50 /* ex_get_elem_blk_ids should be deprecated. */
51 return ex_get_ids(exoid, EX_ELEM_BLOCK, ids);
52 }