1 /* ------------------------------------------------------------------------- *
2  * CGNS - CFD General Notation System (http://www.cgns.org)                  *
3  * CGNS/MLL - Mid-Level Library header file                                  *
4  * Please see cgnsconfig.h file for this local installation configuration    *
5  * ------------------------------------------------------------------------- */
6 
7 /* ------------------------------------------------------------------------- *
8 
9   This software is provided 'as-is', without any express or implied warranty.
10   In no event will the authors be held liable for any damages arising from
11   the use of this software.
12 
13   Permission is granted to anyone to use this software for any purpose,
14   including commercial applications, and to alter it and redistribute it
15   freely, subject to the following restrictions:
16 
17   1. The origin of this software must not be misrepresented; you must not
18      claim that you wrote the original software. If you use this software
19      in a product, an acknowledgment in the product documentation would be
20      appreciated but is not required.
21 
22   2. Altered source versions must be plainly marked as such, and must not
23      be misrepresented as being the original software.
24 
25   3. This notice may not be removed or altered from any source distribution.
26 
27  * -------------------------------------------------------------------------
28  *
29  *  DEVELOPER'S NOTE:
30  *    When adding a defined constant to this file, also add the same defined
31  *    constant to cgns_f.F90
32  *
33  * ------------------------------------------------------------------------- */
34 
35 #ifndef CGNSLIB_H
36 #define CGNSLIB_H
37 
38 #define CGNS_VERSION 4100
39 #define CGNS_DOTVERS 4.10
40 
41 #define CGNS_COMPATVERSION 2540
42 #define CGNS_COMPATDOTVERS 2.54
43 
44 #include "cgnstypes.h"
45 
46 #if CG_BUILD_SCOPE
47 # ifndef CGNS_SCOPE_ENUMS
48 #  define CGNS_SCOPE_ENUMS
49 # endif
50 #else
51 # ifdef CGNS_SCOPE_ENUMS
52 #  undef CGNS_SCOPE_ENUMS
53 # endif
54 #endif
55 
56 #ifndef CGNSDLL
57 # ifdef _WIN32
58 #  if defined(BUILD_DLL)
59 #    define CGNSDLL __declspec(dllexport)
60 #  elif defined(USE_DLL)
61 #    define CGNSDLL __declspec(dllimport)
62 #  else
63 #    define CGNSDLL
64 #  endif
65 # else
66 #  define CGNSDLL
67 # endif
68 #endif
69 
70 #ifdef CGNS_SCOPE_ENUMS
71 /* set scope prefix for values only */
72 #define CGNS_ENUMV( e ) CG_ ## e
73 /* set scope prefix for types */
74 #define CGNS_ENUMT( e ) CG_ ## e
75 /* set scope prefix for defines */
76 #define CGNS_ENUMD( e ) CG_ ## e
77 /* set scope prefix for variables (lowercase same as functions) */
78 #define CGNS_ENUMF( e ) cg_ ## e
79 #else
80 #define CGNS_ENUMV( e ) e
81 #define CGNS_ENUMT( e ) e
82 #define CGNS_ENUMD( e ) e
83 #define CGNS_ENUMF( e ) e
84 #endif
85 
86 /* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - *\
87  *      modes for cgns file                                              *
88 \* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
89 
90 #define CG_MODE_READ	0
91 #define CG_MODE_WRITE	1
92 #define CG_MODE_MODIFY  2
93 #define CG_MODE_CLOSED  3
94 
95 /* file types */
96 
97 #define CG_FILE_NONE  0
98 #define CG_FILE_ADF   1
99 #define CG_FILE_HDF5  2
100 #define CG_FILE_ADF2  3
101 
102 /* function return codes */
103 
104 #define CG_OK		  0
105 #define CG_ERROR	  1
106 #define CG_NODE_NOT_FOUND 2
107 #define CG_INCORRECT_PATH 3
108 #define CG_NO_INDEX_DIM   4
109 
110 /* Null and UserDefined enums */
111 
112 #define CG_Null        0
113 #define CG_UserDefined 1
114 
115 /* max goto depth */
116 
117 #define CG_MAX_GOTO_DEPTH 20
118 
119 /* configuration options */
120 
121 #define CG_CONFIG_ERROR      1
122 #define CG_CONFIG_COMPRESS   2
123 #define CG_CONFIG_SET_PATH   3
124 #define CG_CONFIG_ADD_PATH   4
125 #define CG_CONFIG_FILE_TYPE  5
126 #define CG_CONFIG_RIND_INDEX 6
127 
128 #define CG_CONFIG_HDF5_COMPRESS   201
129 #define CG_CONFIG_HDF5_MPI_COMM   202
130 
131 /* HDF5 dataset storage layout */
132 
133 #define CG_CONTIGUOUS 0
134 #define CG_COMPACT    1
135 #define CG_CHUNKED    2
136 
137 /* note: CG_CONFIG_RIND_ZERO is obsolete and considered a bug.  Users are given
138  *       the option only for backwards compatibility */
139 #define CG_CONFIG_RIND_ZERO (void*)0
140 #define CG_CONFIG_RIND_CORE (void*)1
141 
142 #ifdef __cplusplus
143 extern "C" {
144 #endif
145 
146 /* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - *\
147  *  Enumerations:  if any of this enumerations need to be modified,      *
148  *	           the corresponding namelist must also be updated.      *
149  *                                                                       *
150  *  Any addition to an enum should be done as an addition at end of list *
151  *  with an explicit declaration of the corresponding integer.           *
152  *  This is required for enums stored as integers in the CGNS file or    *
153  *  used in applications.                                                *
154  *                                                                       *
155 \* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
156 
157 /* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - *\
158  *      Dimensional Units                                                *
159 \* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
160 
161 typedef enum {
162   CGNS_ENUMV( MassUnitsNull )       =CG_Null,
163   CGNS_ENUMV( MassUnitsUserDefined )=CG_UserDefined,
164   CGNS_ENUMV( Kilogram )            =2,
165   CGNS_ENUMV( Gram )                =3,
166   CGNS_ENUMV( Slug )                =4,
167   CGNS_ENUMV( PoundMass )           =5
168 } CGNS_ENUMT( MassUnits_t );
169 
170 typedef enum {
171   CGNS_ENUMV( LengthUnitsNull )       =CG_Null,
172   CGNS_ENUMV( LengthUnitsUserDefined )=CG_UserDefined,
173   CGNS_ENUMV( Meter )                 =2,
174   CGNS_ENUMV( Centimeter )            =3,
175   CGNS_ENUMV( Millimeter )            =4,
176   CGNS_ENUMV( Foot )                  =5,
177   CGNS_ENUMV( Inch )                  =6
178 } CGNS_ENUMT( LengthUnits_t );
179 
180 typedef enum {
181   CGNS_ENUMV( TimeUnitsNull )       =CG_Null,
182   CGNS_ENUMV( TimeUnitsUserDefined )=CG_UserDefined,
183   CGNS_ENUMV( Second )              =2
184 } CGNS_ENUMT( TimeUnits_t );
185 
186 typedef enum {
187   CGNS_ENUMV( TemperatureUnitsNull )       =CG_Null,
188   CGNS_ENUMV( TemperatureUnitsUserDefined )=CG_UserDefined,
189   CGNS_ENUMV( Kelvin )                     =2,
190   CGNS_ENUMV( Celsius )                    =3,
191   CGNS_ENUMV( Rankine )                    =4,
192   CGNS_ENUMV( Fahrenheit )                 =5
193 } CGNS_ENUMT( TemperatureUnits_t );
194 
195 typedef enum {
196   CGNS_ENUMV( AngleUnitsNull )       =CG_Null,
197   CGNS_ENUMV( AngleUnitsUserDefined )=CG_UserDefined,
198   CGNS_ENUMV( Degree )               =2,
199   CGNS_ENUMV( Radian )               =3
200 } CGNS_ENUMT( AngleUnits_t );
201 
202 typedef enum {
203   CGNS_ENUMV( ElectricCurrentUnitsNull )       =CG_Null,
204   CGNS_ENUMV( ElectricCurrentUnitsUserDefined )=CG_UserDefined,
205   CGNS_ENUMV( Ampere )                         =2,
206   CGNS_ENUMV( Abampere )                       =3,
207   CGNS_ENUMV( Statampere )                     =4,
208   CGNS_ENUMV( Edison )                         =5,
209   CGNS_ENUMV( auCurrent )                      =6
210 } CGNS_ENUMT( ElectricCurrentUnits_t );
211 
212 typedef enum {
213   CGNS_ENUMV( SubstanceAmountUnitsNull )       =CG_Null,
214   CGNS_ENUMV( SubstanceAmountUnitsUserDefined )=CG_UserDefined,
215   CGNS_ENUMV( Mole )                           =2,
216   CGNS_ENUMV( Entities )                       =3,
217   CGNS_ENUMV( StandardCubicFoot )              =4,
218   CGNS_ENUMV( StandardCubicMeter )             =5
219 } CGNS_ENUMT( SubstanceAmountUnits_t );
220 
221 typedef enum {
222   CGNS_ENUMV( LuminousIntensityUnitsNull )       =CG_Null,
223   CGNS_ENUMV( LuminousIntensityUnitsUserDefined )=CG_UserDefined,
224   CGNS_ENUMV( Candela )                          =2,
225   CGNS_ENUMV( Candle )				 =3,
226   CGNS_ENUMV( Carcel )				 =4,
227   CGNS_ENUMV( Hefner )				 =5,
228   CGNS_ENUMV( Violle )				 =6
229 } CGNS_ENUMT( LuminousIntensityUnits_t );
230 
231 #define NofValidMassUnits              6
232 #define NofValidLengthUnits            7
233 #define NofValidTimeUnits              3
234 #define NofValidTemperatureUnits       6
235 #define NofValidAngleUnits             4
236 #define NofValidElectricCurrentUnits   7
237 #define NofValidSubstanceAmountUnits   6
238 #define NofValidLuminousIntensityUnits 7
239 
240 extern CGNSDLL const char * MassUnitsName[NofValidMassUnits];
241 extern CGNSDLL const char * LengthUnitsName[NofValidLengthUnits];
242 extern CGNSDLL const char * TimeUnitsName[NofValidTimeUnits];
243 extern CGNSDLL const char * TemperatureUnitsName[NofValidTemperatureUnits];
244 extern CGNSDLL const char * AngleUnitsName[NofValidAngleUnits];
245 extern CGNSDLL const char * ElectricCurrentUnitsName[NofValidElectricCurrentUnits];
246 extern CGNSDLL const char * SubstanceAmountUnitsName[NofValidSubstanceAmountUnits];
247 extern CGNSDLL const char * LuminousIntensityUnitsName[NofValidLuminousIntensityUnits];
248 
249 /* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - *\
250  *      Data Class                                                       *
251 \* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
252 
253 typedef enum {
254   CGNS_ENUMV( DataClassNull ) =CG_Null,
255   CGNS_ENUMV( DataClassUserDefined ) =CG_UserDefined,
256   CGNS_ENUMV( Dimensional ) =2,
257   CGNS_ENUMV( NormalizedByDimensional ) =3,
258   CGNS_ENUMV( NormalizedByUnknownDimensional ) =4,
259   CGNS_ENUMV( NondimensionalParameter ) =5,
260   CGNS_ENUMV( DimensionlessConstant ) =6
261 } CGNS_ENUMT( DataClass_t );
262 
263 #define NofValidDataClass 7
264 
265 extern CGNSDLL const char * DataClassName[NofValidDataClass];
266 
267 /* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - *\
268  *	Grid Location
269 \* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
270 
271 typedef enum {
272   CGNS_ENUMV( GridLocationNull ) =CG_Null,
273   CGNS_ENUMV( GridLocationUserDefined ) =CG_UserDefined,
274   CGNS_ENUMV( Vertex ) =2,
275   CGNS_ENUMV( CellCenter ) =3,
276   CGNS_ENUMV( FaceCenter ) =4,
277   CGNS_ENUMV( IFaceCenter ) =5,
278   CGNS_ENUMV( JFaceCenter ) =6,
279   CGNS_ENUMV( KFaceCenter ) =7,
280   CGNS_ENUMV( EdgeCenter ) =8
281 } CGNS_ENUMT( GridLocation_t );
282 
283 #define NofValidGridLocation 9
284 
285 extern CGNSDLL const char * GridLocationName[NofValidGridLocation];
286 
287 /* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - *\
288  *      BCData Types: Can not add types and stay forward compatible      *
289 \* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
290 
291 typedef enum {
292   CGNS_ENUMV( BCDataTypeNull ) =CG_Null,
293   CGNS_ENUMV( BCDataTypeUserDefined ) =CG_UserDefined,
294   CGNS_ENUMV( Dirichlet ) =2,
295   CGNS_ENUMV( Neumann ) =3
296 } CGNS_ENUMT( BCDataType_t );
297 
298 #define NofValidBCDataTypes 4
299 
300 extern CGNSDLL const char * BCDataTypeName[NofValidBCDataTypes];
301 
302 /* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - *\
303  *	Grid Connectivity Types 					 *
304 \* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
305 
306 typedef enum {
307   CGNS_ENUMV( GridConnectivityTypeNull ) =CG_Null,
308   CGNS_ENUMV( GridConnectivityTypeUserDefined ) =CG_UserDefined,
309   CGNS_ENUMV( Overset ) =2,
310   CGNS_ENUMV( Abutting ) =3,
311   CGNS_ENUMV( Abutting1to1 ) =4
312 } CGNS_ENUMT( GridConnectivityType_t );
313 
314 #define NofValidGridConnectivityTypes 5
315 
316 extern CGNSDLL const char * GridConnectivityTypeName[NofValidGridConnectivityTypes];
317 
318 /* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - *\
319  *	Point Set Types: Can't add types and stay forward compatible
320 \* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
321 
322 typedef enum {
323   CGNS_ENUMV( PointSetTypeNull ) =CG_Null,
324   CGNS_ENUMV( PointSetTypeUserDefined ) =CG_UserDefined,
325   CGNS_ENUMV( PointList ) =2,
326   CGNS_ENUMV( PointListDonor ) =3,
327   CGNS_ENUMV( PointRange ) =4,
328   CGNS_ENUMV( PointRangeDonor ) =5,
329   CGNS_ENUMV( ElementRange ) =6,
330   CGNS_ENUMV( ElementList ) =7,
331   CGNS_ENUMV( CellListDonor ) =8
332 } CGNS_ENUMT( PointSetType_t );
333 
334 #define NofValidPointSetTypes 9
335 
336 extern CGNSDLL const char * PointSetTypeName[NofValidPointSetTypes];
337 
338 /* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - *\
339  *      Governing Equations and Physical Models Types                    *
340 \* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
341 
342 typedef enum {
343   CGNS_ENUMV( GoverningEquationsNull ) =CG_Null,
344   CGNS_ENUMV( GoverningEquationsUserDefined ) =CG_UserDefined,
345   CGNS_ENUMV( FullPotential ) =2,
346   CGNS_ENUMV( Euler ) =3,
347   CGNS_ENUMV( NSLaminar ) =4,
348   CGNS_ENUMV( NSTurbulent ) =5,
349   CGNS_ENUMV( NSLaminarIncompressible ) =6,
350   CGNS_ENUMV( NSTurbulentIncompressible ) =7
351 } CGNS_ENUMT( GoverningEquationsType_t );
352 
353 /* Any model type will accept both ModelTypeNull and ModelTypeUserDefined.
354 ** The following models will accept these values as valid...
355 **
356 ** GasModel_t: Ideal, VanderWaals, CaloricallyPerfect, ThermallyPerfect,
357 **    ConstantDensity, RedlichKwong
358 **
359 ** ViscosityModel_t: Constant, PowerLaw, SutherlandLaw
360 **
361 ** ThermalConductivityModel_t: PowerLaw, SutherlandLaw, ConstantPrandtl
362 **
363 ** TurbulenceModel_t: Algebraic_BaldwinLomax, Algebraic_CebeciSmith,
364 **    HalfEquation_JohnsonKing, OneEquation_BaldwinBarth,
365 **    OneEquation_SpalartAllmaras, TwoEquation_JonesLaunder,
366 **    TwoEquation_MenterSST,TwoEquation_Wilcox
367 **
368 ** TurbulenceClosure_t: EddyViscosity, ReynoldsStress, ReynoldsStressAlgebraic
369 **
370 ** ThermalRelaxationModel_t: Frozen, ThermalEquilib, ThermalNonequilib
371 **
372 ** ChemicalKineticsModel_t: Frozen, ChemicalEquilibCurveFit,
373 **    ChemicalEquilibMinimization, ChemicalNonequilib
374 **
375 ** EMElectricFieldModel_t: Voltage, Interpolated, Constant, Frozen
376 **
377 ** EMMagneticFieldModel_t: Interpolated, Constant, Frozen
378 **
379 ** EMConductivityModel_t: Constant, Frozen, Equilibrium_LinRessler,
380 **				Chemistry_LinRessler
381 */
382 
383 typedef enum {
384   CGNS_ENUMV( ModelTypeNull ) =CG_Null,
385   CGNS_ENUMV( ModelTypeUserDefined ) =CG_UserDefined,
386   CGNS_ENUMV( Ideal ) =2,
387   CGNS_ENUMV( VanderWaals ) =3,
388   CGNS_ENUMV( Constant ) =4,
389   CGNS_ENUMV( PowerLaw ) =5,
390   CGNS_ENUMV( SutherlandLaw ) =6,
391   CGNS_ENUMV( ConstantPrandtl ) =7,
392   CGNS_ENUMV( EddyViscosity ) =8,
393   CGNS_ENUMV( ReynoldsStress ) =9,
394   CGNS_ENUMV( ReynoldsStressAlgebraic ) =10,
395   CGNS_ENUMV( Algebraic_BaldwinLomax ) =11,
396   CGNS_ENUMV( Algebraic_CebeciSmith ) =12,
397   CGNS_ENUMV( HalfEquation_JohnsonKing ) =13,
398   CGNS_ENUMV( OneEquation_BaldwinBarth ) =14,
399   CGNS_ENUMV( OneEquation_SpalartAllmaras ) =15,
400   CGNS_ENUMV( TwoEquation_JonesLaunder ) =16,
401   CGNS_ENUMV( TwoEquation_MenterSST ) =17,
402   CGNS_ENUMV( TwoEquation_Wilcox ) =18,
403   CGNS_ENUMV( CaloricallyPerfect ) =19,
404   CGNS_ENUMV( ThermallyPerfect ) =20,
405   CGNS_ENUMV( ConstantDensity ) =21,
406   CGNS_ENUMV( RedlichKwong ) =22,
407   CGNS_ENUMV( Frozen ) =23,
408   CGNS_ENUMV( ThermalEquilib ) =24,
409   CGNS_ENUMV( ThermalNonequilib ) =25,
410   CGNS_ENUMV( ChemicalEquilibCurveFit ) =26,
411   CGNS_ENUMV( ChemicalEquilibMinimization ) =27,
412   CGNS_ENUMV( ChemicalNonequilib ) =28,
413   CGNS_ENUMV( EMElectricField ) =29,
414   CGNS_ENUMV( EMMagneticField ) =30,
415   CGNS_ENUMV( EMConductivity ) =31,
416   CGNS_ENUMV( Voltage ) =32,
417   CGNS_ENUMV( Interpolated ) =33,
418   CGNS_ENUMV( Equilibrium_LinRessler ) =34,
419   CGNS_ENUMV( Chemistry_LinRessler ) =35
420 } CGNS_ENUMT( ModelType_t );
421 
422 #define NofValidGoverningEquationsTypes 8
423 #define NofValidModelTypes 36
424 
425 extern CGNSDLL const char * GoverningEquationsTypeName[NofValidGoverningEquationsTypes];
426 extern CGNSDLL const char * ModelTypeName[NofValidModelTypes];
427 
428 /* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - *\
429  * 	Boundary Condition Types					 *
430 \* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
431 
432 typedef enum {
433   CGNS_ENUMV( BCTypeNull ) =CG_Null,
434   CGNS_ENUMV( BCTypeUserDefined ) =CG_UserDefined,
435   CGNS_ENUMV( BCAxisymmetricWedge ) =2,
436   CGNS_ENUMV( BCDegenerateLine ) =3,
437   CGNS_ENUMV( BCDegeneratePoint ) =4,
438   CGNS_ENUMV( BCDirichlet ) =5,
439   CGNS_ENUMV( BCExtrapolate ) =6,
440   CGNS_ENUMV( BCFarfield ) =7,
441   CGNS_ENUMV( BCGeneral ) =8,
442   CGNS_ENUMV( BCInflow ) =9,
443   CGNS_ENUMV( BCInflowSubsonic ) =10,
444   CGNS_ENUMV( BCInflowSupersonic ) =11,
445   CGNS_ENUMV( BCNeumann ) =12,
446   CGNS_ENUMV( BCOutflow ) =13,
447   CGNS_ENUMV( BCOutflowSubsonic ) =14,
448   CGNS_ENUMV( BCOutflowSupersonic ) =15,
449   CGNS_ENUMV( BCSymmetryPlane ) =16,
450   CGNS_ENUMV( BCSymmetryPolar ) =17,
451   CGNS_ENUMV( BCTunnelInflow ) =18,
452   CGNS_ENUMV( BCTunnelOutflow ) =19,
453   CGNS_ENUMV( BCWall ) =20,
454   CGNS_ENUMV( BCWallInviscid ) =21,
455   CGNS_ENUMV( BCWallViscous ) =22,
456   CGNS_ENUMV( BCWallViscousHeatFlux ) =23,
457   CGNS_ENUMV( BCWallViscousIsothermal ) =24,
458   CGNS_ENUMV( FamilySpecified ) =25
459 } CGNS_ENUMT( BCType_t );
460 
461 #define NofValidBCTypes 26
462 
463 extern CGNSDLL const char * BCTypeName[NofValidBCTypes];
464 
465 /* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - *\
466  *      Data types:  Can not add data types and stay forward compatible  *
467 \* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
468 
469 typedef enum {
470   CGNS_ENUMV( DataTypeNull ) =CG_Null,
471   CGNS_ENUMV( DataTypeUserDefined ) =CG_UserDefined,
472   CGNS_ENUMV( Integer ) =2,
473   CGNS_ENUMV( RealSingle ) =3,
474   CGNS_ENUMV( RealDouble ) =4,
475   CGNS_ENUMV( Character ) =5,
476   CGNS_ENUMV( LongInteger ) =6
477 } CGNS_ENUMT( DataType_t );
478 
479 #define NofValidDataTypes 7
480 
481 extern CGNSDLL const char * DataTypeName[NofValidDataTypes];
482 
483 /* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - *\
484  *      Element types                                                    *
485 \* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
486 
487 /* PLEASE ALSO UPDATE the cgnslib.h/el_size static table */
488 
489 typedef enum {
490   CGNS_ENUMV( ElementTypeNull  ) =CG_Null,
491   CGNS_ENUMV( ElementTypeUserDefined ) =CG_UserDefined,
492   CGNS_ENUMV( NODE ) =2,
493   CGNS_ENUMV( BAR_2 ) =3,
494   CGNS_ENUMV( BAR_3 ) =4,
495   CGNS_ENUMV( TRI_3 ) =5,
496   CGNS_ENUMV( TRI_6 ) =6,
497   CGNS_ENUMV( QUAD_4 ) =7,
498   CGNS_ENUMV( QUAD_8 ) =8,
499   CGNS_ENUMV( QUAD_9 ) =9,
500   CGNS_ENUMV( TETRA_4 ) =10,
501   CGNS_ENUMV( TETRA_10 ) =11,
502   CGNS_ENUMV( PYRA_5 ) =12,
503   CGNS_ENUMV( PYRA_14 ) =13,
504   CGNS_ENUMV( PENTA_6 ) =14,
505   CGNS_ENUMV( PENTA_15 ) =15,
506   CGNS_ENUMV( PENTA_18 ) =16,
507   CGNS_ENUMV( HEXA_8 ) =17,
508   CGNS_ENUMV( HEXA_20 ) =18,
509   CGNS_ENUMV( HEXA_27 ) =19,
510   CGNS_ENUMV( MIXED ) =20,
511   CGNS_ENUMV( PYRA_13 ) =21,
512   CGNS_ENUMV( NGON_n ) =22,
513   CGNS_ENUMV( NFACE_n ) =23,
514   CGNS_ENUMV( BAR_4 ) =24,
515   CGNS_ENUMV( TRI_9 ) =25,
516   CGNS_ENUMV( TRI_10 ) =26,
517   CGNS_ENUMV( QUAD_12 ) =27,
518   CGNS_ENUMV( QUAD_16 ) =28,
519   CGNS_ENUMV( TETRA_16 ) =29,
520   CGNS_ENUMV( TETRA_20 ) =30,
521   CGNS_ENUMV( PYRA_21 ) =31,
522   CGNS_ENUMV( PYRA_29 ) =32,
523   CGNS_ENUMV( PYRA_30 ) =33,
524   CGNS_ENUMV( PENTA_24 ) =34,
525   CGNS_ENUMV( PENTA_38 ) =35,
526   CGNS_ENUMV( PENTA_40 ) =36,
527   CGNS_ENUMV( HEXA_32 ) =37,
528   CGNS_ENUMV( HEXA_56 ) =38,
529   CGNS_ENUMV( HEXA_64 ) =39,
530   CGNS_ENUMV( BAR_5 )=40,
531   CGNS_ENUMV( TRI_12 )=41,
532   CGNS_ENUMV( TRI_15 )=42,
533   CGNS_ENUMV( QUAD_P4_16 )=43,
534   CGNS_ENUMV( QUAD_25 )=44,
535   CGNS_ENUMV( TETRA_22 )=45,
536   CGNS_ENUMV( TETRA_34 )=46,
537   CGNS_ENUMV( TETRA_35 )=47,
538   CGNS_ENUMV( PYRA_P4_29 )=48,
539   CGNS_ENUMV( PYRA_50 )=49,
540   CGNS_ENUMV( PYRA_55 )=50,
541   CGNS_ENUMV( PENTA_33 )=51,
542   CGNS_ENUMV( PENTA_66 )=52,
543   CGNS_ENUMV( PENTA_75 )=53,
544   CGNS_ENUMV( HEXA_44 )=54,
545   CGNS_ENUMV( HEXA_98 )=55,
546   CGNS_ENUMV( HEXA_125 )=56
547 } CGNS_ENUMT( ElementType_t );
548 
549 #define NofValidElementTypes 57
550 
551 extern CGNSDLL const char * ElementTypeName[NofValidElementTypes];
552 
553 #ifdef CGNS_SCOPE_ENUMS
554 #define  CG_NPE_NODE         1
555 #define  CG_NPE_BAR_2        2
556 #define  CG_NPE_BAR_3        3
557 #define  CG_NPE_TRI_3        3
558 #define  CG_NPE_TRI_6        6
559 #define  CG_NPE_QUAD_4       4
560 #define  CG_NPE_QUAD_8       8
561 #define  CG_NPE_QUAD_9       9
562 #define  CG_NPE_TETRA_4      4
563 #define  CG_NPE_TETRA_10    10
564 #define  CG_NPE_PYRA_5       5
565 #define  CG_NPE_PYRA_13     13
566 #define  CG_NPE_PYRA_14     14
567 #define  CG_NPE_PENTA_6      6
568 #define  CG_NPE_PENTA_15    15
569 #define  CG_NPE_PENTA_18    18
570 #define  CG_NPE_HEXA_8       8
571 #define  CG_NPE_HEXA_20     20
572 #define  CG_NPE_HEXA_27     27
573 #define  CG_NPE_MIXED        0
574 #define  CG_NPE_NGON_n       0
575 #define  CG_NPE_NFACE_n      0
576 #define  CG_NPE_BAR_4        4
577 #define  CG_NPE_TRI_9        9
578 #define  CG_NPE_TRI_10      10
579 #define  CG_NPE_QUAD_12     12
580 #define  CG_NPE_QUAD_16     16
581 #define  CG_NPE_TETRA_16    16
582 #define  CG_NPE_TETRA_20    20
583 #define  CG_NPE_PYRA_21     21
584 #define  CG_NPE_PYRA_29     29
585 #define  CG_NPE_PYRA_30     30
586 #define  CG_NPE_PENTA_24    24
587 #define  CG_NPE_PENTA_38    38
588 #define  CG_NPE_PENTA_40    40
589 #define  CG_NPE_HEXA_32     32
590 #define  CG_NPE_HEXA_56     56
591 #define  CG_NPE_HEXA_64     64
592 #define  CG_NPE_BAR_5        5
593 #define  CG_NPE_TRI_12      12
594 #define  CG_NPE_TRI_15      15
595 #define  CG_NPE_QUAD_P4_16  16
596 #define  CG_NPE_QUAD_25     25
597 #define  CG_NPE_TETRA_22    22
598 #define  CG_NPE_TETRA_34    34
599 #define  CG_NPE_TETRA_35    35
600 #define  CG_NPE_PYRA_P4_29  29
601 #define  CG_NPE_PYRA_50     50
602 #define  CG_NPE_PYRA_55     55
603 #define  CG_NPE_PENTA_33    33
604 #define  CG_NPE_PENTA_66    66
605 #define  CG_NPE_PENTA_75    75
606 #define  CG_NPE_HEXA_44     44
607 #define  CG_NPE_HEXA_98     98
608 #define  CG_NPE_HEXA_125   125
609 #else
610 #define  NPE_NODE         1
611 #define  NPE_BAR_2        2
612 #define  NPE_BAR_3        3
613 #define  NPE_TRI_3        3
614 #define  NPE_TRI_6        6
615 #define  NPE_QUAD_4       4
616 #define  NPE_QUAD_8       8
617 #define  NPE_QUAD_9       9
618 #define  NPE_TETRA_4      4
619 #define  NPE_TETRA_10    10
620 #define  NPE_PYRA_5       5
621 #define  NPE_PYRA_13     13
622 #define  NPE_PYRA_14     14
623 #define  NPE_PENTA_6      6
624 #define  NPE_PENTA_15    15
625 #define  NPE_PENTA_18    18
626 #define  NPE_HEXA_8       8
627 #define  NPE_HEXA_20     20
628 #define  NPE_HEXA_27     27
629 #define  NPE_MIXED        0
630 #define  NPE_NGON_n       0
631 #define  NPE_NFACE_n      0
632 #define  NPE_BAR_4        4
633 #define  NPE_TRI_9        9
634 #define  NPE_TRI_10      10
635 #define  NPE_QUAD_12     12
636 #define  NPE_QUAD_16     16
637 #define  NPE_TETRA_16    16
638 #define  NPE_TETRA_20    20
639 #define  NPE_PYRA_21     21
640 #define  NPE_PYRA_29     29
641 #define  NPE_PYRA_30     30
642 #define  NPE_PENTA_24    24
643 #define  NPE_PENTA_38    38
644 #define  NPE_PENTA_40    40
645 #define  NPE_HEXA_32     32
646 #define  NPE_HEXA_56     56
647 #define  NPE_HEXA_64     64
648 #define  NPE_BAR_5        5
649 #define  NPE_TRI_12      12
650 #define  NPE_TRI_15      15
651 #define  NPE_QUAD_P4_16  16
652 #define  NPE_QUAD_25     25
653 #define  NPE_TETRA_22    22
654 #define  NPE_TETRA_34    34
655 #define  NPE_TETRA_35    35
656 #define  NPE_PYRA_P4_29  29
657 #define  NPE_PYRA_50     50
658 #define  NPE_PYRA_55     55
659 #define  NPE_PENTA_33    33
660 #define  NPE_PENTA_66    66
661 #define  NPE_PENTA_75    75
662 #define  NPE_HEXA_44     44
663 #define  NPE_HEXA_98     98
664 #define  NPE_HEXA_125   125
665 #endif
666 
667 /* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - *\
668  *      Zone types                                                       *
669 \* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
670 
671 typedef enum {
672   CGNS_ENUMV( ZoneTypeNull ) =CG_Null,
673   CGNS_ENUMV( ZoneTypeUserDefined ) =CG_UserDefined,
674   CGNS_ENUMV( Structured ) =2,
675   CGNS_ENUMV( Unstructured ) =3
676 } CGNS_ENUMT( ZoneType_t );
677 
678 #define NofValidZoneTypes 4
679 
680 extern CGNSDLL const char * ZoneTypeName[NofValidZoneTypes];
681 
682 /* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - *\
683  *      Rigid Grid Motion types						 *
684 \* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
685 
686 typedef enum {
687   CGNS_ENUMV( RigidGridMotionTypeNull ) =CG_Null,
688   CGNS_ENUMV( RigidGridMotionTypeUserDefined ) =CG_UserDefined,
689   CGNS_ENUMV( ConstantRate ) =2,
690   CGNS_ENUMV( VariableRate ) =3
691 } CGNS_ENUMT( RigidGridMotionType_t );
692 
693 #define NofValidRigidGridMotionTypes 4
694 
695 extern CGNSDLL const char * RigidGridMotionTypeName[NofValidRigidGridMotionTypes];
696 
697 /* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - *\
698  *      Arbitrary Grid Motion types                                      *
699 \* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
700 
701 typedef enum {
702   CGNS_ENUMV( ArbitraryGridMotionTypeNull ) =CG_Null,
703   CGNS_ENUMV( ArbitraryGridMotionTypeUserDefined ) =CG_UserDefined,
704   CGNS_ENUMV( NonDeformingGrid ) =2,
705   CGNS_ENUMV( DeformingGrid ) =3
706 } CGNS_ENUMT( ArbitraryGridMotionType_t );
707 
708 #define NofValidArbitraryGridMotionTypes 4
709 
710 extern CGNSDLL const char * ArbitraryGridMotionTypeName[NofValidArbitraryGridMotionTypes];
711 
712 /* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - *\
713  *      Simulation types					         *
714 \* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
715 
716 typedef enum {
717   CGNS_ENUMV( SimulationTypeNull ) =CG_Null,
718   CGNS_ENUMV( SimulationTypeUserDefined ) =CG_UserDefined,
719   CGNS_ENUMV( TimeAccurate ) =2,
720   CGNS_ENUMV( NonTimeAccurate ) =3
721 } CGNS_ENUMT( SimulationType_t );
722 
723 #define NofValidSimulationTypes 4
724 
725 extern CGNSDLL const char * SimulationTypeName[NofValidSimulationTypes];
726 
727 /* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - *\
728  *	BC Property types						 *
729 \* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
730 
731 typedef enum {
732   CGNS_ENUMV( WallFunctionTypeNull ) =CG_Null,
733   CGNS_ENUMV( WallFunctionTypeUserDefined ) =CG_UserDefined,
734   CGNS_ENUMV( Generic ) =2
735 } CGNS_ENUMT( WallFunctionType_t );
736 
737 typedef enum {
738   CGNS_ENUMV( AreaTypeNull ) =CG_Null,
739   CGNS_ENUMV( AreaTypeUserDefined ) =CG_UserDefined,
740   CGNS_ENUMV( BleedArea ) =2,
741   CGNS_ENUMV( CaptureArea ) =3
742 } CGNS_ENUMT( AreaType_t );
743 
744 #define NofValidWallFunctionTypes 3
745 #define NofValidAreaTypes 4
746 
747 extern CGNSDLL const char * WallFunctionTypeName[NofValidWallFunctionTypes];
748 extern CGNSDLL const char * AreaTypeName[NofValidAreaTypes];
749 
750 /* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - *\
751  *      Grid Connectivity Property types				 *
752 \* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
753 
754 typedef enum {
755   CGNS_ENUMV( AverageInterfaceTypeNull ) =CG_Null,
756   CGNS_ENUMV( AverageInterfaceTypeUserDefined ) =CG_UserDefined,
757   CGNS_ENUMV( AverageAll ) =2,
758   CGNS_ENUMV( AverageCircumferential ) =3,
759   CGNS_ENUMV( AverageRadial ) =4,
760   CGNS_ENUMV( AverageI ) =5,
761   CGNS_ENUMV( AverageJ ) =6,
762   CGNS_ENUMV( AverageK ) =7
763 } CGNS_ENUMT( AverageInterfaceType_t );
764 
765 #define NofValidAverageInterfaceTypes 8
766 
767 extern CGNSDLL const char * AverageInterfaceTypeName[NofValidAverageInterfaceTypes];
768 
769 /* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - *\
770  *      LIBRARY FUNCTIONS						 *
771 \* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
772 
773 CGNSDLL int cg_is_cgns(const char *filename, int *file_type);
774 
775 CGNSDLL int cg_open(const char * filename, int mode, int *fn);
776 CGNSDLL int cg_version(int fn, float *FileVersion);
777 CGNSDLL int cg_precision(int fn, int *precision);
778 CGNSDLL int cg_close(int fn);
779 CGNSDLL int cg_save_as(int fn, const char *filename, int file_type,
780 	int follow_links);
781 
782 CGNSDLL int cg_set_file_type(int file_type);
783 CGNSDLL int cg_get_file_type(int fn, int *file_type);
784 CGNSDLL int cg_root_id(int fn, double *rootid);
785 CGNSDLL int cg_get_cgio(int fn, int *cgio_num);
786 
787 CGNSDLL int cg_configure(int what, void *value);
788 
789 CGNSDLL int cg_error_handler(void (*)(int, char *));
790 CGNSDLL int cg_set_compress(int compress);
791 CGNSDLL int cg_get_compress(int *compress);
792 CGNSDLL int cg_set_path(const char *path);
793 CGNSDLL int cg_add_path(const char *path);
794 
795 /* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - *\
796  *      typedef names                   				 *
797 \* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
798 
799 #undef type
800 
801 CGNSDLL const char *cg_get_name(int nnames, const char **names, int type);
802 
803 CGNSDLL const char *cg_MassUnitsName(CGNS_ENUMT( MassUnits_t ) type);
804 CGNSDLL const char *cg_LengthUnitsName(CGNS_ENUMT( LengthUnits_t ) type);
805 CGNSDLL const char *cg_TimeUnitsName(CGNS_ENUMT( TimeUnits_t ) type);
806 CGNSDLL const char *cg_TemperatureUnitsName(CGNS_ENUMT( TemperatureUnits_t ) type);
807 CGNSDLL const char *cg_AngleUnitsName(CGNS_ENUMT( AngleUnits_t ) type);
808 CGNSDLL const char *cg_ElectricCurrentUnitsName(CGNS_ENUMT( ElectricCurrentUnits_t ) type);
809 CGNSDLL const char *cg_SubstanceAmountUnitsName(CGNS_ENUMT( SubstanceAmountUnits_t ) type);
810 CGNSDLL const char *cg_LuminousIntensityUnitsName(CGNS_ENUMT( LuminousIntensityUnits_t ) type);
811 CGNSDLL const char *cg_DataClassName(CGNS_ENUMT( DataClass_t ) type);
812 CGNSDLL const char *cg_GridLocationName(CGNS_ENUMT( GridLocation_t ) type);
813 CGNSDLL const char *cg_BCDataTypeName(CGNS_ENUMT( BCDataType_t ) type);
814 CGNSDLL const char *cg_GridConnectivityTypeName(CGNS_ENUMT( GridConnectivityType_t ) type);
815 CGNSDLL const char *cg_PointSetTypeName(CGNS_ENUMT( PointSetType_t ) type);
816 CGNSDLL const char *cg_GoverningEquationsTypeName(CGNS_ENUMT( GoverningEquationsType_t ) type);
817 CGNSDLL const char *cg_ModelTypeName(CGNS_ENUMT( ModelType_t ) type);
818 CGNSDLL const char *cg_BCTypeName(CGNS_ENUMT( BCType_t ) type);
819 CGNSDLL const char *cg_DataTypeName(CGNS_ENUMT( DataType_t ) type);
820 CGNSDLL const char *cg_ElementTypeName(CGNS_ENUMT( ElementType_t ) type);
821 CGNSDLL const char *cg_ZoneTypeName(CGNS_ENUMT( ZoneType_t ) type);
822 CGNSDLL const char *cg_RigidGridMotionTypeName(CGNS_ENUMT( RigidGridMotionType_t ) type);
823 CGNSDLL const char *cg_ArbitraryGridMotionTypeName(CGNS_ENUMT( ArbitraryGridMotionType_t ) type);
824 CGNSDLL const char *cg_SimulationTypeName(CGNS_ENUMT( SimulationType_t ) type);
825 CGNSDLL const char *cg_WallFunctionTypeName(CGNS_ENUMT( WallFunctionType_t ) type);
826 CGNSDLL const char *cg_AreaTypeName(CGNS_ENUMT( AreaType_t ) type);
827 CGNSDLL const char *cg_AverageInterfaceTypeName(CGNS_ENUMT( AverageInterfaceType_t ) type);
828 
829 /* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - *\
830  *      Read and write CGNSBase_t Nodes					 *
831 \* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
832 
833 CGNSDLL int cg_nbases(int fn, int *nbases);
834 CGNSDLL int cg_base_read(int file_number, int B, char *basename,
835 	int *cell_dim, int *phys_dim);
836 CGNSDLL int cg_base_id(int fn, int B, double *base_id);
837 CGNSDLL int cg_base_write(int file_number, const char * basename,
838 	int cell_dim, int phys_dim, int *B);
839 
840 CGNSDLL int cg_cell_dim(int fn, int B, int *cell_dim);
841 
842 /* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - *\
843  *      Read and write Zone_t Nodes    					 *
844 \* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
845 
846 CGNSDLL int cg_nzones(int fn, int B, int *nzones);
847 CGNSDLL int cg_zone_read(int fn, int B, int Z, char *zonename, cgsize_t *size);
848 CGNSDLL int cg_zone_type(int file_number, int B, int Z,
849 	CGNS_ENUMT(ZoneType_t) *type);
850 CGNSDLL int cg_zone_id(int fn, int B, int Z, double *zone_id);
851 CGNSDLL int cg_zone_write(int fn, int B, const char * zonename,
852 	const cgsize_t * size, CGNS_ENUMT(ZoneType_t) type, int *Z);
853 
854 CGNSDLL int cg_index_dim(int fn, int B, int Z, int *index_dim);
855 
856 /* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - *\
857  *      Read and write Family_t Nodes                                    *
858 \* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
859 
860 CGNSDLL int cg_nfamilies(int file_number, int B, int *nfamilies);
861 CGNSDLL int cg_family_read(int file_number, int B, int F,
862 	char *family_name, int *nboco, int *ngeos);
863 CGNSDLL int cg_family_write(int file_number, int B,
864 	const char * family_name, int *F);
865 
866 CGNSDLL int cg_nfamily_names(int file_number, int B, int F, int *nnames);
867 CGNSDLL int cg_family_name_read(int file_number, int B, int F,
868 	int N, char *name, char *family);
869 CGNSDLL int cg_family_name_write(int file_number, int B, int F,
870 	const char *name, const char *family);
871 
872 /* FamilyTree extension */ /* ** FAMILY TREE ** */
873 CGNSDLL int cg_node_family_write( const char* family_name, int* F);
874 CGNSDLL int cg_node_nfamilies( int* nfamilies );
875 CGNSDLL int cg_node_family_read( int F, char* family_name, int* nFamBC, int *nGeo );
876 CGNSDLL int cg_node_family_name_write( const char* node_name, const char* family_name );
877 CGNSDLL int cg_node_nfamily_names( int* nnames );
878 CGNSDLL int cg_node_family_name_read(int N, char* node_name, char* family_name );
879 
880 /* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - *\
881  *      Read and write FamilyName_t Nodes                                *
882 \* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
883 
884 CGNSDLL int cg_famname_read(char *family_name);
885 CGNSDLL int cg_famname_write(const char * family_name);
886 
887 CGNSDLL int cg_nmultifam(int *nfams);
888 CGNSDLL int cg_multifam_read(int N, char *name, char *family);
889 CGNSDLL int cg_multifam_write(const char *name, const char *family);
890 
891 /* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - *\
892  *      Read and write FamilyBC_t Nodes                                  *
893 \* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
894 
895 CGNSDLL int cg_fambc_read(int file_number, int B, int F, int BC,
896     char *fambc_name, CGNS_ENUMT(BCType_t) *bocotype);
897 CGNSDLL int cg_fambc_write(int file_number, int B, int F,
898     const char * fambc_name, CGNS_ENUMT(BCType_t) bocotype, int *BC);
899 
900 /* FamilyTree extension */ /* ** FAMILY TREE ** */
901 
902 CGNSDLL int cg_node_fambc_read( int BC, char* fambc_name,
903         CGNS_ENUMT(BCType_t) *bocotype);
904 CGNSDLL int cg_node_fambc_write( const char* fambc_name,
905         CGNS_ENUMT(BCType_t) bocotype, int *BC );
906 
907 /* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - *\
908  *      Read and write GeometryReference_t Nodes                         *
909 \* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
910 
911 CGNSDLL int cg_geo_read(int file_number, int B, int F, int G, char *geo_name,
912     char **geo_file, char *CAD_name, int *npart);
913 CGNSDLL int cg_geo_write(int file_number, int B, int F, const char * geo_name,
914     const char * filename, const char * CADname, int *G);
915 
916 /* FamilyTree extension */ /* ** FAMILY TREE ** */
917 CGNSDLL int cg_node_geo_read( int G, char *geo_name,
918         char **geo_file, char *CAD_name, int *npart );
919 CGNSDLL int cg_node_geo_write( const char *geo_name,
920         const char *filename, const char *CADname, int *G);
921 
922 /* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - *\
923  *      Read and write GeometryEntity_t Nodes                            *
924 \* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
925 
926 CGNSDLL int cg_part_read(int file_number, int B, int F, int G, int P,
927 	char *part_name);
928 CGNSDLL int cg_part_write(int file_number, int B, int F, int G,
929 	const char * part_name, int *P);
930 
931 /* FamilyTree extension */ /* ** FAMILY TREE ** */
932 CGNSDLL int cg_node_part_read(int G, int P, char *part_name);
933 CGNSDLL int cg_node_part_write(int G, const char * part_name, int *P);
934 
935 /* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - *\
936  *      Read and write GridCoordinates_t Nodes                           *
937 \* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
938 
939 CGNSDLL int cg_ngrids(int file_number, int B, int Z, int *ngrids);
940 CGNSDLL int cg_grid_read(int file_number, int B, int Z, int G, char *gridname);
941 CGNSDLL int cg_grid_write(int file_number, int B, int Z,
942 	const char * zcoorname, int *G);
943 CGNSDLL int cg_grid_bounding_box_read(int file_number, int B, int Z, int G,
944         CGNS_ENUMT(DataType_t) type, void* boundingbox);
945 CGNSDLL int cg_grid_bounding_box_write(int file_number, int B, int Z, int G,
946         CGNS_ENUMT(DataType_t) type, void* boundingbox);
947 
948 /* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - *\
949  *      Read and write GridCoordinates_t/DataArray_t Nodes               *
950 \* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
951 
952 CGNSDLL int cg_ncoords(int fn, int B, int Z, int *ncoords);
953 CGNSDLL int cg_coord_info(int fn, int B, int Z, int C,
954 	CGNS_ENUMT(DataType_t) *type, char *coordname);
955 CGNSDLL int cg_coord_read(int fn, int B, int Z, const char * coordname,
956 	CGNS_ENUMT(DataType_t) type, const cgsize_t * rmin,
957 	const cgsize_t * rmax, void *coord);
958 CGNSDLL int cg_coord_general_read(int fn, int B, int Z,
959         const char * coordname, const cgsize_t *s_rmin, const cgsize_t *s_rmax,
960         CGNS_ENUMT(DataType_t) m_type, int m_numdim, const cgsize_t *m_dimvals,
961         const cgsize_t *m_rmin, const cgsize_t *m_rmax, void *coord_ptr);
962 CGNSDLL int cg_coord_id(int fn, int B, int Z, int C, double *coord_id);
963 CGNSDLL int cg_coord_write(int fn, int B, int Z,
964 	CGNS_ENUMT(DataType_t) type, const char * coordname,
965  	const void * coord_ptr, int *C);
966 
967 CGNSDLL int cg_coord_partial_write(int fn, int B, int Z,
968 	CGNS_ENUMT(DataType_t) type, const char * coordname,
969     const cgsize_t *rmin, const cgsize_t *rmax,
970     const void * coord_ptr, int *C);
971 CGNSDLL int cg_coord_general_write(int fn, int B, int Z,
972 	const char *coordname, CGNS_ENUMT(DataType_t) s_type,
973 	const cgsize_t *rmin, const cgsize_t *rmax,
974 	CGNS_ENUMT(DataType_t) m_type, int m_numdim, const cgsize_t *m_dims,
975 	const cgsize_t *m_rmin, const cgsize_t *m_rmax,
976 	const void *coord_ptr, int *C);
977 
978 /* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - *\
979  *      Read and write Elements_t Nodes                                  *
980 \* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
981 
982 CGNSDLL int cg_nsections(int file_number, int B, int Z, int *nsections);
983 CGNSDLL int cg_section_read(int file_number, int B, int Z, int S,
984 	char *SectionName,  CGNS_ENUMT(ElementType_t) *type,
985 	cgsize_t *start, cgsize_t *end, int *nbndry, int *parent_flag);
986 CGNSDLL int cg_elements_read(int file_number, int B, int Z, int S,
987 	cgsize_t *elements, cgsize_t *parent_data);
988 CGNSDLL int cg_poly_elements_read(int file_number, int B, int Z, int S,
989 	cgsize_t *elements, cgsize_t *connect_offset, cgsize_t *parent_data);
990 CGNSDLL int cg_section_write(int file_number, int B, int Z,
991 	const char * SectionName, CGNS_ENUMT(ElementType_t) type,
992 	cgsize_t start, cgsize_t end, int nbndry, const cgsize_t * elements,
993 	int *S);
994 CGNSDLL int cg_poly_section_write(int file_number, int B, int Z,
995 	const char * SectionName, CGNS_ENUMT(ElementType_t) type,
996 	cgsize_t start, cgsize_t end, int nbndry, const cgsize_t * elements,
997 	const cgsize_t * connect_offset, int *S);
998 CGNSDLL int cg_parent_data_write(int file_number, int B, int Z, int S,
999 	const cgsize_t * parent_data);
1000 CGNSDLL int cg_npe( CGNS_ENUMT(ElementType_t) type, int *npe);
1001 CGNSDLL int cg_ElementDataSize(int file_number, int B, int Z, int S,
1002 	cgsize_t *ElementDataSize);
1003 
1004 CGNSDLL int cg_section_partial_write(int file_number, int B, int Z,
1005 	const char * SectionName, CGNS_ENUMT(ElementType_t) type,
1006 	cgsize_t start, cgsize_t end, int nbndry, int *S);
1007 
1008 CGNSDLL int cg_elements_partial_write(int fn, int B, int Z, int S,
1009 	cgsize_t start, cgsize_t end, const cgsize_t *elements);
1010 CGNSDLL int cg_poly_elements_partial_write(int fn, int B, int Z, int S,
1011 	cgsize_t start, cgsize_t end, const cgsize_t *elements, const cgsize_t *connect_offset);
1012 
1013 CGNSDLL int cg_parent_data_partial_write(int fn, int B, int Z, int S,
1014 	cgsize_t start, cgsize_t end, const cgsize_t *ParentData);
1015 
1016 CGNSDLL int cg_elements_partial_read(int file_number, int B, int Z, int S,
1017 	cgsize_t start, cgsize_t end, cgsize_t *elements, cgsize_t *parent_data);
1018 CGNSDLL int cg_poly_elements_partial_read(int file_number, int B, int Z, int S,
1019 	cgsize_t start, cgsize_t end, cgsize_t *elements, cgsize_t *connect_offset, cgsize_t *parent_data);
1020 
1021 CGNSDLL int cg_ElementPartialSize(int file_number, int B, int Z, int S,
1022 	cgsize_t start, cgsize_t end, cgsize_t *ElementDataSize);
1023 
1024 /* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - *\
1025  *      Read and write FlowSolution_t Nodes                              *
1026 \* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
1027 
1028 CGNSDLL int cg_nsols(int fn, int B, int Z, int *nsols);
1029 CGNSDLL int cg_sol_info(int fn, int B, int Z, int S, char *solname,
1030 	CGNS_ENUMT(GridLocation_t) *location);
1031 CGNSDLL int cg_sol_id(int fn, int B, int Z,int S, double *sol_id);
1032 CGNSDLL int cg_sol_write(int fn, int B, int Z, const char * solname,
1033 	CGNS_ENUMT(GridLocation_t) location, int *S);
1034 CGNSDLL int cg_sol_size(int fn, int B, int Z, int S,
1035 	int *data_dim, cgsize_t *dim_vals);
1036 
1037 CGNSDLL int cg_sol_ptset_info(int fn, int B, int Z, int S,
1038 	CGNS_ENUMT(PointSetType_t) *ptset_type, cgsize_t *npnts);
1039 CGNSDLL int cg_sol_ptset_read(int fn, int B, int Z, int S, cgsize_t *pnts);
1040 CGNSDLL int cg_sol_ptset_write(int fn, int B, int Z, const char *solname,
1041 	CGNS_ENUMT(GridLocation_t) location,
1042 	CGNS_ENUMT(PointSetType_t) ptset_type, cgsize_t npnts,
1043 	const cgsize_t *pnts, int *S);
1044 
1045 /* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - *\
1046  *      Read and write solution DataArray_t Nodes                        *
1047 \* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
1048 
1049 CGNSDLL int cg_nfields(int fn, int B, int Z, int S, int *nfields);
1050 CGNSDLL int cg_field_info(int fn,int B,int Z,int S, int F,
1051 	CGNS_ENUMT(DataType_t) *type, char *fieldname);
1052 CGNSDLL int cg_field_read(int fn, int B, int Z, int S, const char *fieldname,
1053 	CGNS_ENUMT(DataType_t) type, const cgsize_t *rmin,
1054         const cgsize_t *rmax, void *field_ptr);
1055 CGNSDLL int cg_field_general_read(int fn, int B, int Z, int S,
1056         const char *fieldname, const cgsize_t *s_rmin, const cgsize_t *s_rmax,
1057         CGNS_ENUMT(DataType_t) m_type, int m_numdim, const cgsize_t *m_dimvals,
1058         const cgsize_t *m_rmin, const cgsize_t *m_rmax, void *field_ptr);
1059 CGNSDLL int cg_field_id(int fn, int B, int Z,int S, int F, double *field_id);
1060 CGNSDLL int cg_field_write(int fn,int B,int Z,int S,
1061 	CGNS_ENUMT(DataType_t) type, const char * fieldname,
1062 	const void * field_ptr, int *F);
1063 
1064 CGNSDLL int cg_field_partial_write(int fn, int B, int Z, int S,
1065 	CGNS_ENUMT(DataType_t) type, const char * fieldname,
1066 	const cgsize_t *rmin, const cgsize_t *rmax,
1067         const void * field_ptr, int *F);
1068 CGNSDLL int cg_field_general_write(int fn, int B, int Z, int S,
1069         const char * fieldname, CGNS_ENUMT(DataType_t) s_type,
1070         const cgsize_t *rmin, const cgsize_t *rmax,
1071         CGNS_ENUMT(DataType_t) m_type, int m_numdim, const cgsize_t *m_dims,
1072         const cgsize_t *m_rmin, const cgsize_t *m_rmax,
1073         const void *field_ptr, int *F);
1074 
1075 /* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - *\
1076  *      Read and write ZoneSubRegion_t Nodes                             *
1077 \* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
1078 
1079 CGNSDLL int cg_nsubregs(int fn, int B, int Z, int *nsubreg);
1080 CGNSDLL int cg_subreg_info(int fn, int B, int Z, int S, char *regname,
1081 	int *dimension, CGNS_ENUMT(GridLocation_t) *location,
1082 	CGNS_ENUMT(PointSetType_t) *ptset_type, cgsize_t *npnts,
1083 	int *bcname_len, int *gcname_len);
1084 CGNSDLL int cg_subreg_ptset_read(int fn, int B, int Z, int S, cgsize_t *pnts);
1085 CGNSDLL int cg_subreg_bcname_read(int fn, int B, int Z, int S, char *bcname);
1086 CGNSDLL int cg_subreg_gcname_read(int fn, int B, int Z, int S, char *gcname);
1087 CGNSDLL int cg_subreg_ptset_write(int fn, int B, int Z, const char *regname,
1088 	int dimension, CGNS_ENUMT(GridLocation_t) location,
1089 	CGNS_ENUMT(PointSetType_t) ptset_type, cgsize_t npnts,
1090 	const cgsize_t *pnts, int *S);
1091 CGNSDLL int cg_subreg_bcname_write(int fn, int B, int Z, const char *regname,
1092 	int dimension, const char *bcname, int *S);
1093 CGNSDLL int cg_subreg_gcname_write(int fn, int B, int Z, const char *regname,
1094 	int dimension, const char *gcname, int *S);
1095 
1096 /* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - *\
1097  *      Read and write ZoneGridConnectivity_t Nodes  			 *
1098 \* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
1099 
1100 CGNSDLL int cg_nzconns(int fn, int B, int Z, int *nzconns);
1101 CGNSDLL int cg_zconn_read(int fn, int B, int Z, int C, char *name);
1102 CGNSDLL int cg_zconn_write(int fn, int B, int Z, const char *name, int *C);
1103 CGNSDLL int cg_zconn_get(int fn, int B, int Z, int *C);
1104 CGNSDLL int cg_zconn_set(int fn, int B, int Z, int C);
1105 
1106 /* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - *\
1107  *      Read and write OversetHoles_t Nodes  				 *
1108 \* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
1109 
1110 CGNSDLL int cg_nholes(int fn, int B, int Z, int *nholes);
1111 CGNSDLL int cg_hole_info(int fn, int B, int Z, int Ii, char *holename,
1112 	CGNS_ENUMT(GridLocation_t) *location,  CGNS_ENUMT(PointSetType_t) *ptset_type,
1113 	int *nptsets, cgsize_t *npnts);
1114 CGNSDLL int cg_hole_read(int fn, int B, int Z, int Ii, cgsize_t *pnts);
1115 CGNSDLL int cg_hole_id(int fn, int B, int Z, int Ii, double *hole_id);
1116 CGNSDLL int cg_hole_write(int fn, int B, int Z, const char * holename,
1117 	CGNS_ENUMT(GridLocation_t) location, CGNS_ENUMT(PointSetType_t) ptset_type,
1118 	int nptsets, cgsize_t npnts, const cgsize_t * pnts, int *Ii);
1119 
1120 /* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - *\
1121  *      Read and write GridConnectivity_t Nodes                          *
1122 \* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
1123 
1124 CGNSDLL int cg_nconns(int fn, int B, int Z, int *nconns);
1125 CGNSDLL int cg_conn_info(int file_number, int B, int Z, int Ii,
1126 	char *connectname, CGNS_ENUMT(GridLocation_t) *location,
1127 	CGNS_ENUMT(GridConnectivityType_t) *type,
1128 	CGNS_ENUMT(PointSetType_t) *ptset_type,
1129 	cgsize_t *npnts, char *donorname,
1130 	CGNS_ENUMT(ZoneType_t) *donor_zonetype,
1131 	CGNS_ENUMT(PointSetType_t) *donor_ptset_type,
1132         CGNS_ENUMT(DataType_t) *donor_datatype,
1133         cgsize_t *ndata_donor);
1134 CGNSDLL int cg_conn_read(int file_number, int B, int Z, int Ii, cgsize_t *pnts,
1135         CGNS_ENUMT(DataType_t) donor_datatype,
1136         cgsize_t *donor_data);
1137 CGNSDLL int cg_conn_id(int fn, int B, int Z, int Ii, double *conn_id);
1138 CGNSDLL int cg_conn_write(int file_number, int B, int Z,
1139 	const char * connectname, CGNS_ENUMT(GridLocation_t) location,
1140 	CGNS_ENUMT(GridConnectivityType_t) type,
1141 	CGNS_ENUMT(PointSetType_t) ptset_type,
1142 	cgsize_t npnts, const cgsize_t * pnts, const char * donorname,
1143 	CGNS_ENUMT(ZoneType_t) donor_zonetype,
1144 	CGNS_ENUMT(PointSetType_t) donor_ptset_type,
1145         CGNS_ENUMT(DataType_t) donor_datatype,
1146         cgsize_t ndata_donor, const cgsize_t *donor_data, int *Ii);
1147 CGNSDLL int cg_conn_write_short(int file_number, int B, int Z,
1148 	const char * connectname, CGNS_ENUMT(GridLocation_t) location,
1149 	CGNS_ENUMT(GridConnectivityType_t) type,
1150 	CGNS_ENUMT(PointSetType_t) ptset_type,
1151 	cgsize_t npnts, const cgsize_t * pnts, const char * donorname, int *Ii);
1152 CGNSDLL int cg_conn_read_short(int file_number, int B, int Z, int Ii,
1153 	cgsize_t *pnts);
1154 
1155 /* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - *\
1156  *      Read and write GridConnectivity1to1_t Nodes in a zone            *
1157 \* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
1158 
1159 CGNSDLL int cg_n1to1(int fn, int B, int Z, int *n1to1);
1160 CGNSDLL int cg_1to1_read(int fn, int B, int Z, int Ii, char *connectname,
1161 	char *donorname, cgsize_t *range, cgsize_t *donor_range, int *transform);
1162 CGNSDLL int cg_1to1_id(int fn, int B, int Z, int Ii, double *one21_id);
1163 CGNSDLL int cg_1to1_write(int fn, int B, int Z, const char * connectname,
1164 	const char * donorname, const cgsize_t * range,
1165 	const cgsize_t * donor_range, const int * transform, int *Ii);
1166 
1167 /* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - *\
1168  *      Read all GridConnectivity1to1_t Nodes of a base                  *
1169 \* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
1170 
1171 CGNSDLL int cg_n1to1_global(int fn, int B, int *n1to1_global);
1172 CGNSDLL int cg_1to1_read_global(int fn, int B, char **connectname,
1173 	char **zonename, char **donorname, cgsize_t **range,
1174 	cgsize_t **donor_range, int **transform);
1175 
1176 /* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - *\
1177  *      Read and write BC_t Nodes                                        *
1178 \* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
1179 
1180 CGNSDLL int cg_nbocos(int fn, int B, int Z, int *nbocos);
1181 CGNSDLL int cg_boco_info(int fn, int B, int Z, int BC, char *boconame,
1182 	CGNS_ENUMT(BCType_t) *bocotype, CGNS_ENUMT(PointSetType_t) *ptset_type,
1183  	cgsize_t *npnts, int *NormalIndex, cgsize_t *NormalListSize,
1184  	CGNS_ENUMT(DataType_t) *NormalDataType, int *ndataset);
1185 CGNSDLL int cg_boco_read(int fn, int B, int Z, int BC, cgsize_t *pnts,
1186 	void *NormalList);
1187 CGNSDLL int cg_boco_id(int fn, int B, int Z, int BC, double *boco_id);
1188 CGNSDLL int cg_boco_write(int file_number, int B, int Z, const char * boconame,
1189 	CGNS_ENUMT(BCType_t) bocotype, CGNS_ENUMT(PointSetType_t) ptset_type,
1190 	cgsize_t npnts, const cgsize_t * pnts, int *BC);
1191 CGNSDLL int cg_boco_normal_write(int file_number, int B, int Z, int BC,
1192 	const int * NormalIndex, int NormalListFlag,
1193 	CGNS_ENUMT(DataType_t) NormalDataType, const void * NormalList);
1194 
1195 CGNSDLL int cg_boco_gridlocation_read(int file_number, int B, int Z,
1196 	int BC, CGNS_ENUMT(GridLocation_t) *location);
1197 CGNSDLL int cg_boco_gridlocation_write(int file_number, int B, int Z,
1198 	int BC, CGNS_ENUMT(GridLocation_t) location);
1199 
1200 /* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - *\
1201  *      Read and write BCDataSet_t Nodes                                 *
1202 \* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
1203 
1204 CGNSDLL int cg_dataset_read(int fn, int B, int Z, int BC, int DS, char *name,
1205 	CGNS_ENUMT(BCType_t) *BCType, int *DirichletFlag, int *NeumannFlag);
1206 CGNSDLL int cg_dataset_write(int file_number, int B, int Z, int BC,
1207 	const char * name, CGNS_ENUMT(BCType_t) BCType, int *Dset);
1208 
1209 /* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - *\
1210  *      Read and write FamilyBCDataSet_t Nodes                           *
1211 \* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
1212 
1213 CGNSDLL int cg_bcdataset_write(const char *name, CGNS_ENUMT(BCType_t) BCType,
1214 	CGNS_ENUMT(BCDataType_t) BCDataType);
1215 CGNSDLL int cg_bcdataset_info(int *n_dataset);
1216 CGNSDLL int cg_bcdataset_read(int index, char *name,
1217 	CGNS_ENUMT(BCType_t) *BCType, int *DirichletFlag, int *NeumannFlag);
1218 
1219 /* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - *\
1220  *      Read and write BCData_t Nodes                                    *
1221 \* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
1222 
1223 CGNSDLL int cg_bcdata_write(int file_number, int B, int Z, int BC, int Dset,
1224 	CGNS_ENUMT(BCDataType_t) BCDataType);
1225 
1226 /* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - *\
1227  *      Read and write DiscreteData_t Nodes                              *
1228 \* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
1229 
1230 CGNSDLL int cg_ndiscrete(int file_number, int B, int Z, int *ndiscrete);
1231 CGNSDLL int cg_discrete_read(int file_number, int B, int Z, int D,
1232 	char *discrete_name);
1233 CGNSDLL int cg_discrete_write(int file_number, int B, int Z,
1234 	const char * discrete_name, int *D);
1235 CGNSDLL int cg_discrete_size(int fn, int B, int Z, int D,
1236 	int *data_dim, cgsize_t *dim_vals);
1237 
1238 CGNSDLL int cg_discrete_ptset_info(int fn, int B, int Z, int D,
1239 	CGNS_ENUMT(PointSetType_t) *ptset_type, cgsize_t *npnts);
1240 CGNSDLL int cg_discrete_ptset_read(int fn, int B, int Z, int D,
1241 	cgsize_t *pnts);
1242 CGNSDLL int cg_discrete_ptset_write(int fn, int B, int Z,
1243 	const char *discrete_name, CGNS_ENUMT(GridLocation_t) location,
1244 	CGNS_ENUMT(PointSetType_t) ptset_type, cgsize_t npnts,
1245 	const cgsize_t *pnts, int *D);
1246 
1247 /* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - *\
1248  *      Read and write RigidGridMotion_t Nodes				 *
1249 \* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
1250 
1251 CGNSDLL int cg_n_rigid_motions(int file_number, int B, int Z,
1252 	int *n_rigid_motions);
1253 CGNSDLL int cg_rigid_motion_read(int file_number, int B, int Z, int R,
1254 	char *name, CGNS_ENUMT(RigidGridMotionType_t) *type);
1255 CGNSDLL int cg_rigid_motion_write(int file_number, int B, int Z,
1256 	const char * name, CGNS_ENUMT(RigidGridMotionType_t) type, int *R);
1257 
1258 /* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - *\
1259  *      Read and write ArbitraryGridMotion_t Nodes                       *
1260 \* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
1261 
1262 CGNSDLL int cg_n_arbitrary_motions(int file_number, int B, int Z,
1263 	int *n_arbitrary_motions);
1264 CGNSDLL int cg_arbitrary_motion_read(int file_number, int B, int Z, int A,
1265 	char *name, CGNS_ENUMT(ArbitraryGridMotionType_t) *type);
1266 CGNSDLL int cg_arbitrary_motion_write(int file_number, int B, int Z,
1267 	const char * amotionname, CGNS_ENUMT(ArbitraryGridMotionType_t) type,
1268         int *A);
1269 
1270 /* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - *\
1271  *      Read and write SimulationType_t Node                             *
1272 \* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
1273 
1274 CGNSDLL int cg_simulation_type_read(int file_number, int B,
1275 	CGNS_ENUMT(SimulationType_t) *type);
1276 CGNSDLL int cg_simulation_type_write(int file_number, int B,
1277 	CGNS_ENUMT(SimulationType_t) type);
1278 
1279 /* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - *\
1280  *      Read and write BaseIterativeData_t Node                          *
1281 \* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
1282 
1283 CGNSDLL int cg_biter_read(int file_number, int B, char *bitername, int *nsteps);
1284 CGNSDLL int cg_biter_write(int file_number, int B, const char * bitername, int nsteps);
1285 
1286 /* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - *\
1287  *      Read and write ZoneIterativeData_t Node                          *
1288 \* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
1289 
1290 CGNSDLL int cg_ziter_read(int file_number, int B, int Z, char *zitername);
1291 CGNSDLL int cg_ziter_write(int file_number, int B, int Z, const char * zitername);
1292 
1293 /* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - *\
1294  *      Read and write Gravity_t Nodes                                   *
1295 \* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
1296 
1297 CGNSDLL int cg_gravity_read(int file_number, int B, float *gravity_vector);
1298 CGNSDLL int cg_gravity_write(int file_number, int B, float const *gravity_vector);
1299 
1300 /* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - *\
1301  *      Read and write Axisymmetry_t Nodes                               *
1302 \* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
1303 
1304 CGNSDLL int cg_axisym_read(int file_number, int B, float *ref_point,
1305 	float *axis);
1306 CGNSDLL int cg_axisym_write(int file_number, int B, float const *ref_point,
1307   	float const *axis);
1308 
1309 /* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - *\
1310  *      Read and write RotatingCoordinates_t Nodes                       *
1311 \* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
1312 
1313 CGNSDLL int cg_rotating_read(float *rot_rate, float *rot_center);
1314 CGNSDLL int cg_rotating_write(float const *rot_rate, float const *rot_center);
1315 
1316 /* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - *\
1317  *      Read and write BCProperty_t/WallFunction_t Nodes   	         *
1318 \* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
1319 
1320 CGNSDLL int cg_bc_wallfunction_read(int file_number, int B, int Z, int BC,
1321 	CGNS_ENUMT(WallFunctionType_t) *WallFunctionType);
1322 CGNSDLL int cg_bc_wallfunction_write(int file_number, int B, int Z, int BC,
1323 	CGNS_ENUMT(WallFunctionType_t) WallFunctionType);
1324 
1325 /* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - *\
1326  *      Read and write BCProperty_t/Area_t Nodes                         *
1327 \* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
1328 
1329 CGNSDLL int cg_bc_area_read(int file_number, int B, int Z, int BC,
1330 	CGNS_ENUMT(AreaType_t) *AreaType, float *SurfaceArea, char *RegionName);
1331 CGNSDLL int cg_bc_area_write(int file_number, int B, int Z, int BC,
1332 	CGNS_ENUMT(AreaType_t) AreaType, float SurfaceArea, const char *RegionName);
1333 
1334 /* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - *\
1335  *      Read and write GridConnectivityProperty_t/Periodic_t Nodes       *
1336 \* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
1337 
1338 CGNSDLL int cg_conn_periodic_read(int file_number, int B, int Z, int Ii,
1339 	float *RotationCenter, float *RotationAngle, float *Translation);
1340 CGNSDLL int cg_conn_periodic_write(int file_number, int B, int Z, int Ii,
1341 	float const *RotationCenter, float const *RotationAngle,
1342 	float const *Translation);
1343 CGNSDLL int cg_1to1_periodic_write(int file_number, int B, int Z, int Ii,
1344 	float const *RotationCenter, float const *RotationAngle,
1345 	float const *Translation);
1346 CGNSDLL int cg_1to1_periodic_read(int file_number, int B, int Z, int Ii,
1347 	float *RotationCenter, float *RotationAngle, float *Translation);
1348 
1349 /* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - *\
1350  *   Read and write GridConnectivityProperty_t/AverageInterface_t Nodes  *
1351 \* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
1352 
1353 CGNSDLL int cg_conn_average_read(int file_number, int B, int Z, int Ii,
1354 	CGNS_ENUMT(AverageInterfaceType_t) *AverageInterfaceType);
1355 CGNSDLL int cg_conn_average_write(int file_number, int B, int Z, int Ii,
1356 	CGNS_ENUMT(AverageInterfaceType_t) AverageInterfaceType);
1357 CGNSDLL int cg_1to1_average_write(int file_number, int B, int Z, int Ii,
1358 	CGNS_ENUMT(AverageInterfaceType_t) AverageInterfaceType);
1359 CGNSDLL int cg_1to1_average_read(int file_number, int B, int Z, int Ii,
1360 	CGNS_ENUMT(AverageInterfaceType_t) *AverageInterfaceType);
1361 
1362 /* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - *\
1363  *      Variable Argument List Functions                                 *
1364 \* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
1365 
1366 CGNSDLL int cg_goto(int file_number, int B, ...);
1367 CGNSDLL int cg_goto_f08(int file_number, int B, ...);
1368 CGNSDLL int cg_gorel(int file_number, ...);
1369 CGNSDLL int cg_gorel_f08(int file_number, ...);
1370 CGNSDLL int cg_gopath(int file_number, const char *path);
1371 CGNSDLL int cg_golist(int file_number, int B, int depth, char **label,
1372 	int *num);
1373 CGNSDLL int cg_where(int *file_number, int *B, int *depth, char **label,
1374 	int *num);
1375 
1376 /* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - *\
1377  *      Read and write ConvergenceHistory_t Nodes                        *
1378 \* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
1379 
1380 CGNSDLL int cg_convergence_read(int *iterations, char **NormDefinitions);
1381 CGNSDLL int cg_convergence_write(int iterations, const char * NormDefinitions);
1382 
1383 /* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - *\
1384  *      Read and write ReferenceState_t Nodes                            *
1385 \* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
1386 
1387 CGNSDLL int cg_state_read(char **StateDescription);
1388 CGNSDLL int cg_state_write(const char * StateDescription);
1389 
1390 /* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - *\
1391  *      Read and write FlowEquationSet_t Nodes                           *
1392 \* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
1393 
1394 CGNSDLL int cg_equationset_read(int *EquationDimension,
1395         int *GoverningEquationsFlag, int *GasModelFlag,
1396         int *ViscosityModelFlag,     int *ThermalConductivityModelFlag,
1397         int *TurbulenceClosureFlag,  int *TurbulenceModelFlag);
1398 CGNSDLL int cg_equationset_chemistry_read(int *ThermalRelaxationFlag,
1399 	int *ChemicalKineticsFlag);
1400 CGNSDLL int cg_equationset_elecmagn_read(int *ElecFldModelFlag,
1401 	int *MagnFldModelFlag, int *ConductivityModelFlag);
1402 CGNSDLL int cg_equationset_write(int EquationDimension);
1403 
1404 /* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - *\
1405  *      Read and write GoverningEquations_t Nodes                        *
1406 \* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
1407 
1408 CGNSDLL int cg_governing_read(CGNS_ENUMT(GoverningEquationsType_t) *EquationsType);
1409 CGNSDLL int cg_governing_write(CGNS_ENUMT(GoverningEquationsType_t) Equationstype);
1410 
1411 /* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - *\
1412  *      Read and write Diffusion Model Nodes                             *
1413 \* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
1414 
1415 CGNSDLL int cg_diffusion_read(int *diffusion_model);
1416 CGNSDLL int cg_diffusion_write(const int * diffusion_model);
1417 
1418 /* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - *\
1419  *      Read and write GasModel_t, ViscosityModel_t,                     *
1420  *      ThermalConductivityModel_t, TurbulenceClosure_t,                 *
1421  *      TurbulenceModel_t, ThermalRelaxationModel_t,                     *
1422  *      ChemicalKineticsModel_t, EMElectricFieldModel_t,                 *
1423  *      EMMagneticFieldModel_t Nodes                                     *
1424 \* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
1425 
1426 CGNSDLL int cg_model_read(const char *ModelLabel, CGNS_ENUMT(ModelType_t) *ModelType);
1427 CGNSDLL int cg_model_write(const char * ModelLabel, CGNS_ENUMT(ModelType_t) ModelType);
1428 
1429 /* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - *\
1430  *      Read and write DataArray_t Nodes                                 *
1431 \* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
1432 
1433 CGNSDLL int cg_narrays(int *narrays);
1434 CGNSDLL int cg_array_info(int A, char *ArrayName,
1435 	CGNS_ENUMT(DataType_t) *DataType,
1436 	int *DataDimension, cgsize_t *DimensionVector);
1437 CGNSDLL int cg_array_read(int A, void *Data);
1438 CGNSDLL int cg_array_read_as(int A, CGNS_ENUMT(DataType_t) type, void *Data);
1439 CGNSDLL int cg_array_general_read(int A,
1440         const cgsize_t *s_rmin, const cgsize_t *s_rmax,
1441         CGNS_ENUMT(DataType_t) m_type, int m_numdim, const cgsize_t *m_dimvals,
1442         const cgsize_t *m_rmin, const cgsize_t *m_rmax, void *data);
1443 CGNSDLL int cg_array_write(const char * ArrayName,
1444 	CGNS_ENUMT(DataType_t) DataType, int DataDimension,
1445 	const cgsize_t * DimensionVector, const void * Data);
1446 CGNSDLL int cg_array_general_write(const char *arrayname,
1447         CGNS_ENUMT(DataType_t) s_type, int s_numdim, const cgsize_t *s_dimvals,
1448         const cgsize_t *s_rmin, const cgsize_t *s_rmax,
1449         CGNS_ENUMT(DataType_t) m_type, int m_numdim, const cgsize_t *m_dimvals,
1450         const cgsize_t *m_rmin, const cgsize_t *m_rmax, const void *data);
1451 
1452 /* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - *\
1453  *      Read and write UserDefinedData_t Nodes - new in version 2.1      *
1454 \* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
1455 
1456 CGNSDLL int cg_nuser_data(int *nuser_data);
1457 CGNSDLL int cg_user_data_read(int Index, char *user_data_name);
1458 CGNSDLL int cg_user_data_write(const char * user_data_name);
1459 
1460 /* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - *\
1461  *      Read and write IntegralData_t Nodes                              *
1462 \* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
1463 
1464 CGNSDLL int cg_nintegrals(int *nintegrals);
1465 CGNSDLL int cg_integral_read(int IntegralDataIndex, char *IntegralDataName);
1466 CGNSDLL int cg_integral_write(const char * IntegralDataName);
1467 
1468 /* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - *\
1469  *      Read and write Rind_t Nodes                                      *
1470 \* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
1471 
1472 CGNSDLL int cg_rind_read(int *RindData);
1473 CGNSDLL int cg_rind_write(const int * RindData);
1474 
1475 /* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - *\
1476  *      Read and write Descriptor_t Nodes                                *
1477 \* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
1478 
1479 CGNSDLL int cg_ndescriptors(int *ndescriptors);
1480 CGNSDLL int cg_descriptor_read(int descr_no, char *descr_name, char **descr_text);
1481 CGNSDLL int cg_descriptor_write(const char * descr_name, const char * descr_text);
1482 
1483 /* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - *\
1484  *      Read and write DimensionalUnits_t Nodes                          *
1485 \* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
1486 
1487 CGNSDLL int
1488 cg_nunits(int *nunits);
1489 CGNSDLL int
1490 cg_units_read     (CGNS_ENUMT(MassUnits_t) *mass,
1491 		   CGNS_ENUMT(LengthUnits_t) *length,
1492 		   CGNS_ENUMT(TimeUnits_t) *time,
1493 		   CGNS_ENUMT(TemperatureUnits_t) *temperature,
1494 		   CGNS_ENUMT(AngleUnits_t) *angle);
1495 CGNSDLL int
1496 cg_units_write    (CGNS_ENUMT(MassUnits_t) mass,
1497 		   CGNS_ENUMT(LengthUnits_t) length,
1498 		   CGNS_ENUMT(TimeUnits_t) time,
1499 		   CGNS_ENUMT(TemperatureUnits_t) temperature,
1500 		   CGNS_ENUMT(AngleUnits_t) angle);
1501 CGNSDLL int
1502 cg_unitsfull_read (CGNS_ENUMT(MassUnits_t) *mass,
1503 		   CGNS_ENUMT(LengthUnits_t) *length,
1504 		   CGNS_ENUMT(TimeUnits_t) *time,
1505 		   CGNS_ENUMT(TemperatureUnits_t) *temperature,
1506 		   CGNS_ENUMT(AngleUnits_t) *angle,
1507 		   CGNS_ENUMT(ElectricCurrentUnits_t) *current,
1508 		   CGNS_ENUMT(SubstanceAmountUnits_t) *amount,
1509 		   CGNS_ENUMT(LuminousIntensityUnits_t) *intensity);
1510 CGNSDLL int
1511 cg_unitsfull_write(CGNS_ENUMT(MassUnits_t) mass,
1512 		   CGNS_ENUMT(LengthUnits_t) length,
1513 		   CGNS_ENUMT(TimeUnits_t) time,
1514 		   CGNS_ENUMT(TemperatureUnits_t) temperature,
1515 		   CGNS_ENUMT(AngleUnits_t) angle,
1516 		   CGNS_ENUMT(ElectricCurrentUnits_t) current,
1517 		   CGNS_ENUMT(SubstanceAmountUnits_t) amount,
1518 		   CGNS_ENUMT(LuminousIntensityUnits_t) intensity);
1519 
1520 /* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - *\
1521  *      Read and write DimensionalExponents_t Nodes                      *
1522 \* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
1523 
1524 CGNSDLL int cg_exponents_info(CGNS_ENUMT(DataType_t) *DataType);
1525 CGNSDLL int cg_nexponents(int *numexp);
1526 CGNSDLL int cg_exponents_read(void *exponents);
1527 CGNSDLL int cg_exponents_write(CGNS_ENUMT(DataType_t) DataType, const void * exponents);
1528 CGNSDLL int cg_expfull_read(void *exponents);
1529 CGNSDLL int cg_expfull_write(CGNS_ENUMT(DataType_t) DataType, const void * exponents);
1530 
1531 /* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - *\
1532  *      Read and write DataConversion_t Nodes                            *
1533 \* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
1534 
1535 CGNSDLL int cg_conversion_info(CGNS_ENUMT(DataType_t) *DataType);
1536 CGNSDLL int cg_conversion_read(void *ConversionFactors);
1537 CGNSDLL int cg_conversion_write(CGNS_ENUMT(DataType_t) DataType, const void * ConversionFactors);
1538 
1539 /* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - *\
1540  *      Read and write DataClass_t Nodes                                 *
1541 \* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
1542 
1543 CGNSDLL int cg_dataclass_read(CGNS_ENUMT(DataClass_t) *dataclass);
1544 CGNSDLL int cg_dataclass_write(CGNS_ENUMT(DataClass_t) dataclass);
1545 
1546 /* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - *\
1547  *      Read and write GridLocation_t Nodes                              *
1548 \* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
1549 
1550 CGNSDLL int cg_gridlocation_read(CGNS_ENUMT(GridLocation_t) *GridLocation);
1551 CGNSDLL int cg_gridlocation_write(CGNS_ENUMT(GridLocation_t) GridLocation);
1552 
1553 /* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - *\
1554  *      Read and write Ordinal_t Nodes                                   *
1555 \* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
1556 
1557 CGNSDLL int cg_ordinal_read(int *Ordinal);
1558 CGNSDLL int cg_ordinal_write(int Ordinal);
1559 
1560 /* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - *\
1561  *      Read and write IndexArray/Range_t Nodes  - new in version 2.4    *
1562 \* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
1563 
1564 CGNSDLL int cg_ptset_info(CGNS_ENUMT(PointSetType_t) *ptset_type,
1565 	cgsize_t *npnts);
1566 CGNSDLL int cg_ptset_write(CGNS_ENUMT(PointSetType_t) ptset_type,
1567 	cgsize_t npnts, const cgsize_t *pnts);
1568 CGNSDLL int cg_ptset_read(cgsize_t *pnts);
1569 
1570 /* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - *\
1571  *      Link Handling Functions - new in version 2.1                     *
1572 \* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
1573 
1574 CGNSDLL int cg_is_link(int *path_length);
1575 CGNSDLL int cg_link_read(char **filename, char **link_path);
1576 CGNSDLL int cg_link_write(const char * nodename, const char * filename,
1577 	const char * name_in_file);
1578 
1579 /* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - *\
1580  *      General Delete Function						 *
1581 \* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
1582 
1583 CGNSDLL int cg_delete_node(const char *node_name);
1584 
1585 /* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - *\
1586  *      Free library malloced memory					 *
1587 \* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
1588 
1589 CGNSDLL int cg_free(void *data);
1590 
1591 /* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - *\
1592  *      Error Handling Functions                                         *
1593 \* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
1594 
1595 CGNSDLL const char *cg_get_error(void);
1596 CGNSDLL void cg_error_exit(void);
1597 CGNSDLL void cg_error_print(void);
1598 
1599 #ifdef __cplusplus
1600 }
1601 #endif
1602 #endif
1603