F5AMR.h

00001 #ifndef __F5AMR_H
00002 #define __F5AMR_H
00003 
00004 #include <F5/F5types.h>
00005 
00006 #include "F5WinDLLApi.h"
00007 
00008 #ifdef  __cplusplus
00009 extern "C"
00010 {
00011 #endif
00012 
00016 typedef struct
00017 {
00018         int spatialRef[3];
00019         int timeRef;
00020 }
00021         LevelInfo;
00022 
00023 typedef struct
00024 {
00025         hid_t fileID;
00026         const char*description;
00027         LevelInfo*li;
00028         int     nLevels;
00029 }
00030         AMRInfo;
00031 
00049 F5_API AMRInfo*F5AMRopen(hid_t fileID,
00050                          const int rank,
00051                          double rootOrigin[3],
00052                          double rootDelta[3],
00053                          const char*description);
00054 
00058 F5_API void     F5AMRclose(AMRInfo*);
00059 
00060 enum
00061 {
00062        F5AMR_VERTEX_CENTERED  = 0,
00063        F5AMR_CELL_CENTERED    = 0xFFFFFFFFU,
00064        F5AMR_X_CENTERED       = 0x00000001,
00065        F5AMR_Y_CENTERED       = 0x00000002,
00066        F5AMR_Z_CENTERED       = 0x00000004,
00067        F5AMR_XY_CENTERED      = F5AMR_X_CENTERED |  F5AMR_Y_CENTERED
00068 };
00069 
00089 F5_API herr_t F5AMRwrite_block( AMRInfo*AI,
00090                                 const int    timestep,
00091                                 const double physTime,
00092                                 const char*  fieldname,
00093                                 const int    level,
00094                                 int          dimension,
00095                                 const int    *location,
00096                                 const int    *size,
00097                                 hid_t fieldtype,
00098                                 const void* dataPtr,
00099                                 int   Centering,
00100                                 const char*blockname,
00101                                 const char*coordinate_system,
00102                                 hid_t property_id);
00103 
00104 
00127 F5_API herr_t F5AMRwrite_block_v( AMRInfo*AI,
00128                                   const int    timestep,
00129                                   const double physTime,
00130                                   const char*  fieldname,
00131                                   const int    level,
00132                                   int        dimension,
00133                                   const int    *location,
00134                                   const int    *size,
00135                                   hid_t fieldtype,
00136                                   const void**dataPtr,
00137                                   int   Centering,
00138                                   const char*blockname,
00139                                   const char*coordinate_system,
00140                                   hid_t property_id);
00141         
00142 #ifdef  __cplusplus
00143 }    /* extern "C" */
00144 #endif
00145 
00146 #endif  /* __F5AMR_H */
00147