MOAB: Mesh Oriented datABase  (version 5.5.0)
iMeshP_extensions.h File Reference
#include "iMeshP.h"
#include "iMeshP_protos.h"
#include "moab_mpi.h"
+ Include dependency graph for iMeshP_extensions.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

void iMeshP_getCommunicator (iMesh_Instance instance, int *fcomm, MPI_Comm *ccomm, int *err)
 Convert a fortran to C communicator Given a Fortran communicator, convert to a C communicator that can be passed back to iMeshP. Though this is an iMeshP function, it doesn't take an iMeshP Partition handle, since the (C) communicator is needed by the function that creates the partition. COMMUNICATION: None. More...
 
void iMeshP_assignGlobalIds (iMesh_Instance instance, const iMeshP_PartitionHandle partition, const iBase_EntitySetHandle this_set, const int dimension, const int start_id, const int largest_dim_only, const int parallel, const int owned_only, int *err)
 Assign a global id space to entities Assign a global id space to entities and vertices, and optionally intermediate-dimension entities. More...
 

Function Documentation

◆ iMeshP_assignGlobalIds()

void iMeshP_assignGlobalIds ( iMesh_Instance  instance,
const iMeshP_PartitionHandle  partition,
const iBase_EntitySetHandle  this_set,
const int  dimension,
const int  start_id,
const int  largest_dim_only,
const int  parallel,
const int  owned_only,
int *  err 
)

Assign a global id space to entities Assign a global id space to entities and vertices, and optionally intermediate-dimension entities.

COMMUNICATION: Collective.

Definition at line 1796 of file iMeshP_MOAB.cpp.

1805 {
1806  ErrorCode rval;
1807 
1808  // get partition set
1809  EntityHandle partitionset = itaps_cast< EntityHandle >( partition );
1810  if( !partitionset )
1811  {
1812  rval = MB_FAILURE;CHKERR( rval, "failed to get partition set" );
1813  }
1814 
1815  EntityHandle this_mb_set = itaps_cast< EntityHandle >( this_set );
1816 
1817  // get ParallelComm for partition
1818  MPI_Comm default_comm;
1819  ParallelComm* pcomm = ParallelComm::get_pcomm( MOABI, partitionset, &default_comm );
1820  if( !pcomm )
1821  {
1822  RETURN( iBase_FAILURE );
1823  }
1824 
1825  rval = pcomm->assign_global_ids( this_mb_set, dimension, start_id, largest_dim_only, parallel, owned_only );
1826 
1827  RETURN( rval );
1828 }

References moab::ParallelComm::assign_global_ids(), CHKERR, ErrorCode, moab::ParallelComm::get_pcomm(), iBase_FAILURE, MOABI, and RETURN.

◆ iMeshP_getCommunicator()

void iMeshP_getCommunicator ( iMesh_Instance  instance,
int *  fcomm,
MPI_Comm *  ccomm,
int *  err 
)

Convert a fortran to C communicator Given a Fortran communicator, convert to a C communicator that can be passed back to iMeshP. Though this is an iMeshP function, it doesn't take an iMeshP Partition handle, since the (C) communicator is needed by the function that creates the partition. COMMUNICATION: None.

Parameters
instance(In) Mesh instance to contain the partition.
fcomm(In) Pointer to fortran communicator
ccomm(Out) Pointer to the C communicator
err(Out) Error code.

Definition at line 1830 of file iMeshP_MOAB.cpp.

1831 {
1832  *ccomm = MPI_Comm_f2c( *fcomm );
1833  RETURN( iBase_SUCCESS );
1834 }

References iBase_SUCCESS, and RETURN.