Because nodal variables are floating point values, the application code must declare the array passed to be the appropriate type (float or `‘double’') to match the compute word size passed in ex_create() or ex_open().
For example, the following code segment will read the values of the first nodal variable for node number one for all time steps stored in the data file:
int num_time_steps, var_index, node_num, beg_time, end_time, error, exoid;
float *var_values;
\comment{determine how many time steps are stored}
\comment{read a nodal variable through time}
var_values = (float *) calloc (num_time_steps, sizeof(float));
var_index = 1; node_num = 1; beg_time = 1; end_time = -1;
end_time, var_values);
@ EX_NODAL
Definition exodusII.h:268
@ EX_INQ_TIME
Definition exodusII.h:159
int ex_get_var_time(int exoid, ex_entity_type var_type, int var_index, ex_entity_id id, int beg_time_step, int end_time_step, void *var_vals)
Definition ex_get_var_time.c:44
int64_t ex_inquire_int(int exoid, ex_inquiry req_info)
Definition ex_inquire.c:1029