Exodus 8.24
|
Functions | |
int | ex_get_time (int exoid, int time_step, void *time_value) |
int | ex_get_variable_names (int exoid, ex_entity_type obj_type, int num_vars, char *var_names[]) |
int | ex_get_variable_name (int exoid, ex_entity_type obj_type, int var_num, char *var_name) |
int | ex_get_variable_param (int exoid, ex_entity_type obj_type, int *num_vars) |
int | ex_get_reduction_variable_names (int exoid, ex_entity_type obj_type, int num_vars, char *var_names[]) |
int | ex_get_reduction_variable_name (int exoid, ex_entity_type obj_type, int var_num, char *var_name) |
int | ex_get_reduction_variable_param (int exoid, ex_entity_type obj_type, int *num_vars) |
int | ex_get_object_truth_vector (int exoid, ex_entity_type obj_type, ex_entity_id entity_id, int num_var, int *var_vec) |
int | ex_get_truth_table (int exoid, ex_entity_type obj_type, int num_blk, int num_var, int *var_tab) |
int | ex_put_all_var_param (int exoid, int num_g, int num_n, int num_e, const int *elem_var_tab, int num_m, const int *nset_var_tab, int num_s, const int *sset_var_tab) |
int | ex_put_time (int exoid, int time_step, const void *time_value) |
int | ex_get_all_times (int exoid, void *time_values) |
int | ex_put_variable_name (int exoid, ex_entity_type obj_type, int var_num, const char *var_name) |
int | ex_put_variable_names (int exoid, ex_entity_type obj_type, int num_vars, char *const var_names[]) |
int | ex_put_variable_param (int exoid, ex_entity_type obj_type, int num_vars) |
int | ex_put_reduction_variable_name (int exoid, ex_entity_type obj_type, int var_num, const char *var_name) |
int | ex_put_reduction_variable_names (int exoid, ex_entity_type obj_type, int num_vars, char *const var_names[]) |
int | ex_put_reduction_variable_param (int exoid, ex_entity_type obj_type, int num_vars) |
int | ex_put_truth_table (int exoid, ex_entity_type obj_type, int num_blk, int num_var, const int *var_tab) |
int | ex_put_all_var_param_ext (int exoid, const ex_var_params *vp) |
int | ex_put_var (int exoid, int time_step, ex_entity_type var_type, int var_index, ex_entity_id obj_id, int64_t num_entries_this_obj, const void *var_vals) |
int | ex_put_var_multi_time (int exoid, ex_entity_type var_type, int var_index, ex_entity_id obj_id, int64_t num_entries_this_obj, int beg_time_step, int end_time_step, const void *var_vals) |
int | ex_put_partial_var (int exoid, int time_step, ex_entity_type var_type, int var_index, ex_entity_id obj_id, int64_t start_index, int64_t num_entities, const void *var_vals) |
int | ex_put_reduction_vars (int exoid, int time_step, ex_entity_type obj_type, ex_entity_id obj_id, int64_t num_variables, const void *var_vals) |
int | ex_get_var (int exoid, int time_step, ex_entity_type var_type, int var_index, ex_entity_id obj_id, int64_t num_entry_this_obj, void *var_vals) |
int | ex_get_var_multi_time (int exoid, ex_entity_type var_type, int var_index, ex_entity_id obj_id, int64_t num_entry_this_obj, int beg_time_step, int end_time_step, void *var_vals) |
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) |
int | ex_get_partial_var (int exoid, int time_step, ex_entity_type var_type, int var_index, ex_entity_id obj_id, int64_t start_index, int64_t num_entities, void *var_vals) |
int | ex_get_reduction_vars (int exoid, int time_step, ex_entity_type obj_type, ex_entity_id obj_id, int64_t num_variables, void *var_vals) |
int | exi_get_nodal_var_multi_time (int exoid, int nodal_var_index, int64_t num_nodes, int beg_time_step, int end_time_step, void *nodal_var_vals) |
int | exi_put_nodal_var_time (int exoid, int nodal_var_index, int64_t num_nodes, int beg_time_step, int end_time_step, const void *nodal_var_vals) |
int | exi_get_partial_nodal_var (int exoid, int time_step, int nodal_var_index, int64_t start_node, int64_t num_nodes, void *var_vals) |
int | exi_put_partial_nodal_var (int exoid, int time_step, int nodal_var_index, int64_t start_node, int64_t num_nodes, const void *nodal_var_vals) |
int | ex_get_glob_vars (int exoid, int time_step, int num_glob_vars, void *glob_var_vals) |
int | ex_get_n_elem_var (int exoid, int time_step, int elem_var_index, ex_entity_id elem_blk_id, int64_t num_elem_this_blk, int64_t start_elem_num, int64_t num_elem, void *elem_var_vals) |
int | ex_get_n_nodal_var (int exoid, int time_step, int nodal_var_index, int64_t start_node, int64_t num_nodes, void *var_vals) |
int | ex_get_n_var (int exoid, int time_step, ex_entity_type var_type, int var_index, ex_entity_id obj_id, int64_t start_index, int64_t num_entities, void *var_vals) |
int | ex_get_nodal_var (int exoid, int time_step, int nodal_var_index, int64_t num_nodes, void *nodal_var_vals) |
int | ex_get_partial_elem_var (int exoid, int time_step, int elem_var_index, ex_entity_id elem_blk_id, int64_t num_elem_this_blk, int64_t start_elem_num, int64_t num_elem, void *elem_var_vals) |
int | ex_get_partial_nodal_var (int exoid, int time_step, int nodal_var_index, int64_t start_node, int64_t num_nodes, void *var_vals) |
int | ex_get_var_name (int exoid, const char *var_type, int var_num, char *var_name) |
int | ex_get_var_names (int exoid, const char *var_type, int num_vars, char *var_names[]) |
int | ex_get_var_param (int exoid, const char *var_type, int *num_vars) |
int | ex_get_var_tab (int exoid, const char *var_type, int num_blk, int num_var, int *var_tab) |
int | ex_put_n_nodal_var (int exoid, int time_step, int nodal_var_index, int64_t start_node, int64_t num_nodes, const void *nodal_var_vals) |
int | ex_put_n_var (int exoid, int time_step, ex_entity_type var_type, int var_index, ex_entity_id obj_id, int64_t start_index, int64_t num_entities, const void *var_vals) |
int | ex_put_nodal_var_slab (int exoid, int time_step, int nodal_var_index, int64_t start_pos, int64_t num_vals, void *nodal_var_vals) |
int | ex_put_partial_nodal_var (int exoid, int time_step, int nodal_var_index, int64_t start_node, int64_t num_nodes, const void *nodal_var_vals) |
int | ex_put_var_name (int exoid, const char *var_type, int var_num, const char *var_name) |
int | ex_put_var_names (int exoid, const char *var_type, int num_vars, char *var_names[]) |
int | ex_put_var_param (int exoid, const char *var_type, int num_vars) |
int | ex_put_var_tab (int exoid, const char *var_type, int num_blk, int num_var, int *var_tab) |
This section describes data file utility functions for creating opening a file, initializing a file with global parameters, reading writing information text, inquiring on parameters stored in the data file, and error reporting.
The results are optional and include an optional variable type for each block and set type (node, edge, face, and element) in addition there are global variables and sideset variables – each of which is stored through time. Nodal results are output (at each time step) for all the nodes in the model. An example of a nodal variable is displacement in the X direction. Global results are output (at each time step) for a single element or node, or for a single property. Linear momentum of a structure and the acceleration at a particular point are both examples of global variables. The other results are output (at each time step) for all entities (elements, faces, edges, nodes, or sides) in one or more entity blocks. For example, stress may be an element variable. Another use of element variables is to record element status (a binary flag indicating whether each element is "alive" or "dead") through time. Although these examples correspond to typical FE applications, the data format is flexible enough to accommodate a spectrum of uses.
A few conventions and limitations must be cited:
|
extern |
The function ex_get_all_times() reads the time values for all time steps. Memory must be allocated for the time values array before this function is invoked. The storage requirements (equal to the number of time steps) can be determined by using the ex_inquire() or ex_inquire_int() routines.
Because time values 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().
[in] | exoid | exodus file ID returned from a previous call to ex_create() or ex_open(). |
[out] | time_values | Returned array of times. These are the time values at all time steps. |
The following code segment will read the time values for all time steps stored in the data file:
int ex_get_glob_vars | ( | int | exoid, |
int | time_step, | ||
int | num_glob_vars, | ||
void * | glob_var_vals ) |
The function ex_get_glob_vars() reads the values of all the global variables for a single time step. Memory must be allocated for the global variables values array before this function is invoked.
Because global 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().
In case of an error, ex_get_glob_vars() returns a negative number; a warning will return a positive number. Possible causes of errors include:
[in] | exoid | exodus file ID returned from a previous call to ex_create() or ex_open(). |
[in] | time_step | The time step, as described under ex_put_time(), at which the global variable values are desired. This is essentially an index (in the time dimension) into the global variable values array stored in the database. The first time step is 1. |
[in] | num_glob_vars | The number of global variables stored in the database. |
[out] | glob_var_vals | Returned array of num_glob_vars global variable values for the time_step'th time step. |
The following is an example code segment that reads all the global variables at one time step:
int ex_get_n_elem_var | ( | int | exoid, |
int | time_step, | ||
int | elem_var_index, | ||
ex_entity_id | elem_blk_id, | ||
int64_t | num_elem_this_blk, | ||
int64_t | start_elem_num, | ||
int64_t | num_elem, | ||
void * | elem_var_vals ) |
int ex_get_n_nodal_var | ( | int | exoid, |
int | time_step, | ||
int | nodal_var_index, | ||
int64_t | start_node, | ||
int64_t | num_nodes, | ||
void * | var_vals ) |
int ex_get_n_var | ( | int | exoid, |
int | time_step, | ||
ex_entity_type | var_type, | ||
int | var_index, | ||
ex_entity_id | obj_id, | ||
int64_t | start_index, | ||
int64_t | num_entities, | ||
void * | var_vals ) |
reads the values of a single variable for a partial block at one time step from the database; assume the first time step and variable index and start_index are 1
exoid | exodus file id |
time_step | time step number |
var_type | type (edge block, face block, edge set, ... ) |
var_index | element variable index |
obj_id | element block id |
start_index | index of first entity in block to read (1-based) |
num_entities | number of entries to read in this block/set |
var_vals | the values to read |
int ex_get_nodal_var | ( | int | exoid, |
int | time_step, | ||
int | nodal_var_index, | ||
int64_t | num_nodes, | ||
void * | nodal_var_vals ) |
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().
[in] | exoid | exodus file ID returned from a previous call to ex_create() or ex_open(). |
[in] | time_step | The time step, as described under ex_put_time(), at which the nodal variable values are desired. This is essentially an index (in the time dimension) into the nodal variable values array stored in the database. The first time step is 1. |
[in] | nodal_var_index | The index of the desired nodal variable. The first variable has an index of 1. |
[in] | num_nodes | The number of nodal points. |
[out] | nodal_var_vals | Returned array of num_nodes values of the nodal_var_index-th nodal variable for the time_step-th time step. |
For example, the following demonstrates how this function would be used:
|
extern |
reads the EXODUS specified variable truth vector from the database
int ex_get_partial_elem_var | ( | int | exoid, |
int | time_step, | ||
int | elem_var_index, | ||
ex_entity_id | elem_blk_id, | ||
int64_t | num_elem_this_blk, | ||
int64_t | start_elem_num, | ||
int64_t | num_elem, | ||
void * | elem_var_vals ) |
int ex_get_partial_nodal_var | ( | int | exoid, |
int | time_step, | ||
int | nodal_var_index, | ||
int64_t | start_node, | ||
int64_t | num_nodes, | ||
void * | var_vals ) |
|
extern |
reads the values of a single variable for a partial block at one time step from the database; assume the first time step and variable index and start_index are 1
exoid | exodus file id |
time_step | time step number |
var_type | type (edge block, face block, edge set, ... ) |
var_index | element variable index |
obj_id | element block id |
start_index | index of first entity in block to read (1-based) |
num_entities | number of entries to read in this block/set |
var_vals | the values to read |
|
extern |
reads the name of a particular results reduction variable from the database
|
extern |
The function ex_get_variable_names() reads the names of the results variables from the database. Memory must be allocated for the name array before this function is invoked.
[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 read from the database. |
[out] | var_names | Returned array of pointers to num_vars variable names. |
ex_entity_type | description |
---|---|
EX_GLOBAL | Global 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 code segment will read the names of the nodal variables stored in the data file:
|
extern |
The function ex_get_reduction_variable_param() reads the number of global, nodal, or element variables stored in the database.
[in] | exoid | exodus file ID returned from a previous call to ex_create() or ex_open(). |
[in] | obj_type | Variable indicating the type of reduction 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_entity_type | description |
---|---|
EX_GLOBAL | Global 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:
|
extern |
The function ex_get_reduction_vars() reads the values of the selected entity reduction variables for a single time step. Memory must be allocated for the variables values array before this function is invoked.
Because 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().
In case of an error, ex_get_reduction_vars() returns a negative number; a warning will return a positive number. Possible causes of errors include:
[in] | exoid | exodus file ID returned from a previous call to ex_create() or ex_open(). |
[in] | time_step | The time step, as described under ex_put_time(), at which the variable values are desired. This is essentially an index (in the time dimension) into the entity variable values array stored in the database. The first time step is 1. |
[in] | var_type | block/variable type node, edge/face/element block, or node/edge/face/side/element set of type ex_entity_type. |
[in] | obj_id | object id, see ex_get_ids() |
[in] | num_variables | The number of reduction variables in this object stored in the database. |
[out] | var_vals | Returned array of num_variables variable values for the time_step'th time step. |
The following is an example code segment that reads the element reduction variables for element block with id 100 at time step 5. There are 'num_variables' reduction variables for element block 100.
|
extern |
The function ex_get_time() reads the time value for a specified time step.
Because time values 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().
[in] | exoid | exodus file ID returned from a previous call to ex_create() or ex_open(). |
[in] | time_step | The time step number. This is essentially an index (in the time dimension) into the global, nodal, and element variables arrays stored in the database. The first time step is 1. |
[out] | time_value | Returned time at the specified time step. |
As an example, the following coding will read the time value stored in the data file for time step n:
|
extern |
reads the EXODUS specified variable truth table from the database
[in] | exoid | exodus file id |
[in] | obj_type | object type |
[in] | num_blk | number of blocks or sets |
[in] | num_var | number of variables |
[out] | *var_tab | variable truth table array |
|
extern |
The function ex_get_var() reads the values of the selected entity variables for a single time step. Memory must be allocated for the variables values array before this function is invoked.
Because 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().
In case of an error, ex_get_var() returns a negative number; a warning will return a positive number. Possible causes of errors include:
[in] | exoid | exodus file ID returned from a previous call to ex_create() or ex_open(). |
[in] | time_step | The time step, as described under ex_put_time(), at which the variable values are desired. This is essentially an index (in the time dimension) into the entity variable values array stored in the database. The first time step is 1. |
[in] | var_type | block/variable type node, edge/face/element block, or node/edge/face/side/element set of type ex_entity_type. |
[in] | var_index | variable index; 1-based |
[in] | obj_id | object id, see ex_get_ids() |
[in] | num_entry_this_obj | The number of entities in this object stored in the database. |
[out] | var_vals | Returned array of num_entry_this_obj variable values for the time_step'th time step. |
The following is an example code segment that reads the 10th element variable for element block with id 100 at time step 5. There are 'num_elements_this_block' elements in element block 100.
|
extern |
The function ex_get_var() reads the values of the selected entity variables for a single time step. Memory must be allocated for the variables values array before this function is invoked.
Because 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().
In case of an error, ex_get_var() returns a negative number; a warning will return a positive number. Possible causes of errors include:
[in] | exoid | exodus file ID returned from a previous call to ex_create() or ex_open(). |
[in] | var_type | block/variable type node, edge/face/element block, or node/edge/face/side/element set of type ex_entity_type. |
[in] | var_index | variable index; 1-based |
[in] | obj_id | object id, see ex_get_ids() |
[in] | num_entry_this_obj | The number of entities in this object stored in the database. |
[in] | beg_time_step | The first time step to access variable data from. 1-based. |
[in] | end_time_step | The last time step to access variable data from. 1-based. |
[out] | var_vals | Returned array of num_entry_this_obj variable values for the time_step'th time step. |
The following is an example code segment that reads the 10th element variable for element block with id 100 over all 10 time steps. There are 'num_elements_this_block' elements in element block 100.
int ex_get_var_name | ( | int | exoid, |
const char * | var_type, | ||
int | var_num, | ||
char * | var_name ) |
reads the name of a particular results variable from the database
int ex_get_var_names | ( | int | exoid, |
const char * | var_type, | ||
int | num_vars, | ||
char * | var_names[] ) |
reads the names of the results variables from the database
int ex_get_var_param | ( | int | exoid, |
const char * | var_type, | ||
int * | num_vars ) |
reads the number of global, nodal, or element variables that are stored in the database
int ex_get_var_tab | ( | int | exoid, |
const char * | var_type, | ||
int | num_blk, | ||
int | num_var, | ||
int * | var_tab ) |
reads the EXODUS specified variable truth table from the database
|
extern |
reads the values of a variable for a single entry of an object (block or set) through a specified number of time steps in the database; assume the first variable index, entry number, and time step are 1
|
extern |
reads the name of a particular results variable from the database
|
extern |
The function ex_get_variable_names() reads the names of the results variables from the database. Memory must be allocated for the name array before this function is invoked.
[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 read from the database. |
[out] | var_names | Returned array of pointers to num_vars variable names. |
ex_entity_type | description |
---|---|
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 code segment will read the names of the nodal variables stored in the data file:
|
extern |
The function ex_get_variable_param() reads the number of global, nodal, or element variables stored in the database.
[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_entity_type | description |
---|---|
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:
|
extern |
defines the number of global, nodal, element, nodeset, and sideset variables that will be written to the database
exoid | exodus file id |
num_g | global variable count |
num_n | nodal variable count |
num_e | element variable count |
*elem_var_tab | element variable truth table array |
num_m | nodeset variable count |
*nset_var_tab | nodeset variable truth table array |
num_s | sideset variable count |
*sset_var_tab | sideset variable truth table array |
|
extern |
writes the number of global, nodal, element, nodeset, and sideset variables that will be written to the database
exoid | exodus file id |
*vp | pointer to variable parameter info |
int ex_put_n_nodal_var | ( | int | exoid, |
int | time_step, | ||
int | nodal_var_index, | ||
int64_t | start_node, | ||
int64_t | num_nodes, | ||
const void * | nodal_var_vals ) |
writes the values of a single nodal variable for a partial block at one single time step to the database; assume the first time step and nodal variable index is 1
exoid | exodus file id |
time_step | whole time step number |
nodal_var_index | index of desired nodal variable |
start_node | index of first node to write data for (1-based) |
num_nodes | number of nodal points |
nodal_var_vals | array of nodal variable values |
int ex_put_n_var | ( | int | exoid, |
int | time_step, | ||
ex_entity_type | var_type, | ||
int | var_index, | ||
ex_entity_id | obj_id, | ||
int64_t | start_index, | ||
int64_t | num_entities, | ||
const void * | var_vals ) |
exoid | exodus file id |
time_step | time step number |
var_type | type (edge block, face block, edge set, ... ) |
var_index | element variable index |
obj_id | element block id |
start_index | index of first entity in block to write (1-based) |
num_entities | number of entries in this block/set |
var_vals | the values to be written |
int ex_put_nodal_var_slab | ( | int | exoid, |
int | time_step, | ||
int | nodal_var_index, | ||
int64_t | start_pos, | ||
int64_t | num_vals, | ||
void * | nodal_var_vals ) |
exoid | NetCDF/Exodus file ID |
time_step | The time step index |
nodal_var_index | Nodal variable index |
start_pos | Start position for write |
num_vals | Number of nodal variables |
nodal_var_vals | Nodal variable values |
int ex_put_partial_nodal_var | ( | int | exoid, |
int | time_step, | ||
int | nodal_var_index, | ||
int64_t | start_node, | ||
int64_t | num_nodes, | ||
const void * | nodal_var_vals ) |
writes the values of a single nodal variable for a partial block at one single time step to the database; assume the first time step and nodal variable index is 1
exoid | exodus file id |
time_step | whole time step number |
nodal_var_index | index of desired nodal variable |
start_node | index of first node to write data for (1-based) |
num_nodes | number of nodal points |
nodal_var_vals | array of nodal variable values |
|
extern |
writes the values of a single variable for a partial block at one time step to the database; assume the first time step and variable index are 1
exoid | exodus file id |
time_step | time step number (1-based) |
var_type | type (edge block, face block, edge set, ... ) |
var_index | entity variable index (1-based) |
obj_id | entity id |
start_index | index of first entity in block to write (1-based) |
num_entities | number of entries in this block/set |
var_vals | the values to be written |
|
extern |
writes the name of a particular results variable to the database
exoid | exodus file id |
obj_type | variable type |
var_num | variable number name to write 1..num_var |
*var_name | ptr of variable name |
|
extern |
The function ex_put_variable_names() writes the names of the results variables to the database. The maximum length of the names returned is specified by the return value from ex_inquire_int()(exoid, EX_INQ_MAX_READ_NAME_LENGTH). The function ex_put_variable_param() must be called before this function is invoked.
[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_entity_type | description |
---|---|
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:
|
extern |
The function ex_put_variable_param() writes the number of global, nodal, nodeset, sideset, edge, face, or element variables that will be written to the database.
[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 ex_entity_type types specified in the table below. |
[in] | num_vars | The number of var_type variables that will be written to the database. |
ex_entity_type | description |
---|---|
EX_GLOBAL | Global 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 |
For example, the following code segment initializes the data file to store global variables:
|
extern |
writes the values of a single variable of the specified type for a single time step. The function ex_put_reduction_variable_param() must be invoked before this call is made.
Because 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().
[in] | exoid | exodus file ID returned from a previous call to ex_create() or ex_open(). |
[in] | time_step | The time step number, as described under ex_put_time(). This is essentially a counter that is incremented when results variables are output. The first time step is 1. |
[in] | var_type | type (edge block, face block, edge set, ... ) |
[in] | obj_id | entity block/set id (ignored for global and nodal variables) |
[in] | num_variables | The number of reduction variables in this block/set |
[in] | var_vals | Array of num_variables values for all reduction variables for the time_step -th time step. |
As an example, the following code segment writes all the assembly variables for assembly 100 for a single time step:
|
extern |
The function ex_put_time() writes the time value for a specified time step.
Because time values 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().
[in] | exoid | exodus file ID returned from a previous call to ex_create() or ex_open(). |
[in] | time_step | The time step number. This is essentially a counter that is incremented only when results variables are output to the data file. The first time step is 1. |
[in] | time_value | The time at the specified time step. |
The following code segment will write out the simulation time value at simulation time step n:
|
extern |
writes the EXODUS variable truth table to the database; also, creates netCDF variables in which to store EXODUS variable values; although this table isn't required (because the netCDF variables can also be created in ex_put_var()), this call will save tremendous time because all of the variables are defined at once while the file is in define mode, rather than going in and out of define mode (causing the entire file to be copied over and over) which is what occurs when the variables are defined in ex_put_var()
exoid | exodus file id |
obj_type | object type |
num_blk | number of blocks or sets |
num_var | number of variables |
*var_tab | variable truth table array |
The following coding will create, populate, and write an element variable truth table to an opened exodus file (NOTE: all element variables are valid for all element blocks in this example.):
|
extern |
writes the values of a single variable of the specified type for a single time step. The function ex_put_variable_param() must be invoked before this call is made.
Because 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().
[in] | exoid | exodus file ID returned from a previous call to ex_create() or ex_open(). |
[in] | time_step | The time step number, as described under ex_put_time(). This is essentially a counter that is incremented when results variables are output. The first time step is 1. |
[in] | var_type | type (edge block, face block, edge set, ... ) |
[in] | var_index | The index of the variable. The first variable has an index of 1. |
[in] | obj_id | entity block/set id (ignored for global and nodal variables) |
[in] | num_entries_this_obj | The number of items in this block/set |
[in] | var_vals | Array of num_entries_this_obj values of the var_index -th variable for the time_step -th time step. |
As an example, the following code segment writes all the nodal variables for a single time step:
|
extern |
writes the values of a single variable of the specified type for a single time step. The function ex_put_variable_param() must be invoked before this call is made.
Because 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().
[in] | exoid | exodus file ID returned from a previous call to ex_create() or ex_open(). |
[in] | var_type | type (edge block, face block, edge set, ... ) |
[in] | var_index | The index of the variable. The first variable has an index of 1. |
[in] | obj_id | entity block/set id (ignored for global and nodal variables) |
[in] | num_entries_this_obj | The number of items in this block/set |
[in] | beg_time_step | The beginning time step number, as described under ex_put_time(). This is essentially a counter that is incremented when results variables are output. The first time step is 1. |
[in] | end_time_step | The last step number to put values. The first time step is 1. |
[in] | var_vals | Array of num_entries_this_obj values of the var_index -th variable for the requested time step(s). |
As an example, the following code segment writes all the nodal variables for a single time step:
int ex_put_var_name | ( | int | exoid, |
const char * | var_type, | ||
int | var_num, | ||
const char * | var_name ) |
writes the name of a particular results variable to the database
exoid | exodus file id |
*var_type | variable type: G,N, or E |
var_num | variable number name to write 1..num_var |
*var_name | ptr of variable name |
int ex_put_var_names | ( | int | exoid, |
const char * | var_type, | ||
int | num_vars, | ||
char * | var_names[] ) |
writes the names of the results variables to the database
exoid | exodus file id |
*var_type | variable type: G,N, or E |
num_vars | # of variables to read |
*var_names | ptr array of variable names |
int ex_put_var_param | ( | int | exoid, |
const char * | var_type, | ||
int | num_vars ) |
writes the number and names of global, nodal, or element variables that will be written to the database
exoid | exodus file id |
var_type | variable type G,N, or E |
num_vars | number of variables in database |
int ex_put_var_tab | ( | int | exoid, |
const char * | var_type, | ||
int | num_blk, | ||
int | num_var, | ||
int * | var_tab ) |
writes the EXODUS variable truth table to the database; also, creates netCDF variables in which to store EXODUS variable values; although this table isn't required (because the netCDF variables can also be created in ex_put_var), this call will save tremendous time because all of the variables are defined at once while the file is in define mode, rather than going in and out of define mode (causing the entire file to be copied over and over) which is what occurs when the variables are defined in ex_put_var
exoid | exodus file id |
*var_type | 'e', 'm', 's' element, nodeset, sideset |
num_blk | number of blocks |
num_var | number of variables |
*var_tab | variable truth table array |
|
extern |
writes the name of a particular results variable to the database
exoid | exodus file id |
obj_type | variable type |
var_num | variable number name to write 1..num_var |
*var_name | ptr of variable name |
|
extern |
The function ex_put_variable_names() writes the names of the results variables to the database. The maximum length of the names returned is specified by the return value from ex_inquire_int()(exoid, EX_INQ_MAX_READ_NAME_LENGTH). The function ex_put_variable_param() must be called before this function is invoked.
[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_entity_type | description |
---|---|
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:
|
extern |
The function ex_put_variable_param() writes the number of global, nodal, nodeset, sideset, edge, face, or element variables that will be written to the database.
[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 ex_entity_type types specified in the table below. |
[in] | num_vars | The number of var_type variables that will be written to the database. |
ex_entity_type | description |
---|---|
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 |
For example, the following code segment initializes the data file to store global variables:
int exi_get_nodal_var_multi_time | ( | int | exoid, |
int | nodal_var_index, | ||
int64_t | num_nodes, | ||
int | beg_time_step, | ||
int | end_time_step, | ||
void * | nodal_var_vals ) |
The function exi_get_nodal_var_multi_time() reads the values of a single nodal variable for a one or more time steps. Memory must be allocated for the nodal variable values array before this function is invoked.
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().
[in] | exoid | exodus file ID returned from a previous call to ex_create() or ex_open(). |
[in] | nodal_var_index | The index of the desired nodal variable. The first variable has an index of 1. |
[in] | num_nodes | The number of nodal points. |
[in] | beg_time_step | The first time step to get values for. |
[in] | end_time_step | The last time step to get values for. |
[out] | nodal_var_vals | Returned array of num_nodes values of the nodal_var_index-th nodal variable for the desired timesteps. |
For example, the following demonstrates how this function would be used:
int exi_get_partial_nodal_var | ( | int | exoid, |
int | time_step, | ||
int | nodal_var_index, | ||
int64_t | start_node, | ||
int64_t | num_nodes, | ||
void * | var_vals ) |
int exi_put_nodal_var_time | ( | int | exoid, |
int | nodal_var_index, | ||
int64_t | num_nodes, | ||
int | beg_time_step, | ||
int | end_time_step, | ||
const void * | nodal_var_vals ) |
The function exi_put_nodal_var_time() writes the values of a single nodal variable for multiple time steps. The function ex_put_variable_param() must be invoked before this call is made.
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().
[in] | exoid | exodus file ID returned from a previous call to ex_create() or ex_open(). |
[in] | nodal_var_index | The index of the nodal variable. The first variable has an index of 1. |
[in] | num_nodes | The number of nodal points. |
[in] | beg_time_step | The beginning time step number, as described under ex_put_time(). This is counter that is incremented when results variables are output. The first time step is 1. |
[in] | end_time_step | The ending time step number, as described under ex_put_time(). This is counter that is incremented when results variables are output. The first time step is 1. |
[in] | nodal_var_vals | Array of num_nodes values of the nodal_var_index-th nodal variable for the time_step-th time step. |
As an example, the following code segment writes all the nodal variables for a single time step:
int exi_put_partial_nodal_var | ( | int | exoid, |
int | time_step, | ||
int | nodal_var_index, | ||
int64_t | start_node, | ||
int64_t | num_nodes, | ||
const void * | nodal_var_vals ) |
writes the values of a single nodal variable for a partial block at one single time step to the database; assume the first time step and nodal variable index is 1
exoid | exodus file id |
time_step | whole time step number |
nodal_var_index | index of desired nodal variable |
start_node | index of first node to write data for (1-based) |
num_nodes | number of nodal points |
nodal_var_vals | array of nodal variable values |