Functions for querying mesh information (vertices, elements, blocks, BCs) More...
Collaboration diagram for Mesh Query Operations:Functions | |
| ErrCode | iMOAB_UpdateMeshInfo (iMOAB_AppID pid) |
| Update application's mesh information after loading or modification. More... | |
| ErrCode | iMOAB_GetMeshInfo (iMOAB_AppID pid, int *num_visible_vertices, int *num_visible_elements, int *num_visible_blocks, int *num_visible_surfaceBC, int *num_visible_vertexBC) |
| Query mesh statistics including vertices, elements, and boundary conditions. More... | |
| ErrCode | iMOAB_GetVertexID (iMOAB_AppID pid, int *vertices_length, iMOAB_GlobalID *global_vertex_ID) |
| Retrieve global IDs for all vertices in application's mesh. More... | |
| ErrCode | iMOAB_GetVertexOwnership (iMOAB_AppID pid, int *vertices_length, int *visible_global_rank_ID) |
| Retrieve parallel ownership information for all vertices. More... | |
| ErrCode | iMOAB_GetVisibleVerticesCoordinates (iMOAB_AppID pid, int *coords_length, double *coordinates) |
| Retrieve coordinates for all vertices in interleaved format. More... | |
| ErrCode | iMOAB_GetBlockID (iMOAB_AppID pid, int *block_length, iMOAB_GlobalID *global_block_IDs) |
| Retrieve global IDs for all material blocks in mesh. More... | |
| ErrCode | iMOAB_GetBlockInfo (iMOAB_AppID pid, iMOAB_GlobalID *global_block_ID, int *vertices_per_element, int *num_elements_in_block) |
| Retrieve information about a specific material block. More... | |
Functions for querying mesh information (vertices, elements, blocks, BCs)
| ErrCode iMOAB_GetBlockID | ( | iMOAB_AppID | pid, |
| int * | block_length, | ||
| iMOAB_GlobalID * | global_block_IDs | ||
| ) |
Retrieve global IDs for all material blocks in mesh.
Get the global block IDs for all locally visible (owned and shared/ghosted) blocks.
Extracts MATERIAL_SET tag values for all material blocks. Blocks are identified by unique integer IDs and contain elements with similar material properties.
| [in] | pid | Application ID |
| [in] | block_length | Number of blocks (must match actual count) |
| [out] | global_block_IDs | Array of material set IDs (size = block_length) |
Definition at line 1599 of file iMOAB.cpp.
References GlobalContext::appDatas, context, GlobalContext::material_tag, MB_CHK_SET_ERR, MB_INVALID_SIZE, MB_SUCCESS, GlobalContext::MBI, moab::Range::size(), and moab::Interface::tag_get_data().
| ErrCode iMOAB_GetBlockInfo | ( | iMOAB_AppID | pid, |
| iMOAB_GlobalID * | global_block_ID, | ||
| int * | vertices_per_element, | ||
| int * | num_elements_in_block | ||
| ) |
Retrieve information about a specific material block.
Get the global block information and number of visible elements of belonging to a block (MATERIAL SET).
Queries element count and connectivity size for specified material block. Assumes all elements in block have same topology type.
| [in] | pid | Application ID |
| [in] | global_block_ID | Material block ID to query |
| [out] | vertices_per_element | Number of vertices per element in this block |
| [out] | num_elements_in_block | Total number of elements in this block |
Definition at line 1650 of file iMOAB.cpp.
References moab::Range::all_of_type(), GlobalContext::appDatas, context, moab::Range::empty(), moab::Interface::get_connectivity(), moab::Interface::get_entities_by_handle(), MB_CHK_SET_ERR, MB_SUCCESS, GlobalContext::MBI, moab::Range::size(), and moab::Interface::type_from_handle().
| ErrCode iMOAB_GetMeshInfo | ( | iMOAB_AppID | pid, |
| int * | num_visible_vertices, | ||
| int * | num_visible_elements, | ||
| int * | num_visible_blocks, | ||
| int * | num_visible_surfaceBC, | ||
| int * | num_visible_vertexBC | ||
| ) |
Query mesh statistics including vertices, elements, and boundary conditions.
Retrieve all the important mesh information related to vertices, elements, vertex and surface boundary conditions.
Retrieves counts of vertices, elements, material blocks, and boundary condition sets. Each output array has 3 components: [owned, ghost, total]. Useful for memory allocation and understanding parallel mesh distribution.
| [in] | pid | Application ID |
| [out] | num_visible_vertices | Vertex counts [local(non-ghost), ghost, total] |
| [out] | num_visible_elements | Element counts [owned, ghost, total] |
| [out] | num_visible_blocks | Material block counts [owned, ghost, total] |
| [out] | num_visible_surfaceBC | Surface BC counts (total face count across all BC sets) |
| [out] | num_visible_vertexBC | Vertex BC counts (total vertex count across all BC sets) |
Definition at line 1332 of file iMOAB.cpp.
References appData::all_verts, GlobalContext::appDatas, moab::Range::begin(), context, appData::dimension, appData::diri_sets, GlobalContext::dirichlet_tag, moab::Range::end(), appData::file_set, moab::Interface::get_adjacencies(), moab::Interface::get_entities_by_dimension(), moab::Interface::get_entities_by_type_and_tag(), appData::ghost_elems, appData::ghost_vertices, appData::mat_sets, GlobalContext::material_tag, MB_CHK_SET_ERR, MB_SUCCESS, MBENTITYSET, GlobalContext::MBI, appData::neu_sets, GlobalContext::neumann_tag, appData::owned_elems, appData::primary_elems, moab::Range::size(), and moab::Interface::UNION.
| ErrCode iMOAB_GetVertexID | ( | iMOAB_AppID | pid, |
| int * | vertices_length, | ||
| iMOAB_GlobalID * | global_vertex_ID | ||
| ) |
Retrieve global IDs for all vertices in application's mesh.
Get the global vertex IDs for all locally visible (owned and shared/ghosted) vertices.
Extracts GLOBAL_ID tag values for all vertices. Global IDs are unique across all processes and are used for parallel mesh operations and entity identification.
| [in] | pid | Application ID |
| [in] | vertices_length | Number of vertices (must match actual vertex count) |
| [out] | global_vertex_ID | Array of global IDs (size = vertices_length) |
Definition at line 1452 of file iMOAB.cpp.
References GlobalContext::appDatas, context, GlobalContext::globalID_tag, IMOAB_ASSERT, IMOAB_CHECKPOINTER, GlobalContext::MBI, moab::Range::size(), and moab::Interface::tag_get_data().
| ErrCode iMOAB_GetVertexOwnership | ( | iMOAB_AppID | pid, |
| int * | vertices_length, | ||
| int * | visible_global_rank_ID | ||
| ) |
Retrieve parallel ownership information for all vertices.
Get vertex ownership information.
Queries which MPI rank owns each vertex. In parallel simulations, each vertex is owned by exactly one process, though it may be ghosted on others.
| [in] | pid | Application ID |
| [in] | vertices_length | Number of vertices (must match actual count) |
| [out] | visible_global_rank_ID | Array of owning ranks (size = vertices_length) |
Definition at line 1490 of file iMOAB.cpp.
References GlobalContext::appDatas, moab::Range::begin(), context, moab::Range::end(), moab::ParallelComm::get_owner(), MB_CHK_SET_ERR, MB_INVALID_SIZE, MB_SUCCESS, and moab::Range::size().
| ErrCode iMOAB_GetVisibleVerticesCoordinates | ( | iMOAB_AppID | pid, |
| int * | coords_length, | ||
| double * | coordinates | ||
| ) |
Retrieve coordinates for all vertices in interleaved format.
Get vertex coordinates for all local (owned and ghosted) vertices.
Extracts 3D coordinates (x,y,z) for all vertices in interleaved format: [x0,y0,z0, x1,y1,z1, ...]. Coordinates are returned in same order as vertex IDs.
| [in] | pid | Application ID |
| [in] | coords_length | Length of coordinates array (must equal 3 * num_vertices) |
| [out] | coordinates | Interleaved coordinate array (size = 3 * num_vertices) |
Definition at line 1557 of file iMOAB.cpp.
References GlobalContext::appDatas, context, moab::Interface::get_coords(), MB_CHK_SET_ERR, MB_INVALID_SIZE, MB_SUCCESS, GlobalContext::MBI, and moab::Range::size().
| ErrCode iMOAB_UpdateMeshInfo | ( | iMOAB_AppID | pid | ) |
Update application's mesh information after loading or modification.
Update local mesh data structure, from file information.
Refreshes all cached mesh metadata including vertex/element counts, ranges, owned/ghost entities, and material/boundary condition sets. Must be called after mesh loading or ghosting.
| [in] | pid | Application ID |
Definition at line 1186 of file iMOAB.cpp.
References appData::all_verts, GlobalContext::appDatas, moab::Range::clear(), moab::ParallelComm::comm(), context, appData::dimension, appData::diri_sets, GlobalContext::dirichlet_tag, moab::Range::empty(), appData::file_set, moab::ParallelComm::filter_pstatus(), moab::Interface::get_entities_by_dimension(), moab::Interface::get_entities_by_type(), moab::Interface::get_entities_by_type_and_tag(), appData::ghost_elems, appData::ghost_vertices, iMOAB_SetGlobalInfo(), appData::local_verts, appData::mat_sets, GlobalContext::material_tag, MB_CHK_SET_ERR, MB_SUCCESS, MBENTITYSET, GlobalContext::MBI, MBVERTEX, GlobalContext::MPI_initialized, appData::neu_sets, GlobalContext::neumann_tag, appData::owned_elems, appData::owned_verts, appData::point_cloud, appData::primary_elems, PSTATUS_GHOST, PSTATUS_NOT, PSTATUS_NOT_OWNED, moab::Range::size(), moab::subtract(), and moab::Interface::UNION.
Referenced by iMOAB_DetermineGhostEntities(), iMOAB_LoadMesh(), iMOAB_MergeVertices(), and iMOAB_ReceiveMesh().