Exodus 8.24
Loading...
Searching...
No Matches
ex_get_elem_var_tab.c File Reference
#include "exodusII.h"

Functions

int ex_get_elem_var_tab (int exoid, int num_elem_blk, int num_elem_var, int *elem_var_tab)
 

Function Documentation

◆ ex_get_elem_var_tab()

int ex_get_elem_var_tab ( int exoid,
int num_elem_blk,
int num_elem_var,
int * elem_var_tab )
Deprecated
Use ex_get_truth_table()(exoid, EX_ELEM_BLOCK, num_elem_blk, num_elem_var, elem_var_tab)

The function ex_get_elem_var_tab() reads the exodus element variable truth table from the database. For a description of the truth table, see the usage of the function ex_put_elem_var_tab(). Memory must be allocated for the truth table(num_elem_blk x num_elem_var in length) before this function is invoked. If the truth table is not stored in the file, it will be created based on information in the file and then returned.

Returns
In case of an error, ex_get_elem_var_tab() 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 not initialized properly with call to ex_put_init().
  • the specified number of element blocks is different than the number specified in a call to ex_put_init().
  • there are no element variables stored in the file or the specified number of element variables doesn't match the number specified in a call to ex_put_variable_param().
Parameters
[in]exoidexodus file ID returned from a previous call to ex_create() or ex_open().
[in]num_elem_blkThe number of element blocks.
[in]num_elem_varThe number of element variables.
[out]elem_var_tabSize [num_elem_blk,num_elem_var]. Returned 2-dimensional array (with the num_elem_var index cycling faster) containing the element variable truth table.

As an example, the following coding will read the element variable truth table from an opened exodus file :

int *truth_tab, num_elem_blk, num_ele_vars, error, exoid;
truth_tab = (int *) calloc ((num_elem_blk*num_ele_vars),
sizeof(int));
error = ex_get_elem_var_tab (exoid, num_elem_blk, num_ele_vars,
truth_tab);
SEACAS_DEPRECATED int ex_get_elem_var_tab(int exoid, int num_elem_blk, int num_elem_var, int *elem_var_tab)
Definition ex_get_elem_var_tab.c:75