iMOAB
iMOAB.h
Go to the documentation of this file.
00001 #ifndef IMOAB_H
00002 #define IMOAB_H
00003 
00019 /*
00020 Comments from Mike and Emily:
00021 
00022 1) Fortran MPI_Comm won't work. Take an integer argument and use MPI_F2C calls to get the C-Comm object
00023 2) ReadHeaderInfo - Does it need the pid ? 
00024 3) Reuse the comm object form the registration for both load and write ops. Do not take comm objects again to avoid confusion.
00025 4) Decipher the global comm object and the subset partioning for each application based on the comm object
00026 5) GetMeshInfo - return separately the owned and ghosted vertices/elements -- not together in visible_** but rather owned_** and ghosted_**. Make these arrays of size 2.
00027 6) Should we sort the vertices after we do ghosting ? So that the locally owned is first and then the ghosted is appended.
00028 7) RCM only for hte owned part of the mesh -- do not screw with the ghosted layers
00029 8) GetBlockID - identical to GetVertexID -- return the global numberign for block
00030 9) GetVertexID -- remember that the order of vertices returned have an implicit numbering embedded in it. DO NOT CHANGE THIS ORDERING...
00031 10) GetBlockInfo takes global Block ID; Remove blockname unless there is a separate use case for it..
00032 11) GetElementConnectivity - clarify whether we return global or local vertex numbering. Preferably local numbering else lot of deciphering for global.
00033 */
00034 
00035 #define iMOAB_AppID    int*
00036 #define iMOAB_String   char*
00037 #define iMOAB_GlobalID int
00038 #define iMOAB_LocalID  int
00039 #define ErrCode        int
00040 
00041 #include "imoab_protos.h"
00042 /*
00043  * tag types can be: dense/sparse, int/ double/entityhandle , they could be on both elements and vertices
00044  */
00045 enum MOAB_TAG_TYPE { DENSE_INTEGER = 0,
00046                      DENSE_DOUBLE ,
00047                      DENSE_ENTITYHANDLE,
00048                      SPARSE_INTEGER ,
00049                      SPARSE_DOUBLE ,
00050                      SPARSE_ENTITYHANDLE
00051 };
00052 
00053 #ifdef __cplusplus
00054 extern "C" {
00055 #endif
00056 
00067 ErrCode iMOAB_Initialize( int argc, iMOAB_String* argv );
00068 
00076 ErrCode iMOAB_InitializeFortran( );
00077 
00085 ErrCode iMOAB_Finalize();
00086 
00100 ErrCode iMOAB_RegisterApplication( iMOAB_String app_name, MPI_Comm* comm, iMOAB_AppID pid );
00101 
00116 ErrCode iMOAB_RegisterFortranApplication( iMOAB_String app_name, int* comm, iMOAB_AppID pid, int app_name_length );
00117 
00128 ErrCode iMOAB_DeregisterApplication( iMOAB_AppID pid );
00129 
00145 ErrCode iMOAB_ReadHeaderInfo ( iMOAB_String filename, int* num_global_vertices, int* num_global_elements, int* num_dimension, int* num_parts, int filename_length );
00146 
00170 ErrCode iMOAB_LoadMesh( iMOAB_AppID pid, iMOAB_String filename, iMOAB_String read_options, int * num_ghost_layers, int filename_length, int read_options_length );
00171 
00188 ErrCode iMOAB_WriteMesh( iMOAB_AppID pid, iMOAB_String filename, iMOAB_String write_options, int filename_length, int write_options_length );
00189 
00206 ErrCode iMOAB_GetMeshInfo( iMOAB_AppID pid, int* num_visible_vertices, int* num_visible_elements, int *num_visible_blocks, int* num_visible_surfaceBC, int* num_visible_vertexBC );
00207 
00220 ErrCode iMOAB_GetVertexID( iMOAB_AppID pid, int * vertices_length, iMOAB_GlobalID* global_vertex_ID );
00221 
00238 ErrCode iMOAB_GetVertexOwnership( iMOAB_AppID pid, int * vertices_length, int* visible_global_rank_ID );
00239 
00254 ErrCode iMOAB_GetVisibleVerticesCoordinates( iMOAB_AppID pid, int * coords_length, double* coordinates );
00255 
00270 ErrCode iMOAB_GetBlockID( iMOAB_AppID pid, int * block_length, iMOAB_GlobalID* global_block_IDs);
00271 
00284 ErrCode iMOAB_GetBlockInfo(iMOAB_AppID pid, iMOAB_GlobalID * global_block_ID, int* vertices_per_element, int* num_elements_in_block);
00285 
00300 ErrCode iMOAB_GetVisibleElementsInfo(iMOAB_AppID pid, int* num_visible_elements,
00301     iMOAB_GlobalID * element_global_IDs, int * ranks, iMOAB_GlobalID * block_IDs);
00302 
00303 
00318 ErrCode iMOAB_GetBlockElementConnectivities(iMOAB_AppID pid, iMOAB_GlobalID * global_block_ID, int * connectivity_length, int* element_connectivity);
00319 
00320 
00334 ErrCode iMOAB_GetElementConnectivity(iMOAB_AppID pid, iMOAB_LocalID * elem_index, int * connectivity_length, int * element_connectivity);
00335 
00336 
00349 ErrCode iMOAB_GetElementOwnership(iMOAB_AppID pid, iMOAB_GlobalID * global_block_ID, int * num_elements_in_block, int* element_ownership);
00350 
00364 ErrCode iMOAB_GetElementID(iMOAB_AppID pid, iMOAB_GlobalID * global_block_ID, int * num_elements_in_block, iMOAB_GlobalID* global_element_ID, iMOAB_LocalID* local_element_ID);
00365 
00377 ErrCode iMOAB_GetPointerToSurfaceBC(iMOAB_AppID pid, int * surface_BC_length, iMOAB_LocalID* local_element_ID, int* reference_surface_ID, int* boundary_condition_value);
00378 
00389 ErrCode iMOAB_GetPointerToVertexBC(iMOAB_AppID pid, int * vertex_BC_length, iMOAB_LocalID* local_vertex_ID, int* boundary_condition_value);
00390 
00409 ErrCode iMOAB_DefineTagStorage(iMOAB_AppID pid, iMOAB_String tag_storage_name, int* tag_type, int* components_per_entity, int * tag_index, int tag_storage_name_length);
00410 
00427 ErrCode iMOAB_SetIntTagStorage(iMOAB_AppID pid, iMOAB_String tag_storage_name, int * num_tag_storage_length, int * entity_type, int* tag_storage_data, int tag_storage_name_length);
00428 
00441 ErrCode iMOAB_GetIntTagStorage(iMOAB_AppID pid, iMOAB_String tag_storage_name, int *num_tag_storage_length, int * entity_type, int* tag_storage_data, int tag_storage_name_length);
00442 
00455 ErrCode iMOAB_SetDoubleTagStorage(iMOAB_AppID pid, iMOAB_String tag_storage_name, int * num_tag_storage_length, int * entity_type, double* tag_storage_data, int tag_storage_name_length);
00456 
00469 ErrCode iMOAB_GetDoubleTagStorage(iMOAB_AppID pid, iMOAB_String tag_storage_name, int * num_tag_storage_length, int * entity_type, double* tag_storage_data, int tag_storage_name_length);
00470 
00482 ErrCode iMOAB_SynchronizeTags(iMOAB_AppID pid, int * num_tag, int * tag_indices, int * ent_type);
00483 
00494 ErrCode iMOAB_GetNeighborElements(iMOAB_AppID pid, iMOAB_LocalID * local_index, int* num_adjacent_elements, iMOAB_LocalID* adjacent_element_IDs);
00495 
00506 ErrCode iMOAB_GetNeighborVertices(iMOAB_AppID pid, iMOAB_LocalID* local_vertex_ID, int* num_adjacent_vertices, iMOAB_LocalID* adjacent_vertex_IDs);
00507 
00508 #ifdef __cplusplus
00509 }
00510 #endif
00511 
00512 #endif
 All Files Functions Enumerations Enumerator Defines