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)

(General Remarks) (File Operations) (Navigating a CGNS File) (Error Handling) (Structural Nodes) (Descriptors) (Physical Data) (Location and Position) (Auxiliary Data) (Grid Specification) (Solution Data) (Grid Connectivity) (Boundary Conditions) (Equation Specification) (Families) (Time-Dependent Data) (Links)

Grid Connectivity

1-to-1 Connectivity

Node: GridConnectivity1to1_t (SIDS, File Mapping)

Functions Modes
ier = cg_n1to1_global(int fn, int B, int *n1to1_global); r - m
ier = cg_1to1_read_global(int fn, int B, char **connectname,
      char **zonename, char **donorname, cgsize_t **range,
      cgsize_t **donor_range, int **transform);
r - m
call cg_n1to1_global_f(fn, B, n1to1_global, ier) r - m
call cg_1to1_read_global_f(fn, B, connectname, zonename,
     donorname, range, donor_range, transform, ier)
r - m

Input/Output

    fn   CGNS file index number.
B Base index number, where 1 ≤ Bnbases.
n1to1_global Total number of one-to-one interfaces in base B, stored under GridConnectivity1to1_t nodes. (I.e., this does not include one-to-one interfaces that may be stored under GridConnectivity_t nodes, used for generalized zone interfaces.) Note that the function cg_n1to1 (described below) may be used to get the number of one-to-one interfaces in a specific zone.
connectname Name of the interface.
zonename Name of the first zone, for all one-to-one interfaces in base B.
donorname Name of the second zone, for all one-to-one interfaces in base B.
range Range of points for the first zone, for all one-to-one interfaces in base B.
donor_range Range of points for the current zone, for all one-to-one interfaces in base B.
transform Short hand notation for the transformation matrix defining the relative orientation of the two zones. This transformation is given for all one-to-one interfaces in base B.
ier Error status.

The above functions may be used to get information about all the one-to-one zone interfaces in a CGNS database.

Functions Modes
ier = cg_1to1_write(int fn, int B, int Z, char *connectname,
      char *donorname, cgsize_t *range, cgsize_t *donor_range,
      int *transform, int *I);
- w m
ier = cg_n1to1(int fn, int B, int Z, int *n1to1); r - m
ier = cg_1to1_read(int fn, int B, int Z, int I, char *connectname,
      char *donorname, cgsize_t *range, cgsize_t *donor_range,
      int *transform);
r - m
call cg_1to1_write_f(fn, B, Z, connectname, donorname, range,
     donor_range, transform, I, ier)
- w m
call cg_n1to1_f(fn, B, Z, n1to1, ier) r - m
call cg_1to1_read_f(fn, B, Z, I, connectname, donorname, range,
     donor_range, transform, ier)
r - m

Input/Output

    fn   CGNS file index number.
B Base index number, where 1 ≤ Bnbases.
Z Zone index number, where 1 ≤ Znzones.
I Interface index number, where 1 ≤ In1to1.
n1to1 Number of one-to-one interfaces in zone Z, stored under GridConnectivity1to1_t nodes. (I.e., this does not include one-to-one interfaces that may be stored under GridConnectivity_t nodes, used for generalized zone interfaces.)
connectname Name of the interface.
donorname Name of the zone interfacing with the current zone.
range Range of points for the current zone.
donor_range Range of points for the donor zone.
transform Short hand notation for the transformation matrix defining the relative orientation of the two zones.
ier Error status.

The above functions are used to read and write one-to-one connectivity data for a specific zone.

Generalized Connectivity

Node: GridConnectivity_t (SIDS, File Mapping)

Functions Modes
ier = cg_conn_write(int fn, int B, int Z, char *connectname,
      GridLocation_t location, GridConnectivityType_t connect_type,
      PointSetType_t ptset_type, cgsize_t npnts, cgsize_t *pnts,
      char *donorname, ZoneType_t donor_zonetype,
      PointSetType_t donor_ptset_type, DataType_t donor_datatype,
      cgsize_t ndata_donor, cgsize_t *donor_data, int *I);
- w m
ier = cg_conn_write_short(int fn, int B, int Z, char *connectname,
      GridLocation_t location, GridConnectivityType_t connect_type,
      PointSetType_t ptset_type, cgsize_t npnts, cgsize_t *pnts, char *donorname,
      int *I);
- w m
ier = cg_nconns(int fn, int B, int Z, int *nconns); r - m
ier = cg_conn_info(int fn, int B, int Z, int I, char *connectname,
      GridLocation_t *location, GridConnectivityType_t *connect_type,
      PointSetType_t *ptset_type, cgsize_t *npnts, char *donorname,
      ZoneType_t *donor_zonetype, PointSetType_t *donor_ptset_type,
      DataType_t *donor_datatype, cgsize_t *ndata_donor);
r - m
ier = cg_conn_read(int fn, int B, int Z, int I, cgsize_t *pnts,
      DataType_t donor_datatype, cgsize_t *donor_data);
r - m
ier = cg_conn_read_short(int fn, int B, int Z, int I, cgsize_t *pnts); r - m
call cg_conn_write_f(fn, B, Z, connectname, location, connect_type,
     ptset_type, npnts, pnts, donorname, donor_zonetype,
     donor_ptset_type, donor_datatype, ndata_donor, donor_data,
     I, ier)
- w m
call cg_conn_write_short_f(fn, B, Z, connectname, location, connect_type,
     ptset_type, npnts, pnts, donorname, I, ier)
- w m
call cg_nconns_f(fn, B, Z, nconns, ier) r - m
call cg_conn_info_f(fn, B, Z, I, connectname, location,
     connect_type, ptset_type, npnts, donorname, donor_zonetype,
     donor_ptset_type, donor_datatype, ndata_donor, ier)
r - m
call cg_conn_read_f(fn, B, Z, I, pnts, donor_datatype, donor_data, ier) r - m
call cg_conn_read_short_f(fn, B, Z, I, pnts, ier) r - m

Input/Output

    fn   CGNS file index number.
B Base index number, where 1 ≤ Bnbases.
Z Zone index number, where 1 ≤ Znzones.
I Interface index number, where 1 ≤ Inconns.
nconns Number of interfaces for zone Z.
connectname Name of the interface.
location Grid location used in the definition of the point set. The currently admissible locations are Vertex and CellCenter.
connect_type Type of interface being defined. The admissible types are Overset, Abutting, and Abutting1to1.
ptset_type Type of point set defining the interface in the current zone; either PointRange or PointList.
donor_ptset_type Type of point set defining the interface in the donor zone; either PointListDonor or CellListDonor.
npnts Number of points defining the interface in the current zone. For a ptset_type of PointRange, npnts is always two. For a ptset_type of PointList, npnts is the number of points in the PointList.
ndata_donor Number of points or cells in the current zone. These are paired with points, cells, or fractions thereof in the donor zone.
donorname Name of the zone interfacing with the current zone.
donor_datatype Data type in which the donor points are stored in the file. As of Version 3.0, this value is ignored when writing, and on reading it will return either Integer or LongInteger depending on whether the file was written using 32 or 64-bit. The donor_datatype argument was left in these functions only for backward compatibility. The donor data is always read as cgsize_t.
pnts Array of points defining the interface in the current zone.
donor_data Array of donor points or cells corresponding to ndata_donor. Note that it is possible that the same donor point or cell may be used multiple times.
donor_zonetype Type of the donor zone. The admissible types are Structured and Unstructured.
ier Error status.

Note that the interpolation factors stored in the InterpolantsDonor data array are accessed using the cg_goto and cg_array_xxx functions.

Special Grid Connectivity Properties

Node: GridConnectivityProperty_t (SIDS, File Mapping)

Functions Modes
ier = cg_conn_periodic_write(int fn, int B, int Z, int I,
      float *RotationCenter, float *RotationAngle, float *Translation);
- w m
ier = cg_conn_average_write(int fn, int B, int Z, int I,
      AverageInterfaceType_t AverageInterfaceType);
- w m
ier = cg_1to1_periodic_write(int fn, int B, int Z, int I,
      float *RotationCenter, float *RotationAngle, float *Translation);
- w m
ier = cg_1to1_average_write(int fn, int B, int Z, int I,
      AverageInterfaceType_t AverageInterfaceType);
- w m
ier = cg_conn_periodic_read(int fn, int B, int Z, int I,
      float *RotationCenter, float *RotationAngle, float *Translation);
r - m
ier = cg_conn_average_read(int fn, int B, int Z, int I,
      AverageInterfaceType_t *AverageInterfaceType);
r - m
ier = cg_1to1_periodic_read(int fn, int B, int Z, int I,
      float *RotationCenter, float *RotationAngle, float *Translation);
r - m
ier = cg_1to1_average_read(int fn, int B, int Z, int I,
      AverageInterfaceType_t *AverageInterfaceType);
r - m
call cg_conn_periodic_write_f(fn, B, Z, I, RotationCenter,
     RotationAngle, Translation, ier)
- w m
call cg_conn_average_write_f(fn, B, Z, I, AverageInterfaceType, ier) - w m
call cg_1to1_periodic_write_f(fn, B, Z, I, RotationCenter,
     RotationAngle, Translation, ier)
- w m
call cg_1to1_average_write_f(fn, B, Z, I, AverageInterfaceType, ier) - w m
call cg_conn_periodic_read_f(fn, B, Z, I, RotationCenter,
     RotationAngle, Translation, ier)
r - m
call cg_conn_average_read_f(fn, B, Z, I, AverageInterfaceType, ier) r - m
call cg_1to1_periodic_read_f(fn, B, Z, I, RotationCenter,
     RotationAngle, Translation, ier)
r - m
call cg_1to1_average_read_f(fn, B, Z, I, AverageInterfaceType, ier) r - m

Input/Output

    fn   CGNS file index number.
B Base index number, where 1 ≤ Bnbases.
Z Zone index number, where 1 ≤ Znzones.
I Grid connectivity index number, where 1 ≤ Inconns for the "cg_conn" functions, and 1 ≤ In1to1 for the "cg_1to1" functions.
RotationCenter An array of size phys_dim defining the coordinates of the origin for defining the rotation angle between the periodic interfaces. (phys_dim is the number of coordinates required to define a vector in the field.) (In Fortran, this is an array of Real*4 values.)
RotationAngle An array of size phys_dim defining the rotation angle from the current interface to the connecting interface. If rotating about more than one axis, the rotation is performed first about the x-axis, then the y-axis, then the z-axis. (In Fortran, this is an array of Real*4 values.)
Translation An array of size phys_dim defining the translation from the current interface to the connecting interface. (In Fortran, this is an array of Real*4 values.)
AverageInterfaceType The type of averaging to be done. Valid types are CG_Null, CG_UserDefined, AverageAll, AverageCircumferential, AverageRadial, AverageI, AverageJ, and AverageK.
ier Error status.

These functions may be used to store special grid connectivity properties. The "cg_conn" functions apply to generalized grid connectivity nodes (i.e., GridConnectivity_t), and the "cg_1to1" functions apply to 1-to-1 grid connectivity nodes (i.e., GridConnectivity1to1_t).

The "write" functions will create the GridConnectivityProperty_t node if it doesn't already exist, then add the appropriate connectivity property. Multiple grid connectivity properties may be recorded under the same GridConnectivityProperty_t node.

The "read" functions will return with ier = 2 = CG_NODE_NOT_FOUND if the requested connectivity property, or the GridConnectivityProperty_t node itself, doesn't exist.

Overset Holes

Node: OversetHoles_t (SIDS, File Mapping)

Functions Modes
ier = cg_hole_write(int fn, int B, int Z, char *holename,
      GridLocation_t location, PointSetType_t ptset_type, int nptsets,
      cgsize_t npnts, cgsize_t *pnts, int *I);
- w m
ier = cg_nholes(int fn, int B, int Z, int *nholes); r - m
ier = cg_hole_info(int fn, int B, int Z, int I, char *holename,
      GridLocation_t *location, PointSetType_t *ptset_type, int *nptsets,
      cgsize_t *npnts);
r - m
ier = cg_hole_read(int fn, int B, int Z, int I, cgsize_t *pnts); r - m
call cg_hole_write_f(fn, B, Z, holename, location, ptset_type,
     nptsets, npnts, pnts, I, ier)
- w m
call cg_nholes_f(fn, B, Z, nholes, ier) r - m
call cg_hole_info_f(fn, B, Z, I, holename, location, ptset_type,
     nptsets, npnts, ier)
r - m
call cg_hole_read_f(fn, B, Z, I, pnts, ier) r - m

Input/Output

    fn   CGNS file index number.
B Base index number, where 1 ≤ Bnbases.
Z Zone index number, where 1 ≤ Znzones.
I Overset hole index number, where 1 ≤ Inholes.
nholes Number of overset holes in zone Z.
holename Name of the overset hole.
location Grid location used in the definition of the point set. The currently admissible locations are Vertex and CellCenter.
ptset_type The extent of the overset hole may be defined using a range of points or cells, or using a discrete list of all points or cells in the overset hole. If a range of points or cells is used, ptset_type is set to PointRange. When a discrete list of points or cells is used, ptset_type equals PointList.
nptsets Number of point sets used to define the hole. If ptset_type is PointRange, several point sets may be used. If ptset_type is PointList, only one point set is allowed.
npnts Number of points (or cells) in the point set. For a ptset_type of PointRange, npnts is always two. For a ptset_type of PointList, npnts is the number of points or cells in the PointList.
pnts Array of points or cells in the point set.
ier Error status.