Debian Codegraph @

packages/seacas/libraries/exodus/src/deprecated/ex_put_node_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 #include "exodusII.h"
9
10 /*!
11
12 \deprecated Use ex_put_id_map()(exoid, EX_NODE_MAP, node_map)
13
14 The function ex_put_node_num_map() writes out the optional node number
15 map to the database. See Section LocalNodeIds for a description of the
16 node number map. The function ex_put_init() must be invoked before
17 this call is made.
18
19 \return In case of an error, ex_put_node_num_map() returns a negative
20 number; a warning will return a positive number. Possible causes of
21 errors include:
22 - data file not properly opened with call to ex_create() or ex_open()
23 - data file opened for read only.
24 - data file not initialized properly with call to ex_put_init().
25 - a node number map already exists in the file.
26
27 \param[in] exoid exodus file ID returned from a previous call to
28 ex_create() or ex_open().
29 \param[in] node_map The node number map.
30
31 The following code generates a default node number map and outputs it
32 to an open exodus file. This is a trivial case and included just for
33 illustration. Since this map is optional, it should be written out
34 only if it contains something other than the default map.
35
36 ~~~{.c}
37 int error, exoid;
38 int *node_map = (int *)calloc(num_nodes, sizeof(int));
39
40 for (i=1; i <= num_nodes; i++)
41 node_map[i-1] = i;
42
43 error = ex_put_node_num_map(exoid, node_map);
44
45 \comment{Equivalent using non-deprecated function}
46 error = ex_put_id_map(exoid, EX_NODE_MAP, node_map);
47 ~~~
48 */
49
50 int ex_put_node_num_map(int exoid, const void_int *node_map)
51 {
52 return ex_put_id_map(exoid, EX_NODE_MAP, node_map);
53 }