Exodus 7.10

Functions
ex_put_prop_array.c File Reference
`#include "exodusII.h"`
`#include "exodusII_int.h"`
`#include "netcdf.h"`
`#include <stddef.h>`
`#include <stdio.h>`
`#include <string.h>`

## Functions
int | ex_put_prop_array (int exoid, ex_entity_type obj_type, const char *prop_name, const void_int *values)

## Function Documentation

## ◆ ex_put_prop_array()

int ex_put_prop_array | ( | int | exoid,
|  | ex_entity_type | obj_type,
|  | const char * | prop_name,
|  | const void_int * | values
| ) |  |

The function ex_put_prop_array() stores an array of ({num_elem_blk}, num_node_sets, or num_side_sets) integer property values for all element blocks, node sets, or side sets. The order of the values in the array must correspond to the order in which the element blocks, node sets, or side sets were introduced into the file. For instance, if the parameters for element block with ID 20 were written to a file (via ex_put_elem_block()), and then parameters for element block with ID 10, followed by the parameters for element block with ID 30, the first, second, and third elements in the property array would correspond to element block 20, element block 10, and element block 30, respectively.

One should note that this same functionality (writing properties to multiple objects) can be accomplished with multiple calls to ex_put_prop().

Although it is not necessary to invoke ex_put_prop_names(), since ex_put_prop_array() will allocate space within the data file if it hasn't been previously allocated, it is more efficient to use ex_put_prop_names() if there is more than one property to store.

See also
  See Efficiency for a discussion of efficiency issues.

Returns
  In case of an error, ex_put_prop_array() 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()
  - data file opened for read only.
  - data file not initialized properly with call to ex_put_init().
  - invalid object type specified.

Parameters

  [in] | exoid | exodus file ID returned from a previous call to ex_create() or ex_open().
  [in] | obj_type | Type of object; use one of the options in the table below.
  [in] | prop_name | The name of the property for which the values will be stored. Maximum length of this string is `MAX_STR_LENGTH` .
  [in] | values | An array of property values.

ex_entity_type | description
--- | ---
EX_NODE_SET | Node Set entity type
EX_EDGE_BLOCK | Edge Block entity type
EX_EDGE_SET | Edge Set entity type
EX_FACE_BLOCK | Face Block entity type
EX_FACE_SET | Face Set entity type
EX_ELEM_BLOCK | Element Block entity type
EX_ELEM_SET | Element Set entity type
EX_SIDE_SET | Side Set entity type
EX_ELEM_MAP | Element Map entity type
EX_NODE_MAP | Node Map entity type
EX_EDGE_MAP | Edge Map entity type
EX_FACE_MAP | Face Map entity type

For an example of code to write an array of object properties, refer to the description for ex_put_prop_names().