The function ex_get_variable_param() reads the number of global, nodal, or element variables stored in the database.
- Returns:
- In case of an error, ex_get_variable_param() 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()
- invalid variable type specified.
- Parameters:
-
[in] | exoid | exodus file ID returned from a previous call to ex_create() or ex_open(). |
[in] | obj_type | Variable indicating the type of variable which is described. Use one of the options in the table below. |
[out] | num_vars | Returned number of var_type variables that are stored in the database. |
EX_GLOBAL} | Global entity type |
EX_NODAL} | Nodal entity type |
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 |
As an example, the following coding will determine the number of global variables stored in the data file: