| 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_get_attr()(exoid, EX_ELEM_BLOCK, elem_blk_id, attrib) instead |
| 13 |
|
| 14 |
The function ex_get_elem_attr() reads the attributes for an element |
| 15 |
block. Memory must be allocated for(num_attr x num_elem_this_blk) |
| 16 |
attributes before this routine is called. |
| 17 |
|
| 18 |
Because the attributes are floating point values, the application code |
| 19 |
must declare the array passed to be the appropriate type (float or |
| 20 |
double) to match the compute word size passed in ex_create() or |
| 21 |
ex_open(). |
| 22 |
|
| 23 |
\return In case of an error, ex_get_elem_attr() returns a negative |
| 24 |
number; a warning will return a positive number. Possible causes of |
| 25 |
errors include: |
| 26 |
- data file not properly opened with call to ex_create() or ex_open() |
| 27 |
- invalid element block ID. |
| 28 |
- a warning value is returned if no attributes are stored in the file. |
| 29 |
|
| 30 |
\param[in] exoid exodus file ID returned from a previous call to |
| 31 |
ex_create() or ex_open(). |
| 32 |
\param[in] elem_blk_id The element block ID. |
| 33 |
\param[out] attrib Size [num_elem_this_blk*num_attr]. |
| 34 |
Returned list of(num_attr x num_elem_this_blk) |
| 35 |
attributes for |
| 36 |
the element block, with the num_attr index cycling |
| 37 |
faster. |
| 38 |
|
| 39 |
Refer to the code example in ex_get_elem_block() for an example |
| 40 |
of reading the element attributes for an element block. |
| 41 |
*/ |
| 42 |
|
| 43 |
int ex_get_elem_attr(int exoid, ex_entity_id elem_blk_id, void *attrib) |
| 44 |
{ |
| 45 |
return ex_get_attr(exoid, EX_ELEM_BLOCK, elem_blk_id, attrib); |
| 46 |
} |