[MOAB-dev] r5074 - in MOAB/trunk: itaps/imesh src/parallel src/parallel/moab

hongjun at mcs.anl.gov hongjun at mcs.anl.gov
Sat Jul 30 10:44:04 CDT 2011


Author: hongjun
Date: 2011-07-30 10:44:04 -0500 (Sat, 30 Jul 2011)
New Revision: 5074

Modified:
   MOAB/trunk/itaps/imesh/MOAB_iMeshP_unit_tests.cpp
   MOAB/trunk/itaps/imesh/iMeshP_MOAB.cpp
   MOAB/trunk/src/parallel/ParallelComm.cpp
   MOAB/trunk/src/parallel/moab/ParallelComm.hpp
Log:
o "iMeshP::iMeshP_exchEntArrToPartsAll" is implemented
o Exchanges entities to assigned parts
o command_code and update_ghost options are not supported yet but will be
o test code is added in MOAB_iMeshP_unit_tests.cpp
o Passes make check


Modified: MOAB/trunk/itaps/imesh/MOAB_iMeshP_unit_tests.cpp
===================================================================
--- MOAB/trunk/itaps/imesh/MOAB_iMeshP_unit_tests.cpp	2011-07-29 20:08:15 UTC (rev 5073)
+++ MOAB/trunk/itaps/imesh/MOAB_iMeshP_unit_tests.cpp	2011-07-30 15:44:04 UTC (rev 5074)
@@ -212,6 +212,7 @@
 int test_push_tag_data_iface( iMesh_Instance, iMeshP_PartitionHandle prtn, const PartMap& );
 int test_push_tag_data_ghost( iMesh_Instance, iMeshP_PartitionHandle prtn, const PartMap& );
 
+int test_exchange_ents( iMesh_Instance imesh, iMeshP_PartitionHandle prtn, const PartMap& map );
 
 /**************************************************************************
                               Helper Funcions
@@ -463,6 +464,7 @@
   num_errors += RUN_TEST( test_push_tag_data_iface );
   num_errors += RUN_TEST( test_push_tag_data_ghost );
   num_errors += RUN_TEST( test_create_ghost_ents );
+  num_errors += RUN_TEST( test_exchange_ents );
   
     // wait until all procs are done before writing summary data
   std::cout.flush();
@@ -2529,6 +2531,63 @@
   return iBase_SUCCESS;
 }  
 
+/**\brief Test exchange entities
+ *
+ * Test:
+ * - iMeshP_exchEntArrToPartsAll
+ */
+int test_exchange_ents( iMesh_Instance imesh, iMeshP_PartitionHandle prtn, const PartMap& map )
+{
+  int ierr, rank, size;
+  int num_err = 0;
+  iMeshP_RequestHandle request;
+  MPI_Comm_rank( MPI_COMM_WORLD, &rank );
+  MPI_Comm_size( MPI_COMM_WORLD, &size );
+  
+  std::vector<iBase_EntityHandle> all_elems;
+  std::vector<iMeshP_Part> all_ids;
+  std::vector<iBase_EntityHandle> quads;
+  
+  // get local part handles and part ids
+  std::vector<iMeshP_PartHandle> local_handles;
+  std::vector<iMeshP_Part> local_ids;
+  ierr = get_local_parts( imesh, prtn, local_handles, &local_ids );
+  PCHECK;
+
+  // get loacal quads before exchange
+  quads.clear();
+  ierr = get_entities( imesh, local_handles[0], iBase_FACE, iMesh_QUADRILATERAL, quads );
+  CHKERR;


More information about the moab-dev mailing list