|
Exodus
7.22
|
The routines in this section read and write information which describe an exodus finite element model. This includes nodal coordinates, element order map, element connectivity arrays, element attributes, node sets, side sets, and object properties. More...
Functions | |
| int | ex_create_group (int parent_id, const char *group_name) |
| int | ex_get_coord_names (int exoid, char **coord_names) |
| int | ex_get_coord (int exoid, void *x_coor, void *y_coor, void *z_coor) |
| int | ex_get_partial_coord_component (int exoid, int64_t start_node_num, int64_t num_nodes, int component, void *coor) |
| int | ex_get_partial_coord (int exoid, int64_t start_node_num, int64_t num_nodes, void *x_coor, void *y_coor, void *z_coor) |
| int | ex_get_ids (int exoid, ex_entity_type obj_type, void_int *ids) |
| int | ex_get_coordinate_frames (int exoid, int *nframes, void_int *cf_ids, void *pt_coordinates, char *tags) |
| int | ex_put_init_ext (int exoid, const ex_init_params *model) |
| int | ex_get_init_ext (int exoid, ex_init_params *info) |
| int | ex_get_init (int exoid, char *title, void_int *num_dim, void_int *num_nodes, void_int *num_elem, void_int *num_elem_blk, void_int *num_node_sets, void_int *num_side_sets) |
| int | ex_put_init (int exoid, const char *title, int64_t num_dim, int64_t num_nodes, int64_t num_elem, int64_t num_elem_blk, int64_t num_node_sets, int64_t num_side_sets) |
| int | ex_get_map (int exoid, void_int *elem_map) |
| int | ex_get_map_param (int exoid, int *num_node_maps, int *num_elem_maps) |
| int | ex_get_name (int exoid, ex_entity_type obj_type, ex_entity_id entity_id, char *name) |
| int | ex_get_names (int exoid, ex_entity_type obj_type, char **names) |
| int | ex_get_prop_array (int exoid, ex_entity_type obj_type, const char *prop_name, void_int *values) |
| int | ex_get_prop (int exoid, ex_entity_type obj_type, ex_entity_id obj_id, const char *prop_name, void_int *value) |
| int | ex_get_partial_num_map (int exoid, ex_entity_type map_type, ex_entity_id map_id, int64_t ent_start, int64_t ent_count, void_int *map) |
| int | ex_get_prop_names (int exoid, ex_entity_type obj_type, char **prop_names) |
| int | ex_add_attr (int exoid, ex_entity_type obj_type, ex_entity_id obj_id, int64_t num_attr_per_entry) |
| int | ex_put_attr_param (int exoid, ex_entity_type obj_type, ex_entity_id obj_id, int num_attrs) |
| int | ex_get_attr_param (int exoid, ex_entity_type obj_type, ex_entity_id obj_id, int *num_attrs) |
| int | ex_put_concat_elem_block (int exoid, const void_int *elem_blk_id, char *elem_type[], const void_int *num_elem_this_blk, const void_int *num_nodes_per_elem, const void_int *num_attr_this_blk, int define_maps) |
| int | ex_put_coord_names (int exoid, char *coord_names[]) |
| int | ex_put_coord (int exoid, const void *x_coor, const void *y_coor, const void *z_coor) |
| int | ex_put_partial_coord_component (int exoid, int64_t start_node_num, int64_t num_nodes, int component, const void *coor) |
| int | ex_put_partial_coord (int exoid, int64_t start_node_num, int64_t num_nodes, const void *x_coor, const void *y_coor, const void *z_coor) |
| int | ex_put_map (int exoid, const void_int *elem_map) |
| int | ex_put_id_map (int exoid, ex_entity_type map_type, const void_int *map) |
| int | ex_put_partial_id_map (int exoid, ex_entity_type map_type, int64_t start_entity_num, int64_t num_entities, const void_int *map) |
| int | ex_get_id_map (int exoid, ex_entity_type map_type, void_int *map) |
| int | ex_get_partial_id_map (int exoid, ex_entity_type map_type, int64_t start_entity_num, int64_t num_entities, void_int *map) |
| int | ex_put_coordinate_frames (int exoid, int nframes, const void_int *cf_ids, void *pt_coordinates, const char *tags) |
| int | ex_put_map_param (int exoid, int num_node_maps, int num_elem_maps) |
| int | ex_put_name (int exoid, ex_entity_type obj_type, ex_entity_id entity_id, const char *name) |
| int | ex_put_names (int exoid, ex_entity_type obj_type, char *names[]) |
| int | ex_put_partial_one_attr (int exoid, ex_entity_type obj_type, ex_entity_id obj_id, int64_t start_num, int64_t num_ent, int attrib_index, const void *attrib) |
| int | ex_put_prop (int exoid, ex_entity_type obj_type, ex_entity_id obj_id, const char *prop_name, ex_entity_id value) |
| int | ex_put_prop_array (int exoid, ex_entity_type obj_type, const char *prop_name, const void_int *values) |
| int | ex_put_prop_names (int exoid, ex_entity_type obj_type, int num_props, char **prop_names) |
| int | ex_put_num_map (int exoid, ex_entity_type map_type, ex_entity_id map_id, const void_int *map) |
| int | ex_get_num_map (int exoid, ex_entity_type map_type, ex_entity_id map_id, void_int *map) |
| int | ex_put_block (int exoid, ex_entity_type blk_type, ex_entity_id blk_id, const char *entry_descrip, int64_t num_entries_this_blk, int64_t num_nodes_per_entry, int64_t num_edges_per_entry, int64_t num_faces_per_entry, int64_t num_attr_per_entry) |
| int | ex_get_block (int exoid, ex_entity_type blk_type, ex_entity_id blk_id, char *elem_type, void_int *num_entries_this_blk, void_int *num_nodes_per_entry, void_int *num_edges_per_entry, void_int *num_faces_per_entry, void_int *num_attr_per_entry) |
| int | ex_get_block_param (int exoid, ex_block *block) |
| int | ex_put_block_param (int exoid, const ex_block block) |
| int | ex_get_block_params (int exoid, size_t block_count, struct ex_block **blocks) |
| int | ex_put_block_params (int exoid, size_t block_count, const struct ex_block *blocks) |
| int | ex_put_concat_all_blocks (int exoid, const ex_block_params *param) |
| int | ex_put_entity_count_per_polyhedra (int exoid, ex_entity_type blk_type, ex_entity_id blk_id, const int *entity_counts) |
| int | ex_get_entity_count_per_polyhedra (int exoid, ex_entity_type blk_type, ex_entity_id blk_id, int *entity_counts) |
| int | ex_put_conn (int exoid, ex_entity_type blk_type, ex_entity_id blk_id, const void_int *node_conn, const void_int *elem_edge_conn, const void_int *elem_face_conn) |
| int | ex_get_conn (int exoid, ex_entity_type blk_type, ex_entity_id blk_id, void_int *nodeconn, void_int *edgeconn, void_int *faceconn) |
| int | ex_get_partial_conn (int exoid, ex_entity_type blk_type, ex_entity_id blk_id, int64_t start_num, int64_t num_ent, void_int *nodeconn, void_int *edgeconn, void_int *faceconn) |
| int | ex_put_partial_conn (int exoid, ex_entity_type blk_type, ex_entity_id blk_id, int64_t start_num, int64_t num_ent, const void_int *nodeconn, const void_int *edgeconn, const void_int *faceconn) |
| int | ex_put_attr (int exoid, ex_entity_type blk_type, ex_entity_id blk_id, const void *attrib) |
| int | ex_put_partial_attr (int exoid, ex_entity_type blk_type, ex_entity_id blk_id, int64_t start_entity, int64_t num_entity, const void *attrib) |
| int | ex_get_attr (int exoid, ex_entity_type obj_type, ex_entity_id obj_id, void *attrib) |
| int | ex_get_partial_attr (int exoid, ex_entity_type obj_type, ex_entity_id obj_id, int64_t start_num, int64_t num_ent, void *attrib) |
| int | ex_put_one_attr (int exoid, ex_entity_type obj_type, ex_entity_id obj_id, int attrib_index, const void *attrib) |
| int | ex_get_one_attr (int exoid, ex_entity_type obj_type, ex_entity_id obj_id, int attrib_index, void *attrib) |
| int | ex_get_partial_one_attr (int exoid, ex_entity_type obj_type, ex_entity_id obj_id, int64_t start_num, int64_t num_ent, int attrib_index, void *attrib) |
| int | ex_put_attr_names (int exoid, ex_entity_type blk_type, ex_entity_id blk_id, char **names) |
| int | ex_get_attr_names (int exoid, ex_entity_type obj_type, ex_entity_id obj_id, char **names) |
| int | ex_put_set_param (int exoid, ex_entity_type set_type, ex_entity_id set_id, int64_t num_entries_in_set, int64_t num_dist_fact_in_set) |
| int | ex_get_set_param (int exoid, ex_entity_type set_type, ex_entity_id set_id, void_int *num_entry_in_set, void_int *num_dist_fact_in_set) |
| int | ex_put_set (int exoid, ex_entity_type set_type, ex_entity_id set_id, const void_int *set_entry_list, const void_int *set_extra_list) |
| int | ex_get_partial_set (int exoid, ex_entity_type set_type, ex_entity_id set_id, int64_t offset, int64_t num_to_get, void_int *set_entry_list, void_int *set_extra_list) |
| int | ex_put_partial_set (int exoid, ex_entity_type set_type, ex_entity_id set_id, int64_t offset, int64_t num_to_put, const void_int *set_entry_list, const void_int *set_extra_list) |
| int | ex_get_set (int exoid, ex_entity_type set_type, ex_entity_id set_id, void_int *set_entry_list, void_int *set_extra_list) |
| int | ex_put_set_dist_fact (int exoid, ex_entity_type set_type, ex_entity_id set_id, const void *set_dist_fact) |
| int | ex_get_set_dist_fact (int exoid, ex_entity_type set_type, ex_entity_id set_id, void *set_dist_fact) |
| int | ex_get_partial_set_dist_fact (int exoid, ex_entity_type set_type, ex_entity_id set_id, int64_t offset, int64_t num_to_put, void *set_dist_fact) |
| int | ex_put_concat_sets (int exoid, ex_entity_type set_type, const struct ex_set_specs *set_specs) |
| int | ex_get_concat_sets (int exoid, ex_entity_type set_type, struct ex_set_specs *set_specs) |
| int | ex_put_sets (int exoid, size_t set_count, const struct ex_set *sets) |
| int | ex_get_sets (int exoid, size_t set_count, struct ex_set *sets) |
| int | ex_put_partial_num_map (int exoid, ex_entity_type map_type, ex_entity_id map_id, int64_t ent_start, int64_t ent_count, const void_int *map) |
| int | ex_put_partial_set_dist_fact (int exoid, ex_entity_type set_type, ex_entity_id set_id, int64_t offset, int64_t num_to_put, const void *set_dist_fact) |
| int | ex_get_concat_side_set_node_count (int exoid, int *side_set_node_cnt_list) |
| int | ex_get_side_set_node_list_len (int exoid, ex_entity_id side_set_id, void_int *side_set_node_list_len) |
| int | ex_get_side_set_node_count (int exoid, ex_entity_id side_set_id, int *side_set_node_cnt_list) |
| int | ex_get_side_set_node_list (int exoid, ex_entity_id side_set_id, void_int *side_set_node_cnt_list, void_int *side_set_node_list) |
| int | ex_get_ns_param_global (int exoid, void_int *global_ids, void_int *node_cnts, void_int *df_cnts) |
| int | ex_put_ns_param_global (int exoid, void_int *global_ids, void_int *node_cnts, void_int *df_cnts) |
| int | ex_get_ss_param_global (int exoid, void_int *global_ids, void_int *side_cnts, void_int *df_cnts) |
| int | ex_put_ss_param_global (int exoid, void_int *global_ids, void_int *side_cnts, void_int *df_cnts) |
| int | ex_get_eb_info_global (int exoid, void_int *el_blk_ids, void_int *el_blk_cnts) |
| int | ex_put_eb_info_global (int exoid, void_int *el_blk_ids, void_int *el_blk_cnts) |
| int | ex_get_elem_type (int exoid, ex_entity_id elem_blk_id, char *elem_type) |
| int | ex_get_processor_node_maps (int exoid, void_int *node_mapi, void_int *node_mapb, void_int *node_mape, int processor) |
| int | ex_put_processor_node_maps (int exoid, void_int *node_mapi, void_int *node_mapb, void_int *node_mape, int proc_id) |
| int | ex_get_processor_elem_maps (int exoid, void_int *elem_mapi, void_int *elem_mapb, int processor) |
| int | ex_put_processor_elem_maps (int exoid, void_int *elem_mapi, void_int *elem_mapb, int processor) |
| int | ex_get_cmap_params (int exoid, void_int *node_cmap_ids, void_int *node_cmap_node_cnts, void_int *elem_cmap_ids, void_int *elem_cmap_elem_cnts, int processor) |
| int | ex_put_cmap_params (int exoid, void_int *node_cmap_ids, void_int *node_cmap_node_cnts, void_int *elem_cmap_ids, void_int *elem_cmap_elem_cnts, int64_t processor) |
| int | ex_put_cmap_params_cc (int exoid, void_int *node_cmap_ids, void_int *node_cmap_node_cnts, void_int *node_proc_ptrs, void_int *elem_cmap_ids, void_int *elem_cmap_elem_cnts, void_int *elem_proc_ptrs) |
| int | ex_get_node_cmap (int exoid, ex_entity_id map_id, void_int *node_ids, void_int *proc_ids, int processor) |
| int | ex_put_node_cmap (int exoid, ex_entity_id map_id, void_int *node_ids, void_int *proc_ids, int processor) |
| int | ex_get_elem_cmap (int exoid, ex_entity_id map_id, void_int *elem_ids, void_int *side_ids, void_int *proc_ids, int processor) |
| int | ex_put_elem_cmap (int exoid, ex_entity_id map_id, void_int *elem_ids, void_int *side_ids, void_int *proc_ids, int processor) |
| int | ex_get_init_global (int exoid, void_int *num_nodes_g, void_int *num_elems_g, void_int *num_elem_blks_g, void_int *num_node_sets_g, void_int *num_side_sets_g) |
| int | ex_get_init_info (int exoid, int *num_proc, int *num_proc_in_f, char *ftype) |
| int | ex_get_loadbal_param (int exoid, void_int *num_int_nodes, void_int *num_bor_nodes, void_int *num_ext_nodes, void_int *num_int_elems, void_int *num_bor_elems, void_int *num_node_cmaps, void_int *num_elem_cmaps, int processor) |
| int | ex_put_init_global (int exoid, int64_t num_nodes_g, int64_t num_elems_g, int64_t num_elem_blks_g, int64_t num_node_sets_g, int64_t num_side_sets_g) |
| int | ex_put_init_info (int exoid, int num_proc, int num_proc_in_f, char *ftype) |
| int | ex_put_loadbal_param (int exoid, int64_t num_int_nodes, int64_t num_bor_nodes, int64_t num_ext_nodes, int64_t num_int_elems, int64_t num_bor_elems, int64_t num_node_cmaps, int64_t num_elem_cmaps, int processor) |
| int | ex_put_loadbal_param_cc (int exoid, void_int *num_int_nodes, void_int *num_bor_nodes, void_int *num_ext_nodes, void_int *num_int_elems, void_int *num_bor_elems, void_int *num_node_cmaps, void_int *num_elem_cmaps) |
The routines in this section read and write information which describe an exodus finite element model. This includes nodal coordinates, element order map, element connectivity arrays, element attributes, node sets, side sets, and object properties.
| int ex_add_attr | ( | int | exoid, |
| ex_entity_type | obj_type, | ||
| ex_entity_id | obj_id, | ||
| int64_t | num_attr_per_entry | ||
| ) |
| int ex_create_group | ( | int | parent_id, |
| const char * | group_name | ||
| ) |
| int ex_get_attr | ( | int | exoid, |
| ex_entity_type | obj_type, | ||
| ex_entity_id | obj_id, | ||
| void * | attrib | ||
| ) |
| int ex_get_attr_names | ( | int | exoid, |
| ex_entity_type | obj_type, | ||
| ex_entity_id | obj_id, | ||
| char ** | names | ||
| ) |
| int ex_get_attr_param | ( | int | exoid, |
| ex_entity_type | obj_type, | ||
| ex_entity_id | obj_id, | ||
| int * | num_attrs | ||
| ) |
| int ex_get_block | ( | int | exoid, |
| ex_entity_type | blk_type, | ||
| ex_entity_id | blk_id, | ||
| char * | entity_descrip, | ||
| void_int * | num_entries_this_blk, | ||
| void_int * | num_nodes_per_entry, | ||
| void_int * | num_edges_per_entry, | ||
| void_int * | num_faces_per_entry, | ||
| void_int * | num_attr_per_entry | ||
| ) |
entry conditions - input parameters: int idexo exodus file id int blk_type block type (edge,face,element) int blk_id block id
exit conditions - char* elem_type element type name int* num_entries_this_blk number of elements in this element block int* num_nodes_per_entry number of nodes per element block int* num_attr_per_entry number of attributes
revision history -
| int ex_get_block_param | ( | int | exoid, |
| ex_block * | block | ||
| ) |
entry conditions - input parameters: int idexo exodus file id int blk_type block type (edge,face,element) int blk_id block id
exit conditions - char* elem_type element type name int* num_entries_this_blk number of elements in this element block int* num_nodes_per_entry number of nodes per element block int* num_attr_per_entry number of attributes
revision history -
| int ex_get_block_params | ( | int | exoid, |
| size_t | block_count, | ||
| struct ex_block ** | blocks | ||
| ) |
Reads the parameters describing element/face/edge blocks
| exoid | exodus file id |
| block_count | number of blocks being queried |
| blocks | array of ex_block structures describing block counts |
the id and type fields of the block(s) must be defined to specify which blocks to access; all other fields will be filled in based on data from the file
| int ex_get_cmap_params | ( | int | exoid, |
| void_int * | node_cmap_ids, | ||
| void_int * | node_cmap_node_cnts, | ||
| void_int * | elem_cmap_ids, | ||
| void_int * | elem_cmap_elem_cnts, | ||
| int | processor | ||
| ) |
| exoid | NetCDF/Exodus file ID |
| node_cmap_ids | Nodal comm. map IDs |
| node_cmap_node_cnts | Number of nodes in each map |
| elem_cmap_ids | Elemental comm. map IDs |
| elem_cmap_elem_cnts | Number of elems in each map |
| processor | This processor ID |
| int ex_get_concat_sets | ( | int | exoid, |
| ex_entity_type | set_type, | ||
| struct ex_set_specs * | set_specs | ||
| ) |
reads the set ID's, set entry count array, set entry pointers array, set entry list, set extra list, and set distribution factors for all sets of the specified type.
entry conditions - input parameters: int exoid exodus file id ex_entity_type set_type type of set
exit conditions - struct ex_set_specs* set_specs set specs structure
revision history -
| int ex_get_concat_side_set_node_count | ( | int | exoid, |
| int * | side_set_node_cnt_list | ||
| ) |
| int ex_get_conn | ( | int | exoid, |
| ex_entity_type | blk_type, | ||
| ex_entity_id | blk_id, | ||
| void_int * | nodeconn, | ||
| void_int * | edgeconn, | ||
| void_int * | faceconn | ||
| ) |
entry conditions - expelb must be called first to establish element block parameters. input parameters: int exoid exodus file id int blk_type block type (edge, face, element) int blk_id block id
exit conditions - int* nodeconn nodal connectivity array int* edgeconn edge connectivity array (where applicable) int* faceconn face connectivity array (where applicable)
| int ex_get_coord | ( | int | exoid, |
| void * | x_coor, | ||
| void * | y_coor, | ||
| void * | z_coor | ||
| ) |
The function ex_get_coord() reads the nodal coordinates of the nodes. Memory must be allocated for the coordinate arrays (x_coor, y_coor, and z_coor) before this call is made. The length of each of these arrays is the number of nodes in the mesh.
Because the coordinates are floating point values, the application code must declare the arrays 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] | x_coor | Returned X coordinates of the nodes. If this is NULL, the X-coordinates will not be read. |
| [out] | y_coor | Returned Y coordinates of the nodes. These are returned only if num_dim > 1; otherwise, pass in NULL. If this is NULL, the Y-coordinates will not be read. |
| [out] | z_coor | Returned Z coordinates of the nodes. These are returned only if num_dim > 2; otherwise, pass in NULL. If this is NULL, the Z-coordinates will not be read. |
The following code segment will read the nodal coordinates from an open exodus file :
| int ex_get_coord_names | ( | int | exoid, |
| char ** | coord_names | ||
| ) |
The function ex_get_coord_names() reads the names of the coordinate arrays from the database. Memory must be allocated for the character strings before this function is invoked.
| [in] | exoid | exodus file ID returned from a previous call to ex_create() or ex_open(). |
| [out] | coord_names | Returned pointer to a vector containing num_dim names of the nodal coordinate arrays. |
The following code segment will read the coordinate names from an open exodus file :
| int ex_get_coordinate_frames | ( | int | exoid, |
| int * | nframes, | ||
| void_int * | cf_ids, | ||
| void * | pt_coordinates, | ||
| char * | tags | ||
| ) |
Coordinate frames are stored in the database as a series of three points (defined in the basic cartesian coordinate system). The first of these points describes the origin of the new system. The second point lies on the 3 axis (or Z axis) of the frame. The third point is in the 1-3 (xz) plane. Each coordinate frame is identified by a unique, integer coordinate ID, and by a character tag indicating whether the frame is rectangular cartesian "R", cylindrical "C, or spherical "S". Because the coordinates are floating point values, the application code must declare the arrays passed to be the appropriate type "float" or "double" to match the compute word size passed in ex_create() or ex_open().
| exoid | exodus file id | |
| [in,out] | nframes | if 'cf_ids' is NULL, then nframes is returned with the number of defined coordinate frames. Else it is the number of coordinate frames to read. |
| [out] | cf_ids | The (nframes) coordinate frame Ids. If cf_ids is NULL, no data will be returned in this or any other array. Only nframes will be modified. Otherwise, space must be allocated to store 'nframes' integers before making this call. |
| [out] | pt_coordinates | The (9*nframes) coordinates of the three points defining each coordinate axis. The first three values are the origin of the first frame. The next three values are the coordinates of a point on the 3rd axis of the first frame. The next three values are the coordinates of a point in the plane of the 1-3 axis. The pattern is repeated for each frame. If 'cf_ids' is null, no data will be returned in this array. Otherwise, space must be allocated for 9*nframes floating point values. The size of the allocation depends upon the compute word size. |
| [out] | tags | The (nframes) character tags associated with each coordinate frame. If 'cf_ids' is NULL, no data will be returned in this array. Otherwise, space must be allocated for 'nframes' characters. |
| exoid | NemesisI file ID |
| el_blk_ids | Vector of global element IDs |
| el_blk_cnts | Vector of global element counts |
| int ex_get_elem_cmap | ( | int | exoid, |
| ex_entity_id | map_id, | ||
| void_int * | elem_ids, | ||
| void_int * | side_ids, | ||
| void_int * | proc_ids, | ||
| int | processor | ||
| ) |
| exoid | NetCDF/Exodus file ID |
| map_id | Elemental comm map ID |
| elem_ids | Element IDs |
| side_ids | Element side IDs |
| proc_ids | Processor IDs |
| processor | This processor ID |
| int ex_get_elem_type | ( | int | exoid, |
| ex_entity_id | elem_blk_id, | ||
| char * | elem_type | ||
| ) |
| exoid | NetCDF/Exodus file ID |
| elem_blk_id | Element block ID |
| elem_type | The name of the element type |
| int ex_get_entity_count_per_polyhedra | ( | int | exoid, |
| ex_entity_type | blk_type, | ||
| ex_entity_id | blk_id, | ||
| int * | entity_counts | ||
| ) |
reads in the number of entities (nodes/faces) per polyhedra (nsided/nfaced) in this element block.
| exoid | exodus file id |
| blk_type | type of block (face, or element) |
| blk_id | block identifier |
| entity_counts | entity_per_polyhedra count array |
| int ex_get_id_map | ( | int | exoid, |
| ex_entity_type | map_type, | ||
| void_int * | map | ||
| ) |
| int ex_get_ids | ( | int | exoid, |
| ex_entity_type | obj_type, | ||
| void_int * | ids | ||
| ) |
| int ex_get_init | ( | int | exoid, |
| char * | title, | ||
| void_int * | num_dim, | ||
| void_int * | num_nodes, | ||
| void_int * | num_elem, | ||
| void_int * | num_elem_blk, | ||
| void_int * | num_node_sets, | ||
| void_int * | num_side_sets | ||
| ) |
The function ex_get_init() reads the initializationinitialization parameters from an opened exodus file.
| exoid | exodus file ID returned from a previous call to ex_create() or ex_open(). | |
| [out] | title | Returned database title. String length may be up to MAX_LINE_LENGTH bytes. |
| [out] | num_dim | Returned dimensionality of the database. This is the number of coordinates per node. |
| [out] | num_nodes | Returned number of nodal points. |
| [out] | num_elem | Returned number of elements |
| [out] | num_elem_blk | Returned number of element blocks |
| [out] | num_node_sets | Returned number of node sets |
| [out] | num_side_sets | Returned number of side sets |
The following code segment will read the initialization parameters from the open exodus file:
| int ex_get_init_ext | ( | int | exoid, |
| ex_init_params * | info | ||
| ) |
reads the initialization parameters from an opened EXODUS file
| exoid | exodus file id | |
| [out] | info | ex_init_params structure containing metadata for mesh. |
| int ex_get_init_info | ( | int | exoid, |
| int * | num_proc, | ||
| int * | num_proc_in_f, | ||
| char * | ftype | ||
| ) |
| int ex_get_map | ( | int | exoid, |
| void_int * | elem_map | ||
| ) |
The function ex_get_map() reads the element order map from the database. If an element order map is not stored in the data file, a default array (1,2,3,. .. num_elem) is returned. Memory must be allocated for the element map array ({num_elem} in length) before this call is made.
| [in] | exoid | exodus file ID returned from a previous call to ex_create() or ex_open(). |
| [out] | elem_map | Returned element order map. |
The following code will read an element order map from an open exodus file :
| int ex_get_map_param | ( | int | exoid, |
| int * | num_node_maps, | ||
| int * | num_elem_maps | ||
| ) |
| int ex_get_name | ( | int | exoid, |
| ex_entity_type | obj_type, | ||
| ex_entity_id | entity_id, | ||
| char * | name | ||
| ) |
| int ex_get_names | ( | int | exoid, |
| ex_entity_type | obj_type, | ||
| char ** | names | ||
| ) |
| int ex_get_node_cmap | ( | int | exoid, |
| ex_entity_id | map_id, | ||
| void_int * | node_ids, | ||
| void_int * | proc_ids, | ||
| int | processor | ||
| ) |
| exoid | NetCDF/Exodus file ID |
| map_id | Map ID |
| node_ids | FEM node IDs |
| proc_ids | Processor IDs |
| processor | This processor ID |
| int ex_get_ns_param_global | ( | int | exoid, |
| void_int * | global_ids, | ||
| void_int * | node_cnts, | ||
| void_int * | df_cnts | ||
| ) |
| exoid | NetCDF/Exodus file ID |
| global_ids | Global IDs of node sets |
| node_cnts | Count of nodes in node sets |
| df_cnts | Count of dist. factors in ns |
| int ex_get_num_map | ( | int | exoid, |
| ex_entity_type | map_type, | ||
| ex_entity_id | map_id, | ||
| void_int * | map | ||
| ) |
| int ex_get_one_attr | ( | int | exoid, |
| ex_entity_type | obj_type, | ||
| ex_entity_id | obj_id, | ||
| int | attrib_index, | ||
| void * | attrib | ||
| ) |
| int ex_get_partial_attr | ( | int | exoid, |
| ex_entity_type | obj_type, | ||
| ex_entity_id | obj_id, | ||
| int64_t | start_num, | ||
| int64_t | num_ent, | ||
| void * | attrib | ||
| ) |
reads the specified attribute for a subsect of a block
| exoid | exodus file id |
| obj_type | object type (edge, face, elem block) |
| obj_id | object id (edge, face, elem block ID) |
| start_num | the starting index of the attributes to be returned. |
| num_ent | the number of entities to read attributes for. |
| attrib | array of attributes |
| int ex_get_partial_conn | ( | int | exoid, |
| ex_entity_type | blk_type, | ||
| ex_entity_id | blk_id, | ||
| int64_t | start_num, | ||
| int64_t | num_ent, | ||
| void_int * | nodeconn, | ||
| void_int * | edgeconn, | ||
| void_int * | faceconn | ||
| ) |
| int ex_get_partial_coord | ( | int | exoid, |
| int64_t | start_node_num, | ||
| int64_t | num_nodes, | ||
| void * | x_coor, | ||
| void * | y_coor, | ||
| void * | z_coor | ||
| ) |
reads the coordinates of the nodes. Memory must be allocated for the coordinate arrays (x_coor, y_coor, and z_coor) before this call is made. The length of each of these arrays is the number of nodes in the mesh. Because the coordinates are floating point values, the application code must declare the arrays passed to be the appropriate type "float" or "double" to match the compute word size passed in ex_create() or ex_open()
| exoid | exodus file id | |
| start_node_num | the starting index of the coordinates to be returned. | |
| num_nodes | the number of nodes to read coordinates for. | |
| [out] | x_coor | Returned X coordinates of the nodes. These are returned only if x_coor is non-NULL. |
| [out] | y_coor | Returned Y coordinates of the nodes. These are returned only if y_coor is non-NULL. |
| [out] | z_coor | Returned Z coordinates of the nodes. These are returned only if z_coor is non-NULL. |
| int ex_get_partial_coord_component | ( | int | exoid, |
| int64_t | start_node_num, | ||
| int64_t | num_nodes, | ||
| int | component, | ||
| void * | coor | ||
| ) |
reads the coordinates of some of the nodes in the model for the specified component Memory must be allocated for the coordinate array (coor) before this call is made. The length of the array is at least num_nodes Because the coordinates 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()
| exoid | exodus file id | |
| start_node_num | the starting index of the coordinates to be returned. | |
| num_nodes | the number of nodes to read coordinates for. | |
| component | which component (1=X, 2=Y, 3=Z) | |
| [out] | coor | Returned coordinate of the nodes for the specified component. |
| int ex_get_partial_id_map | ( | int | exoid, |
| ex_entity_type | map_type, | ||
| int64_t | start_entity_num, | ||
| int64_t | num_entities, | ||
| void_int * | map | ||
| ) |
reads the a portion of the values of the id map for the entity type specified by map_type The beginning location of the read is a start_entity_num which is 1-based. The read will return num_entities values starting at that location. Requirements are:
start_entity_num > 0start_entity_num + num_entities - 1 <= num_entity which is the number of entities of specified type (e.g. elements)| exoid | exodus file id |
| map_type | type (edge block, face block, edge set, ... ) |
| start_entity_num | index of first entity in block to read (1-based) |
| num_entities | number of entries to read in this block/set |
| map | the values read are returned here. |
| int ex_get_partial_num_map | ( | int | exoid, |
| ex_entity_type | map_type, | ||
| ex_entity_id | map_id, | ||
| int64_t | ent_start, | ||
| int64_t | ent_count, | ||
| void_int * | map | ||
| ) |
| int ex_get_partial_one_attr | ( | int | exoid, |
| ex_entity_type | obj_type, | ||
| ex_entity_id | obj_id, | ||
| int64_t | start_num, | ||
| int64_t | num_ent, | ||
| int | attrib_index, | ||
| void * | attrib | ||
| ) |
reads the specified attribute for a subsect of a block
| exoid | exodus file id |
| obj_type | object type (edge, face, elem block) |
| obj_id | object id (edge, face, elem block ID) |
| start_num | the starting index of the attributes to be returned. |
| num_ent | the number of entities to read attributes for. |
| attrib_index | index of attribute to write |
| attrib | array of attributes |
| int ex_get_partial_set | ( | int | exoid, |
| ex_entity_type | set_type, | ||
| ex_entity_id | set_id, | ||
| int64_t | offset, | ||
| int64_t | num_to_get, | ||
| void_int * | set_entry_list, | ||
| void_int * | set_extra_list | ||
| ) |
reads a portion of the set entry list and set extra list for a single set
| exoid | exodus file id |
| set_type | set type |
| set_id | set id |
| offset | index of first entry in set to access (1-based) |
| num_to_get | number of entries to output. |
| set_entry_list | array of entries in set. Set to NULL to not read. |
| set_extra_list | array of extras in set. Set to NULL to not read. |
| int ex_get_partial_set_dist_fact | ( | int | exoid, |
| ex_entity_type | set_type, | ||
| ex_entity_id | set_id, | ||
| int64_t | offset, | ||
| int64_t | num_to_put, | ||
| void * | set_dist_fact | ||
| ) |
reads the distribution factors for a single set
| int ex_get_processor_elem_maps | ( | int | exoid, |
| void_int * | elem_mapi, | ||
| void_int * | elem_mapb, | ||
| int | processor | ||
| ) |
| exoid | NetCDF/Exodus file ID |
| elem_mapi | Internal element IDs |
| elem_mapb | Border element IDs |
| processor | Processor ID |
| int ex_get_processor_node_maps | ( | int | exoid, |
| void_int * | node_mapi, | ||
| void_int * | node_mapb, | ||
| void_int * | node_mape, | ||
| int | processor | ||
| ) |
| exoid | NetCDF/Exodus file ID |
| node_mapi | Internal FEM node IDs |
| node_mapb | Border FEM node IDs |
| node_mape | External FEM node IDs |
| processor | Processor IDs |
| int ex_get_prop | ( | int | exoid, |
| ex_entity_type | obj_type, | ||
| ex_entity_id | obj_id, | ||
| const char * | prop_name, | ||
| void_int * | value | ||
| ) |
The function ex_get_prop() reads an integer object property value stored for a single element block, node set, or side set.
| [in] | exoid | exodus file ID returned from a previous call to ex_create() or ex_open(). |
| [in] | obj_type | Type of object; use one of the options in the table below. |
| [in] | obj_id | The element block, node set, or side set ID. |
| [in] | prop_name | The name of the property (maximum length is MAX_STR_LENGTH ) for which the value is desired. |
| [out] | value | Returned value of the property. |
| ex_entity_type | description |
|---|---|
| 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 |
| EX_ELEM_MAP | Element Map entity type |
| EX_NODE_MAP | Node Map entity type |
| EX_EDGE_MAP | Edge Map entity type |
| EX_FACE_MAP | Face Map entity type |
For an example of code to read an object property, refer to the description for ex_get_prop_names().
| int ex_get_prop_array | ( | int | exoid, |
| ex_entity_type | obj_type, | ||
| const char * | prop_name, | ||
| void_int * | values | ||
| ) |
The function ex_get_prop_array() reads an array of integer property values for all element blocks, node sets, or side sets. The order of the values in the array correspond to the order in which the element blocks, node sets, or side sets were introduced into the file. Before this function is invoked, memory must be allocated for the returned array of(num_elem_blk, num_node_sets, or {num_side_sets}) integer values.
This function can be used in place of
| [in] | exoid | exodus file ID returned from a previous call to ex_create() or ex_open(). |
| [in] | obj_type | Type of object; use one of the options in the table below. |
| [in] | prop_name | The name of the property (maximum length of MAX_STR_LENGTH ) for which the values are desired. |
| [out] | values | Returned array of property values. |
| ex_entity_type | description |
|---|---|
| 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 |
| EX_ELEM_MAP | Element Map entity type |
| EX_NODE_MAP | Node Map entity type |
| EX_EDGE_MAP | Edge Map entity type |
| EX_FACE_MAP | Face Map entity type |
For an example of code to read an array of object properties, refer to the description for ex_get_prop_names().
| int ex_get_prop_names | ( | int | exoid, |
| ex_entity_type | obj_type, | ||
| char ** | prop_names | ||
| ) |
The function ex_get_prop_names() returns names of integer properties stored for an element block, node set, or side set. The number of properties (needed to allocate space for the property names) can be obtained via a call to ex_inquire() or ex_inquire_int().
| [in] | exoid | exodus file ID returned from a previous call to ex_create() or ex_open(). |
| [in] | obj_type | Type of object; use one of the options in the table below. |
| [out] | prop_names | Returned array containing num_props (obtained from call to ex_inquire() or ex_inquire_int()) names (of maximum length MAX_STR_LENGTH ) of properties to be stored. ID, a reserved property name, will be the first name in the array. |
| ex_entity_type | description |
|---|---|
| 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 |
| EX_ELEM_MAP | Element Map entity type |
| EX_NODE_MAP | Node Map entity type |
| EX_EDGE_MAP | Edge Map entity type |
| EX_FACE_MAP | Face Map entity type |
As an example, the following code segment reads in properties assigned to node sets:
| int ex_get_set | ( | int | exoid, |
| ex_entity_type | set_type, | ||
| ex_entity_id | set_id, | ||
| void_int * | set_entry_list, | ||
| void_int * | set_extra_list | ||
| ) |
reads the set entry list and set extra list for a single set
| exoid | exodus file id |
| set_type | set type |
| set_id | set id |
| *set_entry_list | array of entries in set. Set to NULL to not read. |
| *set_extra_list | array of extras in set. Set to NULL to not read. |
| int ex_get_set_dist_fact | ( | int | exoid, |
| ex_entity_type | set_type, | ||
| ex_entity_id | set_id, | ||
| void * | set_dist_fact | ||
| ) |
reads the distribution factors for a single set
| int ex_get_set_param | ( | int | exoid, |
| ex_entity_type | set_type, | ||
| ex_entity_id | set_id, | ||
| void_int * | num_entry_in_set, | ||
| void_int * | num_dist_fact_in_set | ||
| ) |
| int ex_get_sets | ( | int | exoid, |
| size_t | set_count, | ||
| struct ex_set * | sets | ||
| ) |
| int ex_get_side_set_node_count | ( | int | exoid, |
| ex_entity_id | side_set_id, | ||
| int * | side_set_node_cnt_list | ||
| ) |
| int ex_get_side_set_node_list | ( | int | exoid, |
| ex_entity_id | side_set_id, | ||
| void_int * | side_set_node_cnt_list, | ||
| void_int * | side_set_node_list | ||
| ) |
| int ex_get_side_set_node_list_len | ( | int | exoid, |
| ex_entity_id | side_set_id, | ||
| void_int * | side_set_node_list_len | ||
| ) |
This routine is designed to read the Exodus II V 2.0 side set side definition and return the length of a ExodusI style side set node list.
| exoid | exodus file id | |
| side_set_id | side set id | |
| [out] | *side_set_node_list_len | length of node list |
| int ex_get_ss_param_global | ( | int | exoid, |
| void_int * | global_ids, | ||
| void_int * | side_cnts, | ||
| void_int * | df_cnts | ||
| ) |
| exoid | NetCDF/Exodus file ID |
| global_ids | Global side-set IDs |
| side_cnts | Global side count |
| df_cnts | Global dist. factor count |
| int ex_put_attr | ( | int | exoid, |
| ex_entity_type | blk_type, | ||
| ex_entity_id | blk_id, | ||
| const void * | attrib | ||
| ) |
writes the attributes for an edge/face/element block
| exoid | exodus file id |
| blk_type | block type |
| blk_id | block id |
| attrib | array of attributes |
| int ex_put_attr_names | ( | int | exoid, |
| ex_entity_type | blk_type, | ||
| ex_entity_id | blk_id, | ||
| char ** | names | ||
| ) |
| int ex_put_attr_param | ( | int | exoid, |
| ex_entity_type | obj_type, | ||
| ex_entity_id | obj_id, | ||
| int | num_attrs | ||
| ) |
defines the number of attributes.
| exoid | exodus file id |
| obj_type | block/set type (node, edge, face, elem) |
| obj_id | block/set id (ignored for NODAL) |
| num_attrs | number of attributes |
| int ex_put_block | ( | int | exoid, |
| ex_entity_type | blk_type, | ||
| ex_entity_id | blk_id, | ||
| const char * | entry_descrip, | ||
| int64_t | num_entries_this_blk, | ||
| int64_t | num_nodes_per_entry, | ||
| int64_t | num_edges_per_entry, | ||
| int64_t | num_faces_per_entry, | ||
| int64_t | num_attr_per_entry | ||
| ) |
writes the parameters used to describe an element/face/edge block
| exoid | exodus file id |
| blk_type | type of block (edge, face, or element) |
| blk_id | block identifier |
| entry_descrip | string describing shape of entries in the block |
| num_entries_this_blk | number of entries(records) in the block |
| num_nodes_per_entry | number of nodes per block entry |
| num_edges_per_entry | number of edges per block entry |
| num_faces_per_entry | number of faces per block entry |
| num_attr_per_entry | number of attributes per block entry |
| int ex_put_block_param | ( | int | exoid, |
| const ex_block | block | ||
| ) |
writes the parameters used to describe an element/face/edge block
| exoid | exodus file id |
| block | ex_block structure describing block counts |
| int ex_put_block_params | ( | int | exoid, |
| size_t | block_count, | ||
| const struct ex_block * | blocks | ||
| ) |
writes the parameters used to describe an element/face/edge block
| exoid | exodus file id |
| block_count | number of blocks being defined |
| blocks | array of ex_block structures describing block counts |
| int ex_put_cmap_params | ( | int | exoid, |
| void_int * | node_cmap_ids, | ||
| void_int * | node_cmap_node_cnts, | ||
| void_int * | elem_cmap_ids, | ||
| void_int * | elem_cmap_elem_cnts, | ||
| int64_t | processor | ||
| ) |
| exoid | NetCDF/Exodus file ID |
| node_cmap_ids | Node map IDs |
| node_cmap_node_cnts | Nodes in nodal comm |
| elem_cmap_ids | Elem map IDs |
| elem_cmap_elem_cnts | Elems in elemental comm |
| processor | This processor ID |
| int ex_put_cmap_params_cc | ( | int | exoid, |
| void_int * | node_cmap_ids, | ||
| void_int * | node_cmap_node_cnts, | ||
| void_int * | node_proc_ptrs, | ||
| void_int * | elem_cmap_ids, | ||
| void_int * | elem_cmap_elem_cnts, | ||
| void_int * | elem_proc_ptrs | ||
| ) |
| exoid | NetCDF/Exodus file ID |
| node_cmap_ids | Node map IDs |
| node_cmap_node_cnts | Nodes in nodal comm |
| node_proc_ptrs | Pointer into array for node maps |
| elem_cmap_ids | Elem map IDs |
| elem_cmap_elem_cnts | Elems in elemental comm |
| elem_proc_ptrs | Pointer into array for elem maps |
| int ex_put_concat_all_blocks | ( | int | exoid, |
| const ex_block_params * | param | ||
| ) |
writes the parameters used to describe all element, edge, and face blocks
| exoid | exodus file id |
| param | block parameters structure |
| int ex_put_concat_elem_block | ( | int | exoid, |
| const void_int * | elem_blk_id, | ||
| char * | elem_type[], | ||
| const void_int * | num_elem_this_blk, | ||
| const void_int * | num_nodes_per_elem, | ||
| const void_int * | num_attr_this_blk, | ||
| int | define_maps | ||
| ) |
writes the parameters used to describe an element block
| exoid | exodus file id |
| elem_blk_id | element block id |
| elem_type | element type string |
| num_elem_this_blk | number of elements in the element blk |
| num_nodes_per_elem | number of nodes per element block |
| num_attr_this_blk | number of attributes |
| define_maps | if != 0, write maps, else don't |
| int ex_put_concat_sets | ( | int | exoid, |
| ex_entity_type | set_type, | ||
| const struct ex_set_specs * | set_specs | ||
| ) |
writes the set ID's, set entry count array, set entry pointers array, set entry list, set extra list, and distribution factors list for all the sets of the specified type.
| exoid | exodus file id |
| set_type | type of set |
| set_specs | set specs structure |
| int ex_put_conn | ( | int | exoid, |
| ex_entity_type | blk_type, | ||
| ex_entity_id | blk_id, | ||
| const void_int * | node_conn, | ||
| const void_int * | elem_edge_conn, | ||
| const void_int * | elem_face_conn | ||
| ) |
writes the connectivity array for a block
| exoid | exodus file id |
| blk_type | type of block |
| blk_id | id of block |
| node_conn | node-element connectivity |
| elem_edge_conn | element-edge connectivity (NULL if none) |
| elem_face_conn | element-face connectivity (NULL if none) |
| int ex_put_coord | ( | int | exoid, |
| const void * | x_coor, | ||
| const void * | y_coor, | ||
| const void * | z_coor | ||
| ) |
The function ex_put_coord() writes the nodal coordinates of the nodes in the model. The function ex_put_init() must be invoked before this call is made.
Because the coordinates are floating point values, the application code must declare the arrays 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] | x_coor | The X-coordinates of the nodes. If this is NULL, the X-coordinates will not be written. |
| [in] | y_coor | The Y-coordinates of the nodes. These are stored only if num_dim > 1; otherwise, pass in NULL. If this is NULL, the Y-coordinates will not be written. |
| [in] | z_coor | The Z-coordinates of the nodes. These are stored only if num_dim > 2; otherwise, pass in NULL. If this is NULL, the Z-coordinates will not be written. |
The following will write the nodal coordinates to an open exodus file :
| int ex_put_coord_names | ( | int | exoid, |
| char * | coord_names[] | ||
| ) |
The function ex_put_coord_names() writes the names of the coordinate arrays to the database. Memory must be allocated for the character strings before this function is invoked.
In case of an error, ex_put_coord_names() 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] | coord_names | Array containing num_dim names of length ...max_name_length... of the nodal coordinate arrays. |
The following coding will write the coordinate names to an open exodus file :
| int ex_put_coordinate_frames | ( | int | exoid, |
| int | nframes, | ||
| const void_int * | cf_ids, | ||
| void * | pt_coordinates, | ||
| const char * | tags | ||
| ) |
expfrm - ex_put_coordinate_frames: write coordinate frames
| exoid | exodus file id |
| nframes | number of coordinate frames in model |
| cf_ids | coordinate ids |
| pt_coordinates | pointer to coordinates. 9 values per coordinate frame |
| tags | character tag for each frame. 'r' - rectangular, 'c' - cylindrical, 's' - spherical |
returns - EX_NOERR for no error EX_FATAL for fatal errors 1 number frames < 0
| exoid | NemesisI file ID |
| el_blk_ids | Vector of global element IDs |
| el_blk_cnts | Vector of global element counts |
| int ex_put_elem_cmap | ( | int | exoid, |
| ex_entity_id | map_id, | ||
| void_int * | elem_ids, | ||
| void_int * | side_ids, | ||
| void_int * | proc_ids, | ||
| int | processor | ||
| ) |
| exoid | NetCDF/Exodus file ID |
| map_id | Elemental comm map ID |
| elem_ids | Vector of element IDs |
| side_ids | Vector of side IDs |
| proc_ids | Vector of processor IDs |
| processor | This processor ID |
| int ex_put_entity_count_per_polyhedra | ( | int | exoid, |
| ex_entity_type | blk_type, | ||
| ex_entity_id | blk_id, | ||
| const int * | entity_counts | ||
| ) |
writes out the number of entities (nodes/faces) per polyhedra (nsided/nfaced) in this element block to the database.
| exoid | exodus file id |
| blk_type | type of block (face, or element) |
| blk_id | block identifier |
| entity_counts | entity_per_polyhedra count array |
| int ex_put_id_map | ( | int | exoid, |
| ex_entity_type | map_type, | ||
| const void_int * | map | ||
| ) |
writes out the entity numbering map to the database; this allows the entity numbers to be non-contiguous. This map is used for mapping between local and global entity ids.
| exoid | exodus file id |
| map_type | |
| map | element numbering map array |
| int ex_put_init | ( | int | exoid, |
| const char * | title, | ||
| int64_t | num_dim, | ||
| int64_t | num_nodes, | ||
| int64_t | num_elem, | ||
| int64_t | num_elem_blk, | ||
| int64_t | num_node_sets, | ||
| int64_t | num_side_sets | ||
| ) |
The function ex_put_init() writes the initialization parameters to the exodus file. This function must be called once (and only once) before writing any data to the file.
| exoid | exodus file ID returned from a previous call to ex_create() or ex_open(). |
| title | Database title. Maximum length is MAX_LINE_LENGTH. |
| num_dim | The dimensionality of the database. This is the number of coordinates per node. |
| num_nodes | The number of nodal points. |
| num_elem | The number of elements. |
| num_elem_blk | The number of element blocks. |
| num_node_sets | The number of node sets. |
| num_side_sets | The number of side sets. |
The following code segment will initialize an open exodus file with the specified parameters:
| int ex_put_init_ext | ( | int | exoid, |
| const ex_init_params * | model | ||
| ) |
writes the initialization parameters to the EXODUS file
| exoid | exodus file id |
| model | finite element model parameters |
| int ex_put_init_global | ( | int | exoid, |
| int64_t | num_nodes_g, | ||
| int64_t | num_elems_g, | ||
| int64_t | num_elem_blks_g, | ||
| int64_t | num_node_sets_g, | ||
| int64_t | num_side_sets_g | ||
| ) |
| int ex_put_init_info | ( | int | exoid, |
| int | num_proc, | ||
| int | num_proc_in_f, | ||
| char * | ftype | ||
| ) |
| int ex_put_loadbal_param | ( | int | exoid, |
| int64_t | num_int_nodes, | ||
| int64_t | num_bor_nodes, | ||
| int64_t | num_ext_nodes, | ||
| int64_t | num_int_elems, | ||
| int64_t | num_bor_elems, | ||
| int64_t | num_node_cmaps, | ||
| int64_t | num_elem_cmaps, | ||
| int | processor | ||
| ) |
| int ex_put_map | ( | int | exoid, |
| const void_int * | elem_map | ||
| ) |
The function ex_put_map() writes out the optional element order map to the database. The function ex_put_init() must be invoked before this call is made.
In case of an error, ex_put_map() 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] | elem_map | The element order map. |
The following code generates a default element order map and outputs it to an open exodus file. This is a trivial case and included just for illustration. Since this map is optional, it should be written out only if it contains something other than the default map.
| int ex_put_map_param | ( | int | exoid, |
| int | num_node_maps, | ||
| int | num_elem_maps | ||
| ) |
defines the number of node and element maps. It is more efficient to define both of these at the same time; however, they can be defined in separate calls by setting only one of the counts to a non-zero value. It is an error to redefine the number of node or element maps.
| exoid | exodus file id |
| num_node_maps | number of node maps |
| num_elem_maps | number of element maps |
| int ex_put_name | ( | int | exoid, |
| ex_entity_type | obj_type, | ||
| ex_entity_id | entity_id, | ||
| const char * | name | ||
| ) |
writes the name of the specified entity to the database. The entity with id entity_id must exist before calling ex_put_name().
| exoid | exodus file id |
| obj_type | object type |
| entity_id | id of entity name to write |
| name | ptr to entity name |
| int ex_put_names | ( | int | exoid, |
| ex_entity_type | obj_type, | ||
| char * | names[] | ||
| ) |
writes the entity names to the database
| exoid | exodus file id |
| obj_type | object type |
| names | ptr array of entity names |
| int ex_put_node_cmap | ( | int | exoid, |
| ex_entity_id | map_id, | ||
| void_int * | node_ids, | ||
| void_int * | proc_ids, | ||
| int | processor | ||
| ) |
| exoid | NetCDF/Exodus file ID |
| map_id | Nodal comm map ID |
| node_ids | FEM node IDs |
| proc_ids | Processor IDs |
| processor | This processor ID |
| int ex_put_ns_param_global | ( | int | exoid, |
| void_int * | global_ids, | ||
| void_int * | node_cnts, | ||
| void_int * | df_cnts | ||
| ) |
| exoid | NemesisI file ID |
| global_ids | Vector of global node-set IDs |
| node_cnts | Vector of node counts in node-sets |
| df_cnts | Vector of dist factor counts in node-sets |
| int ex_put_num_map | ( | int | exoid, |
| ex_entity_type | map_type, | ||
| ex_entity_id | map_id, | ||
| const void_int * | map | ||
| ) |
writes a map; this is a vector of integers of the same length as the number of entries in the source object (nodes, edges, faces, or elements in the file).
| exoid | exodus file id |
| map_type | type of map (node,edge,face,elem) |
| map_id | id to associate with new map |
| map | map set value array |
| int ex_put_one_attr | ( | int | exoid, |
| ex_entity_type | obj_type, | ||
| ex_entity_id | obj_id, | ||
| int | attrib_index, | ||
| const void * | attrib | ||
| ) |
writes the specified attribute for a block
| exoid | exodus file id |
| obj_type | object type (edge, face, elem block) |
| obj_id | object id (edge, face, elem block ID) |
| attrib_index | index of attribute to write |
| attrib | array of attributes |
| int ex_put_partial_attr | ( | int | exoid, |
| ex_entity_type | blk_type, | ||
| ex_entity_id | blk_id, | ||
| int64_t | start_entity, | ||
| int64_t | num_entity, | ||
| const void * | attrib | ||
| ) |
writes the attributes for an edge/face/element block
| exoid | exodus file id |
| blk_type | block type |
| blk_id | block id |
| start_entity | the starting index (1-based) of the attribute to be written |
| num_entity | the number of entities to write attributes |
| attrib | array of attributes |
| int ex_put_partial_conn | ( | int | exoid, |
| ex_entity_type | blk_type, | ||
| ex_entity_id | blk_id, | ||
| int64_t | start_num, | ||
| int64_t | num_ent, | ||
| const void_int * | nodeconn, | ||
| const void_int * | edgeconn, | ||
| const void_int * | faceconn | ||
| ) |
| int ex_put_partial_coord | ( | int | exoid, |
| int64_t | start_node_num, | ||
| int64_t | num_nodes, | ||
| const void * | x_coor, | ||
| const void * | y_coor, | ||
| const void * | z_coor | ||
| ) |
writes the coordinates of some of the nodes in the model Only writes the 'non-null' arrays.
| exoid | exodus file id |
| start_node_num | the starting index (1-based) of the coordinates to be written |
| num_nodes | the number of nodes to write coordinates for. |
| x_coor | x coord array |
| y_coor | y coord array |
| z_coor | z coord array |
| int ex_put_partial_coord_component | ( | int | exoid, |
| int64_t | start_node_num, | ||
| int64_t | num_nodes, | ||
| int | component, | ||
| const void * | coor | ||
| ) |
writes the coordinates of some of the nodes in the model for the specified component
| exoid | exodus file id |
| start_node_num | the starting index (1-based) of the coordinates to be written |
| num_nodes | the number of nodes to write coordinates for. |
| component | which component (1=X, 2=Y, 3=Z) |
| coor | coord array |
| int ex_put_partial_id_map | ( | int | exoid, |
| ex_entity_type | map_type, | ||
| int64_t | start_entity_num, | ||
| int64_t | num_entities, | ||
| const void_int * | map | ||
| ) |
writes out a portion of the entity numbering map to the database; this allows the entity numbers to be non-contiguous. This map is used for mapping between local and global entity ids.
| exoid | exodus file id |
| map_type | |
| start_entity_num | |
| num_entities | |
| map | element numbering map array |
| int ex_put_partial_num_map | ( | int | exoid, |
| ex_entity_type | map_type, | ||
| ex_entity_id | map_id, | ||
| int64_t | ent_start, | ||
| int64_t | ent_count, | ||
| const void_int * | map | ||
| ) |
writes a map; this is a vector of integers of length number of mesh objects of that type (element, node, face, edge)
| int ex_put_partial_one_attr | ( | int | exoid, |
| ex_entity_type | obj_type, | ||
| ex_entity_id | obj_id, | ||
| int64_t | start_num, | ||
| int64_t | num_ent, | ||
| int | attrib_index, | ||
| const void * | attrib | ||
| ) |
writes the specified attribute for a block
| exoid | exodus file id |
| obj_type | object type (edge, face, elem block) |
| obj_id | object id (edge, face, elem block ID) |
| start_num | the starting index of the attributes to be written |
| num_ent | the number of entities to write attributes for. |
| attrib_index | index of attribute to write |
| attrib | array of attributes |
| int ex_put_partial_set | ( | int | exoid, |
| ex_entity_type | set_type, | ||
| ex_entity_id | set_id, | ||
| int64_t | offset, | ||
| int64_t | num_to_put, | ||
| const void_int * | set_entry_list, | ||
| const void_int * | set_extra_list | ||
| ) |
writes the set entry list and set extra list for a single set
| exoid | exodus file id |
| set_type | set type |
| set_id | set id |
| offset | The initial entity (1-based) to be output |
| num_to_put | The number of entities to output |
| *set_entry_list | array of entries in set. Set to NULL to not write. |
| *set_extra_list | array of extras in set. Set to NULL to not write. |
| int ex_put_partial_set_dist_fact | ( | int | exoid, |
| ex_entity_type | set_type, | ||
| ex_entity_id | set_id, | ||
| int64_t | offset, | ||
| int64_t | num_to_put, | ||
| const void * | set_dist_fact | ||
| ) |
writes the partial distribution factors for a single set
| exoid | exodus file id |
| set_type | set type |
| set_id | set id |
| offset | index (1-based) of first dist factor to write |
| num_to_put | number of dist factors to write. |
| *set_dist_fact | array of dist factors for set |
| int ex_put_processor_elem_maps | ( | int | exoid, |
| void_int * | elem_mapi, | ||
| void_int * | elem_mapb, | ||
| int | processor | ||
| ) |
| exoid | NetCDF/Exodus file ID |
| elem_mapi | Internal FEM element IDs |
| elem_mapb | Border FEM element IDs |
| processor | This processor ID |
| int ex_put_processor_node_maps | ( | int | exoid, |
| void_int * | node_mapi, | ||
| void_int * | node_mapb, | ||
| void_int * | node_mape, | ||
| int | proc_id | ||
| ) |
| exoid | NetCDF/Exodus file ID |
| node_mapi | Internal FEM node IDs |
| node_mapb | Border FEM node IDs |
| node_mape | External FEM node IDs |
| proc_id | This processor ID |
| int ex_put_prop | ( | int | exoid, |
| ex_entity_type | obj_type, | ||
| ex_entity_id | obj_id, | ||
| const char * | prop_name, | ||
| ex_entity_id | value | ||
| ) |
The function ex_put_prop() stores an integer object property value to a single element block, node set, or side set. Although it is not necessary to invoke ex_put_prop_names(), since ex_put_prop() will allocate space within the data file if it hasn't been previously allocated, it is more efficient to use ex_put_prop_names() if there is more than one property to store.
It should be noted that the interpretation of the values of the integers stored as properties is left to the application code. In general, a zero (0) means the object does not have the specified property (or is not in the specified group); a nonzero value means the object does have the specified property. When space is allocated for the properties using ex_put_prop_names() or ex_put_prop(), the properties are initialized to zero (0).
Because the ID of an element block, node set, or side set is just another property (named ID), this routine can be used to change the value of an ID. This feature must be used with caution, though, because changing the ID of an object to the ID of another object of the same type (element block, node set, or side set) would cause two objects to have the same ID, and thus only the first would be accessible. Therefore, ex_put_prop() issues a warning if a user attempts to give two objects the same ID.
| [in] | exoid | exodus file ID returned from a previous call to ex_create() or ex_open(). |
| [in] | obj_type | Type of object; use one of the options in the table below. |
| [in] | obj_id | The element block, node set, or side set ID. |
| [in] | prop_name | The name of the property for which the value will be stored. Maximum length of this string is MAX_STR_LENGTH . |
| [in] | value | The value of the property. |
| ex_entity_type | description |
|---|---|
| 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 |
| EX_ELEM_MAP | Element Map entity type |
| EX_NODE_MAP | Node Map entity type |
| EX_EDGE_MAP | Edge Map entity type |
| EX_FACE_MAP | Face Map entity type |
For an example of code to write out an object property, refer to the description for ex_put_prop_names().
| int ex_put_prop_array | ( | int | exoid, |
| ex_entity_type | obj_type, | ||
| const char * | prop_name, | ||
| const void_int * | values | ||
| ) |
The function ex_put_prop_array() stores an array of ({num_elem_blk}, num_node_sets, or num_side_sets) integer property values for all element blocks, node sets, or side sets. The order of the values in the array must correspond to the order in which the element blocks, node sets, or side sets were introduced into the file. For instance, if the parameters for element block with ID 20 were written to a file (via ex_put_elem_block()), and then parameters for element block with ID 10, followed by the parameters for element block with ID 30, the first, second, and third elements in the property array would correspond to element block 20, element block 10, and element block 30, respectively.
One should note that this same functionality (writing properties to multiple objects) can be accomplished with multiple calls to ex_put_prop().
Although it is not necessary to invoke ex_put_prop_names(), since ex_put_prop_array() will allocate space within the data file if it hasn't been previously allocated, it is more efficient to use ex_put_prop_names() if there is more than one property to store.
| [in] | exoid | exodus file ID returned from a previous call to ex_create() or ex_open(). |
| [in] | obj_type | Type of object; use one of the options in the table below. |
| [in] | prop_name | The name of the property for which the values will be stored. Maximum length of this string is MAX_STR_LENGTH . |
| [in] | values | An array of property values. |
| ex_entity_type | description |
|---|---|
| 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 |
| EX_ELEM_MAP | Element Map entity type |
| EX_NODE_MAP | Node Map entity type |
| EX_EDGE_MAP | Edge Map entity type |
| EX_FACE_MAP | Face Map entity type |
For an example of code to write an array of object properties, refer to the description for ex_put_prop_names().
| int ex_put_prop_names | ( | int | exoid, |
| ex_entity_type | obj_type, | ||
| int | num_props, | ||
| char ** | prop_names | ||
| ) |
The function ex_put_prop_names() writes object property names and allocates space for object property arrays used to assign integer properties to element blocks, node sets, or side sets. The property arrays are initialized to zero (0). Although this function is optional, since ex_put_prop() will allocate space within the data file if it hasn't been previously allocated, it is more efficient to use ex_put_prop_names() if there is more than one property to store.
| [in] | exoid | exodus file ID returned from a previous call to ex_create() or ex_open(). |
| [in] | obj_type | Type of object; use one of the options in the table below. |
| [in] | num_props | The number of integer properties to be assigned to all of the objects of the type specified (element blocks, node sets, or side sets). |
| [in] | prop_names | Array containing num_props names (of maximum length of MAX_STR_LENGTH ) of properties to be stored. |
| ex_entity_type | description |
|---|---|
| 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 |
| EX_ELEM_MAP | Element Map entity type |
| EX_NODE_MAP | Node Map entity type |
| EX_EDGE_MAP | Edge Map entity type |
| EX_FACE_MAP | Face Map entity type |
For instance, suppose a user wanted to assign the 1st, 3rd, and 5th element blocks (those element blocks stored 1st, 3rd, and 5th, regardless of their ID) to a group (property) called TOP, and the 2nd, 3rd, and 4th element blocks to a group called LSIDE. This could be accomplished with the following code:
| int ex_put_set | ( | int | exoid, |
| ex_entity_type | set_type, | ||
| ex_entity_id | set_id, | ||
| const void_int * | set_entry_list, | ||
| const void_int * | set_extra_list | ||
| ) |
writes the set entry list and set extra list for a single set
| exoid | exodus file id |
| set_type | set type |
| set_id | set id |
| *set_entry_list | array of entries in set. Set to NULL to not write. |
| *set_extra_list | array of extras in set. Set to NULL to not write. |
| int ex_put_set_dist_fact | ( | int | exoid, |
| ex_entity_type | set_type, | ||
| ex_entity_id | set_id, | ||
| const void * | set_dist_fact | ||
| ) |
writes the distribution factors for a single set
| exoid | exodus file id |
| set_type | set type |
| set_id | set id |
| *set_dist_fact | array of dist factors for set |
| int ex_put_set_param | ( | int | exoid, |
| ex_entity_type | set_type, | ||
| ex_entity_id | set_id, | ||
| int64_t | num_entries_in_set, | ||
| int64_t | num_dist_fact_in_set | ||
| ) |
writes the set id and the number of entries which describe a single set
| exoid | exodus file id |
| set_type | the type of set |
| set_id | set id |
| num_entries_in_set | number of entries in the set |
| num_dist_fact_in_set | number of distribution factors in the set |
| int ex_put_sets | ( | int | exoid, |
| size_t | set_count, | ||
| const struct ex_set * | sets | ||
| ) |
writes the set parameters and optionally set data for 1 or more sets
| exoid | exodus file id |
| set_count | number of sets to write |
| *sets | array of ex_set structures |
| int ex_put_ss_param_global | ( | int | exoid, |
| void_int * | global_ids, | ||
| void_int * | side_cnts, | ||
| void_int * | df_cnts | ||
| ) |
| exoid | NemesisI file ID |
| global_ids | Vector of global side-set IDs |
| side_cnts | Vector of element/side counts in each side set |
| df_cnts | Vector of dist. factor counts in each side set |