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