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

Defines

#define EX_PUT_NAMES(TNAME, DNUMVAR, VNAMES)

Functions

int ex_put_variable_names (int exoid, ex_entity_type obj_type, int num_vars, char *var_names[])

Define Documentation

#define EX_PUT_NAMES (   TNAME,
  DNUMVAR,
  VNAMES 
)

Function Documentation

int ex_put_variable_names ( int  exoid,
ex_entity_type  obj_type,
int  num_vars,
char *  var_names[] 
)

The function ex_put_variable_names() writes the names of the results variables to the database. The names are MAX_STR_LENGTH -characters in length. The function ex_put_variable_param() must be called before this function is invoked.

Returns:
In case of an error, ex_put_variable_names() returns a negative number; a warning will return a positive number. Possible causes of errors include:
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 options in the table below.
[in]num_varsThe number of var_type variables that will be written to the database.
[in]var_namesArray of pointers to num_vars variable names.
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:

int num_nod_vars, error, exoid;
char *var_names[2];

\comment{write results variables parameters and names}
num_nod_vars = 2;

var_names[0] = "disx";
var_names[1] = "disy";

error = ex_put_variable_param (exoid, EX_NODAL, num_nod_vars);
error = ex_put_variable_names (exoid, EX_NODAL, num_nod_vars, var_names);
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Defines