[MOAB-dev] r2712 - MOAB/trunk/tools/iMesh
kraftche at cae.wisc.edu
kraftche at cae.wisc.edu
Thu Mar 12 17:06:20 CDT 2009
Author: kraftche
Date: 2009-03-12 17:06:20 -0500 (Thu, 12 Mar 2009)
New Revision: 2712
Modified:
MOAB/trunk/tools/iMesh/iMeshP.h
MOAB/trunk/tools/iMesh/iMeshP_MOAB.cpp
Log:
remove iMeshP_getAdjEntities
Modified: MOAB/trunk/tools/iMesh/iMeshP.h
===================================================================
--- MOAB/trunk/tools/iMesh/iMeshP.h 2009-03-12 21:48:22 UTC (rev 2711)
+++ MOAB/trunk/tools/iMesh/iMeshP.h 2009-03-12 22:06:20 UTC (rev 2712)
@@ -1127,65 +1127,6 @@
-/** \brief Return entities adjacent to entities in a given part and entity set.
- *
- * Given an entity set handle
- * and a part handle, return entities adjacent (with respect to a given
- * entity type and/or topology) to entities
- * that are in both the part and the entity set.
- * This function is similar to iMesh_getAdjEntities, but it also restricts
- * the returned data with respect to its existence in the given part.
- * If a non-root entity set is specified, the function also returns
- * flags indicating whether each adjacent entity
- * is in the entity set; (*in_entity_set)[i]=1 indicates that adjacent entity
- * (*adj_entities)[i] is in the specified entity set.
- * Array entry offset[i] stores the index of first adjacent entity to
- * entity i.
- *
- * COMMUNICATION: None.
- *
- * \param instance (In) Mesh instance containing the
- * partition.
- * \param partition (In) The partition being queried.
- * \param part (In) The part being queried.
- * \param entity_set (In) Entity set handle for the
- * entity set being queried;
- * may be the root set.
- * \param entity_type_requestor (In) Return entities adjacent to
- * entities of this type;
- * may be iBase_ALL_TYPES.
- * \param entity_topology_requestor (In) Return entities adjacent to
- * entities of this topology;
- * may be iMesh_ALL_TOPOLOGIES.
- * \param entity_type_requested (In) Return adjacent entities of
- * this type;
- * may be iBase_ALL_TYPES.
- * \param adj_entities (In/Out) Array of adjacent entity
- * handles returned.
- * \param adj_entities_allocated (In/Out) Allocated size of
- * adj_entities.
- * \param adj_entities_size (Out) Occupied size of
- * adj_entities.
- * \param offset (In/Out) Array of offsets returned.
- * \param offset_allocated (In/Out) Allocated size of offset.
- * \param offset_size (Out) Occupied size of offset.
- * \param err (Out) Error code.
- */
-void iMeshP_getAdjEntities(
- iMesh_Instance instance,
- const iMeshP_PartitionHandle partition,
- const iMeshP_PartHandle part,
- const iBase_EntitySetHandle entity_set,
- int entity_type_requestor,
- int entity_topology_requestor,
- int entity_type_requested,
- iBase_EntityHandle **adj_entities,
- int *adj_entities_allocated,
- int *adj_entities_size,
- int **offset,
- int *offset_allocated,
- int *offset_size,
- int *err);
/** \brief Create an entity iterator for a given part and entity set.
Modified: MOAB/trunk/tools/iMesh/iMeshP_MOAB.cpp
===================================================================
--- MOAB/trunk/tools/iMesh/iMeshP_MOAB.cpp 2009-03-12 21:48:22 UTC (rev 2711)
+++ MOAB/trunk/tools/iMesh/iMeshP_MOAB.cpp 2009-03-12 22:06:20 UTC (rev 2712)
@@ -998,67 +998,6 @@
RETURN(iBase_SUCCESS);
}
-void iMeshP_getAdjEntities( iMesh_Instance instance,
- const iMeshP_PartitionHandle partition_handle,
- const iMeshP_PartHandle part_handle,
- const iBase_EntitySetHandle entity_set_handle,
- const int entity_type_requestor,
- const int entity_topology_requestor,
- const int entity_type_requested,
- iBase_EntityHandle** adj_entity_handles,
- int* adj_entity_handles_allocated,
- int* adj_entity_handles_size,
- int** offset,
- int* offset_allocated,
- int* offset_size,
- int *err )
-{
- MBErrorCode rval;
- MBRange r;
- set_intersection_query( instance, part_handle, entity_set_handle,
- entity_type_requestor, entity_topology_requestor,
- r, err );
- if (iBase_SUCCESS != *err)
- return;
-
- // count adjacencies
- std::vector<MBEntityHandle> tmp_storage;
- int num_adj = 0;
- int num_conn;
- const MBEntityHandle* conn_ptr;
- for (MBRange::iterator i = r.begin(); i != r.end(); ++i) {
- if (entity_type_requested || TYPE_FROM_HANDLE(*i) == MBPOLYHEDRON) {
- tmp_storage.clear();
- rval = MBI->get_adjacencies( &*i, 1, entity_type_requested, false, tmp_storage );
- CHKERR(rval);
- num_adj += tmp_storage.size();
- }
- else {
- rval = MBI->get_connectivity( *i, conn_ptr, num_conn, false, &tmp_storage );
- CHKERR(rval);
- num_adj += num_conn;
- }
- }
-
- // get adjacencies
- ALLOCATE_ARRAY( adj_entity_handles, num_adj );
- ALLOCATE_ARRAY( offset, r.size() );
- int arr_pos = 0;
- int* offset_iter = *offset;
- for (MBRange::iterator i = r.begin(); i != r.end(); ++i) {
- *offset_iter = arr_pos;
- ++offset_iter;
-
- tmp_storage.clear();
- rval = MBI->get_adjacencies( &*i, 1, entity_type_requested, false, tmp_storage );
- CHKERR(rval);
- for (std::vector<MBEntityHandle>::iterator j = tmp_storage.begin(); j != tmp_storage.end(); ++j) {
- (*adj_entity_handles)[arr_pos] = itaps_cast<iBase_EntityHandle>(*j);
- ++arr_pos;
- }
- }
-}
-
void iMeshP_initEntIter( iMesh_Instance instance,
const iMeshP_PartitionHandle partition_handle,
const iMeshP_PartHandle part_handle,
More information about the moab-dev
mailing list