[MOAB-dev] r5281 - MOAB/trunk/tools/mbzoltan
hongjun at mcs.anl.gov
hongjun at mcs.anl.gov
Thu Dec 22 12:33:13 CST 2011
Author: hongjun
Date: 2011-12-22 12:33:13 -0600 (Thu, 22 Dec 2011)
New Revision: 5281
Modified:
MOAB/trunk/tools/mbzoltan/MBZoltan.cpp
MOAB/trunk/tools/mbzoltan/MBZoltan.hpp
Log:
o Better geometry partition result
o Do repartition after round-robin partition for geometry partition
o Modified face mesh load estimation
o Passes make check
Modified: MOAB/trunk/tools/mbzoltan/MBZoltan.cpp
===================================================================
--- MOAB/trunk/tools/mbzoltan/MBZoltan.cpp 2011-12-22 15:36:34 UTC (rev 5280)
+++ MOAB/trunk/tools/mbzoltan/MBZoltan.cpp 2011-12-22 18:33:13 UTC (rev 5281)
@@ -61,6 +61,7 @@
static int *NborProcs=NULL;
static double *ObjWeights=NULL;
static double *EdgeWeights=NULL;
+static int *Parts=NULL;
const bool debug = false;
@@ -270,7 +271,7 @@
std::vector<double> pts; // x[0], y[0], z[0], ... from MOAB
std::vector<int> ids; // point ids from MOAB
- std::vector<int> adjs, length;
+ std::vector<int> adjs, length, parts;
std::vector<double> obj_weights, edge_weights;
Range elems;
#ifdef CGM
@@ -318,7 +319,8 @@
else {
#ifdef CGM
result = assemble_graph(part_dim, pts, ids, adjs, length, obj_weights,
- edge_weights, entities, part_geom_mesh_size); RR;
+ edge_weights, parts, entities,
+ part_geom_mesh_size, nparts); RR;
if (debug) {
int n_ids = ids.size();
@@ -327,7 +329,8 @@
for (int i = 0; i < n_ids; i++) {
std::cout << "graph_input_ids[" << i << "]=" << ids[i]
<< ",obj_weights=" << obj_weights[i]
- << ",entity_id=" << entities.get_and_step()->id() << std::endl;
+ << ",entity_id=" << entities.get_and_step()->id()
+ << ",part=" << parts[i] << std::endl;
for (int j = 0; j < length[i]; j++) {
std::cout << "adjs[" << j << "]=" << adjs[i_leng]
<< ",edge_weights=" << edge_weights[i_leng]<< std::endl;
@@ -344,7 +347,7 @@
if (edge_weights.size() > 0) e_wgt = &edge_weights[0];
myNumPts = mbInitializePoints((int)ids.size(), &pts[0], &ids[0], &adjs[0],
- &length[0], o_wgt, e_wgt);
+ &length[0], o_wgt, e_wgt, &parts[0]);
// Initialize Zoltan. This is a C call. The simple C++ code
@@ -421,6 +424,7 @@
More information about the moab-dev
mailing list