MOAB: Mesh Oriented datABase
(version 5.4.1)
|
Mesquite iMesh Adapter. More...
#include <MsqIMeshP.hpp>
Public Member Functions | |
MsqIMeshP () | |
virtual | ~MsqIMeshP () |
MsqIMeshP (iMesh_Instance imesh, iMeshP_PartitionHandle partition, iBase_EntitySetHandle meshset, iBase_EntityType element_dimension, MsqError &err, const iBase_TagHandle *fixed_tag=0, const iBase_TagHandle *slaved_tag=0) | |
MsqIMeshP (iMesh_Instance imesh, iMeshP_PartitionHandle partition, iBase_EntityType element_dimension, MsqError &err, const iBase_TagHandle *fixed_tag=0, const iBase_TagHandle *slaved_tag=0) | |
virtual void | vertices_get_global_id (const VertexHandle vert_array[], size_t gid[], size_t num_vtx, MsqError &err) |
virtual void | vertices_get_processor_id (const VertexHandle vert_array[], int pid[], size_t num_vtx, MsqError &err) |
Protected Attributes | |
iMeshP_PartitionHandle | partitionInstance |
Mesquite iMesh Adapter.
Adpater for interfacing parallel Mesquite with an application that provides the ITAPS iMeshP interface for interacting with mesh data.
Definition at line 50 of file MsqIMeshP.hpp.
MBMesquite::MsqIMeshP::~MsqIMeshP | ( | ) | [virtual] |
Definition at line 72 of file MsqIMeshP.cpp.
{}
MBMesquite::MsqIMeshP::MsqIMeshP | ( | iMesh_Instance | imesh, |
iMeshP_PartitionHandle | partition, | ||
iBase_EntitySetHandle | meshset, | ||
iBase_EntityType | element_dimension, | ||
MsqError & | err, | ||
const iBase_TagHandle * | fixed_tag = 0 , |
||
const iBase_TagHandle * | slaved_tag = 0 |
||
) |
Definition at line 51 of file MsqIMeshP.cpp.
: MsqIMesh( mesh, meshset, type, err, fixed_tag, slaved_tag ), partitionInstance( partition ) { }
MBMesquite::MsqIMeshP::MsqIMeshP | ( | iMesh_Instance | imesh, |
iMeshP_PartitionHandle | partition, | ||
iBase_EntityType | element_dimension, | ||
MsqError & | err, | ||
const iBase_TagHandle * | fixed_tag = 0 , |
||
const iBase_TagHandle * | slaved_tag = 0 |
||
) |
Definition at line 62 of file MsqIMeshP.cpp.
: MsqIMesh( mesh, element_dimension, err, fixed_tag, slaved_tag ), partitionInstance( partition ) { }
void MBMesquite::MsqIMeshP::vertices_get_global_id | ( | const VertexHandle | vert_array[], |
size_t | gid[], | ||
size_t | num_vtx, | ||
MsqError & | err | ||
) | [virtual] |
Get global ids for given vertices.
Implements MBMesquite::ParallelMesh.
Definition at line 76 of file MsqIMeshP.cpp.
References iMeshP_getEntOwnerPart, iMeshP_getLocalParts, iMeshP_getOwnerCopy, iMeshP_getPartIdFromPartHandle, iMeshP_getRankOfPart, MBMesquite::MsqIMesh::meshInstance, partitionInstance, and rank.
{ int itaps_err; // get a local part id iMeshP_PartHandle* parts = 0; int parts_allocated = 0; int parts_size = 0; iMeshP_getLocalParts( meshInstance, partitionInstance, &parts, &parts_allocated, &parts_size, &itaps_err ); iMeshP_Part part_id; iMeshP_getPartIdFromPartHandle( meshInstance, partitionInstance, parts[0], &part_id, &itaps_err ); if( parts_allocated ) free( parts ); // get rank of local part int rank; iMeshP_getRankOfPart( meshInstance, partitionInstance, part_id, &rank, &itaps_err ); // get global ids for all vertex handles for( unsigned i = 0; i < num_vtx; i++ ) { iMeshP_getEntOwnerPart( meshInstance, partitionInstance, (iBase_EntityHandle)( vert_array[i] ), &part_id, &itaps_err ); int part_rank; iMeshP_getRankOfPart( meshInstance, partitionInstance, part_id, &part_rank, &itaps_err ); if( part_rank == rank ) { gid[i] = (size_t)( vert_array[i] ); } else { iBase_EntityHandle handle; iMeshP_getOwnerCopy( meshInstance, partitionInstance, (iBase_EntityHandle)( vert_array[i] ), &part_id, &handle, &itaps_err ); gid[i] = (size_t)handle; } } }
void MBMesquite::MsqIMeshP::vertices_get_processor_id | ( | const VertexHandle | vert_array[], |
int | pid[], | ||
size_t | num_vtx, | ||
MsqError & | err | ||
) | [virtual] |
Get processor ids for given vertices.
Implements MBMesquite::ParallelMesh.
Definition at line 114 of file MsqIMeshP.cpp.
References iMeshP_getEntOwnerPart, iMeshP_getRankOfPart, MBMesquite::MsqIMesh::meshInstance, and partitionInstance.
{ int itaps_err; for( unsigned i = 0; i < num_vtx; i++ ) { iMeshP_Part part_id; iMeshP_getEntOwnerPart( meshInstance, partitionInstance, (iBase_EntityHandle)( vert_array[i] ), &part_id, &itaps_err ); iMeshP_getRankOfPart( meshInstance, partitionInstance, part_id, &( pid[i] ), &itaps_err ); } }
Definition at line 84 of file MsqIMeshP.hpp.
Referenced by vertices_get_global_id(), and vertices_get_processor_id().