Public Member Functions | Protected Attributes

LibGeoDecomp::Partition< DIM > Class Template Reference

#include <partition.h>

Inherited by LibGeoDecomp::CheckerboardingPartition< DIM >, LibGeoDecomp::RecursiveBisectionPartition< DIM >, LibGeoDecomp::SpaceFillingCurve< DIM >, LibGeoDecomp::SpaceFillingCurve< 2 >, and LibGeoDecomp::SpaceFillingCurve< DIMENSIONS >.

Collaboration diagram for LibGeoDecomp::Partition< DIM >:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 Partition (const long &offset, const std::vector< std::size_t > &weights)
 initializes the partition so that the domain will be split up in chucks with sizes proportional to the weights specified in _weights.
virtual ~Partition ()
const std::vector< std::size_t > & getWeights () const
virtual Region< DIM > getRegion (const std::size_t node) const =0

Protected Attributes

std::vector< std::size_t > weights
std::vector< std::size_t > startOffsets

template<int DIM>
class LibGeoDecomp::Partition< DIM >


Constructor & Destructor Documentation

template<int DIM>
LibGeoDecomp::Partition< DIM >::Partition ( const long &  offset,
const std::vector< std::size_t > &  weights 
) [inline]

initializes the partition so that the domain will be split up in chucks with sizes proportional to the weights specified in _weights.

For most applications offset should be set to 0. Also, _weights.sum() should equal simulationArea.size() (where simulationArea is stored in PartitionManager). This basically means that each simulation cell corresponds to a weight of 1. Each entry in the weight vector will usually correspond to an MPI process, identified by its rank.

References LibGeoDecomp::Partition< DIM >::startOffsets.

template<int DIM>
virtual LibGeoDecomp::Partition< DIM >::~Partition (  )  [inline, virtual]

Member Function Documentation

template<int DIM>
virtual Region<DIM> LibGeoDecomp::Partition< DIM >::getRegion ( const std::size_t  node  )  const [pure virtual]
template<int DIM>
const std::vector<std::size_t>& LibGeoDecomp::Partition< DIM >::getWeights (  )  const [inline]

Member Data Documentation

template<int DIM>
std::vector<std::size_t> LibGeoDecomp::Partition< DIM >::startOffsets [protected]
template<int DIM>
std::vector<std::size_t> LibGeoDecomp::Partition< DIM >::weights [protected]

The documentation for this class was generated from the following file: