[MOAB-dev] r5354 - in MOAB/trunk: src src/io src/parallel src/parallel/moab test/parallel tools/mbcoupler

nbertram at wisc.edu nbertram at wisc.edu
Mon Jan 30 14:10:02 CST 2012


Author: bertram
Date: 2012-01-30 14:09:58 -0600 (Mon, 30 Jan 2012)
New Revision: 5354

Added:
   MOAB/trunk/src/parallel/TupleList.cpp
   MOAB/trunk/src/parallel/gs.cpp
   MOAB/trunk/src/parallel/moab/TupleList.hpp
   MOAB/trunk/src/parallel/moab/gs.hpp
Modified:
   MOAB/trunk/src/ScdInterface.cpp
   MOAB/trunk/src/io/WriteHDF5.cpp
   MOAB/trunk/src/parallel/CMakeLists.txt
   MOAB/trunk/src/parallel/Makefile.am
   MOAB/trunk/src/parallel/ParallelComm.cpp
   MOAB/trunk/src/parallel/ParallelMergeMesh.cpp
   MOAB/trunk/src/parallel/ProcConfig.cpp
   MOAB/trunk/src/parallel/WriteHDF5Parallel.cpp
   MOAB/trunk/src/parallel/moab/ParallelComm.hpp
   MOAB/trunk/src/parallel/moab/ParallelMergeMesh.hpp
   MOAB/trunk/src/parallel/moab/ProcConfig.hpp
   MOAB/trunk/test/parallel/parmerge.cpp
   MOAB/trunk/tools/mbcoupler/CMakeLists.txt
   MOAB/trunk/tools/mbcoupler/Coupler.cpp
   MOAB/trunk/tools/mbcoupler/Coupler.hpp
   MOAB/trunk/tools/mbcoupler/Makefile.am
   MOAB/trunk/tools/mbcoupler/errmem.h
   MOAB/trunk/tools/mbcoupler/ssn_test.cpp
Log:
Converted tuple_list, gather-scatter, crystal router files from C to C++ files.

Modified: MOAB/trunk/src/ScdInterface.cpp
===================================================================
--- MOAB/trunk/src/ScdInterface.cpp	2012-01-26 21:22:48 UTC (rev 5353)
+++ MOAB/trunk/src/ScdInterface.cpp	2012-01-30 20:09:58 UTC (rev 5354)
@@ -7,18 +7,12 @@
 #include "ScdVertexData.hpp"
 #ifdef USE_MPI
 #  include "moab/ParallelComm.hpp"
-extern "C" 
-{
-#  include "types.h"
-#  include "gs.h"
-#  include "errmem.h"
-#  include "sort.h"
-#  include "tuple_list.h"
-}
 #endif
 #include "assert.h"
 #include <iostream>
 #include <functional>
+#include "moab/TupleList.hpp"
+#include "moab/gs.hpp"
 
 #define ERRORR(rval, str) {if (MB_SUCCESS != rval)          \
       {std::cerr << str; return rval; }}
@@ -620,9 +614,11 @@
   int incoming = procs.size();
   int p, j, k;
   MPI_Status status;
-  tuple_list shared_data;
-  tuple_list_init_max(&shared_data, 1, 0, 2, 0, 
-                      shared_indices.size()/2);
+  TupleList shared_data;
+  shared_data.initialize(1, 0, 2, 0, 
+                         shared_indices.size()/2);
+  shared_data.enableWriteAccess();
+
   j = 0; k = 0;
   while (incoming) {
     int success = MPI_Waitany(procs.size(), &recv_reqs[0], &p, &status);
@@ -630,19 +626,19 @@
     unsigned int num_indices = (offsets[p+1]-offsets[p])/2;
     int *lh = &shared_indices[offsets[p]], *rh = lh + num_indices;
     for (unsigned int i = 0; i < num_indices; i++) {
-      shared_data.vi[j++] = procs[p];
-      shared_data.vul[k++] = shandles[0] + lh[i];
-      shared_data.vul[k++] = rhandles[4*p] + rh[i];
-      shared_data.n++;
+      shared_data.vi_wr[j++] = procs[p];
+      shared_data.vul_wr[k++] = shandles[0] + lh[i];
+      shared_data.vul_wr[k++] = rhandles[4*p] + rh[i];


More information about the moab-dev mailing list