#include "moab/MOABConfig.h"
#include "moab/Types.hpp"
#include <stdio.h>
#include <assert.h>
#include <stdlib.h>
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 2239 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 2218 of file iMOAB.cpp.
References moab::Interface::add_entities(), appData::all_verts, GlobalContext::appDatas, context, moab::Interface::create_vertices(), dim, moab::Range::empty(), ErrorCode, 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 1467 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.
ErrCode iMOAB_DeregisterApplication | ( | iMOAB_AppID | pid | ) |
De-Register application: delete mesh (set) associated with the application ID.
Operations: Collective
[in] | pid | (iMOAB_AppID) The unique pointer to the application ID |
Definition at line 331 of file iMOAB.cpp.
References GlobalContext::appDatas, GlobalContext::appIdCompMap, GlobalContext::appIdMap, context, moab::Interface::delete_entities(), moab::Range::empty(), ErrorCode, 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_ERR, MB_SUCCESS, MBENTITYSET, GlobalContext::MBI, MBVERTEX, appData::name, moab::ParallelComm::rank(), moab::Range::subset_by_type(), moab::subtract(), moab::Interface::UNION, and GlobalContext::unused_pid.
Referenced by iMOAB_DeregisterApplicationFortran().
ErrCode iMOAB_DeregisterApplicationFortran | ( | iMOAB_AppID | pid | ) |
De-Register the Fortran based application: delete mesh (set) associated with the application ID.
Operations: Collective
[in] | pid | (iMOAB_AppID) The unique pointer to the application ID |
Definition at line 432 of file iMOAB.cpp.
References GlobalContext::appDatas, context, and iMOAB_DeregisterApplication().
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). |
ErrCode iMOAB_Finalize | ( | void | ) |
Finalize the iMOAB interface implementation.
It will delete the internally reference counted MOAB instance, if the reference count reaches 0.
Operations: Collective
Definition at line 187 of file iMOAB.cpp.
References context, MB_SUCCESS, GlobalContext::MBI, and GlobalContext::refCountMB.
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 1159 of file iMOAB.cpp.
References appData::all_verts, GlobalContext::appDatas, context, ErrorCode, moab::Interface::get_connectivity(), moab::Interface::get_entities_by_handle(), moab::Range::index(), appData::mat_sets, appData::matIndex, MB_CHK_ERR, MB_SUCCESS, and GlobalContext::MBI.
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.
Operations: Not Collective
[in] | pid | (iMOAB_AppID) The unique pointer to the application ID. |
[in] | block_length | (int*) The allocated size of array (typical size := num_visible_blocks ). |
[out] | global_block_IDs | (iMOAB_GlobalID*) The global IDs for all locally visible blocks (array allocated by user). |
Definition at line 1036 of file iMOAB.cpp.
References GlobalContext::appDatas, context, ErrorCode, GlobalContext::material_tag, MB_CHK_ERR, 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 | ||
) |
Get the global block information and number of visible elements of belonging to a block (MATERIAL SET).
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 to be queried. |
[out] | vertices_per_element | (int*) The number of vertices per element. |
[out] | num_elements_in_block | (int*) The number of elements in block. |
Definition at line 1060 of file iMOAB.cpp.
References moab::Range::all_of_type(), GlobalContext::appDatas, context, moab::Range::empty(), ErrorCode, moab::Interface::get_connectivity(), moab::Interface::get_entities_by_handle(), MB_CHK_ERR, MB_SUCCESS, GlobalContext::MBI, moab::Range::size(), and moab::Interface::type_from_handle().
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 2035 of file iMOAB.cpp.
References appData::all_verts, GlobalContext::appDatas, context, ErrorCode, 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 1210 of file iMOAB.cpp.
References appData::all_verts, GlobalContext::appDatas, context, ErrorCode, moab::Interface::get_connectivity(), moab::Range::index(), MB_CHK_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 1300 of file iMOAB.cpp.
References GlobalContext::appDatas, context, moab::Range::empty(), ErrorCode, moab::Interface::get_entities_by_handle(), GlobalContext::globalID_tag, moab::Range::index(), appData::mat_sets, appData::matIndex, MB_CHK_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 1250 of file iMOAB.cpp.
References GlobalContext::appDatas, moab::Range::begin(), context, moab::Range::empty(), moab::Range::end(), ErrorCode, moab::Interface::get_entities_by_handle(), moab::ParallelComm::get_owner(), MB_CHK_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 2312 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 1659 of file iMOAB.cpp.
References appData::all_verts, GlobalContext::appDatas, context, ErrorCode, MB_CHK_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_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.
Operations: Not Collective
[in] | pid | (iMOAB_AppID) The unique pointer to the application ID. |
[out] | num_visible_vertices | (int*) The number of vertices in the current partition/process arranged. as: owned/shared only, ghosted, total_visible (array allocated by user, size := 3 ). |
[out] | num_visible_elements | (int*) The number of elements in current partition/process arranged as: owned only, ghosted/shared, total_visible (array allocated by user, size := 3 ). |
[out] | num_visible_blocks | (int*) The number of material sets in local mesh in current partition/process arranged as: owned only, ghosted/shared, total_visible (array allocated by user, size := 3 ). |
[out] | num_visible_surfaceBC | (int*) The number of mesh surfaces that have a NEUMANN_SET BC defined in local mesh in current partition/process arranged as: owned only, ghosted/shared, total_visible (array allocated by user, size := 3 ). |
[out] | num_visible_vertexBC | (int*) The number of vertices that have a DIRICHLET_SET BC defined in local mesh in current partition/process arranged as: owned only, ghosted/shared, total_visible (array allocated by user, size := 3 ). |
Definition at line 878 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(), ErrorCode, 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_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_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 2180 of file iMOAB.cpp.
References GlobalContext::appDatas, context, appData::dimension, ErrorCode, moab::MeshTopoUtil::get_bridge_adjacencies(), moab::Range::index(), MB_CHK_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 1350 of file iMOAB.cpp.
References GlobalContext::appDatas, moab::Range::begin(), context, appData::dimension, moab::Range::end(), ErrorCode, moab::Interface::get_adjacencies(), moab::Interface::get_entities_by_dimension(), moab::Range::index(), MB_CHK_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 1418 of file iMOAB.cpp.
References appData::all_verts, GlobalContext::appDatas, moab::Range::begin(), context, appData::diri_sets, GlobalContext::dirichlet_tag, moab::Range::end(), ErrorCode, moab::Interface::get_entities_by_dimension(), moab::Range::index(), MB_CHK_ERR, MB_SUCCESS, GlobalContext::MBI, moab::Range::size(), and moab::Interface::tag_get_data().
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.
Operations: Not collective
[in] | pid | (iMOAB_AppID) The unique pointer to the application ID. |
[in] | vertices_length | (int*) The allocated size of array (typical size := num_visible_vertices ). |
[out] | global_vertex_ID | (iMOAB_GlobalID*) The global IDs for all locally visible vertices (array allocated by user). |
Definition at line 970 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 | ||
) |
Get vertex ownership information.
For each vertex based on the local ID, return the process that owns the vertex (local, shared or ghost)
Operations: Not Collective
[in] | pid | (iMOAB_AppID) The unique pointer to the application ID. |
[in] | vertices_length | (int*) The allocated size of array (typically size := num_visible_vertices ). |
[out] | visible_global_rank_ID | (int*) The processor rank owning each of the local vertices. |
Definition at line 983 of file iMOAB.cpp.
References GlobalContext::appDatas, moab::Range::begin(), context, moab::Range::end(), ErrorCode, moab::ParallelComm::get_owner(), MB_CHK_ERR, MB_SUCCESS, and moab::Range::size().
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 1102 of file iMOAB.cpp.
References GlobalContext::appDatas, moab::Range::begin(), context, moab::Range::end(), ErrorCode, moab::Interface::get_entities_by_handle(), moab::ParallelComm::get_owner(), GlobalContext::globalID_tag, moab::Range::index(), appData::mat_sets, GlobalContext::material_tag, MB_CHK_ERR, MB_SUCCESS, GlobalContext::MBI, appData::primary_elems, and moab::Interface::tag_get_data().
ErrCode iMOAB_GetVisibleVerticesCoordinates | ( | iMOAB_AppID | pid, |
int * | coords_length, | ||
double * | coordinates | ||
) |
Get vertex coordinates for all local (owned and ghosted) vertices.
Operations: Not Collective
[in] | pid | (iMOAB_AppID) The unique pointer to the application ID. |
[in] | coords_length | (int*) The size of the allocated coordinate array (array allocated by user, size := 3*num_visible_vertices ). |
[out] | coordinates | (double*) The pointer to user allocated memory that will be filled with interleaved coordinates. |
Definition at line 1021 of file iMOAB.cpp.
References GlobalContext::appDatas, context, ErrorCode, moab::Interface::get_coords(), MB_CHK_ERR, MB_SUCCESS, GlobalContext::MBI, and moab::Range::size().
ErrCode iMOAB_Initialize | ( | int | argc, |
iMOAB_String * | argv | ||
) |
Initialize the iMOAB interface implementation.
Operations: Collective
[in] | argc | (int) Number of command line arguments |
[in] | argv | (iMOAB_String*) Command line arguments |
Definition at line 136 of file iMOAB.cpp.
References context, DIRICHLET_SET_TAG_NAME, GlobalContext::dirichlet_tag, ErrorCode, GLOBAL_ID_TAG_NAME, GlobalContext::globalID_tag, GlobalContext::globalrank, GlobalContext::iArgc, GlobalContext::iArgv, IMOAB_CHECKPOINTER, MATERIAL_SET_TAG_NAME, GlobalContext::material_tag, MB_CHK_ERR, MB_SUCCESS, MB_TAG_ANY, MB_TYPE_INTEGER, GlobalContext::MBI, GlobalContext::MPI_initialized, NEUMANN_SET_TAG_NAME, GlobalContext::neumann_tag, GlobalContext::refCountMB, moab::Interface::tag_get_handle(), and GlobalContext::worldprocs.
Referenced by iMOAB_InitializeFortran().
ErrCode iMOAB_InitializeFortran | ( | void | ) |
Initialize the iMOAB interface implementation from Fortran driver.
It will create the MOAB instance, if not created already (reference counted).
Operations: Collective
Definition at line 182 of file iMOAB.cpp.
References iMOAB_Initialize().
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.
This will also exchange ghost cells and vertices, as requested. The default bridge dimension is 0 (vertices), and all additional lower dimensional sub-entities are exchanged (mesh edges and faces). The tags in the file are not exchanged by default. Default tag information for GLOBAL_ID, MATERIAL_SET, NEUMANN_SET and DIRICHLET_SET is exchanged. Global ID tag is exchanged for all cells and vertices. Material sets, Neumann sets and Dirichlet sets are all augmented with the ghost entities.
Operations: Collective
[in] | pid | (iMOAB_AppID) The unique pointer to the application ID. |
[in] | filename | (iMOAB_String) The MOAB mesh file (H5M) to load onto the internal application mesh set. |
[in] | read_options | (iMOAB_String) Additional options for reading the MOAB mesh file in parallel. |
[in] | num_ghost_layers | (int*) The total number of ghost layers to exchange during mesh loading. |
Definition at line 607 of file iMOAB.cpp.
References GlobalContext::appDatas, context, ErrorCode, IMOAB_ASSERT, IMOAB_CHECKPOINTER, iMOAB_UpdateMeshInfo(), moab::Interface::load_file(), MB_CHK_ERR, GlobalContext::MBI, GlobalContext::MPI_initialized, GlobalContext::worldprocs, and moab::Interface::write_file().
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.
[in] | filename | (iMOAB_String) The MOAB mesh file (H5M) to probe for header information. |
[out] | num_global_vertices | (int*) The total number of vertices in the mesh file. |
[out] | num_global_elements | (int*) The total number of elements (of highest dimension only). |
[out] | num_dimension | (int*) The highest dimension of elements in the mesh (Edge=1, Tri/Quad=2, Tet/Hex/Prism/Pyramid=3). |
[out] | num_parts | (int*) The total number of partitions available in the mesh file, typically partitioned with mbpart during pre-processing. |
Definition at line 463 of file iMOAB.cpp.
References mhdf_EntDesc::count, mhdf_ElemDesc::desc, mhdf_FileDesc::elems, IMOAB_ASSERT, IMOAB_CHECKPOINTER, MB_SUCCESS, mdhf_HEX_TYPE_NAME, mdhf_KNIFE_TYPE_NAME, mhdf_closeFile(), mhdf_EDGE_TYPE_NAME, mhdf_getFileSummary(), mhdf_isError(), mhdf_message(), mhdf_openFile(), mhdf_POLYGON_TYPE_NAME, mhdf_POLYHEDRON_TYPE_NAME, mhdf_PRISM_TYPE_NAME, mhdf_PYRAMID_TYPE_NAME, mhdf_QUAD_TYPE_NAME, mhdf_SEPTAHEDRON_TYPE_NAME, mhdf_TET_TYPE_NAME, mhdf_TRI_TYPE_NAME, mhdf_FileDesc::nodes, mhdf_FileDesc::num_elem_desc, mhdf_FileDesc::numEntSets, mhdf_ElemDesc::type, and mhdf_EntDesc::vals_per_ent.
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 2140 of file iMOAB.cpp.
References appData::all_verts, GlobalContext::appDatas, context, ErrorCode, MB_CHK_ERR, MB_SUCCESS, appData::primary_elems, moab::ParallelComm::reduce_tags(), and appData::tagList.
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 |
Definition at line 199 of file iMOAB.cpp.
References GlobalContext::appDatas, GlobalContext::appIdCompMap, GlobalContext::appIdMap, context, moab::Interface::create_meshset(), ErrorCode, appData::file_set, moab::ParallelComm::get_id(), appData::global_id, IMOAB_CHECKPOINTER, appData::is_fortran, MB_CHK_ERR, MB_SUCCESS, GlobalContext::MBI, MESHSET_SET, appData::name, appData::num_ghost_layers, appData::point_cloud, and GlobalContext::unused_pid.
Referenced by iMOAB_RegisterApplicationFortran().
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. |
Definition at line 287 of file iMOAB.cpp.
References GlobalContext::appDatas, context, ErrCode, IMOAB_CHECKPOINTER, and iMOAB_RegisterApplication().
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). |
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 1716 of file iMOAB.cpp.
References appData::all_verts, GlobalContext::appDatas, context, ErrorCode, 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 1776 of file iMOAB.cpp.
References appData::all_verts, GlobalContext::appDatas, moab::Range::begin(), context, moab::ProcConfig::crystal_router(), moab::TupleList::enableWriteAccess(), moab::Range::end(), ErrorCode, 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 2304 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 1602 of file iMOAB.cpp.
References appData::all_verts, GlobalContext::appDatas, context, ErrorCode, MB_CHK_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 2095 of file iMOAB.cpp.
References appData::all_verts, GlobalContext::appDatas, context, ErrorCode, moab::ParallelComm::exchange_tags(), MB_CHK_ERR, MB_SUCCESS, appData::primary_elems, and appData::tagList.
ErrCode iMOAB_UpdateMeshInfo | ( | iMOAB_AppID | pid | ) |
Update local mesh data structure, from file information.
Operations: Collective
[in] | pid | (iMOAB_AppID) The unique pointer to the application ID. |
Definition at line 778 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(), ErrorCode, 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_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_LoadMesh().
ErrCode iMOAB_WriteLocalMesh | ( | iMOAB_AppID | pid, |
iMOAB_String | prefix | ||
) |
Write a local MOAB mesh copy.
Operations: Not Collective (independent operation).
[in] | pid | (iMOAB_AppID) The unique pointer to the application ID. |
[in] | prefix | (iMOAB_String) The MOAB file prefix that will be used with task ID in parallel. |
Definition at line 760 of file iMOAB.cpp.
References GlobalContext::appDatas, context, ErrorCode, IMOAB_ASSERT, IMOAB_CHECKPOINTER, MB_CHK_ERR, MB_SUCCESS, GlobalContext::MBI, size, and moab::Interface::write_file().
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.
Operations: Collective for parallel write, non collective for serial write.
[in] | pid | (iMOAB_AppID) The unique pointer to the application ID. |
[in] | filename | (iMOAB_String) The MOAB mesh file (H5M) to write all the entities contained in the internal application mesh set. |
[in] | write_options | (iMOAB_String) Additional options for writing the MOAB mesh in parallel. |
Definition at line 699 of file iMOAB.cpp.
References GlobalContext::appDatas, context, ErrorCode, appData::file_set, moab::Interface::globalId_tag(), IMOAB_ASSERT, IMOAB_CHECKPOINTER, MB_CHK_ERR, MB_SUCCESS, GlobalContext::MBI, moab::Interface::tag_get_handle(), appData::tagList, appData::tagMap, and moab::Interface::write_file().