51 #define iMOAB_AppID int*
52 #define iMOAB_String char*
53 #define iMOAB_GlobalID int
54 #define iMOAB_LocalID int
56 #define ErrCode moab::ErrorCode
62 #define __PRETTY_FUNCTION__ __FUNCSIG__
64 #if !defined( __cplusplus ) || !defined( __PRETTY_FUNCTION__ )
65 #define __PRETTY_FUNCTION__ __func__
95 #define CHK_MPI_ERR( ierr ) \
97 if( 0 != ( ierr ) ) return moab::MB_FAILURE; \
100 #define IMOAB_CHECKPOINTER( prmObj, position ) \
102 if( prmObj == nullptr ) \
104 printf( "InputParamError at %d: '%s' is invalid and null.\n", position, #prmObj ); \
105 return moab::MB_UNHANDLED_OPTION; \
109 #define IMOAB_THROW_ERROR( message, retval ) \
111 printf( "iMOAB Error: %s.\n Location: %s in %s:%d.\n", message, __PRETTY_FUNCTION__, __FILE__, __LINE__ ); \
116 #define IMOAB_ASSERT_RET( condition, message, retval ) \
118 if( !( condition ) ) \
120 printf( "iMOAB Error: %s.\n Failed condition: %s\n Location: %s in %s:%d.\n", message, #condition, \
121 __PRETTY_FUNCTION__, __FILE__, __LINE__ ); \
126 #define IMOAB_ASSERT( condition, message ) IMOAB_ASSERT_RET( condition, message, moab::MB_UNHANDLED_OPTION )
129 #define IMOAB_ASSERT( condition, message )
130 #define IMOAB_ASSERT_RET( condition, message, retval )
262 int* num_global_vertices,
263 int* num_global_elements,
291 int* num_ghost_layers );
322 int* num_nodes_per_element,
430 int* num_visible_vertices,
431 int* num_visible_elements,
432 int* num_visible_blocks,
433 int* num_visible_surfaceBC,
434 int* num_visible_vertexBC );
525 int* vertices_per_element,
526 int* num_elements_in_block );
545 int* num_visible_elements,
569 int* connectivity_length,
570 int* element_connectivity );
590 int* connectivity_length,
591 int* element_connectivity );
610 int* num_elements_in_block,
611 int* element_ownership );
633 int* num_elements_in_block,
653 int* surface_BC_length,
655 int* reference_surface_ID,
656 int* boundary_condition_value );
672 int* vertex_BC_length,
674 int* boundary_condition_value );
696 int* components_per_entity,
720 int* num_tag_storage_length,
722 int* tag_storage_data );
741 int* num_tag_storage_length,
743 int* tag_storage_data );
762 int* num_tag_storage_length,
764 double* tag_storage_data );
786 int* num_tag_storage_length,
788 double* tag_storage_data,
791 #ifdef MOAB_HAVE_TEMPESTREMAP
810 ErrCode iMOAB_GetCoverageMeshInfo(
iMOAB_AppID pid,
int* num_cov_elems,
int* gids,
double* centroids );
826 int* num_tag_storage_length,
827 double* tag_storage_data );
847 int* num_tag_storage_length,
849 double* tag_storage_data );
893 int* num_adjacent_elements,
913 int* num_adjacent_vertices,
953 MPI_Comm* joint_communicator,
954 MPI_Group* receivingGroup,
981 MPI_Comm* joint_communicator,
982 MPI_Group* sending_group,
983 int* sender_comp_id );
1001 MPI_Comm* joint_communicator,
1020 MPI_Comm* joint_communicator,
1041 MPI_Comm* joint_communicator,
1070 #ifdef MOAB_HAVE_TEMPESTREMAP
1072 ErrCode iMOAB_CoverageGraph( MPI_Comm* joint_communicator,
1108 #ifdef MOAB_HAVE_TEMPESTREMAP
1118 ErrCode iMOAB_SetMapGhostLayers(
iMOAB_AppID pid,
int* n_src_ghost_layers,
int* n_tgt_ghost_layers );
1185 #ifdef MOAB_HAVE_MPI
1222 #if defined( MOAB_HAVE_NETCDF ) || defined( MOAB_HAVE_PNETCDF )
1297 ErrCode iMOAB_ComputeScalarProjectionWeights(
1301 int* disc_order_source,
1303 int* disc_order_target,
1306 int* fMonotoneTypeID,
1308 int* fInverseDistanceMap,
1309 int* fNoConservation,
1336 ErrCode iMOAB_ApplyScalarProjectionWeights(
1345 #ifdef MOAB_HAVE_MPI
1358 inline MPI_Fint MOAB_MPI_Comm_c2f( MPI_Comm* comm )
1360 return MPI_Comm_c2f( *comm );
1370 inline MPI_Comm* MOAB_MPI_Comm_f2c( MPI_Fint fcomm )
1373 ccomm = (MPI_Comm*)( malloc(
sizeof( MPI_Comm ) ) );
1374 *ccomm = MPI_Comm_f2c( fcomm );
1375 if( *ccomm == MPI_COMM_NULL )
1391 inline MPI_Fint MOAB_MPI_Group_c2f( MPI_Group* group )
1393 return MPI_Group_c2f( *group );
1403 inline MPI_Group* MOAB_MPI_Group_f2c( MPI_Fint fgroup )
1406 cgroup = (MPI_Group*)( malloc(
sizeof( MPI_Group ) ) );
1407 *cgroup = MPI_Group_f2c( fgroup );
1408 if( *cgroup == MPI_GROUP_NULL )
1411 IMOAB_THROW_ERROR(
"The MPI_Group conversion from Fortran to C failed.", NULL );