Skip navigation links
(CGNS Documentation Home Page) (Steering Committee Charter) (Overview and Entry-Level Document) (A User's Guide to CGNS) (Mid-Level Library) (Standard Interface Data Structures) (SIDS File Mapping Manual) (CGIO User's Guide) (Parallel CGNS User's Guide) (ADF Implementation) (HDF5 Implementation) (Python Implementation) (CGNS Tools and Utilities)

(The CGIO Software Library) (Database-Level Routines) (Data Structure Management Routines) (Link Management Routines) (Node Management Routines) (Data I/O Routines) (Error Messages and Routines) (Miscellaneous Routines) (Example Programs)

Node Management Routines

Functions Modes
ier = cgio_get_node_id(int cgio_num, double pid, const char *pathname, double *id); r w m
ier = cgio_get_name(int cgio_num, double id, char *name); r w m
ier = cgio_set_name(int cgio_num, double pid, double id, const char *name); - w m
ier = cgio_get_label(int cgio_num, double id, char *label); r w m
ier = cgio_set_label(int cgio_num, double id, const char *label); - w m
ier = cgio_get_data_type(int cgio_num, double id, char *data_type); r w m
ier = cgio_get_dimensions(int cgio_num, double id, int *ndims, cgsize_t *dims); r w m
ier = cgio_set_dimensions(int cgio_num, double id, const char *data_type,
      int ndims, const cgsize_t *dims);
- w m
call cgio_get_node_id_f(cgio_num, pid, name, id, ier) r w m
call cgio_get_name_f(cgio_num, id, name, ier) r w m
call cgio_set_name_f(cgio_num, pid, id, name, ier) - w m
call cgio_get_label_f(cgio_num, id, label, ier) r w m
call cgio_set_label_f(cgio_num, id, label, ier) - w m
call cgio_get_data_type_f(cgio_num, id, data_type, ier) r w m
call cgio_get_dimensions_f(cgio_num, id, ndims, dims, ier) r w m
call cgio_set_dimensions_f(cgio_num, id, data_type, ndims, dims, ier) - w m

Input/Output

    cgio_num   Database identifier.
pid Parent node identifier.
id Node identifier.
pathname Absolute or relative path name for a node.
name Node name (max length 32).
label Node label (max length 32).
data_type Type of data contained in the node. One of "MT", "I4", "I8", "U4", "U8", "R4", "C1", or "B1".
ndims Number of dimensions for the data (max 12).
dims Data dimension values (ndims values).
ier Error status.

Function Descriptions

cgio_get_node_id
Gets the node identifier for the node specified by pathname in the database given by cgio_num. if pathname starts with '/', then it is taken as an absolute path and is located based on the root id of the database, otherwise it is taken to be a relative path from the parent node identifed by pid. The function returns 0 and the node identifier in id on success, else an error code.
 
cgio_get_name
Gets the name of the node identified by id in the database given by cgio_num. The name is returned in name, and has a maximum length of CGIO_MAX_NAME_LENGTH (32). In C, name should be dimensioned at least 33 to allow for the terminating '0'. The function returns 0 for success, else an error code.
 
cgio_set_name
Sets (renames) the node identied by id in the database given by cgio_num to name. The parent node identifier is given by pid. There must not already exist a child node of pid with that name. The function return 0 on success, else an error code.
 
cgio_get_label
Gets the label of the node identified by id in the database given by cgio_num. The label is returned in label, and has a maximum length of CGIO_MAX_LABEL_LENGTH (32). In C, label should be dimensioned at least 33 to allow for the terminating '0'. The function returns 0 for success, else an error code.
 
cgio_set_label
Sets the label of the node identied by id in the database given by cgio_num to label. The function return 0 on success, else an error code.
 
cgio_get_data_type
Gets the data type of the data associated with the node identified by id in the database given by cgio_num. The data type is returned in data_type, and has a maximum length of CGIO_MAX_DATATYPE_LENGTH (2). In C, data_type should be dimensioned at least 3 to allow for the terminating '0'. The function returns 0 for success, else an error code.
 
cgio_get_dimensions
Gets the dimensions of the data associated with the node identified by id in the database given by cgio_num. The number of dimensions is returned in ndims and the dimension values in dims. Since the maximum number of dimensions is CGIO_MAX_DIMENSIONS (12), dims should be dimensioned 12, unless the actual number of dimensions is already known. The function returns 0 for success, else an error code.
 
cgio_set_dimensions
Sets the data type and dimensions for data associated with the node identified by id in the database given by cgio_num. The data type (data_type) as one of:
    "MT"  An empty node containing no data
    "I4"  32-bit integer (int or integer*4)
    "I8"  64-bit integer (cglong_t or integer*8)
    "U4"  32-bit unsigned integer (unsigned int or integer*4)
    "U8"  64-bit unsigned integer (cgulong_t or integer*8)
    "R4"  32-bit real (float or real*4)
    "R8"  64-bit real (double or real*8)
    "C1"  character (char or character)
    "B1"  unsigned bytes (unsigned char or character*1)
    
The number of dimensions is given by ndims (maximum is 12), and the dimension values by dims. Note that any existing data for the node will be destroyed. To add the data to the node, use one of the data writing routines. The function returns 0 for success, else an error code.