Exodus 7.10

Functions
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

  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 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);