ExodusII  6.05
ex_put_variable_param.c File Reference
#include <stdio.h>
#include "exodusII.h"
#include "exodusII_int.h"
#include "netcdf.h"

Functions

int ex_put_variable_param (int exoid, ex_entity_type obj_type, int num_vars)

Function Documentation

int ex_put_variable_param ( int  exoid,
ex_entity_type  obj_type,
int  num_vars 
)

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.

Returns:
In case of an error, ex_put_variable_param() 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.
  • invalid variable type specified.
  • data file not initialized properly with call to ex_put_init().
  • this routine has already been called with the same variable type; redefining the number of variables is not allowed.
  • a warning value is returned if the number of variables is specified as zero.
Parameters:
[in]exoidexodus file ID returned from a previous call to ex_create() or ex_open().
[in]obj_typeVariable indicating the type of variable which is described. Use one of the ex_entity_type types specified in the table below.
[in]num_varsThe number of var_type variables that will be written to the database.
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 num_glo_vars, error, exoid;

\comment{write results variables parameters}
num_glo_vars = 3;

error = ex_put_variable_param (exoid, EX_GLOBAL, num_glo_vars);
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Defines