Functions | Modes |
---|---|
ier = cg_sol_write(int fn, int B, int Z, char *solname, GridLocation_t location, int *S); | - w m |
ier = cg_nsols(int fn, int B, int Z, int *nsols); | r - m |
ier = cg_sol_info(int fn, int B, int Z, int S, char *solname, GridLocation_t *location); | r - m |
call cg_sol_write_f(fn, B, Z, solname, location, S, ier) | - w m |
call cg_nsols_f(fn, B, Z, nsols, ier) | r - m |
call cg_sol_info_f(fn, B, Z, S, solname, location, ier) | r - m |
fn | CGNS file index number. | ||
B | Base index number, where 1 ≤ B ≤ nbases. | ||
Z | Zone index number, where 1 ≤ Z ≤ nzones. | ||
S | Flow solution index number, where 1 ≤ S ≤ nsols. | ||
nsols | Number of flow solutions for zone Z. | ||
solname | Name of the flow solution. | ||
location | Grid location where the solution is recorded. The current admissible locations are Vertex, CellCenter, IFaceCenter, JFaceCenter, and KFaceCenter. | ||
ier | Error status. |
The above functions are used to create, and get information about,
FlowSolution_t nodes.
Functions | Modes |
---|---|
ier = cg_field_write(int fn, int B, int Z, int S, DataType_t datatype, char *fieldname, void *solution_array, int *F); | - w m |
ier = cg_field_partial_write(int fn, int B, int Z, int S, DataType_t datatype, char *fieldname, cgsize_t *range_min, cgsize_t *range_max, void *solution_array, int *F); | - w m |
ier = cg_nfields(int fn, int B, int Z, int S, int *nfields); | r - m |
ier = cg_field_info(int fn, int B, int Z, int S, int F, DataType_t *datatype, char *fieldname); | r - m |
ier = cg_field_read(int fn, int B, int Z, int S, char *fieldname, DataType_t datatype, cgsize_t *range_min, cgsize_t *range_max, void *solution_array); | r - m |
call cg_field_write_f(fn, B, Z, S, datatype, fieldname, solution_array, F, ier) | - w m |
call cg_field_partial_write_f(fn, B, Z, S, datatype, fieldname, range_min, range_max, solution_array, F, ier) | - w m |
call cg_nfields_f(fn, B, Z, S, nfields, ier) | r - m |
call cg_field_info_f(fn, B, Z, S, F, datatype, fieldname, ier) | r - m |
call cg_field_read_f(fn, B, Z, S, fieldname, datatype, range_min, range_max, solution_array, ier) | r - m |
fn | CGNS file index number. | ||
B | Base index number, where 1 ≤ B ≤ nbases. | ||
Z | Zone index number, where 1 ≤ Z ≤ nzones. | ||
S | Flow solution index number, where 1 ≤ S ≤ nsols. | ||
F | Solution array index number, where 1 ≤ F ≤ nfields. | ||
nfields | Number of data arrays in flow solution S. | ||
datatype | Data type in which the solution array is written. Admissible data types for a solution array are Integer, RealSingle, and RealDouble. | ||
fieldname | Name of the solution array. It is strongly advised to use the SIDS nomenclature conventions when naming the solution arrays to insure file compatibility. | ||
range_min | Lower range index (eg., imin, jmin, kmin). | ||
range_max | Upper range index (eg., imax, jmax, kmax). | ||
solution_array | Array of solution values for the range prescribed. | ||
ier | Error status. |
The above functions are used to read and write solution arrays stored below a FlowSolution_t node.
When writing, the function cg_field_write will automatically write the full range of the solution (i.e., the entire solution_array). The function cg_field_partial_write may be used to write only a subset of solution_array. When using the partial write, any existing data from range_min to range_max will be overwritten by the new values. All other values will not be affected.
The function cg_field_read returns the solution array fieldname, for the range prescribed by range_min and range_max. The array is returned to the application in the data type requested in datatype. This data type does not need to be the same as the one in which the data is stored in the file. A solution array stored as double precision in the CGNS file can be returned to the application as single precision, or vice versa.
In Fortran, when using cg_field_read_f to read a 2D or 3D solution, the extent of each dimension of solution_array must be consistent with the requested range. When reading a 1D solution, the declared size can be larger than the requested range. For example, for a 2D zone with 100 × 50 vertices, if range_min and range_max are set to (11,11) and (20,20) to read a subset of the solution, then solution_array must be dimensioned (10,10). If solution_array is declared larger (e.g., (100,50)) the indices for the returned array values will be wrong.
Functions | Modes |
---|---|
ier = cg_discrete_write(int fn, int B, int Z, char *DiscreteName, int *D); | - w m |
ier = cg_ndiscrete(int fn, int B, int Z, int *ndiscrete); | r - m |
ier = cg_discrete_read(int fn, int B, int Z, int D, char *DiscreteName); | r - m |
call cg_discrete_write_f(fn, B, Z, DiscreteName, D, ier) | - w m |
call cg_ndiscrete_f(fn, B, Z, ndiscrete, ier) | r - m |
call cg_discrete_read_f(fn, B, Z, D, DiscreteName, ier) | r - m |
fn | CGNS file index number. | ||
B | Base index number, where 1 ≤ B ≤ nbases. | ||
Z | Zone index number, where 1 ≤ Z ≤ nzones. | ||
D | Discrete data index number, where 1 ≤ D ≤ ndiscrete. | ||
ndiscrete | Number of DiscreteData_t data structures under zone Z. | ||
DiscreteName | Name of DiscreteData_t data structure. | ||
ier | Error status. |
DiscreteData_t nodes are intended for the storage of fields of data not usually identified as part of the flow solution, such as fluxes or equation residuals.