#include "moab/MOABConfig.h"#include "moab/Types.hpp"#include <stdio.h>#include <assert.h>#include <stdlib.h>
Include dependency graph for iMOAB.h:
This graph shows which files directly or indirectly include this file:Go to the source code of this file.
Macros | |
| #define | iMOAB_AppID int* |
| #define | iMOAB_String char* |
| #define | iMOAB_GlobalID int |
| #define | iMOAB_LocalID int |
| #define | ErrCode int |
| #define | __PRETTY_FUNCTION__ __func__ |
| #define | CHK_MPI_ERR(ierr) |
| #define | IMOAB_CHECKPOINTER(prmObj, position) |
| #define | IMOAB_THROW_ERROR(message, retval) |
| #define | IMOAB_ASSERT_RET(condition, message, retval) |
| #define | IMOAB_ASSERT(condition, message) IMOAB_ASSERT_RET( condition, message, moab::MB_UNHANDLED_OPTION ) |
Enumerations | |
| enum | MOAB_TAG_TYPE { DENSE_INTEGER = 0 , DENSE_DOUBLE = 1 , DENSE_ENTITYHANDLE = 2 , SPARSE_INTEGER = 3 , SPARSE_DOUBLE = 4 , SPARSE_ENTITYHANDLE = 5 } |
| MOAB tag types can be: dense/sparse, and of int/double/EntityHandle types. They can also be defined on both elements and vertices of the mesh. More... | |
| enum | MOAB_TAG_OWNER_TYPE { TAG_VERTEX = 0 , TAG_EDGE = 1 , TAG_FACE = 2 , TAG_ELEMENT = 3 } |
| Define MOAB tag ownership information i.e., the entity where the tag is primarily defined This is typically used to query the tag data and to set it back. More... | |
Functions | |
| ErrCode | iMOAB_Initialize (int argc, iMOAB_String *argv) |
| Initialize the iMOAB interface implementation. More... | |
| ErrCode | iMOAB_InitializeFortran (void) |
| Initialize the iMOAB interface implementation from Fortran driver. More... | |
| ErrCode | iMOAB_Finalize (void) |
| Finalize the iMOAB interface implementation. More... | |
| ErrCode | iMOAB_RegisterApplication (const iMOAB_String app_name, int *compid, iMOAB_AppID pid) |
| Register application - Create a unique application ID and bootstrap interfaces for further queries. More... | |
| ErrCode | iMOAB_DeregisterApplication (iMOAB_AppID pid) |
| De-Register application: delete mesh (set) associated with the application ID. More... | |
| ErrCode | iMOAB_RegisterApplicationFortran (const iMOAB_String app_name, int *compid, iMOAB_AppID pid) |
| Register a Fortran-based application - Create a unique application ID and bootstrap interfaces for further queries. More... | |
| ErrCode | iMOAB_DeregisterApplicationFortran (iMOAB_AppID pid) |
| De-Register the Fortran based application: delete mesh (set) associated with the application ID. More... | |
| ErrCode | iMOAB_ReadHeaderInfo (const iMOAB_String filename, int *num_global_vertices, int *num_global_elements, int *num_dimension, int *num_parts) |
| It should be called on master task only, and information obtained could be broadcasted by the user. It is a fast lookup in the header of the file. More... | |
| ErrCode | iMOAB_LoadMesh (iMOAB_AppID pid, const iMOAB_String filename, const iMOAB_String read_options, int *num_ghost_layers) |
| Load a MOAB mesh file in parallel and exchange ghost layers as requested. More... | |
| ErrCode | iMOAB_CreateVertices (iMOAB_AppID pid, int *coords_len, int *dim, double *coordinates) |
| Create vertices for an app; it assumes no other vertices. More... | |
| ErrCode | iMOAB_CreateElements (iMOAB_AppID pid, int *num_elem, int *type, int *num_nodes_per_element, int *connectivity, int *block_ID) |
| Create elements for an app; it assumes connectivity from local vertices, in order. More... | |
| ErrCode | iMOAB_ResolveSharedEntities (iMOAB_AppID pid, int *num_verts, int *marker) |
| Resolve shared entities using global markers on shared vertices. More... | |
| ErrCode | iMOAB_DetermineGhostEntities (iMOAB_AppID pid, int *ghost_dim, int *num_ghost_layers, int *bridge_dim) |
| Create the requested number of ghost layers for the parallel mesh. More... | |
| ErrCode | iMOAB_WriteMesh (iMOAB_AppID pid, const iMOAB_String filename, const iMOAB_String write_options) |
| Write a MOAB mesh along with the solution tags to a file. More... | |
| ErrCode | iMOAB_WriteLocalMesh (iMOAB_AppID pid, iMOAB_String prefix) |
| Write a local MOAB mesh copy. More... | |
| ErrCode | iMOAB_UpdateMeshInfo (iMOAB_AppID pid) |
| Update local mesh data structure, from file information. 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) |
| Retrieve all the important mesh information related to vertices, elements, vertex and surface boundary conditions. More... | |
| ErrCode | iMOAB_GetVertexID (iMOAB_AppID pid, int *vertices_length, iMOAB_GlobalID *global_vertex_ID) |
| Get the global vertex IDs for all locally visible (owned and shared/ghosted) vertices. More... | |
| ErrCode | iMOAB_GetVertexOwnership (iMOAB_AppID pid, int *vertices_length, int *visible_global_rank_ID) |
| Get vertex ownership information. More... | |
| ErrCode | iMOAB_GetVisibleVerticesCoordinates (iMOAB_AppID pid, int *coords_length, double *coordinates) |
| Get vertex coordinates for all local (owned and ghosted) vertices. More... | |
| ErrCode | iMOAB_GetBlockID (iMOAB_AppID pid, int *block_length, iMOAB_GlobalID *global_block_IDs) |
| Get the global block IDs for all locally visible (owned and shared/ghosted) blocks. More... | |
| ErrCode | iMOAB_GetBlockInfo (iMOAB_AppID pid, iMOAB_GlobalID *global_block_ID, int *vertices_per_element, int *num_elements_in_block) |
| Get the global block information and number of visible elements of belonging to a block (MATERIAL SET). More... | |
| ErrCode | iMOAB_GetVisibleElementsInfo (iMOAB_AppID pid, int *num_visible_elements, iMOAB_GlobalID *element_global_IDs, int *ranks, iMOAB_GlobalID *block_IDs) |
| Get the visible elements information. More... | |
| ErrCode | iMOAB_GetBlockElementConnectivities (iMOAB_AppID pid, iMOAB_GlobalID *global_block_ID, int *connectivity_length, int *element_connectivity) |
| Get the connectivities for elements contained within a certain block. More... | |
| ErrCode | iMOAB_GetElementConnectivity (iMOAB_AppID pid, iMOAB_LocalID *elem_index, int *connectivity_length, int *element_connectivity) |
| Get the connectivity for one element only. More... | |
| ErrCode | iMOAB_GetElementOwnership (iMOAB_AppID pid, iMOAB_GlobalID *global_block_ID, int *num_elements_in_block, int *element_ownership) |
| Get the element ownership within a certain block i.e., processor ID of the element owner. More... | |
| ErrCode | iMOAB_GetElementID (iMOAB_AppID pid, iMOAB_GlobalID *global_block_ID, int *num_elements_in_block, iMOAB_GlobalID *global_element_ID, iMOAB_LocalID *local_element_ID) |
| Get the global IDs for all locally visible elements belonging to a particular block. More... | |
| ErrCode | iMOAB_GetPointerToSurfaceBC (iMOAB_AppID pid, int *surface_BC_length, iMOAB_LocalID *local_element_ID, int *reference_surface_ID, int *boundary_condition_value) |
| Get the surface boundary condition information. More... | |
| ErrCode | iMOAB_GetPointerToVertexBC (iMOAB_AppID pid, int *vertex_BC_length, iMOAB_LocalID *local_vertex_ID, int *boundary_condition_value) |
| Get the vertex boundary condition information. More... | |
| ErrCode | iMOAB_DefineTagStorage (iMOAB_AppID pid, const iMOAB_String tag_storage_name, int *tag_type, int *components_per_entity, int *tag_index) |
| Define a MOAB Tag corresponding to the application depending on requested types. More... | |
| ErrCode | iMOAB_SetIntTagStorage (iMOAB_AppID pid, const iMOAB_String tag_storage_name, int *num_tag_storage_length, int *entity_type, int *tag_storage_data) |
| Store the specified values in a MOAB integer Tag. More... | |
| ErrCode | iMOAB_GetIntTagStorage (iMOAB_AppID pid, const iMOAB_String tag_storage_name, int *num_tag_storage_length, int *entity_type, int *tag_storage_data) |
| Get the specified values in a MOAB integer Tag. More... | |
| ErrCode | iMOAB_SetDoubleTagStorage (iMOAB_AppID pid, const iMOAB_String tag_storage_name, int *num_tag_storage_length, int *entity_type, double *tag_storage_data) |
| Store the specified values in a MOAB double Tag. More... | |
| ErrCode | iMOAB_SetDoubleTagStorageWithGid (iMOAB_AppID pid, const iMOAB_String tag_storage_names, int *num_tag_storage_length, int *entity_type, double *tag_storage_data, int *globalIds) |
| Store the specified values in a MOAB double Tag, for given ids. More... | |
| ErrCode | iMOAB_GetDoubleTagStorage (iMOAB_AppID pid, const iMOAB_String tag_storage_name, int *num_tag_storage_length, int *entity_type, double *tag_storage_data) |
| Retrieve the specified values in a MOAB double Tag. More... | |
| ErrCode | iMOAB_SynchronizeTags (iMOAB_AppID pid, int *num_tag, int *tag_indices, int *ent_type) |
| Exchange tag values for the given tags across process boundaries. More... | |
| ErrCode | iMOAB_ReduceTagsMax (iMOAB_AppID pid, int *tag_index, int *ent_type) |
| Perform global reductions with the processes in the current applications communicator. Specifically this routine performs reductions on the maximum value of the tag indicated by tag_index. More... | |
| ErrCode | iMOAB_GetNeighborElements (iMOAB_AppID pid, iMOAB_LocalID *local_index, int *num_adjacent_elements, iMOAB_LocalID *adjacent_element_IDs) |
| Retrieve the adjacencies for the element entities. More... | |
| ErrCode | iMOAB_GetNeighborVertices (iMOAB_AppID pid, iMOAB_LocalID *local_vertex_ID, int *num_adjacent_vertices, iMOAB_LocalID *adjacent_vertex_IDs) |
| Get the adjacencies for the vertex entities. More... | |
| ErrCode | iMOAB_SetGlobalInfo (iMOAB_AppID pid, int *num_global_verts, int *num_global_elems) |
| Set global information for number of vertices and number of elements; It is usually available from the h5m file, or it can be computed with a MPI_Reduce. More... | |
| ErrCode | iMOAB_GetGlobalInfo (iMOAB_AppID pid, int *num_global_verts, int *num_global_elems) |
| Get global information about number of vertices and number of elements. More... | |
iMOAB: a language-agnostic, lightweight interface to MOAB.
Supports usage from C/C++, Fortran (77/90/2003), Python.
Definition in file iMOAB.h.
| #define CHK_MPI_ERR | ( | ierr | ) |
| #define iMOAB_AppID int* |
\notes 1) Fortran MPI_Comm won't work. Take an integer argument and use MPI_F2C calls to get the C-Comm object 2) ReadHeaderInfo - Does it need the pid ? 3) Reuse the comm object from the registration for both load and write operations. Do not take comm objects again to avoid confusion and retain consistency. 4) Decipher the global comm object and the subset partioning for each application based on the comm object 5) GetMeshInfo - return separately the owned and ghosted vertices/elements – not together in visible_** but rather owned_** and ghosted_**. Make these arrays of size 2. 6) Should we sort the vertices after ghosting, such that the locally owned is first, and the ghosted appended next. 7) RCM only for the owned part of the mesh – do not screw with the ghosted layers 8) GetBlockID - identical to GetVertexID – return the global numbering for block 9) GetVertexID – remember that the order of vertices returned have an implicit numbering embedded in it. DO NOT CHANGE THIS ORDERING... 10) GetBlockInfo takes global Block ID; Remove blockname unless there is a separate use case for it.. 11) GetElementConnectivity - clarify whether we return global or local vertex numbering. Preferably local numbering else lot of deciphering for global.
| #define IMOAB_ASSERT | ( | condition, | |
| message | |||
| ) | IMOAB_ASSERT_RET( condition, message, moab::MB_UNHANDLED_OPTION ) |
| #define IMOAB_ASSERT_RET | ( | condition, | |
| message, | |||
| retval | |||
| ) |
| #define IMOAB_CHECKPOINTER | ( | prmObj, | |
| position | |||
| ) |
| #define IMOAB_THROW_ERROR | ( | message, | |
| retval | |||
| ) |
| enum MOAB_TAG_OWNER_TYPE |
| enum MOAB_TAG_TYPE |
| ErrCode iMOAB_CreateElements | ( | iMOAB_AppID | pid, |
| int * | num_elem, | ||
| int * | type, | ||
| int * | num_nodes_per_element, | ||
| int * | connectivity, | ||
| int * | block_ID | ||
| ) |
Create elements for an app; it assumes connectivity from local vertices, in order.
| [in] | pid | (iMOAB_AppID) The unique pointer to the application ID. |
| [in] | num_elem | (int*) Number of elements. |
| [in] | type | (int*) Type of element (moab type). |
| [in] | num_nodes_per_element | (int*) Number of nodes per element. |
| [in] | connectivity | (int *) Connectivity array, with respect to vertices (assumed contiguous). |
| [in] | block_ID | (int *) The local block identifier, which will now contain the elements. |
add the new ents to the clock set
Definition at line 2931 of file iMOAB.cpp.
References moab::Interface::add_entities(), GlobalContext::appDatas, context, moab::Interface::create_meshset(), moab::Range::empty(), ErrorCode, appData::file_set, moab::ReadUtilIface::get_element_connect(), moab::Interface::get_entities_by_type_and_tag(), appData::local_verts, GlobalContext::material_tag, MB_CHK_ERR, MB_SUCCESS, MBENTITYSET, GlobalContext::MBI, moab::Range::merge(), MESHSET_SET, appData::primary_elems, moab::Interface::query_interface(), moab::Interface::tag_set_data(), and moab::ReadUtilIface::update_adjacencies().
| ErrCode iMOAB_CreateVertices | ( | iMOAB_AppID | pid, |
| int * | coords_len, | ||
| int * | dim, | ||
| double * | coordinates | ||
| ) |
Create vertices for an app; it assumes no other vertices.
| [in] | pid | (iMOAB_AppID) The unique pointer to the application ID. |
| [in] | coords_len | (int*) Size of the coordinates array (nverts * dim). |
| [in] | dim | (int*) Dimension of the vertex coordinates (usually 3). |
| [in] | coordinates | (double*) Coordinates of all vertices, interleaved. |
Definition at line 2911 of file iMOAB.cpp.
References moab::Interface::add_entities(), appData::all_verts, GlobalContext::appDatas, context, moab::Interface::create_vertices(), moab::Range::empty(), appData::file_set, appData::local_verts, MB_CHK_ERR, MB_SUCCESS, GlobalContext::MBI, and moab::Range::merge().
| ErrCode iMOAB_DefineTagStorage | ( | iMOAB_AppID | pid, |
| const iMOAB_String | tag_storage_name, | ||
| int * | tag_type, | ||
| int * | components_per_entity, | ||
| int * | tag_index | ||
| ) |
Define a MOAB Tag corresponding to the application depending on requested types.
Operations: Collective
| [in] | pid | (iMOAB_AppID) The unique pointer to the application ID. |
| [in] | tag_storage_name | (iMOAB_String) The tag name to store/retrieve the data in MOAB. |
| [in] | tag_type | (int*) The type of MOAB tag (Dense/Sparse, Double/Int/EntityHandle), enum MOAB_TAG_TYPE. |
| [in] | components_per_entity | (int*) The total size of vector dimension per entity for the tag (e.g., number of doubles per entity). |
| [out] | tag_index | (int*) The tag index which can be used as identifier in synchronize methods. |
Definition at line 2068 of file iMOAB.cpp.
References GlobalContext::appDatas, context, ErrorCode, appData::global_id, MB_ALREADY_ALLOCATED, MB_SUCCESS, MB_TAG_CREAT, MB_TAG_DENSE, MB_TAG_EXCL, MB_TAG_SPARSE, MB_TYPE_DOUBLE, MB_TYPE_HANDLE, MB_TYPE_INTEGER, GlobalContext::MBI, appData::name, moab::ParallelComm::rank(), split_tag_names(), moab::Interface::tag_get_handle(), appData::tagList, appData::tagMap, and TagType.
Referenced by iMOAB_ReceiveMesh().
| ErrCode iMOAB_DetermineGhostEntities | ( | iMOAB_AppID | pid, |
| int * | ghost_dim, | ||
| int * | num_ghost_layers, | ||
| int * | bridge_dim | ||
| ) |
Create the requested number of ghost layers for the parallel mesh.
Operations: Collective.
| [in] | pid | (iMOAB_AppID) The unique pointer to the application ID. |
| [in] | ghost_dim | (int*) Desired ghost dimension (2 or 3, most of the time). |
| [in] | num_ghost_layers | (int*) Number of ghost layers requested. |
| [in] | bridge_dim | (int*) Bridge dimension (0 for vertices, 1 for edges, 2 for faces). |
Definition at line 3076 of file iMOAB.cpp.
References GlobalContext::appDatas, context, moab::ParallelComm::correct_thin_ghost_layers(), moab::ParallelComm::exchange_ghost_cells(), appData::file_set, iMOAB_UpdateMeshInfo(), MB_CHK_ERR, MB_SUCCESS, and appData::num_ghost_layers.
| ErrCode iMOAB_GetBlockElementConnectivities | ( | iMOAB_AppID | pid, |
| iMOAB_GlobalID * | global_block_ID, | ||
| int * | connectivity_length, | ||
| int * | element_connectivity | ||
| ) |
Get the connectivities for elements contained within a certain block.
Operations: Not Collective
| [in] | pid | (iMOAB_AppID) The unique pointer to the application ID. |
| [in] | global_block_ID | (iMOAB_GlobalID*) The global block ID of the set being queried. |
| [in] | connectivity_length | (int*) The allocated size of array. (typical size := vertices_per_element*num_elements_in_block) |
| [out] | element_connectivity | (int*) The connectivity array to store element ordering in MOAB canonical numbering scheme (array allocated by user); array contains vertex indices in the local numbering order for vertices elements are in the same order as provided by GetElementOwnership and GetElementID. |
Definition at line 1745 of file iMOAB.cpp.
References appData::all_verts, GlobalContext::appDatas, context, moab::Interface::get_connectivity(), moab::Interface::get_entities_by_handle(), moab::Range::index(), appData::mat_sets, appData::matIndex, MB_CHK_SET_ERR, MB_SUCCESS, and GlobalContext::MBI.
| ErrCode iMOAB_GetDoubleTagStorage | ( | iMOAB_AppID | pid, |
| const iMOAB_String | tag_storage_name, | ||
| int * | num_tag_storage_length, | ||
| int * | entity_type, | ||
| double * | tag_storage_data | ||
| ) |
Retrieve the specified values in a MOAB double Tag.
| [in] | pid | (iMOAB_AppID) The unique pointer to the application ID. |
| [in] | tag_storage_name | (iMOAB_String) The tag names to retrieve the data in MOAB. |
| [in] | num_tag_storage_length | (int) The size of total tag storage data (e.g., num_visible_vertices*components_per_entity*num_tags or num_visible_elements*components_per_entity*num_tags) |
| [in] | entity_type | (int*) Type=0 for vertices, and Type=1 for primary elements. |
| [out] | tag_storage_data | (double*) The array data of type double to replace the internal tag memory; The data is assumed to be contiguous over the local set of visible entities (either vertices or elements). unrolled by tags |
Definition at line 2729 of file iMOAB.cpp.
References appData::all_verts, GlobalContext::appDatas, context, MB_CHK_ERR, MB_SUCCESS, MB_TYPE_DOUBLE, GlobalContext::MBI, appData::primary_elems, moab::Range::size(), split_tag_names(), moab::Interface::tag_get_data(), moab::Interface::tag_get_data_type(), moab::Interface::tag_get_length(), and appData::tagMap.
| ErrCode iMOAB_GetElementConnectivity | ( | iMOAB_AppID | pid, |
| iMOAB_LocalID * | elem_index, | ||
| int * | connectivity_length, | ||
| int * | element_connectivity | ||
| ) |
Get the connectivity for one element only.
Operations: Not Collective
| [in] | pid | (iMOAB_AppID) The unique pointer to the application ID. |
| [in] | elem_index | (iMOAB_LocalID *) Local element index. |
| [in,out] | connectivity_length | (int *) On input, maximum length of connectivity. On output, actual length. |
| [out] | element_connectivity | (int*) The connectivity array to store connectivity in MOAB canonical numbering scheme. Array contains vertex indices in the local numbering order for vertices. |
Definition at line 1793 of file iMOAB.cpp.
References appData::all_verts, GlobalContext::appDatas, context, moab::Interface::get_connectivity(), moab::index, moab::Range::index(), MB_CHK_SET_ERR, MB_SUCCESS, GlobalContext::MBI, appData::primary_elems, and moab::Range::size().
| ErrCode iMOAB_GetElementID | ( | iMOAB_AppID | pid, |
| iMOAB_GlobalID * | global_block_ID, | ||
| int * | num_elements_in_block, | ||
| iMOAB_GlobalID * | global_element_ID, | ||
| iMOAB_LocalID * | local_element_ID | ||
| ) |
Get the global IDs for all locally visible elements belonging to a particular block.
Operations: Not Collective
| [in] | pid | (iMOAB_AppID) The unique pointer to the application ID. |
| [in] | global_block_ID | (iMOAB_GlobalID*) The global block ID of the set being queried. |
| [in] | num_elements_in_block | (int*) The allocated size of global element ID array, same as num_elements_in_block returned from GetBlockInfo(). |
| [out] | global_element_ID | (iMOAB_GlobalID*) The global IDs for all locally visible elements (array allocated by user). |
| [out] | local_element_ID | (iMOAB_LocalID*) (Optional) The local IDs for all locally visible elements (index in the range of all primary elements in the rank) |
Definition at line 1880 of file iMOAB.cpp.
References GlobalContext::appDatas, context, moab::Range::empty(), moab::Interface::get_entities_by_handle(), GlobalContext::globalID_tag, moab::Range::index(), appData::mat_sets, appData::matIndex, MB_CHK_SET_ERR, MB_SUCCESS, GlobalContext::MBI, appData::primary_elems, moab::Range::size(), and moab::Interface::tag_get_data().
| ErrCode iMOAB_GetElementOwnership | ( | iMOAB_AppID | pid, |
| iMOAB_GlobalID * | global_block_ID, | ||
| int * | num_elements_in_block, | ||
| int * | element_ownership | ||
| ) |
Get the element ownership within a certain block i.e., processor ID of the element owner.
Operations: Not Collective
| [in] | pid | (iMOAB_AppID) The unique pointer to the application ID. |
| [in] | global_block_ID | (iMOAB_GlobalID) The global block ID of the set being queried. |
| [in] | num_elements_in_block | (int*) The allocated size of ownership array, same as num_elements_in_block returned from GetBlockInfo(). |
| [out] | element_ownership | (int*) The ownership array to store processor ID for all elements (array allocated by user). |
Definition at line 1833 of file iMOAB.cpp.
References GlobalContext::appDatas, moab::Range::begin(), context, moab::Range::empty(), moab::Range::end(), moab::Interface::get_entities_by_handle(), moab::ParallelComm::get_owner(), MB_CHK_SET_ERR, MB_SUCCESS, GlobalContext::MBI, and moab::Range::size().
| ErrCode iMOAB_GetGlobalInfo | ( | iMOAB_AppID | pid, |
| int * | num_global_verts, | ||
| int * | num_global_elems | ||
| ) |
Get global information about number of vertices and number of elements.
| [in] | pid | (iMOAB_AppID) The unique pointer to the application ID. |
| [in] | num_global_verts | (int*) The number of total vertices in the mesh. |
| [in] | num_global_elems | (MPI_Comm) The number of total elements in the mesh. |
Definition at line 3007 of file iMOAB.cpp.
References GlobalContext::appDatas, context, MB_SUCCESS, appData::num_global_elements, and appData::num_global_vertices.
| ErrCode iMOAB_GetIntTagStorage | ( | iMOAB_AppID | pid, |
| const iMOAB_String | tag_storage_name, | ||
| int * | num_tag_storage_length, | ||
| int * | entity_type, | ||
| int * | tag_storage_data | ||
| ) |
Get the specified values in a MOAB integer Tag.
| [in] | pid | (iMOAB_AppID) The unique pointer to the application ID. |
| [in] | tag_storage_name | (iMOAB_String) The tag name to store/retreive the data in MOAB. |
| [in] | num_tag_storage_length | (int*) The size of tag storage data (e.g., num_visible_vertices*components_per_entity or num_visible_elements*components_per_entity). |
| [in] | entity_type | (int*) Type=0 for vertices, and Type=1 for primary elements. |
| [out] | tag_storage_data | (int*) The array data of type int to be copied from the internal tag memory; The data is assumed to be contiguous over the local set of visible entities (either vertices or elements). |
Definition at line 2241 of file iMOAB.cpp.
References appData::all_verts, GlobalContext::appDatas, context, MB_CHK_ERR, MB_CHK_SET_ERR, MB_SUCCESS, MB_TYPE_INTEGER, GlobalContext::MBI, appData::primary_elems, moab::Range::size(), moab::Interface::tag_get_data(), moab::Interface::tag_get_data_type(), moab::Interface::tag_get_length(), and appData::tagMap.
| ErrCode iMOAB_GetNeighborElements | ( | iMOAB_AppID | pid, |
| iMOAB_LocalID * | local_index, | ||
| int * | num_adjacent_elements, | ||
| iMOAB_LocalID * | adjacent_element_IDs | ||
| ) |
Retrieve the adjacencies for the element entities.
| [in] | pid | (iMOAB_AppID) The unique pointer to the application ID. |
| [in] | local_index | (iMOAB_LocalID*) The local element ID for which adjacency information is needed. |
| [out] | num_adjacent_elements | (int*) The total number of adjacent elements. |
| [out] | adjacent_element_IDs | (iMOAB_LocalID*) The local element IDs of all adjacent elements to the current one (typically, num_total_sides for internal elements or num_total_sides-num_sides_on_boundary for boundary elements). |
Definition at line 2872 of file iMOAB.cpp.
References GlobalContext::appDatas, context, appData::dimension, moab::MeshTopoUtil::get_bridge_adjacencies(), moab::Range::index(), MB_CHK_SET_ERR, MB_SUCCESS, GlobalContext::MBI, appData::primary_elems, and moab::Range::size().
| ErrCode iMOAB_GetNeighborVertices | ( | iMOAB_AppID | pid, |
| iMOAB_LocalID * | local_vertex_ID, | ||
| int * | num_adjacent_vertices, | ||
| iMOAB_LocalID * | adjacent_vertex_IDs | ||
| ) |
Get the adjacencies for the vertex entities.
| [in] | pid | (iMOAB_AppID) The unique pointer to the application ID. |
| [in] | local_vertex_ID | (iMOAB_LocalID*) The local vertex ID for which adjacency information is needed. |
| [out] | num_adjacent_vertices | (int*) The total number of adjacent vertices. |
| [out] | adjacent_vertex_IDs | (iMOAB_LocalID*) The local element IDs of all adjacent vertices to the current one (typically, num_total_sides for internal elements or num_total_sides-num_sides_on_boundary for boundary elements). |
| ErrCode iMOAB_GetPointerToSurfaceBC | ( | iMOAB_AppID | pid, |
| int * | surface_BC_length, | ||
| iMOAB_LocalID * | local_element_ID, | ||
| int * | reference_surface_ID, | ||
| int * | boundary_condition_value | ||
| ) |
Get the surface boundary condition information.
| [in] | pid | (iMOAB_AppID) The unique pointer to the application ID. |
| [in] | surface_BC_length | (int*) The allocated size of surface boundary condition array, same as num_visible_surfaceBC returned by GetMeshInfo(). |
| [out] | local_element_ID | (iMOAB_LocalID*) The local element IDs that contains the side with the surface BC. |
| [out] | reference_surface_ID | (int*) The surface number with the BC in the canonical reference element (e.g., 1 to 6 for HEX, 1-4 for TET). |
| [out] | boundary_condition_value | (int*) The boundary condition type as obtained from the mesh description (value of the NeumannSet defined on the element). |
Definition at line 1928 of file iMOAB.cpp.
References GlobalContext::appDatas, moab::Range::begin(), context, appData::dimension, moab::Range::end(), moab::Interface::get_adjacencies(), moab::Interface::get_entities_by_dimension(), moab::index, moab::Range::index(), MB_CHK_SET_ERR, MB_SUCCESS, GlobalContext::MBI, appData::neu_sets, GlobalContext::neumann_tag, appData::primary_elems, moab::Interface::side_number(), moab::side_number(), moab::Range::size(), and moab::Interface::tag_get_data().
| ErrCode iMOAB_GetPointerToVertexBC | ( | iMOAB_AppID | pid, |
| int * | vertex_BC_length, | ||
| iMOAB_LocalID * | local_vertex_ID, | ||
| int * | boundary_condition_value | ||
| ) |
Get the vertex boundary condition information.
| [in] | pid | (iMOAB_AppID) The unique pointer to the application ID. |
| [in] | vertex_BC_length | (int) The allocated size of vertex boundary condition array, same as num_visible_vertexBC returned by GetMeshInfo(). |
| [out] | local_vertex_ID | (iMOAB_LocalID*) The local vertex ID that has Dirichlet BC defined. |
| [out] | boundary_condition_value | (int*) The boundary condition type as obtained from the mesh description (value of the Dirichlet_Set tag defined on the vertex). |
Definition at line 1998 of file iMOAB.cpp.
References appData::all_verts, GlobalContext::appDatas, moab::Range::begin(), context, appData::diri_sets, GlobalContext::dirichlet_tag, moab::Range::end(), moab::Interface::get_entities_by_dimension(), moab::index, moab::Range::index(), MB_CHK_SET_ERR, MB_SUCCESS, GlobalContext::MBI, moab::Range::size(), and moab::Interface::tag_get_data().
| ErrCode iMOAB_GetVisibleElementsInfo | ( | iMOAB_AppID | pid, |
| int * | num_visible_elements, | ||
| iMOAB_GlobalID * | element_global_IDs, | ||
| int * | ranks, | ||
| iMOAB_GlobalID * | block_IDs | ||
| ) |
Get the visible elements information.
Return for all visible elements the global IDs, ranks they belong to, block ids they belong to.
| [in] | pid | (iMOAB_AppID) The unique pointer to the application ID. |
| [in] | num_visible_elements | (int*) The number of visible elements (returned by GetMeshInfo). |
| [out] | element_global_IDs | (iMOAB_GlobalID*) Element global ids to be added to the block. |
| [out] | ranks | (int*) The owning ranks of elements. |
| [out] | block_IDs | (iMOAB_GlobalID*) The block ids containing the elements. |
Definition at line 1686 of file iMOAB.cpp.
References GlobalContext::appDatas, moab::Range::begin(), context, moab::Range::end(), moab::Interface::get_entities_by_handle(), moab::ParallelComm::get_owner(), GlobalContext::globalID_tag, moab::index, moab::Range::index(), appData::mat_sets, GlobalContext::material_tag, MB_CHK_SET_ERR, MB_SUCCESS, GlobalContext::MBI, appData::primary_elems, and moab::Interface::tag_get_data().
| ErrCode iMOAB_ReduceTagsMax | ( | iMOAB_AppID | pid, |
| int * | tag_index, | ||
| int * | ent_type | ||
| ) |
Perform global reductions with the processes in the current applications communicator. Specifically this routine performs reductions on the maximum value of the tag indicated by tag_index.
| [in] | pid | (iMOAB_AppID) The unique pointer to the application ID. |
| [in] | tag_index | (int*) The tag index of interest. |
| [in] | ent_type | (int*) The type of entity for tag reduction operation (vertices = 0, elements = 1) |
Definition at line 2833 of file iMOAB.cpp.
References appData::all_verts, GlobalContext::appDatas, context, MB_CHK_ERR, MB_SUCCESS, appData::primary_elems, moab::ParallelComm::reduce_tags(), appData::tagList, and UNUSED.
| ErrCode iMOAB_RegisterApplication | ( | const iMOAB_String | app_name, |
| int * | compid, | ||
| iMOAB_AppID | pid | ||
| ) |
Register application - Create a unique application ID and bootstrap interfaces for further queries.
Operations: Collective
| [in] | app_name | (iMOAB_String) Application name (PROTEUS, NEK5000, etc) |
| [in] | comm | (MPI_Comm*) MPI communicator to be used for all mesh-related queries originating from this application |
| [in] | compid | (int*) The unique external component identifier |
| [out] | pid | (iMOAB_AppID) The unique pointer to the application ID |
| ErrCode iMOAB_RegisterApplicationFortran | ( | const iMOAB_String | app_name, |
| int * | compid, | ||
| iMOAB_AppID | pid | ||
| ) |
Register a Fortran-based application - Create a unique application ID and bootstrap interfaces for further queries.
Operations: Collective
| [in] | app_name | (iMOAB_String) Application name ("MySolver", "E3SM", "DMMoab", "PROTEUS", "NEK5000", etc) |
| [in] | communicator | (int*) Fortran MPI communicator to be used for all mesh-related queries originating from this application. |
| [in] | compid | (int*) External component id, (A const unique identifier). |
| [out] | pid | (iMOAB_AppID) The unique pointer to the application ID. |
| ErrCode iMOAB_ResolveSharedEntities | ( | iMOAB_AppID | pid, |
| int * | num_verts, | ||
| int * | marker | ||
| ) |
Resolve shared entities using global markers on shared vertices.
Operations: Collective .
| [in] | pid | (iMOAB_AppID) The unique pointer to the application ID. |
| [in] | num_verts | (int*) Number of vertices. |
| [in] | marker | (int*) Resolving marker (global id marker). |
Definition at line 3025 of file iMOAB.cpp.
References GlobalContext::appDatas, context, moab::Range::empty(), ErrorCode, appData::file_set, appData::local_verts, MB_ALREADY_ALLOCATED, MB_CHK_ERR, MB_SUCCESS, MB_TAG_CREAT, MB_TAG_DENSE, MB_TAG_SPARSE, MB_TYPE_INTEGER, GlobalContext::MBI, appData::primary_elems, moab::ParallelComm::rank(), moab::ParallelComm::resolve_shared_ents(), moab::Range::size(), moab::Interface::tag_delete(), moab::Interface::tag_get_handle(), and moab::Interface::tag_set_data().
| ErrCode iMOAB_SetDoubleTagStorage | ( | iMOAB_AppID | pid, |
| const iMOAB_String | tag_storage_name, | ||
| int * | num_tag_storage_length, | ||
| int * | entity_type, | ||
| double * | tag_storage_data | ||
| ) |
Store the specified values in a MOAB double Tag.
| [in] | pid | (iMOAB_AppID) The unique pointer to the application ID. |
| [in] | tag_storage_name | (iMOAB_String) The tag names, separated, to store the data. |
| [in] | num_tag_storage_length | (int*) The size of total tag storage data (e.g., num_visible_vertices*components_per_entity or num_visible_elements*components_per_entity*num_tags). |
| [in] | entity_type | (int*) Type=0 for vertices, and Type=1 for primary elements. |
| [out] | tag_storage_data | (double*) The array data of type double to replace the internal tag memory; The data is assumed to be contiguous over the local set of visible entities (either vertices or elements). unrolled by tags |
Definition at line 2285 of file iMOAB.cpp.
References appData::all_verts, GlobalContext::appDatas, context, MB_CHK_ERR, MB_SUCCESS, MB_TYPE_DOUBLE, GlobalContext::MBI, appData::primary_elems, moab::Range::size(), split_tag_names(), moab::Interface::tag_get_data_type(), moab::Interface::tag_get_length(), moab::Interface::tag_set_data(), and appData::tagMap.
| ErrCode iMOAB_SetDoubleTagStorageWithGid | ( | iMOAB_AppID | pid, |
| const iMOAB_String | tag_storage_names, | ||
| int * | num_tag_storage_length, | ||
| int * | entity_type, | ||
| double * | tag_storage_data, | ||
| int * | globalIds | ||
| ) |
Store the specified values in a MOAB double Tag, for given ids.
| [in] | pid | (iMOAB_AppID) The unique pointer to the application ID. |
| [in] | tag_storage_name | (iMOAB_String) The tag names, separated, to store the data. |
| [in] | num_tag_storage_length | (int*) The size of total tag storage data (e.g., num_visible_vertices*components_per_entity or num_visible_elements*components_per_entity*num_tags). |
| [in] | entity_type | (int*) Type=0 for vertices, and Type=1 for primary elements. |
| [in] | tag_storage_data | (double*) The array data of type double to replace the internal tag memory; The data is assumed to be permuted over the local set of visible entities (either vertices or elements). unrolled by tags in parallel, might be different order, or different entities on the task |
| [in] | globalIds | global ids of the cells to be set; |
Definition at line 2336 of file iMOAB.cpp.
References appData::all_verts, GlobalContext::appDatas, moab::Range::begin(), context, moab::ProcConfig::crystal_router(), moab::TupleList::enableWriteAccess(), moab::Range::end(), moab::TupleList::get_n(), moab::Interface::globalId_tag(), moab::TupleList::inc_n(), moab::TupleList::initialize(), MB_CHK_ERR, MB_SET_ERR, MB_SUCCESS, MB_TYPE_DOUBLE, GlobalContext::MBI, appData::primary_elems, moab::ParallelComm::proc_config(), moab::TupleList::reserve(), moab::TupleList::buffer::reset(), moab::Range::size(), moab::ParallelComm::size(), moab::TupleList::sort(), split_tag_names(), moab::Interface::tag_get_data(), moab::Interface::tag_get_data_type(), moab::Interface::tag_get_length(), moab::Interface::tag_set_data(), appData::tagMap, moab::TupleList::vi_rd, moab::TupleList::vi_wr, moab::TupleList::vr_rd, and moab::TupleList::vr_wr.
| ErrCode iMOAB_SetGlobalInfo | ( | iMOAB_AppID | pid, |
| int * | num_global_verts, | ||
| int * | num_global_elems | ||
| ) |
Set global information for number of vertices and number of elements; It is usually available from the h5m file, or it can be computed with a MPI_Reduce.
| [in] | pid | (iMOAB_AppID) The unique pointer to the application ID. |
| [in] | num_global_verts | (int*) The number of total vertices in the mesh. |
| [in] | num_global_elems | (MPI_Comm) The number of total elements in the mesh. |
Definition at line 2999 of file iMOAB.cpp.
References GlobalContext::appDatas, context, MB_SUCCESS, appData::num_global_elements, and appData::num_global_vertices.
Referenced by iMOAB_UpdateMeshInfo().
| ErrCode iMOAB_SetIntTagStorage | ( | iMOAB_AppID | pid, |
| const iMOAB_String | tag_storage_name, | ||
| int * | num_tag_storage_length, | ||
| int * | entity_type, | ||
| int * | tag_storage_data | ||
| ) |
Store the specified values in a MOAB integer Tag.
Values are set on vertices or elements, depending on entity_type
Operations: Collective
| [in] | pid | (iMOAB_AppID) The unique pointer to the application ID. |
| [in] | tag_storage_name | (iMOAB_String) The tag name to store/retreive the data in MOAB. |
| [in] | num_tag_storage_length | (int*) The size of tag storage data (e.g., num_visible_vertices*components_per_entity or num_visible_elements*components_per_entity). |
| [in] | entity_type | (int*) Type=0 for vertices, and Type=1 for primary elements. |
| [out] | tag_storage_data | (int*) The array data of type int to replace the internal tag memory; The data is assumed to be contiguous over the local set of visible entities (either vertices or elements). |
Definition at line 2199 of file iMOAB.cpp.
References appData::all_verts, GlobalContext::appDatas, context, MB_CHK_ERR, MB_CHK_SET_ERR, MB_SUCCESS, MB_TYPE_INTEGER, GlobalContext::MBI, appData::primary_elems, moab::Range::size(), moab::Interface::tag_get_data_type(), moab::Interface::tag_get_length(), moab::Interface::tag_set_data(), and appData::tagMap.
| ErrCode iMOAB_SynchronizeTags | ( | iMOAB_AppID | pid, |
| int * | num_tag, | ||
| int * | tag_indices, | ||
| int * | ent_type | ||
| ) |
Exchange tag values for the given tags across process boundaries.
| [in] | pid | (iMOAB_AppID) The unique pointer to the application ID. |
| [in] | num_tags | (int*) Number of tags to exchange. |
| [in] | tag_indices | (int*) Array with tag indices of interest (size = *num_tags). |
| [in] | ent_type | (int*) The type of entity for tag exchange. |
Definition at line 2788 of file iMOAB.cpp.
References appData::all_verts, GlobalContext::appDatas, context, moab::ParallelComm::exchange_tags(), MB_CHK_ERR, MB_SUCCESS, appData::primary_elems, appData::tagList, and UNUSED.