Functions for registering and managing application instances. More...
Collaboration diagram for Application Management:Functions | |
| ErrCode | iMOAB_RegisterApplication (const iMOAB_String app_name, MPI_Comm *comm, int *compid, iMOAB_AppID pid) |
| Register a new application instance with iMOAB. More... | |
| ErrCode | iMOAB_RegisterApplicationFortran (const iMOAB_String app_name, int *comm, int *compid, iMOAB_AppID pid) |
| Fortran-compatible wrapper for iMOAB_RegisterApplication. More... | |
| ErrCode | iMOAB_DeregisterApplication (iMOAB_AppID pid) |
| Deregister an application instance and cleanup associated resources. More... | |
| ErrCode | iMOAB_DeregisterApplicationFortran (iMOAB_AppID pid) |
| Fortran-compatible wrapper for iMOAB_DeregisterApplication. More... | |
Functions for registering and managing application instances.
| ErrCode iMOAB_DeregisterApplication | ( | iMOAB_AppID | pid | ) |
Deregister an application instance and cleanup associated resources.
De-Register application: delete mesh (set) associated with the application ID.
Removes application from iMOAB, deletes mesh entities, frees parallel communicator, and cleans up all associated data structures. Must be called before iMOAB_Finalize().
| [in] | pid | Application ID to deregister |
Definition at line 559 of file iMOAB.cpp.
References GlobalContext::appDatas, GlobalContext::appIdMap, context, moab::Interface::delete_entities(), moab::Range::empty(), appData::file_set, moab::Interface::get_adjacencies(), moab::Interface::get_connectivity(), moab::Interface::get_entities_by_handle(), moab::Interface::get_entities_by_type(), appData::global_id, moab::Range::insert(), MB_CHK_SET_ERR, MB_SUCCESS, MBENTITYSET, GlobalContext::MBI, MBVERTEX, appData::name, appData::pcomm, appData::pgraph, moab::ParallelComm::rank(), moab::Range::subset_by_type(), moab::subtract(), and moab::Interface::UNION.
Referenced by iMOAB_DeregisterApplicationFortran().
| ErrCode iMOAB_DeregisterApplicationFortran | ( | iMOAB_AppID | pid | ) |
Fortran-compatible wrapper for iMOAB_DeregisterApplication.
De-Register the Fortran based application: delete mesh (set) associated with the application ID.
Deregisters application from Fortran code by clearing Fortran flag and calling C-style deregistration.
| [in] | pid | Application ID to deregister |
Definition at line 672 of file iMOAB.cpp.
References GlobalContext::appDatas, context, and iMOAB_DeregisterApplication().
| ErrCode iMOAB_RegisterApplication | ( | const iMOAB_String | app_name, |
| MPI_Comm * | comm, | ||
| int * | compid, | ||
| iMOAB_AppID | pid | ||
| ) |
Register a new application instance with iMOAB.
Creates a new application context with unique ID, allocates a mesh set for data storage, and sets up parallel communicator if MPI is enabled. Each application represents a distinct component in a coupled simulation (e.g., atmosphere, ocean, land).
| [in] | app_name | Unique name for this application instance |
| [in] | comm | MPI communicator for this application (MPI builds only) |
| [in] | compid | External component ID (must be positive) |
| [out] | pid | Generated application ID (output parameter) |
Definition at line 394 of file iMOAB.cpp.
References GlobalContext::appDatas, apphash(), GlobalContext::appIdMap, context, moab::Interface::create_meshset(), appData::file_set, appData::global_id, IMOAB_CHECKPOINTER, appData::is_fortran, MB_CHK_SET_ERR, MB_SUCCESS, GlobalContext::MBI, MESHSET_SET, appData::name, appData::num_ghost_layers, appData::pcomm, and appData::point_cloud.
Referenced by iMOAB_RegisterApplicationFortran().
| ErrCode iMOAB_RegisterApplicationFortran | ( | const iMOAB_String | app_name, |
| int * | comm, | ||
| int * | compid, | ||
| iMOAB_AppID | pid | ||
| ) |
Fortran-compatible wrapper for iMOAB_RegisterApplication.
Registers application from Fortran code by converting Fortran MPI communicator to C and calling C-style registration. Sets is_fortran flag to enable proper MPI handle conversions.
| [in] | app_name | Unique name for this application instance |
| [in] | comm | Fortran MPI communicator (integer handle, MPI builds only) |
| [in] | compid | External component ID (must be positive) |
| [out] | pid | Generated application ID (output parameter) |
Definition at line 487 of file iMOAB.cpp.
References GlobalContext::appDatas, context, ErrCode, IMOAB_CHECKPOINTER, iMOAB_RegisterApplication(), and MOAB_HAVE_MPI.