| 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_put_attr()(exoid, EX_ELEM_BLOCK, elem_blk_id, attrib) |
| 13 |
|
| 14 |
The function ex_put_elem_attr() writes the attributes for an element |
| 15 |
block. Each element in the element block must have the same number of |
| 16 |
attributes, so there are(num_attr x num_elem_this_blk) |
| 17 |
attributes for each element block. The function ex_put_elem_block() |
| 18 |
must be invoked before this call is made. |
| 19 |
|
| 20 |
Because the attributes are floating point values, the application code |
| 21 |
must declare the array passed to be the appropriate type (float or |
| 22 |
double) to match the compute word size passed in ex_create() or |
| 23 |
ex_open(). |
| 24 |
|
| 25 |
\return In case of an error, ex_put_elem_attr() returns a negative |
| 26 |
number; a warning will return a positive number. Possible causes of |
| 27 |
errors include: |
| 28 |
- data file not properly opened with call to ex_create() or ex_open() |
| 29 |
- data file opened for read only. |
| 30 |
- data file not initialized properly with call to ex_put_init(). |
| 31 |
- ex_put_elem_block() was not called previously for specified element block |
| 32 |
ID. |
| 33 |
- ex_put_elem_block() was called with 0 attributes specified. |
| 34 |
|
| 35 |
\param[in] exoid exodus file ID returned from a previous call to |
| 36 |
ex_create() or ex_open(). |
| 37 |
\param[in] elem_blk_id The element block ID. |
| 38 |
\param[in] attrib Size [num_elem_this_blk*num_attr] |
| 39 |
The list of attributes for the element block. The |
| 40 |
num_attr |
| 41 |
index cycles faster. |
| 42 |
|
| 43 |
Refer to the code example in ex_put_elem_block() for an example of |
| 44 |
writing the attributes array for an element block. |
| 45 |
|
| 46 |
*/ |
| 47 |
|
| 48 |
int ex_put_elem_attr(int exoid, ex_entity_id elem_blk_id, const void *attrib) |
| 49 |
{ |
| 50 |
return ex_put_attr(exoid, EX_ELEM_BLOCK, elem_blk_id, attrib); |
| 51 |
} |