[MOAB-dev] r2097 - in MOAB/trunk: parallel tools/iMesh
tautges at mcs.anl.gov
tautges at mcs.anl.gov
Sun Sep 28 11:08:58 CDT 2008
Author: tautges
Date: 2008-09-28 11:08:58 -0500 (Sun, 28 Sep 2008)
New Revision: 2097
Modified:
MOAB/trunk/parallel/Makefile.am
MOAB/trunk/tools/iMesh/iMesh_MOAB.cpp
Log:
Adding a couple of source/header files to non-installed set so that make dist works.
Making implementation of getEntAdj more efficient for vertices in iMesh.
Modified: MOAB/trunk/parallel/Makefile.am
===================================================================
--- MOAB/trunk/parallel/Makefile.am 2008-09-26 16:39:57 UTC (rev 2096)
+++ MOAB/trunk/parallel/Makefile.am 2008-09-28 16:08:58 UTC (rev 2097)
@@ -21,6 +21,7 @@
MOAB_PARALLEL_TEST =
MOAB_PARALLEL_CHECK =
if PARALLEL
+# The list of source files, and any header files that do not need to be installed
MOAB_PARALLEL_SRCS += \
MBParallelComm.cpp \
MBProcConfig.cpp \
@@ -29,8 +30,9 @@
crystal.c errmem.c \
transfer.c gs.c gs.h tuple_list.c \
tuple_list.h \
- sort.c sort.h
+ sort.c sort.h minmax.h transfer.h sort_imp.c
+# The list of header files which are to be installed
MOAB_PARALLEL_HDRS += \
MBParallelComm.hpp \
MBProcConfig.hpp \
Modified: MOAB/trunk/tools/iMesh/iMesh_MOAB.cpp
===================================================================
--- MOAB/trunk/tools/iMesh/iMesh_MOAB.cpp 2008-09-26 16:39:57 UTC (rev 2096)
+++ MOAB/trunk/tools/iMesh/iMesh_MOAB.cpp 2008-09-28 16:08:58 UTC (rev 2097)
@@ -1006,22 +1006,31 @@
int prev_off = 0;
std::vector<MBEntityHandle> all_adj_ents;
+ std::vector<MBEntityHandle> adj_ents;
+ const MBEntityHandle *connect;
+ int num_connect;
for ( ; entity_iter != entity_end; ++entity_iter)
{
*off_iter = prev_off;
off_iter++;
- std::vector<MBEntityHandle> adj_ents;
- result = MBI->get_adjacencies( entity_iter, 1,
- entity_type_requested, false, adj_ents );
- if (MB_SUCCESS != result) {
- iMesh_processError(iBase_ERROR_MAP[result], "iMesh_getEntArrAdj: trouble getting adjacency list.");
- RETURN(iBase_ERROR_MAP[result]);
+ if (iBase_VERTEX != entity_type_requested) {
+ adj_ents.clear();
+ result = MBI->get_adjacencies( entity_iter, 1,
+ entity_type_requested, false, adj_ents );
+ if (MB_SUCCESS != result) {
+ iMesh_processError(iBase_ERROR_MAP[result], "iMesh_getEntArrAdj: trouble getting adjacency list.");
+ RETURN(iBase_ERROR_MAP[result]);
+ }
+ std::copy(adj_ents.begin(), adj_ents.end(), std::back_inserter(all_adj_ents));
+ prev_off += adj_ents.size();
}
-
- std::copy(adj_ents.begin(), adj_ents.end(), std::back_inserter(all_adj_ents));
- prev_off += adj_ents.size();
+ else {
+ result = MBI->get_connectivity(*entity_iter, connect, num_connect);
+ std::copy(connect, connect+num_connect, std::back_inserter(all_adj_ents));
+ prev_off += num_connect;
+ }
}
*off_iter = prev_off;
More information about the moab-dev
mailing list