Skip to main content
Ctrl+K
CGNS Documentation - Home CGNS Documentation - Home
  • GitHub
  • Introduction to CGNS
    • What is CGNS?
    • Quick Start Guide
    • Overview
    • Status and History
    • Glossary
    • FAQ
    • Implementations
  • Standard Specification
    • Standardization bodies
    • CGNS/SIDS - Standard Interface Data Structures
      • 1. Introduction
      • 2. Design Philosophy of Standard Interface Data Structures
      • 3. Conventions
      • 4. Building Block Structure Definition
      • 5. Data-Array Structure Definitions
      • 6. Hierarchical Structures
      • 7. Grid Coordinates, Elements, and Flow Solution
      • 8. Multizone Interface Connectivity
      • 9. Boundary Conditions
      • 10. Governing Flow Equations
      • 11. Time-Dependent Flow
      • 12. Miscellaneous Data Structures
      • 13. Particle Data
      • Appendix A: Conventions for Data-Name Identifiers
      • Appendix B: Structured Two-Zone Flat Plate Example
    • CGNS/FMM - Data model mapping to implementation
      • Detailed CGNS Node Descriptions
      • CGNS File Mapping Figures
        • ArbitraryGridMotion Figure
        • Area Figure
        • AverageInterface Figure
        • Axisymmetry Figure
        • BaseIterativeData Figure
        • BC Figure
        • BCData Figure
        • BCDataSet Figure
        • BCProperty Figure
        • CGNSBase Figure
        • ChemicalKineticsModel Figure
        • ConvergenceHistory Figure
        • DataArray Figure
        • DimensionalExponents Figure
        • DimensionalUnits Figure
        • Elements Figure
        • EMConductivityModel Figure
        • EMElectricFieldModel Figure
        • EMMagneticFieldModel Figure
        • Family Figure
        • FamilyBC Figure
        • FamilyBCDataSet Figure
        • FlowEquationSet Figure
        • FlowSolution/DiscreteData Figure
        • GasModel Figure
        • GeometryReference Figure
        • GoverningEquations Figure
        • Gravity Figure
        • GridConnectivity Figure
        • GridConnectivity1to1 Figure
        • GridConnectivityProperty Figure
        • GridCoordinates Figure
        • IntegralData Figure
        • OversetHoles Figure
        • ParticleBreakupModel Figure
        • ParticleCollisionModel Figure
        • ParticleCoordinates Figure
        • ParticleEquationSet Figure
        • ParticleForceModel Figure
        • ParticleGoverningEquations Figure
        • ParticlePhaseChangeModel Figure
        • ParticleSolution Figure
        • ParticleWallInteractionModel Figure
        • ParticleZone Figure
        • Periodic Figure
        • ReferenceState Figure
        • RigidGridMotion Figure
        • RotatingCoordinates Figure
        • ThermalConductivityModel Figure
        • ThermalRelaxationModel Figure
        • TurbulenceClosure Figure
        • TurbulenceModel Figure
        • UserDefinedData Figure
        • ViscosityModel Figure
        • WallFunction Figure
        • Zone Figure
        • ZoneBC Figure
        • ZoneGridConnectivity Figure
        • ZoneIterativeData/ParticleIterativeData Figure
        • ZoneSubRegion Figure
    • CGNS/MLL - C and Fortran APIs for Applications
      • General Remarks
        • List of enumerated values (key words) for each of these variable types (typedefs)
      • CGNS/MLL API Overview for C and Fortran applications
      • CGNS Parallel API Overview
    • CGNS/CGIO - Basic node implementation
      • Database-Level Routines
      • Data Structure Management Routines
      • Link Management Routines
      • Node Management Routines
      • Data I/O Routines
      • Error Handling Routines
      • Miscellaneous Routines
      • Code Examples
    • CGNS/HDF5 - An HPC implementation
    • CGNS/Python - A Python implementation
  • Resources
    • News
    • CPEX
    • Download
    • Build CGNS code
    • Examples
    • More CGNS Software
    • More documentation
      • Papers
      • User’s Guide to CGNS
  • CGNS Governance
    • Steering Committee
    • Meetings
    • Support
  • Repository
  • Open issue

Link Management Routines

Contents

  • cgio_is_link
    • cgio_is_link()
  • cgio_link_size
    • cgio_link_size()
  • cgio_create_link
    • cgio_create_link()
  • cgio_get_link
    • cgio_get_link()

Link Management Routines#

cgio_is_link#

C Signature:
int cgio_is_link(int cgio_num, double id, int *link_len)#
Fortran Signature:
subroutine  cgio_is_link_f(cgio_num, id, link_len, ier)#
Parameters:

cgio_num

IN: Identifier for the open database file.

id

IN: Node identifier.

link_len

OUT: Total length of the link information (file_len + name_len).

Returns:

ier - Error status

Modes:

r w m

Description:

Determines if the node identified by id in the database given by cgio_num is a link or not. The function returns 0 if successful, else an error code. If this node is a link, then the total length of the linked-to file and node information is returned in link_len. If the node is not a link, link_len will be 0.

cgio_link_size#

C Signature:
int cgio_link_size(int cgio_num, double id, int *file_len, int *name_len)#
Fortran Signature:
subroutine  cgio_link_size_f(cgio_num, id, file_len, name_len, ier)#
Parameters:

cgio_num

IN: Identifier for the open database file.

id

IN: Node identifier.

file_len

OUT: Length of the name of the linked-to file. This will be 0 if this is an internal link.

name_len

OUT: Length of the pathname of the linked-to node.

Returns:

ier - Error status

Modes:

r w m

Description:

Gets the size of the linked-to file name in file_len and the node pathname length in name_len for the node identified by id in the database given by cgio_num. The function returns 0 for success, else an error code. If this is an internal link (link to a node in the same database), then file_len will be returned as 0.

cgio_create_link#

C Signature:
int cgio_create_link(int cgio_num, double pid, const char *name, const char *filename, const char *name_in_file, double *id)#
Fortran Signature:
subroutine  cgio_create_link_f(cgio_num, pid, name, filename, name_in_file, id, ier)#
Parameters:

cgio_num

IN: Identifier for the open database file.

pid

IN: Parent node identifier.

name

IN: Name of the link node.

filename

IN: Name of the linked-to file. If creating an internal link, then this should be NULL or an empty string. When reading an internal link, this will be returned as an empty string.

name_in_file

IN: Pathname of the linked-to node.

id

OUT: Node identifier.

Returns:

ier - Error status

Modes:

- w m

Description:

Creates a link node as a child of the parent node identified by pid in the database given by cgio_num. The name of the node is given by name, the name of the linked-to file by filename, and the pathname to the linked-to node by name_in_file. If this is an internal link (link to a node in the same database), then filename should be defined as NULL or an empty string. The function returns 0 and the identifier of the new node in id on success, otherwise an error code is returned.

cgio_get_link#

C Signature:
int cgio_get_link(int cgio_num, double id, char *filename, char *name_in_file)#
Fortran Signature:
subroutine  cgio_get_link_f(cgio_num, id, filename, name_in_file, ier)#
Parameters:

cgio_num

IN: Identifier for the open database file.

id

IN: Node identifier.

filename

OUT: Name of the linked-to file. If creating an internal link, then this should be NULL or an empty string. When reading an internal link, this will be returned as an empty string.

name_in_file

OUT: Pathname of the linked-to node.

Returns:

ier - Error status

Modes:

r w m

Description:

Gets the link information for the node identified by id in the database given by cgio_num. If successful, the function returns 0 and the linked-to file name in filename and the node pathname in name_in_file. These strings are ‘0’-terminated, and thus should be dimensioned at least (file_len + 1) and (name_len + 1), respectively If this is an internal link (link to a node in the same database), then filename will be an empty string. The maximum length for a file name is given by CGIO_MAX_FILE_LENGTH (1024) and for a link pathname by CGIO_MAX_LINK_LENGTH (4096).

previous

Data Structure Management Routines

next

Node Management Routines

Contents
  • cgio_is_link
    • cgio_is_link()
  • cgio_link_size
    • cgio_link_size()
  • cgio_create_link
    • cgio_create_link()
  • cgio_get_link
    • cgio_get_link()
Dedicated to the public domain with CC0 1.0.