libsff

Home Modules Examples

/home/pinky2/mattijs/OpenFOAM/OpenFOAM-1.0/applications/utilities/mesh/conversion/ccm24ToFoam/libccmio/libccmio/ccmio.h

Go to the documentation of this file.
00001 #ifndef CCMIO_H
00002 #define CCMIO_H
00003 
00004 /*@@
00005  *  Program: Star File Format Library  - $RCSfile: ccmio.h,v $
00006  *  Author:  Geoff Prewett
00007  *  Date:    July 28, 2003
00008  *
00009  *
00010  *  Star File Format Library - Copyright (C) 2003 by adapco, Ltd.
00011  *
00012  *  This program is the property of adapco, Ltd. and contains
00013  *  confidential and proprietary information.  The unauthorized use,
00014  *  distribution, or duplication of this program is prohibited.
00015  *  All rights reserved.
00016  *
00017  *  $Id: ccmio.h,v 1.6 2004/08/06 23:15:00 prewett Exp $
00018  */
00019 
00020 #ifdef __cplusplus
00021 extern "C" {
00022 #endif
00023 
00024 #include "ccmiotypes.h"
00025 #include "ccmiobuffer.h"
00026 
00027 /* \{ \name Basic functions
00028       \ingroup intermediate */
00029 
00033 extern CCMIOError CCMIOOpenFile( CCMIOError *err, const char *file,
00034                                  CCMIOIOType mode, CCMIOID *root );
00035 
00038 extern CCMIOError CCMIOCloseFile( CCMIOError *err, CCMIOID root );
00039 
00041 extern CCMIOError CCMIOGetVersion( CCMIOError *err, CCMIONode root,
00042                                    int *version );
00043 
00045 extern CCMIOError CCMIOSetVersion( CCMIOError *err, CCMIONode root,
00046                                    int version );
00047 
00050 extern CCMIOError CCMIOGetTitle( CCMIOError *err, CCMIONode root, char **title );
00051 
00053 extern CCMIOError CCMIOSetTitle( CCMIOError *err, CCMIONode root,
00054                                  const char *title );
00055 
00056 /* \} */
00057 /* \{ \name Functions for Optional Nodes
00058       \ingroup intermediate */
00059 
00065 extern CCMIOError CCMIOWriteOpti( CCMIOError *err, CCMIOID parent,
00066                                   const char *name, int value );
00067 
00073 extern CCMIOError CCMIOWriteOptf( CCMIOError *err, CCMIOID parent,
00074                                   const char *name, float value );
00075 
00081 extern CCMIOError CCMIOWriteOptd( CCMIOError *err, CCMIOID parent,
00082                                   const char *name, double value );
00083 
00089 extern CCMIOError CCMIOWriteOptstr( CCMIOError *err, CCMIOID parent,
00090                                     const char *name, const char *value );
00091 
00097 extern CCMIOError CCMIOReadOpti( CCMIOError *err, CCMIOID parent,
00098                                  const char *name, int *value );
00099 
00105 extern CCMIOError CCMIOReadOptf( CCMIOError *err, CCMIOID parent,
00106                                  const char *name, float *value );
00107 
00113 extern CCMIOError CCMIOReadOptd( CCMIOError *err, CCMIOID parent,
00114                                  const char *name, double *value );
00115 
00121 extern CCMIOError CCMIOReadOptstr( CCMIOError *err, CCMIOID parent,
00122                                    const char *name, int *size, char *value );
00123 
00127 extern CCMIOError CCMIOReadOpt1i( CCMIOError *err, CCMIOID parent,
00128                                   const char *name, int *data,
00129                                   unsigned int start, unsigned int end );
00138 extern CCMIOError CCMIOReadOpt1f( CCMIOError *err, CCMIOID parent,
00139                                   const char *name, float *data,
00140                                   unsigned int start, unsigned int end );
00144 extern CCMIOError CCMIOReadOpt1d( CCMIOError *err, CCMIOID parent,
00145                                   const char *name, double *data,
00146                                   unsigned int start, unsigned int end );
00150 extern CCMIOError CCMIOReadOpt2i( CCMIOError *err, CCMIOID parent,
00151                                   const char *name, int *data,
00152                                   unsigned int start, unsigned int end );
00172 extern CCMIOError CCMIOReadOpt2f( CCMIOError *err, CCMIOID parent,
00173                                   const char *name, float *data,
00174                                   unsigned int start, unsigned int end );
00178 extern CCMIOError CCMIOReadOpt2d( CCMIOError *err, CCMIOID parent,
00179                                   const char *name, double *data,
00180                                   unsigned int start, unsigned int end );
00184 extern CCMIOError CCMIOReadOpt3i( CCMIOError *err, CCMIOID parent,
00185                                   const char *name, int *data,
00186                                   unsigned int start, unsigned int end );
00206 extern CCMIOError CCMIOReadOpt3f( CCMIOError *err, CCMIOID parent,
00207                                   const char *name, float *data,
00208                                   unsigned int start, unsigned int end );
00212 extern CCMIOError CCMIOReadOpt3d( CCMIOError *err, CCMIOID parent,
00213                                   const char *name, double *data,
00214                                   unsigned int start, unsigned int end );
00215 
00218 extern CCMIOError CCMIOWriteOpt1i( CCMIOError *err, CCMIOID parent,
00219                                    const char *name, int n, const int *data,
00220                                    unsigned int start, unsigned int end );
00228 extern CCMIOError CCMIOWriteOpt1f( CCMIOError *err, CCMIOID parent,
00229                                    const char *name, int n, const float *data,
00230                                    unsigned int start, unsigned int end );
00233 extern CCMIOError CCMIOWriteOpt1d( CCMIOError *err, CCMIOID parent,
00234                                    const char *name, int n, const double *data,
00235                                    unsigned int start, unsigned int end );
00238 extern CCMIOError CCMIOWriteOpt2i( CCMIOError *err, CCMIOID parent,
00239                                    const char *name, int x, int y,
00240                                    const int *data,
00241                                    unsigned int start, unsigned int end );
00264 extern CCMIOError CCMIOWriteOpt2f( CCMIOError *err, CCMIOID parent,
00265                                    const char *name, int x, int y,
00266                                    const float *data,
00267                                    unsigned int start, unsigned int end );
00270 extern CCMIOError CCMIOWriteOpt2d( CCMIOError *err, CCMIOID parent,
00271                                    const char *name, int x, int y,
00272                                    const double *data,
00273                                    unsigned int start, unsigned int end );
00276 extern CCMIOError CCMIOWriteOpt3i( CCMIOError *err, CCMIOID parent,
00277                                    const char *name, int x, int y, int z,
00278                                    const int *data,
00279                                    unsigned int start, unsigned int end );
00303 extern CCMIOError CCMIOWriteOpt3f( CCMIOError *err, CCMIOID parent,
00304                                    const char *name, int x, int y, int z,
00305                                    const float *data, unsigned int start,
00306                                    unsigned int end );
00309 extern CCMIOError CCMIOWriteOpt3d( CCMIOError *err, CCMIOID parent,
00310                                    const char *name, int x, int y, int z,
00311                                    const double *data, unsigned int start,
00312                                    unsigned int end );
00313 
00325 extern CCMIOError CCMIOGetOptInfo( CCMIOError *err, CCMIOID parent,
00326                                    const char *name, CCMIODataType *type,
00327                                    unsigned int *x, unsigned int *y,
00328                                    unsigned int *z );
00329 
00330 /* \} */
00331 /* \{ \name Intermediate API
00332       \ingroup intermediate */
00333 
00335 extern int CCMIOIsValidEntity( CCMIOID entity );
00336 
00339 extern int CCMIOIsFromSameFile( CCMIOID entity1, CCMIOID entity2 );
00340 
00349 extern CCMIOError CCMIONewEntity( CCMIOError *err, CCMIOID parent,
00350                                   CCMIOEntity type, const char *description,
00351                                   CCMIOID *id );
00352 
00364 extern CCMIOError CCMIOGetEntity( CCMIOError *err, CCMIOID parent,
00365                                   CCMIOEntity type, int idVal, CCMIOID *id );
00366 
00380 extern CCMIOError CCMIONewIndexedEntity( CCMIOError *err, CCMIOID parent,
00381                                      CCMIOEntity which, int idVal,
00382                                      const char *description, CCMIOID *id );
00383 
00386 extern CCMIOError CCMIOGetEntityIndex( CCMIOError *err, CCMIOID id , int *n );
00387 
00399 extern CCMIOError CCMIONewState( CCMIOError *err, CCMIOID root,
00400                                  const char *name, CCMIOID *problemDescription,
00401                                  const char *description, CCMIOID *state );
00402 
00414 extern CCMIOError CCMIOGetState( CCMIOError *err, CCMIOID root,
00415                                  const char *name, CCMIOID *problemDescription,
00416                                  CCMIOID *state );
00417 
00424 extern CCMIOError CCMIOWriteState( CCMIOError *err, CCMIOID state,
00425                                    CCMIOID problemDescription,
00426                                    const char *description );
00427 
00440 extern CCMIOError CCMIONewField( CCMIOError *err, CCMIOID phase,
00441                                  const char *name, const char *shortName,
00442                                  CCMIODimensionality dim, CCMIOID *field );
00443 
00452 extern CCMIOError CCMIOGetField( CCMIOError *err, CCMIOID phase,
00453                                  const char *name, CCMIODimensionality *dim,
00454                                  CCMIOID *field );
00455 
00470 extern CCMIOError CCMIOReadField( CCMIOError *err, CCMIOID field, char *name,
00471                                   char *shortName, CCMIODimensionality *dim,
00472                                   CCMIODataType *datatype );
00473 
00479 extern CCMIOError CCMIODeleteEntity( CCMIOError *err, CCMIOID id );
00480 
00491 extern CCMIOError CCMIONextEntity( CCMIOError *err, CCMIOID parent,
00492                                    CCMIOEntity type, int *i, CCMIOID *next );
00493 
00497 extern CCMIOError CCMIOEntitySize( CCMIOError *err, CCMIOID id, unsigned int *n,
00498                                    unsigned int *max );
00499 
00504 extern CCMIOError CCMIOEntityName( CCMIOError *err, CCMIOID id, char *name );
00505 
00513 extern CCMIOError CCMIOEntityLabel( CCMIOError *err, CCMIOID id,
00514                                     unsigned int *size, char *label );
00515 
00522 extern CCMIOError CCMIOEntityDescription( CCMIOError *err, CCMIOID id,
00523                                           unsigned int *size, char *desc );
00524 
00526 extern CCMIOError CCMIOGetEntityNode( CCMIOError *err, CCMIOID id,
00527                                       CCMIONode *node );
00528 
00531 extern CCMIOError CCMIOEntityDataType( CCMIOError *err, CCMIOID id,
00532                                        CCMIODataType *type );
00533 
00539 extern CCMIOError CCMIOWriteMap( CCMIOError *err, CCMIOID id, unsigned int n,
00540                                  unsigned int max, int *data,
00541                                  unsigned int start, unsigned int end );
00546 extern CCMIOError CCMIOReadMap( CCMIOError *err, CCMIOID id, int *data,
00547                                 unsigned int start, unsigned int end );
00548 
00565 extern CCMIOError CCMIOReadVerticesf( CCMIOError *err, CCMIOID id,
00566                                       int *dims, float *scale, CCMIOID *mapID,
00567                                       float  *vertices, unsigned int start,
00568                                       unsigned int end );
00585 extern CCMIOError CCMIOReadVerticesd( CCMIOError *err, CCMIOID id,
00586                                       int *dims, float *scale, CCMIOID *mapID,
00587                                       double *vertices, unsigned int start,
00588                                       unsigned int end );
00602 extern CCMIOError CCMIOWriteVerticesf( CCMIOError *err, CCMIOID id,
00603                                        int dims, float scale, CCMIOID mapID,
00604                                        const float *vertices,
00605                                        unsigned int start, unsigned int end );
00619 extern CCMIOError CCMIOWriteVerticesd( CCMIOError *err, CCMIOID id,
00620                                        int dims, float scale, CCMIOID mapID,
00621                                        const double *vertices,
00622                                        unsigned int start, unsigned int end );
00623 
00634 extern CCMIOError CCMIOReadCells( CCMIOError *err, CCMIOID id, CCMIOID *mapID,
00635                                   int *cellTypes, unsigned int start,
00636                                   unsigned int end );
00637 
00646 extern CCMIOError CCMIOWriteCells( CCMIOError *err, CCMIOID id, CCMIOID mapID,
00647                                    int *cellTypes, unsigned int start,
00648                                   unsigned int end );
00649 
00669 extern CCMIOError CCMIOReadFaces( CCMIOError *err, CCMIOID entity,
00670                                   CCMIOEntity which, CCMIOID *mapID,
00671                                   unsigned int *streamSize, int *vertexStream,
00672                                   unsigned int start, unsigned int end );
00673 
00676 extern CCMIOError CCMIOWriteFaces( CCMIOError *err, CCMIOID entity,
00677                                    CCMIOEntity which, CCMIOID mapID,
00678                                    unsigned int streamSize, int *vertexStream,
00679                                    unsigned int start, unsigned int end );
00680 
00695 CCMIOError CCMIOReadFaceCells( CCMIOError *err, CCMIOID entity,
00696                                CCMIOEntity which, int *cells,
00697                                unsigned int start, unsigned int end );
00698 
00701 CCMIOError CCMIOWriteFaceCells( CCMIOError *err, CCMIOID entity,
00702                                 CCMIOEntity which, CCMIOID mapID,
00703                                 int *cells, unsigned int start,
00704                                 unsigned int end );
00725 extern CCMIOError CCMIOWriteProcessor( CCMIOError *err, CCMIOID processor,
00726                                    const char *verticesFile, CCMIOID *vertices,
00727                                    const char *topologyFile, CCMIOID *topology,
00728                                    const char *initialFieldFile, CCMIOID *initialField,
00729                                    const char *solutionFile, CCMIOID *solution);
00730 
00736 extern CCMIOError CCMIOReadProcessor( CCMIOError *err, CCMIOID processor,
00737                                       CCMIOID *vertices, CCMIOID *topology,
00738                                       CCMIOID *initialField, CCMIOID *solution);
00739 
00754 extern CCMIOError CCMIOClearProcessor( CCMIOError *err, CCMIOID state,
00755                                        CCMIOID processor,
00756                                        int clearVertices, int clearTopology,
00757                                        int clearInitialField, int clearSolution,
00758                                        int clearLagrangian );
00759 
00772 extern CCMIOError CCMIOWriteLagrangianData( CCMIOError *err, CCMIOID lagrangian,
00773                                             const char *positionsFile,
00774                                             CCMIOID *positions,
00775                                             const char *solutionFile,
00776                                             CCMIOID *solution );
00777 
00783 extern CCMIOError CCMIOReadLagrangianData( CCMIOError *err, CCMIOID lagrangian,
00784                                            CCMIOID *positions,
00785                                            CCMIOID *solution );
00786 
00797 extern CCMIOError CCMIOWriteMultiDimensionalFieldData( CCMIOError *err,
00798                                                        CCMIOID fieldID,
00799                                                        CCMIOComponent component,
00800                                                        CCMIOID componentField );
00801 
00812 extern CCMIOError CCMIOReadMultiDimensionalFieldData( CCMIOError *err,
00813                                                       CCMIOID fieldID,
00814                                                       CCMIOComponent component,
00815                                                       CCMIOID *componentField );
00816 
00831 extern CCMIOError CCMIOWriteFieldDataf( CCMIOError *err, CCMIOID fieldData,
00832                                         CCMIOID mapID, CCMIODataLocation loc,
00833                                         float *data, unsigned int start,
00834                                         unsigned int end  );
00837 extern CCMIOError CCMIOWriteFieldDatad( CCMIOError *err, CCMIOID fieldData,
00838                                         CCMIOID mapID, CCMIODataLocation loc,
00839                                         double *data, unsigned int start,
00840                                         unsigned int end  );
00841 
00844 extern CCMIOError CCMIOWriteFieldDatai( CCMIOError *err, CCMIOID fieldData,
00845                                         CCMIOID mapID, CCMIODataLocation loc,
00846                                         int *data, unsigned int start,
00847                                         unsigned int end  );
00848 
00856 extern CCMIOError CCMIOWriteConstantFieldDataf( CCMIOError *err,
00857                                                 CCMIOID fieldData,
00858                                                 CCMIOID mapID,
00859                                                 CCMIODataLocation loc,
00860                                                 float value );
00861 
00864 extern CCMIOError CCMIOWriteConstantFieldDatad( CCMIOError *err,
00865                                                 CCMIOID fieldData,
00866                                                 CCMIOID mapID,
00867                                                 CCMIODataLocation loc,
00868                                                 double value );
00869 
00872 extern CCMIOError CCMIOWriteConstantFieldDatai( CCMIOError *err,
00873                                                 CCMIOID fieldData,
00874                                                 CCMIOID mapID,
00875                                                 CCMIODataLocation loc,
00876                                                 int value );
00877 
00905 extern CCMIOError CCMIOReadFieldDataf( CCMIOError *err, CCMIOID fieldData,
00906                                        CCMIOID *mapID, CCMIODataLocation *loc,
00907                                        float *data, unsigned int start,
00908                                        unsigned int end  );
00909 
00913 extern CCMIOError CCMIOReadFieldDatad( CCMIOError *err, CCMIOID fieldData,
00914                                        CCMIOID *mapID, CCMIODataLocation *loc,
00915                                        double *data, unsigned int start,
00916                                        unsigned int end  );
00917 
00921 extern CCMIOError CCMIOReadFieldDatai( CCMIOError *err, CCMIOID fieldData,
00922                                        CCMIOID *mapID, CCMIODataLocation *loc,
00923                                        int *data, unsigned int start,
00924                                        unsigned int end  );
00925 
00938 extern CCMIOError CCMIOWriteRestartInfo( CCMIOError *err, CCMIOID restartInfo,
00939                                          const char *solverName, int iteration,
00940                                          float time, const char *timeUnits,
00941                                          float startAngle );
00942 
00945 extern CCMIOError CCMIOReadRestartInfo( CCMIOError *err, CCMIOID restartInfo,
00946                                         char *solverName, int *iteration,
00947                                         float *time, char *timeUnits,
00948                                         float *startAngle );
00949 
00950 /* \} */
00951 
00952 #ifdef __cplusplus
00953     }
00954 #endif
00955 #endif // CCMIO_H

Generated on Mon Dec 13 16:20:26 2004 for libccmio by doxygen 1.3.6