The function ex_put_variable_names() writes the names of the results variables to the database. The names are MAX_STR_LENGTH -characters in length. The function ex_put_variable_param() must be called before this function is invoked.
- Returns
- In case of an error, ex_put_variable_names() returns a negative number; a warning will return a positive number. Possible causes of errors include:
- 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. |
| [in] | num_vars | The number of var_type variables that will be written to the database. |
| [in] | var_names | Array of pointers to num_vars variable names. |
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 |
The following coding will write out the names associated with the nodal variables:
int num_nod_vars, error,
exoid;
char *var_names[2];
\comment{write results variables parameters and names}
num_nod_vars = 2;
var_names[0] = "disx";
var_names[1] = "disy";