Exodus  7.10
ex_put_init.c File Reference
#include "exodusII.h"
#include <stdint.h>
#include <string.h>

Functions

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)
 

Function Documentation

◆ ex_put_init()

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.

Returns
In case of an error, ex_put_init() returns a negative number; a warning will return a positive number. Possible causes of errors include:
  • data file not properly opened with call to ex_create() or ex_open()
  • data file opened for read only.
  • this routine has been called previously.
Parameters
exoidexodus file ID returned from a previous call to ex_create() or ex_open().
titleDatabase title. Maximum length is MAX_LINE_LENGTH.
num_dimThe dimensionality of the database. This is the number of coordinates per node.
num_nodesThe number of nodal points.
num_elemThe number of elements.
num_elem_blkThe number of element blocks.
num_node_setsThe number of node sets.
num_side_setsThe number of side sets.

The following code segment will initialize an open exodus file with the specified parameters:

int num_dim, num_nods, num_el, num_el_blk, num_ns, num_ss, error, exoid;
/* initialize file with parameters */
num_dim = 3; num_nods = 46; num_el = 5; num_el_blk = 5;
num_ns = 2; num_ss = 5;
error = ex_put_init (exoid, "This is the title", num_dim,
num_nods, num_el,num_el_blk, num_ns, num_ss);