Functions | Modes |
---|---|
ier = cg_array_write(char *ArrayName, DataType_t DataType, int DataDimension, cgsize_t *DimensionVector, void *Data); | - w m |
ier = cg_narrays(int *narrays); | r - m |
ier = cg_array_info(int A, char *ArrayName, DataType_t *DataType, int *DataDimension, cgsize_t *DimensionVector); | r - m |
ier = cg_array_read(int A, void *Data); | r - m |
ier = cg_array_read_as(int A, DataType_t DataType, void *Data); | r - m |
call cg_array_write_f(ArrayName, DataType, DataDimension, DimensionVector, Data, ier) | - w m |
call cg_narrays_f(narrays, ier) | r - m |
call cg_array_info_f(A, ArrayName, DataType, DataDimension, DimensionVector, ier) | r - m |
call cg_array_read_f(A, Data, ier) | r - m |
call cg_array_read_as_f(A, DataType, Data, ier) | r - m |
narrays | Number of DataArray_t nodes under the current node. | ||
A | Data array index, where 1 ≤ A ≤ narrays. | ||
ArrayName | Name of the DataArray_t node. | ||
DataType | Type of data held in the DataArray_t node. The admissible types are Integer, RealSingle, RealDouble, and Character. | ||
DataDimension | Number of dimensions. | ||
DimensionVector | Number of data elements in each dimension. | ||
Data | The data array. | ||
ier | Error status. |
Functions | Modes |
---|---|
ier = cg_dataclass_write(DataClass_t dataclass); | - w m |
ier = cg_dataclass_read(DataClass_t *dataclass); | r - m |
call cg_dataclass_write_f(dataclass, ier) | - w m |
call cg_dataclass_read_f(dataclass, ier) | r - m |
dataclass | Data class for the nodes at this level. See below for the data classes currently supported in CGNS. | ||
ier | Error status. |
The data classes currently supported in CGNS are:
Dimensional | Regular dimensional data. | ||
NormalizedByDimensional | Nondimensional data that is normalized by dimensional reference quantities. | ||
NormalizedByUnknownDimensional | All fields and reference data are nondimensional. | ||
NondimensionalParameter | Nondimensional parameters such as Mach number and lift coefficient. | ||
DimensionlessConstant | Constant such as π. |
Functions | Modes |
---|---|
ier = cg_conversion_write(DataType_t DataType, void *ConversionFactors); | - w m |
ier = cg_conversion_info(DataType_t *DataType); | r - m |
ier = cg_conversion_read(void *ConversionFactors); | r - m |
call cg_conversion_write_f(DataType, ConversionFactors, ier) | - w m |
call cg_conversion_info_f(DataType, ier) | r - m |
call cg_conversion_read_f(ConversionFactors, ier) | r - m |
DataType | Data type in which the conversion factors are recorded. Admissible data types for conversion factors are RealSingle and RealDouble. | ||
ConversionFactors | Two-element array containing the scaling and offset factors. | ||
ier | Error status. |
The DataConversion_t data structure contains factors to convert the nondimensional data to "raw" dimensional data. The scaling and offset factors are contained in the two-element array ConversionFactors. In pseudo-Fortran, the conversion process is as follows:
ConversionScale = ConversionFactors(1) ConversionOffset = ConversionFactors(2) Data(raw) = Data(nondimensional)*ConversionScale + ConversionOffset
Functions | Modes |
---|---|
ier = cg_units_write(MassUnits_t mass, LengthUnits_t length, TimeUnits_t time, TemperatureUnits_t temperature, AngleUnits_t angle); | - w m |
ier = cg_unitsfull_write(MassUnits_t mass, LengthUnits_t length, TimeUnits_t time, TemperatureUnits_t temperature, AngleUnits_t angle, ElectricCurrentUnits_t current, SubstanceAmountUnits_t amount, LuminousIntensityUnits_t intensity); | - w m |
ier = cg_nunits(int *nunits); | r - m |
ier = cg_units_read(MassUnits_t *mass, LengthUnits_t *length, TimeUnits_t *time, TemperatureUnits_t *temperature, AngleUnits_t *angle); | r - m |
ier = cg_unitsfull_read(MassUnits_t *mass, LengthUnits_t *length, TimeUnits_t *time, TemperatureUnits_t *temperature, AngleUnits_t *angle, ElectricCurrentUnits_t *current, SubstanceAmountUnits_t *amount, LuminousIntensityUnits_t *intensity); | r - m |
call cg_units_write_f(mass, length, time, temperature, angle, ier) | - w m |
call cg_unitsfull_write_f(mass, length, time, temperature, angle, current, amount, intensity, ier) | - w m |
call cg_nunits_f(nunits, ier) | r - m |
call cg_units_read_f(mass, length, time, temperature, angle, ier) | r - m |
call cg_unitsfull_read_f(mass, length, time, temperature, angle, current, amount, intensity, ier) | r - m |
mass | Mass units. Admissible values are CG_Null, CG_UserDefined, Kilogram, Gram, Slug, and PoundMass. | ||
length | Length units. Admissible values are CG_Null, CG_UserDefined, Meter, Centimeter, Millimeter, Foot, and Inch. | ||
time | Time units. Admissible values are CG_Null, CG_UserDefined, and Second. | ||
temperature | Temperature units. Admissible values are CG_Null, CG_UserDefined, Kelvin, Celsius, Rankine, and Fahrenheit. | ||
angle | Angle units. Admissible values are CG_Null, CG_UserDefined, Degree, and Radian. | ||
current | Electric current units. Admissible values are CG_Null, CG_UserDefined, Ampere, Abampere, Statampere, Edison, and auCurrent. | ||
amount | Substance amount units. Admissible values are CG_Null, CG_UserDefined, Mole, Entities, StandardCubicFoot, and StandardCubicMeter. | ||
intensity | Luminous intensity units. Admissible values are CG_Null, CG_UserDefined, Candela, Candle, Carcel, Hefner, and Violle. | ||
nunits | Number of units used in the file (i.e., either 5 or 8). | ||
ier | Error status. |
The supported units are declared within typedefs in cgnslib.h and as parameters in cgnslib_f.h.
When reading units data, either cg_units_read or cg_unitsfull_read may be used, regardless of the number of units used in the file. If cg_unitsfull_read is used, but only five units are used in the file, the returned values of current, amount, and intensity will be CG_Null.
Functions | Modes |
---|---|
ier = cg_exponents_write(DataType_t DataType, void *exponents); | - w m |
ier = cg_expfull_write(DataType_t DataType, void *exponents); | - w m |
ier = cg_nexponents(int *nexponents); | r - m |
ier = cg_exponents_info(DataType_t *DataType); | r - m |
ier = cg_exponents_read(void *exponents); | r - m |
ier = cg_expfull_read(void *exponents); | r - m |
call cg_exponents_write_f(DataType, exponents, ier) | - w m |
call cg_expfull_write_f(DataType, exponents, ier) | - w m |
call cg_nexponents_f(nexponents, ier) | r - m |
call cg_exponents_info_f(DataType, ier) | r - m |
call cg_exponents_read_f(exponents, ier) | r - m |
call cg_expfull_read_f(exponents, ier) | r - m |
DataType | Data type in which the exponents are recorded. Admissible data types for the exponents are RealSingle and RealDouble. | ||
exponents | Exponents for the dimensional units for mass, length, time, temperature, angle, electric current, substance amount, and luminous intensity, in that order. | ||
nexponents | Number of exponents used in the file (i.e., either 5 or 8). | ||
ier | Error status. |
When reading exponent data, either cg_exponents_read or cg_expfull_read may be used, regardless of the number of exponents used in the file. If cg_exponents_read is used, but all eight exponents are used in the file, only the first five exponents are returned. If cg_expfull_read is used, but only five exponents are used in the file, the returned values of the exponents for electric current, substance amount, and luminous intensity will be zero.