| 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_NODE_SET, ids) |
| 13 |
|
| 14 |
The function ex_get_node_set_ids() reads the IDs of all of the node |
| 15 |
sets. Memory must be allocated for the returned array of |
| 16 |
({num_node_sets}) IDs before this function is invoked. |
| 17 |
|
| 18 |
\return In case of an error, ex_get_node_set_ids() returns a negative |
| 19 |
number; a warning will return a positive number. Possible causes of |
| 20 |
errors include: |
| 21 |
- data file not properly opened with call to ex_create() or ex_open() |
| 22 |
- a warning value is returned if no node sets are stored in the file. |
| 23 |
|
| 24 |
\param[in] exoid exodus file ID returned from a previous call to ex_create() |
| 25 |
or ex_open(). |
| 26 |
\param[out] ids Returned array of the node sets IDs. The order of the IDs |
| 27 |
in this array |
| 28 |
reflects the sequence the node sets were introduced into |
| 29 |
the file. |
| 30 |
|
| 31 |
As an example, the following code will read all of the node set IDs |
| 32 |
from an open data file: |
| 33 |
|
| 34 |
~~~{.c} |
| 35 |
int *ids, num_node_sets, error, exoid; |
| 36 |
|
| 37 |
\comment{read node sets IDs} |
| 38 |
ids = (int *) calloc(num_node_sets, sizeof(int)); |
| 39 |
|
| 40 |
error = ex_get_node_set_ids (exoid, ids); |
| 41 |
|
| 42 |
\comment{Same result using non-deprecated functions.} |
| 43 |
error = ex_get_ids (exoid, EX_NODE_SET, ids); |
| 44 |
~~~ |
| 45 |
*/ |
| 46 |
|
| 47 |
int ex_get_node_set_ids(int exoid, void_int *ids) { return ex_get_ids(exoid, EX_NODE_SET, ids); } |