MOAB: Mesh Oriented datABase  (version 5.4.1)
iMOABF.F90
Go to the documentation of this file.
00001 ! iMOAB Interface for Fortran 90/2003/2008 compatible compilers
00002 
00003 #include "moab/MOABConfig.h"
00004 
00005 module iMOAB
00006 
00007    use iso_c_binding
00008    implicit none
00009 
00010 ! Interface to all the API routines
00011    interface
00012 
00013       integer(c_int) function iMOAB_Initialize() bind(C, name='iMOAB_InitializeFortran')
00014          ! Directly forward the call
00015          use, intrinsic :: iso_c_binding, only: c_int
00016       end function iMOAB_Initialize
00017 
00018       integer(c_int) function iMOAB_Finalize() bind(C, name='iMOAB_Finalize')
00019          ! Directly forward the call
00020          use, intrinsic :: iso_c_binding, only: c_int
00021       end function iMOAB_Finalize
00022 
00023 #ifdef MOAB_HAVE_MPI
00024       integer(c_int) function iMOAB_RegisterApplication(app_name, fcomm, compid, pid) &
00025                               bind(C, name='iMOAB_RegisterApplicationFortran')
00026 #else
00027       integer(c_int) function iMOAB_RegisterApplication(app_name, compid, pid) &
00028                               bind(C, name='iMOAB_RegisterApplicationFortran')
00029 #endif
00030         ! Interface blocks don't know about their context,
00031         ! so we need to use iso_c_binding inside all interface functions again
00032         use, intrinsic :: iso_c_binding, only: c_int, c_char, c_ptr
00033         character(kind=c_char), intent(in) :: app_name(*)
00034 #ifdef MOAB_HAVE_MPI
00035         integer, intent(in) :: fcomm
00036 #endif
00037         integer(c_int), intent(in) :: compid
00038         integer(c_int), intent(out) :: pid
00039       end function iMOAB_RegisterApplication
00040 
00041       integer(c_int) function iMOAB_DeregisterApplication(pid) bind(C, name='iMOAB_DeregisterApplicationFortran')
00042         use, intrinsic :: iso_c_binding, only: c_int
00043         integer(c_int), intent(in) :: pid
00044       end function iMOAB_DeregisterApplication
00045 
00046       integer(c_int) function iMOAB_ReadHeaderInfo(filename, num_global_vertices, num_global_elements, &
00047                                                    num_dimension, num_parts) bind(C, name='iMOAB_ReadHeaderInfo')
00048         use, intrinsic :: iso_c_binding, only: c_int, c_char
00049         character(kind=c_char), intent(in) :: filename(*)
00050         integer(c_int), intent(out) :: num_global_vertices
00051         integer(c_int), intent(out) :: num_global_elements
00052         integer(c_int), intent(out) :: num_dimension
00053         integer(c_int), intent(out) :: num_parts
00054       end function iMOAB_ReadHeaderInfo
00055 
00056       integer(c_int) function iMOAB_LoadMesh(pid, filename, read_options, num_ghost_layers) bind(C, name='iMOAB_LoadMesh')
00057         use, intrinsic :: iso_c_binding, only: c_int, c_char
00058         integer(c_int), intent(in) :: pid
00059         character(kind=c_char), intent(in) :: filename(*)
00060         character(kind=c_char), intent(in) :: read_options(*)
00061         integer(c_int), intent(in) :: num_ghost_layers
00062       end function iMOAB_LoadMesh
00063 
00064       integer(c_int) function iMOAB_CreateVertices(pid, coords_len, dim, coordinates) bind(C, name='iMOAB_CreateVertices')
00065         use, intrinsic :: iso_c_binding, only: c_int, c_double
00066         integer(c_int), intent(in) :: pid
00067         integer(c_int), intent(in) :: coords_len
00068         integer(c_int), intent(in) :: dim
00069         real(c_double), intent(in) :: coordinates(*)
00070       end function iMOAB_CreateVertices
00071 
00072       integer(c_int) function iMOAB_CreateElements(pid, num_elem, type, num_nodes_per_element, &
00073                                                    connectivity, block_ID) bind(C, name='iMOAB_CreateElements')
00074         use, intrinsic :: iso_c_binding, only: c_int
00075         integer(c_int), intent(in) :: pid
00076         integer(c_int), intent(in) :: num_elem
00077         integer(c_int), intent(in) :: type
00078         integer(c_int), intent(in) :: num_nodes_per_element
00079         integer(c_int), intent(in) :: connectivity(*)
00080         integer(c_int), intent(in) :: block_ID
00081       end function iMOAB_CreateElements
00082 
00083       integer(c_int) function iMOAB_ResolveSharedEntities(pid, num_verts, marker) bind(C, name='iMOAB_ResolveSharedEntities')
00084         use, intrinsic :: iso_c_binding, only: c_int
00085         integer(c_int), intent(in) :: pid
00086         integer(c_int), intent(in) :: num_verts
00087         integer(c_int), intent(in) :: marker(*)
00088       end function iMOAB_ResolveSharedEntities
00089 
00090       integer(c_int) function iMOAB_DetermineGhostEntities(pid, ghost_dim, num_ghost_layers, bridge_dim) &
00091                               bind(C, name='iMOAB_DetermineGhostEntities')
00092         use, intrinsic :: iso_c_binding, only: c_int
00093         integer(c_int), intent(in) :: pid
00094         integer(c_int), intent(in) :: ghost_dim
00095         integer(c_int), intent(in) :: num_ghost_layers
00096         integer(c_int), intent(in) :: bridge_dim
00097       end function iMOAB_DetermineGhostEntities
00098 
00099       integer(c_int) function iMOAB_WriteMesh(pid, filename, write_options) bind(C, name='iMOAB_WriteMesh')
00100         use, intrinsic :: iso_c_binding, only: c_int, c_char
00101         integer(c_int), intent(in) :: pid
00102         character(kind=c_char), intent(in) :: filename(*)
00103         character(kind=c_char), intent(in) :: write_options(*)
00104       end function iMOAB_WriteMesh
00105 
00106       integer(c_int) function iMOAB_UpdateMeshInfo(pid) bind(C, name='iMOAB_UpdateMeshInfo')
00107         use, intrinsic :: iso_c_binding, only: c_int
00108         integer(c_int), intent(in) :: pid
00109       end function iMOAB_UpdateMeshInfo
00110 
00111       integer(c_int) function iMOAB_GetMeshInfo(pid, num_visible_vertices, num_visible_elements, &
00112                                                 num_visible_blocks, num_visible_surfaceBC, &
00113                                                 num_visible_vertexBC) bind(C, name='iMOAB_GetMeshInfo')
00114         use, intrinsic :: iso_c_binding, only: c_int
00115         integer(c_int), intent(in) :: pid
00116         integer(c_int), intent(out) :: num_visible_vertices(3)
00117         integer(c_int), intent(out) :: num_visible_elements(3)
00118         integer(c_int), intent(out) :: num_visible_blocks(3)
00119         integer(c_int), intent(out) :: num_visible_surfaceBC(3)
00120         integer(c_int), intent(out) :: num_visible_vertexBC(3)
00121       end function iMOAB_GetMeshInfo
00122 
00123       integer(c_int) function iMOAB_GetVertexID(pid, vertices_length, global_vertex_ID) bind(C, name='iMOAB_GetVertexID')
00124         use, intrinsic :: iso_c_binding, only: c_int
00125         integer(c_int), intent(in) :: pid
00126         integer(c_int), intent(in) :: vertices_length
00127         integer(c_int), intent(out) :: global_vertex_ID(*)
00128       end function iMOAB_GetVertexID
00129 
00130       integer(c_int) function iMOAB_GetVertexOwnership(pid, vertices_length, visible_global_rank_ID) &
00131                               bind(C, name='iMOAB_GetVertexOwnership')
00132         use, intrinsic :: iso_c_binding, only: c_int
00133         integer(c_int), intent(in) :: pid
00134         integer(c_int), intent(in) :: vertices_length
00135         integer(c_int), intent(out) :: visible_global_rank_ID(*)
00136       end function iMOAB_GetVertexOwnership
00137 
00138       integer(c_int) function iMOAB_GetVisibleVerticesCoordinates(pid, coords_length, coordinates) &
00139                               bind(C, name='iMOAB_GetVisibleVerticesCoordinates')
00140         use, intrinsic :: iso_c_binding, only: c_int, c_double
00141         integer(c_int), intent(in) :: pid
00142         integer(c_int), intent(in) :: coords_length
00143         real(c_double), intent(out) :: coordinates(*)
00144       end function iMOAB_GetVisibleVerticesCoordinates
00145 
00146       integer(c_int) function iMOAB_GetBlockID(pid, block_length, global_block_IDs) bind(C, name='iMOAB_GetBlockID')
00147         use, intrinsic :: iso_c_binding, only: c_int
00148         integer(c_int), intent(in) :: pid
00149         integer(c_int), intent(in) :: block_length
00150         integer(c_int), intent(out) :: global_block_IDs(*)
00151       end function iMOAB_GetBlockID
00152 
00153       integer(c_int) function iMOAB_GetBlockInfo(pid, global_block_ID, vertices_per_element, &
00154                                                 num_elements_in_block) bind(C, name='iMOAB_GetBlockInfo')
00155         use, intrinsic :: iso_c_binding, only: c_int
00156         integer(c_int), intent(in) :: pid
00157         integer(c_int), intent(in) :: global_block_ID
00158         integer(c_int), intent(out) :: vertices_per_element
00159         integer(c_int), intent(out) :: num_elements_in_block
00160       end function iMOAB_GetBlockInfo
00161 
00162       integer(c_int) function iMOAB_GetVisibleElementsInfo(pid, num_visible_elements, element_global_IDs, &
00163                                                           ranks, block_IDs) bind(C, name='iMOAB_GetVisibleElementsInfo')
00164         use, intrinsic :: iso_c_binding, only: c_int
00165         integer(c_int), intent(in) :: pid
00166         integer(c_int), intent(out) :: num_visible_elements
00167         integer(c_int), intent(out) :: element_global_IDs(*)
00168         integer(c_int), intent(out) :: ranks(*)
00169         integer(c_int), intent(out) :: block_IDs(*)
00170       end function iMOAB_GetVisibleElementsInfo
00171 
00172       integer(c_int) function iMOAB_GetBlockElementConnectivities(pid, global_block_ID, connectivity_length, &
00173                                                                   element_connectivity) &
00174                                                                   bind(C, name='iMOAB_GetBlockElementConnectivities')
00175         use, intrinsic :: iso_c_binding, only: c_int
00176         integer(c_int), intent(in) :: pid
00177         integer(c_int), intent(in) :: global_block_ID
00178         integer(c_int), intent(in) :: connectivity_length
00179         integer(c_int), intent(out) :: element_connectivity(*)
00180       end function iMOAB_GetBlockElementConnectivities
00181 
00182       integer(c_int) function iMOAB_GetElementConnectivity(pid, elem_index, connectivity_length, &
00183                                                           element_connectivity) bind(C, name='iMOAB_GetElementConnectivity')
00184         use, intrinsic :: iso_c_binding, only: c_int
00185         integer(c_int), intent(in) :: pid
00186         integer(c_int), intent(in) :: elem_index
00187         integer(c_int), intent(in) :: connectivity_length
00188         integer(c_int), intent(out) :: element_connectivity(*)
00189       end function iMOAB_GetElementConnectivity
00190 
00191       integer(c_int) function iMOAB_GetElementOwnership(pid, global_block_ID, num_elements_in_block, &
00192                                                         element_ownership) bind(C, name='iMOAB_GetElementOwnership')
00193         use, intrinsic :: iso_c_binding, only: c_int
00194         integer(c_int), intent(in) :: pid
00195         integer(c_int), intent(in) :: global_block_ID
00196         integer(c_int), intent(out) :: num_elements_in_block
00197         integer(c_int), intent(out) :: element_ownership(*)
00198       end function iMOAB_GetElementOwnership
00199 
00200       integer(c_int) function iMOAB_GetElementID(pid, global_block_ID, num_elements_in_block, &
00201                                                 global_element_ID, local_element_ID) bind(C, name='iMOAB_GetElementID')
00202         use, intrinsic :: iso_c_binding, only: c_int
00203         integer(c_int), intent(in) :: pid
00204         integer(c_int), intent(in) :: global_block_ID
00205         integer(c_int), intent(in) :: num_elements_in_block
00206         integer(c_int), intent(in) :: global_element_ID
00207         integer(c_int), intent(out) :: local_element_ID
00208       end function iMOAB_GetElementID
00209 
00210       integer(c_int) function iMOAB_GetPointerToSurfaceBC(pid, surface_BC_length, local_element_ID, &
00211                                                           reference_surface_ID, boundary_condition_value) &
00212                                                           bind(C, name='iMOAB_GetPointerToSurfaceBC')
00213         use, intrinsic :: iso_c_binding, only: c_int
00214         integer(c_int), intent(in) :: pid
00215         integer(c_int), intent(in) :: surface_BC_length
00216         integer(c_int), intent(in) :: local_element_ID
00217         integer(c_int), intent(in) :: reference_surface_ID
00218         integer(c_int), intent(out) :: boundary_condition_value
00219       end function iMOAB_GetPointerToSurfaceBC
00220 
00221       integer(c_int) function iMOAB_GetPointerToVertexBC(pid, vertex_BC_length, local_vertex_ID, &
00222                                                         boundary_condition_value) bind(C, name='iMOAB_GetPointerToVertexBC')
00223         use, intrinsic :: iso_c_binding, only: c_int
00224         integer(c_int), intent(in) :: pid
00225         integer(c_int), intent(in) :: vertex_BC_length
00226         integer(c_int), intent(in) :: local_vertex_ID
00227         integer(c_int), intent(out) :: boundary_condition_value
00228       end function iMOAB_GetPointerToVertexBC
00229 
00230       integer(c_int) function iMOAB_DefineTagStorage(pid, tag_storage_name, tag_type, components_per_entity, &
00231                                                     tag_index) bind(C, name='iMOAB_DefineTagStorage')
00232         use, intrinsic :: iso_c_binding, only: c_int, c_char
00233         integer(c_int), intent(in) :: pid
00234         character(kind=c_char), intent(in) :: tag_storage_name(*)
00235         integer(c_int), intent(in) :: tag_type
00236         integer(c_int), intent(in) :: components_per_entity
00237         integer(c_int), intent(in) :: tag_index
00238       end function iMOAB_DefineTagStorage
00239 
00240       integer(c_int) function iMOAB_SetIntTagStorage(pid, tag_storage_name, num_tag_storage_length, entity_type, &
00241                                                     tag_storage_data) bind(C, name='iMOAB_SetIntTagStorage')
00242         use, intrinsic :: iso_c_binding, only: c_int, c_char
00243         integer(c_int), intent(in) :: pid
00244         character(kind=c_char), intent(in) :: tag_storage_name(*)
00245         integer(c_int), intent(in) :: num_tag_storage_length
00246         integer(c_int), intent(in) :: entity_type
00247         integer(c_int), intent(in) :: tag_storage_data(*)
00248       end function iMOAB_SetIntTagStorage
00249 
00250       integer(c_int) function iMOAB_GetIntTagStorage(pid, tag_storage_name, num_tag_storage_length, entity_type, &
00251                                                      tag_storage_data) bind(C, name='iMOAB_GetIntTagStorage')
00252         use, intrinsic :: iso_c_binding, only: c_int, c_char
00253         integer(c_int), intent(in) :: pid
00254         character(kind=c_char), intent(in) :: tag_storage_name(*)
00255         integer(c_int), intent(in) :: num_tag_storage_length
00256         integer(c_int), intent(in) :: entity_type
00257         integer(c_int), intent(out) :: tag_storage_data(*)
00258       end function iMOAB_GetIntTagStorage
00259 
00260       integer(c_int) function iMOAB_SetDoubleTagStorage(pid, tag_storage_name, num_tag_storage_length, entity_type, &
00261                                                         tag_storage_data) bind(C, name='iMOAB_SetDoubleTagStorage')
00262         use, intrinsic :: iso_c_binding, only: c_int, c_char, c_double
00263         integer(c_int), intent(in) :: pid
00264         character(kind=c_char), intent(in) :: tag_storage_name(*)
00265         integer(c_int), intent(in) :: num_tag_storage_length
00266         integer(c_int), intent(in) :: entity_type
00267         real(c_double), intent(in) :: tag_storage_data(*)
00268       end function iMOAB_SetDoubleTagStorage
00269 
00270       integer(c_int) function iMOAB_SetDoubleTagStorageWithGid(pid, tag_storage_name, num_tag_storage_length, entity_type, &
00271                                          tag_storage_data, globalIds) bind(C, name='iMOAB_SetDoubleTagStorageWithGid')
00272         use, intrinsic :: iso_c_binding, only: c_int, c_char, c_double
00273         integer(c_int), intent(in) :: pid
00274         character(kind=c_char), intent(in) :: tag_storage_name(*)
00275         integer(c_int), intent(in) :: num_tag_storage_length
00276         integer(c_int), intent(in) :: entity_type
00277         real(c_double), intent(in) :: tag_storage_data(*)
00278         integer(c_int), intent(in) :: globalIds(*)
00279       end function iMOAB_SetDoubleTagStorageWithGid
00280 
00281 
00282       integer(c_int) function iMOAB_GetDoubleTagStorage(pid, tag_storage_name, num_tag_storage_length, entity_type, &
00283                                                         tag_storage_data) bind(C, name='iMOAB_GetDoubleTagStorage')
00284         use, intrinsic :: iso_c_binding, only: c_int, c_char, c_double
00285         integer(c_int), intent(in) :: pid
00286         character(kind=c_char), intent(in) :: tag_storage_name(*)
00287         integer(c_int), intent(in) :: num_tag_storage_length
00288         integer(c_int), intent(in) :: entity_type
00289         real(c_double), intent(out) :: tag_storage_data(*)
00290       end function iMOAB_GetDoubleTagStorage
00291 
00292       integer(c_int) function iMOAB_SynchronizeTags(pid, num_tag, tag_indices, entity_type) bind(C, name='iMOAB_SynchronizeTags')
00293         use, intrinsic :: iso_c_binding, only: c_int
00294         integer(c_int), intent(in) :: pid
00295         integer(c_int), intent(in) :: num_tag
00296         integer(c_int), intent(in) :: tag_indices(*)
00297         integer(c_int), intent(in) :: entity_type(*)
00298       end function iMOAB_SynchronizeTags
00299 
00300       integer(c_int) function iMOAB_ReduceTagsMax(pid, tag_index, entity_type) bind(C, name='iMOAB_ReduceTagsMax')
00301         use, intrinsic :: iso_c_binding, only: c_int
00302         integer(c_int), intent(in) :: pid
00303         integer(c_int), intent(in) :: tag_index
00304         integer(c_int), intent(in) :: entity_type
00305       end function iMOAB_ReduceTagsMax
00306 
00307       integer(c_int) function iMOAB_GetNeighborElements(pid, local_index, num_adjacent_elements, adjacent_element_IDs) &
00308                               bind(C, name='iMOAB_GetNeighborElements')
00309         use, intrinsic :: iso_c_binding, only: c_int
00310         integer(c_int), intent(in) :: pid
00311         integer(c_int), intent(in) :: local_index
00312         integer(c_int), intent(out) :: num_adjacent_elements
00313         integer(c_int), intent(out) :: adjacent_element_IDs
00314       end function iMOAB_GetNeighborElements
00315 
00316       integer(c_int) function iMOAB_GetNeighborVertices(pid, local_index, num_adjacent_vertices, adjacent_vertex_IDs) &
00317                               bind(C, name='iMOAB_GetNeighborVertices')
00318         use, intrinsic :: iso_c_binding, only: c_int
00319         integer(c_int), intent(in) :: pid
00320         integer(c_int), intent(in) :: local_index
00321         integer(c_int), intent(out) :: num_adjacent_vertices
00322         integer(c_int), intent(out) :: adjacent_vertex_IDs
00323       end function iMOAB_GetNeighborVertices
00324 
00325       integer(c_int) function iMOAB_SetGlobalInfo(pid, num_global_verts, num_global_elems) bind(C, name='iMOAB_SetGlobalInfo')
00326         use, intrinsic :: iso_c_binding, only: c_int
00327         integer(c_int), intent(in) :: pid
00328         integer(c_int), intent(in) :: num_global_verts
00329         integer(c_int), intent(in) :: num_global_elems
00330       end function iMOAB_SetGlobalInfo
00331 
00332       integer(c_int) function iMOAB_GetGlobalInfo(pid, num_global_verts, num_global_elems) bind(C, name='iMOAB_GetGlobalInfo')
00333         use, intrinsic :: iso_c_binding, only: c_int
00334         integer(c_int), intent(in) :: pid
00335         integer(c_int), intent(out) :: num_global_verts
00336         integer(c_int), intent(out) :: num_global_elems
00337       end function iMOAB_GetGlobalInfo
00338 
00339   integer(c_int) function iMOAB_WriteLocalMesh(pid, prefix) bind(C, name='iMOAB_WriteLocalMesh')
00340     use, intrinsic :: iso_c_binding, only : c_int, c_char
00341     integer(c_int), intent(in) :: pid
00342     character(kind=c_char), intent(in) :: prefix(*)
00343   end function iMOAB_WriteLocalMesh
00344 
00345 #ifdef MOAB_HAVE_MPI
00346 
00347       integer(c_int) function iMOAB_SendMesh(pid, joint_comm, receivingGroup, rcompid, method) bind(C, name='iMOAB_SendMesh')
00348         use, intrinsic :: iso_c_binding, only: c_int, c_ptr
00349         integer(c_int), intent(in) :: pid
00350         integer, intent(in) :: joint_comm ! MPI_Comm
00351         integer, intent(in) :: receivingGroup ! MPI_Group
00352         integer(c_int), intent(in) :: rcompid
00353         integer(c_int), intent(in) :: method
00354       end function iMOAB_SendMesh
00355 
00356       integer(c_int) function iMOAB_ReceiveMesh(pid, joint_comm, sendingGroup, scompid) bind(C, name='iMOAB_ReceiveMesh')
00357         use, intrinsic :: iso_c_binding, only: c_int, c_ptr
00358         integer(c_int), intent(in) :: pid
00359         integer, intent(in) :: joint_comm ! MPI_Comm
00360         integer, intent(in) :: sendingGroup ! MPI_Group
00361         integer(c_int), intent(in) :: scompid
00362       end function iMOAB_ReceiveMesh
00363 
00364       integer(c_int) function iMOAB_FreeSenderBuffers(pid, context_id) bind(C, name='iMOAB_FreeSenderBuffers')
00365         use, intrinsic :: iso_c_binding, only: c_int
00366         integer(c_int), intent(in) :: pid
00367         integer(c_int), intent(in) :: context_id
00368       end function iMOAB_FreeSenderBuffers
00369 
00370       integer(c_int) function iMOAB_SendElementTag(pid, tag_storage_name, joint_comm, context_id) &
00371                               bind(C, name='iMOAB_SendElementTag')
00372         use, intrinsic :: iso_c_binding, only: c_int, c_char, c_ptr
00373         integer(c_int), intent(in) :: pid
00374         character(kind=c_char), intent(in) :: tag_storage_name(*)
00375         integer, intent(in) :: joint_comm ! MPI_Comm
00376         integer(c_int), intent(in) :: context_id
00377       end function iMOAB_SendElementTag
00378 
00379       integer(c_int) function iMOAB_ReceiveElementTag(pid, tag_storage_name, joint_comm, context_id) &
00380                               bind(C, name='iMOAB_ReceiveElementTag')
00381         use, intrinsic :: iso_c_binding, only: c_int, c_char, c_ptr
00382         integer(c_int), intent(in) :: pid
00383         character(kind=c_char), intent(in) :: tag_storage_name(*)
00384         integer, intent(in) :: joint_comm ! MPI_Comm
00385         integer(c_int), intent(in) :: context_id
00386       end function iMOAB_ReceiveElementTag
00387 
00388       integer(c_int) function iMOAB_ComputeCommGraph(pid1, pid2, joint_comm, group1, group2, type1, type2, &
00389                                                      comp1, comp2) bind(C, name='iMOAB_ComputeCommGraph')
00390         use, intrinsic :: iso_c_binding, only: c_int, c_ptr
00391         integer(c_int), intent(in) :: pid1
00392         integer(c_int), intent(in) :: pid2
00393         integer, intent(in) :: joint_comm ! MPI_Comm
00394         integer, intent(in) :: group1     ! MPI_Group
00395         integer, intent(in) :: group2     ! MPI_Group
00396         integer(c_int), intent(in) :: type1
00397         integer(c_int), intent(in) :: type2
00398         integer(c_int), intent(in) :: comp1
00399         integer(c_int), intent(in) :: comp2
00400       end function iMOAB_ComputeCommGraph
00401 
00402       integer(c_int) function iMOAB_CoverageGraph(joint_comm, pid_source, pid_migration, pid_intx, source_id, &
00403                                                   migration_id, context_id) bind(C, name='iMOAB_CoverageGraph')
00404         use, intrinsic :: iso_c_binding, only: c_int, c_ptr
00405         integer, intent(in) :: joint_comm ! MPI_Comm
00406         integer(c_int), intent(in) :: pid_source
00407         integer(c_int), intent(in) :: pid_migration
00408         integer(c_int), intent(in) :: pid_intx
00409         integer(c_int), intent(in) :: source_id
00410         integer(c_int), intent(in) :: migration_id
00411         integer(c_int), intent(in) :: context_id
00412       end function iMOAB_CoverageGraph
00413 
00414       integer(c_int) function iMOAB_DumpCommGraph(pid, context_id, is_sender, prefix) bind(C, name='iMOAB_DumpCommGraph')
00415         use, intrinsic :: iso_c_binding, only: c_int, c_char
00416         integer(c_int), intent(in) :: pid
00417         integer(c_int), intent(in) :: context_id
00418         integer(c_int), intent(in) :: is_sender
00419         character(kind=c_char), intent(in) :: prefix(*)
00420       end function iMOAB_DumpCommGraph
00421 
00422       integer(c_int) function iMOAB_MergeVertices(pid) bind(C, name='iMOAB_MergeVertices')
00423         use, intrinsic :: iso_c_binding, only: c_int
00424         integer(c_int), intent(in) :: pid
00425       end function iMOAB_MergeVertices
00426 
00427       integer(c_int) function iMOAB_MigrateMapMesh( pid1, pid2, pid3, jointcomm, groupA, groupB, type, comp1, comp2, &
00428                                                     direction) bind(C, name='iMOAB_MigrateMapMesh')
00429         use, intrinsic :: iso_c_binding, only : c_int
00430         integer(c_int), intent(in) :: pid1
00431         integer(c_int), intent(in) :: pid2
00432         integer(c_int), intent(in) :: pid3
00433         integer, intent(in) :: jointcomm  ! MPI_Comm
00434         integer, intent(in) :: groupA     ! MPI_Group
00435         integer, intent(in) :: groupB     ! MPI_Group
00436         integer(c_int), intent(in) :: type
00437         integer(c_int), intent(in) :: comp1
00438         integer(c_int), intent(in) :: comp2
00439         integer(c_int), intent(in) :: direction
00440       end function iMOAB_MigrateMapMesh
00441 
00442 ! closing endif: MOAB_HAVE_MPI
00443 #endif
00444 
00445 #ifdef MOAB_HAVE_TEMPESTREMAP
00446 
00447       integer(c_int) function iMOAB_ComputeMeshIntersectionOnSphere(pid_source, pid_target, pid_intersection) &
00448                                                                   bind(C, name='iMOAB_ComputeMeshIntersectionOnSphere')
00449         use, intrinsic :: iso_c_binding, only: c_int
00450         integer(c_int), intent(in) :: pid_source
00451         integer(c_int), intent(in) :: pid_target
00452         integer(c_int), intent(in) :: pid_intersection
00453       end function iMOAB_ComputeMeshIntersectionOnSphere
00454 
00455       integer(c_int) function iMOAB_ComputePointDoFIntersection(pid_source, pid_target, pid_intersection) &
00456                                                                 bind(C, name='iMOAB_ComputePointDoFIntersection')
00457         use, intrinsic :: iso_c_binding, only: c_int
00458         integer(c_int), intent(in) :: pid_source
00459         integer(c_int), intent(in) :: pid_target
00460         integer(c_int), intent(in) :: pid_intersection
00461       end function iMOAB_ComputePointDoFIntersection
00462 
00463 #ifdef MOAB_HAVE_NETCDF
00464 
00465       integer(c_int) function iMOAB_LoadMappingWeightsFromFile(pid_intersection, pid_cpl, column_or_row, mtype, &
00466                                                                solution_weights_identifier, remap_weights_filename) &
00467                                                                   bind(C, name='iMOAB_LoadMappingWeightsFromFile')
00468             use, intrinsic :: iso_c_binding, only : c_int, c_char
00469             integer(c_int), intent(in) :: pid_intersection
00470             integer(c_int), intent(in) :: pid_cpl
00471             integer(c_int), intent(in) :: column_or_row
00472             integer(c_int), intent(in) :: mtype
00473             character(kind=c_char), intent(in) :: solution_weights_identifier(*)
00474             character(kind=c_char), intent(in) :: remap_weights_filename(*)
00475       end function iMOAB_LoadMappingWeightsFromFile
00476 
00477       integer(c_int) function iMOAB_WriteMappingWeightsToFile(pid_intersection, solution_weights_identifier,  &
00478                                                   remap_weights_filename) bind(C, name='iMOAB_WriteMappingWeightsToFile')
00479         use, intrinsic :: iso_c_binding, only: c_int, c_char
00480         integer(c_int), intent(in) :: pid_intersection
00481         character(kind=c_char), intent(in) :: solution_weights_identifier(*)
00482         character(kind=c_char), intent(in) :: remap_weights_filename(*)
00483       end function iMOAB_WriteMappingWeightsToFile
00484 
00485 ! closing endif: MOAB_HAVE_NETCDF
00486 #endif
00487 
00488       integer(c_int) function iMOAB_ComputeScalarProjectionWeights(pid_intersection, solution_weights_identifier, &
00489                                                                   disc_method_source, disc_order_source, &
00490                                                                   disc_method_target, disc_order_target, &
00491                                                                   fNoBubble, fMonotoneTypeID, fVolumetric, &
00492                                                                   fInverseDistanceMap, fNoConservation, fValidate, &
00493                                                                   source_solution_tag_dof_name, target_solution_tag_dof_name) &
00494                                                                   bind(C, name='iMOAB_ComputeScalarProjectionWeights')
00495         use, intrinsic :: iso_c_binding, only: c_int, c_char
00496         integer(c_int), intent(in) :: pid_intersection
00497         character(kind=c_char), intent(in) :: solution_weights_identifier(*)
00498         character(kind=c_char), intent(in) :: disc_method_source(*)
00499         integer(c_int), intent(in) :: disc_order_source
00500         character(kind=c_char), intent(in) :: disc_method_target(*)
00501         integer(c_int), intent(in) :: disc_order_target
00502         integer(c_int), intent(in) :: fNoBubble
00503         integer(c_int), intent(in) :: fMonotoneTypeID
00504         integer(c_int), intent(in) :: fVolumetric
00505         integer(c_int), intent(in) :: fInverseDistanceMap
00506         integer(c_int), intent(in) :: fNoConservation
00507         integer(c_int), intent(in) :: fValidate
00508         character(kind=c_char), intent(in) :: source_solution_tag_dof_name(*)
00509         character(kind=c_char), intent(in) :: target_solution_tag_dof_name(*)
00510       end function iMOAB_ComputeScalarProjectionWeights
00511 
00512       integer(c_int) function iMOAB_ApplyScalarProjectionWeights(pid_intersection, solution_weights_identifier, &
00513                                                                 source_solution_tag_name, target_solution_tag_name) &
00514                                                                 bind(C, name='iMOAB_ApplyScalarProjectionWeights')
00515         use, intrinsic :: iso_c_binding, only: c_int, c_char
00516         integer(c_int), intent(in) :: pid_intersection
00517         character(kind=c_char), intent(in) :: solution_weights_identifier(*)
00518         character(kind=c_char), intent(in) :: source_solution_tag_name(*)
00519         character(kind=c_char), intent(in) :: target_solution_tag_name(*)
00520       end function iMOAB_ApplyScalarProjectionWeights
00521 
00522 ! closing endif: MOAB_HAVE_TEMPESTREMAP
00523 #endif
00524 
00525 #ifdef MOAB_HAVE_MPI
00526 
00527 ! Add some helper MPI converter functions
00528 
00529       ! Convert a C-based MPI-Comm handle to fortran
00530       integer function iMOAB_MPI_Comm_c2f(c_handle) bind(C, name="MOAB_MPI_Comm_c2f")
00531         use, intrinsic :: iso_c_binding, only: c_ptr
00532         type(c_ptr), value :: c_handle
00533       end function
00534 
00535       ! Convert a Fortran-based MPI-integer handle to MPI-Comm pointer
00536       type(c_ptr) function iMOAB_MPI_Comm_f2c(f_handle) bind(C, name="MOAB_MPI_Comm_f2c")
00537         use, intrinsic :: iso_c_binding, only: c_ptr
00538         integer, intent(in) :: f_handle
00539       end function
00540 
00541       ! Convert a C-based MPI-Group handle to fortran
00542       integer function iMOAB_MPI_Group_c2f(c_handle) bind(C, name="MOAB_MPI_Group_c2f")
00543         use, intrinsic :: iso_c_binding, only: c_ptr
00544         type(c_ptr), value :: c_handle
00545       end function
00546 
00547       ! Convert a Fortran-based MPI-integer handle to MPI-Group pointer
00548       type(c_ptr) function iMOAB_MPI_Group_f2c(f_handle) bind(C, name="MOAB_MPI_Group_f2c")
00549         use, intrinsic :: iso_c_binding, only: c_ptr
00550         integer, intent(in) :: f_handle
00551       end function
00552 
00553 #endif
00554 
00555    end interface
00556 
00557 end module iMOAB
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines