Commit 2cf78e20 authored by Sebastian Eibl's avatar Sebastian Eibl
Browse files

extended MetisAssignmentFunctor

parent d8fe0a2e
......@@ -41,12 +41,15 @@ public:
{
for( auto it = blockData.begin(); it != blockData.end(); ++it )
{
const uint_t& weight = ic_->find( it->first->getId() )->second.numberOfLocalBodies + uint_c(baseWeight_);
blockforest::DynamicParMetisBlockInfo info( int64_c(weight) );
info.setVertexSize(int64_c( weight ));
const double weight = double_c( ic_->find( it->first->getId() )->second.numberOfLocalBodies ) + baseWeight_;
//const double commWeight = double_c( edgeWeightFactor * (double_c(ic_->find( it->first->getId() )->second.numberOfShadowBodies) + baseWeight_)) + 1;
blockforest::DynamicParMetisBlockInfo info( 0 );
info.setVertexWeight( int64_c(weight) );
info.setVertexSize( int64_c( weight ) );
info.setVertexCoords( it->first->getAABB().center() );
for( uint_t nb = uint_t(0); nb < it->first->getNeighborhoodSize(); ++nb )
{
info.setEdgeWeight(it->first->getNeighborId(nb), int64_c(weight) );
info.setEdgeWeight(it->first->getNeighborId(nb), int64_c(edgeWeight_) );
}
it->second = info;
}
......@@ -55,11 +58,15 @@ public:
inline void setBaseWeight( const double weight) { baseWeight_ = weight;}
inline double getBaseWeight() const { return baseWeight_; }
inline void setEdgeWeight( const double weight) { edgeWeight_ = weight;}
inline double getEdgeWeight() const { return edgeWeight_; }
private:
shared_ptr< InfoCollection > ic_;
///Base weight due to allocated data structures. A weight of zero for blocks is dangerous as empty blocks might accumulate on one process!
double baseWeight_ = real_t(10.0);
double baseWeight_ = 10.0;
double edgeWeight_ = 1.0;
};
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment