Functions for parallel mesh operations and data transfer. More...
Collaboration diagram for Parallel Communication:Functions | |
| ErrCode | iMOAB_SendMesh (iMOAB_AppID pid, MPI_Comm *joint_communicator, MPI_Group *receivingGroup, int *rcompid, int *method) |
| Transfer mesh data from sender component to receiver component. More... | |
| ErrCode | iMOAB_ReceiveMesh (iMOAB_AppID pid, MPI_Comm *joint_communicator, MPI_Group *sendingGroup, int *scompid) |
| Receive mesh data on target component from sending component. More... | |
| ErrCode | iMOAB_SendElementTag (iMOAB_AppID pid, const iMOAB_String tag_storage_name, MPI_Comm *joint_communicator, int *context_id) |
| Send element tag data from calling component to another component. More... | |
| ErrCode | iMOAB_ReceiveElementTag (iMOAB_AppID pid, const iMOAB_String tag_storage_name, MPI_Comm *joint_communicator, int *context_id) |
| Receive element tag data from another component. More... | |
| ErrCode | iMOAB_ComputeCommGraph (iMOAB_AppID pid1, iMOAB_AppID pid2, MPI_Comm *joint_communicator, MPI_Group *group1, MPI_Group *group2, int *type1, int *type2, int *comp1, int *comp2) |
| Compute communication graph between two components using rendezvous algorithm. More... | |
| ErrCode | iMOAB_MergeVertices (iMOAB_AppID pid) |
| Merge duplicate vertices in a mesh and update connectivity information. More... | |
Functions for parallel mesh operations and data transfer.
| ErrCode iMOAB_ComputeCommGraph | ( | iMOAB_AppID | pid1, |
| iMOAB_AppID | pid2, | ||
| MPI_Comm * | joint_communicator, | ||
| MPI_Group * | group1, | ||
| MPI_Group * | group2, | ||
| int * | type1, | ||
| int * | type2, | ||
| int * | comp1, | ||
| int * | comp2 | ||
| ) |
Compute communication graph between two components using rendezvous algorithm.
Implements sophisticated rendezvous-based algorithm to determine which processes from component 1 need to communicate with which processes from component 2. Uses global entity IDs (or DOFs) as "rendezvous points" to discover communication patterns between components.
| [in] | pid1 | Application ID for component 1 (or negative if not on these ranks) |
| [in] | pid2 | Application ID for component 2 (or negative if not on these ranks) |
| [in] | joint_communicator | MPI communicator spanning both component groups |
| [in] | group1 | MPI group for component 1 processes |
| [in] | group2 | MPI group for component 2 processes |
| [in] | type1 | Entity type for component 1 (1=DOFs, 2=vertices, 3=elements) |
| [in] | type2 | Entity type for component 2 (1=DOFs, 2=vertices, 3=elements) |
| [in] | comp1 | Component 1 external ID |
| [in] | comp2 | Component 2 external ID |
Definition at line 3753 of file iMOAB.cpp.
References GlobalContext::appDatas, context, moab::Remapper::CoveringMesh, moab::ProcConfig::crystal_router(), moab::TupleList::enableWriteAccess(), appData::file_set, moab::Interface::get_entities_by_dimension(), moab::Interface::get_entities_by_type(), moab::TupleList::get_n(), moab::Interface::globalId_tag(), moab::TupleList::inc_n(), moab::TupleList::initialize(), MB_CHK_ERR, MB_SUCCESS, GlobalContext::MBI, MBQUAD, MBVERTEX, appData::pgraph, moab::TupleList::print_to_file(), moab::TupleList::reserve(), moab::TupleList::buffer::reset(), moab::TupleList::resize(), moab::ParCommGraph::settle_comm_by_ids(), moab::Range::size(), moab::TupleList::sort(), moab::Interface::tag_get_data(), moab::Interface::tag_get_handle(), moab::Interface::tag_get_length(), moab::TupleList::vi_rd, and moab::TupleList::vi_wr.
| ErrCode iMOAB_MergeVertices | ( | iMOAB_AppID | pid | ) |
Merge duplicate vertices in a mesh and update connectivity information.
This function consolidates duplicate vertices that may exist after mesh operations such as intersection or migration. Vertices with identical GLOBAL_ID values are merged, and connectivity of elements is updated accordingly. The function performs both local (within-process) and parallel (across-process) vertex merging.
| [in] | pid | Application ID for the mesh |
Definition at line 4158 of file iMOAB.cpp.
References moab::Interface::add_entities(), GlobalContext::appDatas, moab::ParallelComm::assign_global_ids(), moab::Range::clear(), context, moab::Range::empty(), ErrorCode, appData::file_set, moab::Interface::get_entities_by_dimension(), moab::Interface::get_entities_by_type_and_tag(), moab::Interface::globalId_tag(), iMOAB_UpdateMeshInfo(), appData::mat_sets, GlobalContext::material_tag, MB_ALREADY_ALLOCATED, MB_CHK_ERR, MB_SUCCESS, MB_TAG_CREAT, MB_TAG_SPARSE, MB_TYPE_INTEGER, MBENTITYSET, GlobalContext::MBI, moab::ParallelMergeMesh::merge(), appData::pcomm, moab::ParallelComm::rank(), moab::IntxUtils::remove_duplicate_vertices(), moab::Interface::remove_entities(), moab::Interface::tag_get_handle(), moab::Interface::tag_set_data(), and moab::Interface::UNION.
| ErrCode iMOAB_ReceiveElementTag | ( | iMOAB_AppID | pid, |
| const iMOAB_String | tag_storage_name, | ||
| MPI_Comm * | joint_communicator, | ||
| int * | context_id | ||
| ) |
Receive element tag data from another component.
Receives tag data (scalar or vector values) associated with mesh elements from another component using pre-established communication graph. Received tag values are applied to corresponding entities in local mesh, enabling data exchange between coupled components.
| [in] | pid | Application ID for receiver component |
| [in] | tag_storage_name | Tag name(s) to receive (colon-separated for multiple tags) |
| [in] | joint_communicator | MPI communicator spanning sender and receiver groups |
| [in] | context_id | Communication graph context ID |
Definition at line 3611 of file iMOAB.cpp.
References GlobalContext::appDatas, context, moab::Remapper::CoveringMesh, ErrorCode, appData::file_set, moab::ParCommGraph::get_cover_set(), moab::Interface::get_entities_by_dimension(), appData::is_fortran, appData::local_verts, MB_CHK_ERR, MB_CHK_SET_ERR, MB_SUCCESS, GlobalContext::MBI, appData::owned_elems, appData::pgraph, appData::point_cloud, moab::ParallelComm::rank(), moab::ParCommGraph::receive_tag_values(), split_tag_names(), and moab::Interface::tag_get_handle().
| ErrCode iMOAB_ReceiveMesh | ( | iMOAB_AppID | pid, |
| MPI_Comm * | joint_communicator, | ||
| MPI_Group * | sendingGroup, | ||
| int * | scompid | ||
| ) |
Receive mesh data on target component from sending component.
Implements receiver side of distributed mesh transfer protocol. Receives mesh entities and data from multiple sender processes, consolidates them into local mesh, and handles entity deduplication based on global IDs.
| [in] | pid | Application ID for receiver component |
| [in] | joint_communicator | MPI communicator spanning both sender and receiver groups |
| [in] | sendingGroup | MPI group of sending processes |
| [in] | scompid | Sender component ID (key for communication graph storage) |
Definition at line 3287 of file iMOAB.cpp.
References moab::Interface::add_entities(), moab::Range::all_of_type(), GlobalContext::appDatas, CHK_MPI_ERR, moab::ParallelComm::comm(), context, ErrorCode, appData::file_set, moab::Interface::get_connectivity(), moab::Interface::get_entities_by_dimension(), moab::Interface::get_entities_by_handle(), iMOAB_DefineTagStorage(), iMOAB_UpdateMeshInfo(), appData::is_fortran, MB_ALREADY_ALLOCATED, MB_CHK_ERR, MB_SUCCESS, MB_TAG_CREAT, MB_TAG_SPARSE, MB_TYPE_INTEGER, GlobalContext::MBI, MBVERTEX, moab::MergeMesh::merge_using_integer_tag(), appData::point_cloud, moab::ParallelComm::rank(), moab::ParCommGraph::receive_comm_graph(), moab::ParCommGraph::receive_mesh(), moab::ParCommGraph::receiver(), moab::Interface::remove_entities(), moab::ParallelComm::resolve_shared_ents(), moab::Range::size(), moab::Range::subset_by_type(), moab::subtract(), moab::Interface::tag_get_handle(), and moab::Interface::tag_set_data().
| ErrCode iMOAB_SendElementTag | ( | iMOAB_AppID | pid, |
| const iMOAB_String | tag_storage_name, | ||
| MPI_Comm * | joint_communicator, | ||
| int * | context_id | ||
| ) |
Send element tag data from calling component to another component.
Transfers tag data (scalar or vector values) associated with mesh elements from one component to another using pre-established communication graph. Transfer based on communication patterns determined by previous mesh transfer or communication graph computation operations.
| [in] | pid | Application ID for sender component |
| [in] | tag_storage_name | Tag name(s) to send (colon-separated for multiple tags) |
| [in] | joint_communicator | MPI communicator spanning sender and receiver groups |
| [in] | context_id | Communication graph context ID |
Definition at line 3504 of file iMOAB.cpp.
References GlobalContext::appDatas, context, moab::Remapper::CoveringMesh, ErrorCode, moab::ParCommGraph::get_cover_set(), moab::Interface::get_entities_by_dimension(), appData::is_fortran, appData::local_verts, MB_CHK_ERR, MB_CHK_SET_ERR, MB_SUCCESS, GlobalContext::MBI, appData::owned_elems, appData::pgraph, appData::point_cloud, moab::ParCommGraph::send_tag_values(), split_tag_names(), and moab::Interface::tag_get_handle().
| ErrCode iMOAB_SendMesh | ( | iMOAB_AppID | pid, |
| MPI_Comm * | joint_communicator, | ||
| MPI_Group * | receivingGroup, | ||
| int * | rcompid, | ||
| int * | method | ||
| ) |
Transfer mesh data from sender component to receiver component.
Implements distributed mesh transfer protocol that moves mesh entities (elements, vertices, and associated data) from one set of MPI processes to another. Transfer is orchestrated through a communication graph that maps sender processes to receiver processes based on partitioning strategy.
| [in] | pid | Application ID for sender component |
| [in] | joint_communicator | MPI communicator spanning both sender and receiver groups |
| [in] | receivingGroup | MPI group of receiving processes |
| [in] | rcompid | Receiver component ID (key for communication graph storage) |
| [in] | method | Partitioning method: 0=trivial, !=0=computed |
Definition at line 3140 of file iMOAB.cpp.
References GlobalContext::appDatas, moab::ParallelComm::comm(), moab::ParCommGraph::compute_partition(), moab::ParCommGraph::compute_trivial_partition(), context, appData::is_fortran, MB_CHK_ERR, MB_SUCCESS, moab::ParallelComm::rank(), moab::ParCommGraph::send_graph(), moab::ParCommGraph::send_graph_partition(), moab::ParCommGraph::send_mesh_parts(), moab::Range::size(), and moab::ParallelComm::size().