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,
426 int* num_visible_vertices,
427 int* num_visible_elements,
428 int* num_visible_blocks,
429 int* num_visible_surfaceBC,
430 int* num_visible_vertexBC );
521 int* vertices_per_element,
522 int* num_elements_in_block );
541 int* num_visible_elements,
565 int* connectivity_length,
566 int* element_connectivity );
586 int* connectivity_length,
587 int* element_connectivity );
606 int* num_elements_in_block,
607 int* element_ownership );
629 int* num_elements_in_block,
649 int* surface_BC_length,
651 int* reference_surface_ID,
652 int* boundary_condition_value );
668 int* vertex_BC_length,
670 int* boundary_condition_value );
692 int* components_per_entity,
716 int* num_tag_storage_length,
718 int* tag_storage_data );
737 int* num_tag_storage_length,
739 int* tag_storage_data );
758 int* num_tag_storage_length,
760 double* tag_storage_data );
782 int* num_tag_storage_length,
784 double* tag_storage_data,
803 int* num_tag_storage_length,
805 double* tag_storage_data );
849 int* num_adjacent_elements,
869 int* num_adjacent_vertices,
909 MPI_Comm* joint_communicator,
910 MPI_Group* receivingGroup,
937 MPI_Comm* joint_communicator,
938 MPI_Group* sending_group,
939 int* sender_comp_id );
957 MPI_Comm* joint_communicator,
976 MPI_Comm* joint_communicator,
997 MPI_Comm* joint_communicator,
1026 ErrCode iMOAB_CoverageGraph( MPI_Comm* joint_communicator,
1070 #ifdef MOAB_HAVE_TEMPESTREMAP
1107 #ifdef MOAB_HAVE_NETCDF
1109 #ifdef MOAB_HAVE_MPI
1163 ErrCode iMOAB_LoadMappingWeightsFromFile(
1183 ErrCode iMOAB_WriteMappingWeightsToFile(
1218 ErrCode iMOAB_ComputeScalarProjectionWeights(
1222 int* disc_order_source,
1224 int* disc_order_target,
1227 int* fMonotoneTypeID,
1229 int* fInverseDistanceMap,
1230 int* fNoConservation,
1253 ErrCode iMOAB_ApplyScalarProjectionWeights(
1262 #ifdef MOAB_HAVE_MPI
1275 inline MPI_Fint MOAB_MPI_Comm_c2f( MPI_Comm* comm )
1277 return MPI_Comm_c2f( *comm );
1287 inline MPI_Comm* MOAB_MPI_Comm_f2c( MPI_Fint fcomm )
1290 ccomm = (MPI_Comm*)( malloc(
sizeof( MPI_Comm ) ) );
1291 *ccomm = MPI_Comm_f2c( fcomm );
1292 if( *ccomm == MPI_COMM_NULL )
1308 inline MPI_Fint MOAB_MPI_Group_c2f( MPI_Group* group )
1310 return MPI_Group_c2f( *group );
1320 inline MPI_Group* MOAB_MPI_Group_f2c( MPI_Fint fgroup )
1323 cgroup = (MPI_Group*)( malloc(
sizeof( MPI_Group ) ) );
1324 *cgroup = MPI_Group_f2c( fgroup );
1325 if( *cgroup == MPI_GROUP_NULL )
1328 IMOAB_THROW_ERROR(
"The MPI_Group conversion from Fortran to C failed.", NULL );