The function ex_get_coord_names() reads the names (MAX_STR_LENGTH
-characters in length) of the coordinate arrays from the database. Memory must be allocated for the character strings before this function is invoked.
- Returns:
- In case of an error, ex_get_coord_names() 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()
- a warning value is returned if coordinate names were not stored.
- Parameters:
-
[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 error, exoid;
char *coord_names[3];
for (i=0; i < num_dim; i++) {
coord_names[i] = (char *)calloc((MAX_STR_LENGTH+1), sizeof(char));
}
error = ex_get_coord_names (exoid, coord_names);