Exodus 7.22

Functions
ex_get_concat_node_sets.c File Reference
`#include "exodusII.h"`

## Functions
int | ex_get_concat_node_sets (int exoid, void_int *node_set_ids, void_int *num_nodes_per_set, void_int *num_df_per_set, void_int *node_sets_node_index, void_int *node_sets_df_index, void_int *node_sets_node_list, void *node_sets_dist_fact)

## Function Documentation

## ◆ ex_get_concat_node_sets()

int ex_get_concat_node_sets | ( | int | exoid,
|  | void_int * | node_set_ids,
|  | void_int * | num_nodes_per_set,
|  | void_int * | num_df_per_set,
|  | void_int * | node_sets_node_index,
|  | void_int * | node_sets_df_index,
|  | void_int * | node_sets_node_list,
|  | void * | node_sets_dist_fact
| ) |  |

Deprecated:
  Use ex_get_concat_sets()(exoid, EX_NODE_SET, set_specs) instead

The function ex_get_concat_node_sets() reads the node set ID's, node set node count array, node set distribution factors count array, node set node pointers array, node set distribution factors pointer array, node set node list, and node set distribution factors for all of the node sets. `‘Concatenated node sets’' refers to the arrays required to define all of the node sets (ID array, counts arrays, pointers arrays, node list array, and distribution factors array) as described in Section 3.10 on page 11.

Because the distribution factors are floating point values, the application code must declare the array passed to be the appropriate type (float or double) to match the compute word size passed in ex_create() or ex_open().

The length of each of the returned arrays can be determined by invoking ex_inquire() or ex_inquire_int().

Returns
  In case of an error, ex_get_concat_node_sets() returns a negative number; a warning will return a positive number. Possible causes of errors include:
  - data file not properly opened with call to ex_create() or ex_open()
  - a warning value is returned if no node sets are stored in the file.

Parameters

  [in] | exoid | exodus file ID returned from a previous call to ex_create() or ex_open().
  [out] | node_set_ids | Returned array containing the node set ID for each set.
  [out] | num_nodes_per_set | Returned array containing the number of nodes for each set.
  [out] | num_df_per_set | Returned array containing the number of distribution factors for each set.
  [out] | node_sets_node_index | Returned array containing the indices into the node_set_node_list which are the locations of the first node for each set. These indices are 0-based.
  [out] | node_sets_df_index | Returned array containing the indices into the node_set_dist_fact which are the locations of the first distribution factor for each set. These indices are 0-based.
  [out] | node_sets_node_list | Returned array containing the nodes for all sets. Internal node IDs are used in this list (see Section LocalNodeIds).
  [out] | node_sets_dist_fact | Returned array containing the distribution factors for all sets.

As an example, the following code segment will read concatenated node sets:

int error, exoid, num_node_sets, list_len, *ids,
*num_nodes_per_set, *num_df_per_set, *node_ind,
*df_ind, *node_list;
float *dist_fact
/* read concatenated node sets */
num_node_sets = ex_inquire_int(exoid, EX_INQ_NODE_SETS);
ids = (int *) calloc(num_node_sets, sizeof(int));
num_nodes_per_set = (int *) calloc(num_node_sets, sizeof(int));
num_df_per_set = (int *) calloc(num_node_sets, sizeof(int));
node_ind = (int *) calloc(num_node_sets, sizeof(int));
df_ind = (int *) calloc(num_node_sets, sizeof(int));
list_len = ex_inquire_int(exoid, EX_INQ_NS_NODE_LEN);
node_list = (int *) calloc(list_len, sizeof(int));
list_len = ex_inquire_int(exoid, EX_INQ_NS_DF_LEN);
dist_fact = (float *) calloc(list_len, sizeof(float));
error = ex_get_concat_node_sets (exoid, ids, num_nodes_per_set,
num_df_per_set, node_ind, df_ind,
node_list, dist_fact);
ex_inquire_int
int64_t ex_inquire_int(int exoid, ex_inquiry req_info)
Definition: ex_inquire.c:954
error
error
Definition: ex_put_elem_var_tab.c:115
EX_INQ_NS_DF_LEN
Definition: exodusII.h:176
ex__obj_stats::exoid
int exoid
Definition: exodusII_int.h:666
EX_INQ_NS_NODE_LEN
Definition: exodusII.h:166
ex_get_concat_node_sets
SEACAS_DEPRECATED int ex_get_concat_node_sets(int exoid, void_int *node_set_ids, void_int *num_nodes_per_set, void_int *num_df_per_set, void_int *node_sets_node_index, void_int *node_sets_df_index, void_int *node_sets_node_list, void *node_sets_dist_fact)
Definition: ex_get_concat_node_sets.c:132
EX_INQ_NODE_SETS
Definition: exodusII.h:165