FreePOOMA
2.4.1
|
UniformGridPartition is a layout partitioner; it is created with the information needed to partition a global domain into subdomains using a grid layout. More...
#include <UniformGridPartition.h>
Public Types | |
enum | { uniform = true } |
enum | { gridded = true } |
enum | { tile = false } |
enum | { general = false } |
enum | { dimensions = Dim } |
typedef LocalMapper< Dim > | DefaultMapper_t |
typedef Interval< Dim > | Domain_t |
typedef Node< Domain_t > | Value_t |
typedef std::vector< Value_t * > | List_t |
Public Member Functions | |
UniformGridPartition () | |
UniformGridPartition (const GuardLayers< Dim > &gcs) | |
UniformGridPartition (const Loc< Dim > &a) | |
UniformGridPartition (const Loc< Dim > &a, const GuardLayers< Dim > &gcs) | |
UniformGridPartition (const Loc< Dim > &a, const GuardLayers< Dim > &igcs, const GuardLayers< Dim > &egcs) | |
UniformGridPartition (const UniformGridPartition< Dim > &b) | |
~UniformGridPartition () | |
UniformGridPartition< Dim > & | operator= (const UniformGridPartition< Dim > &g) |
int | maxSize () const |
const Loc< Dim > & | blocks () const |
bool | hasGuards () const |
bool | hasInternalGuards () const |
bool | hasExternalGuards () const |
const GuardLayers< Dim > & | internalGuards () const |
const GuardLayers< Dim > & | externalGuards () const |
template<class D > | |
int | partition (const D &domain, List_t &all, const ContextMapper< Dim > &cmapper) const |
template<class D > | |
int | partition (const D &domain, List_t &list) const |
Protected Member Functions | |
void | calcNum () |
Protected Attributes | |
Loc< Dim > | blocks_m |
bool | hasGuards_m |
bool | hasCustomEdgeGuards_m |
GuardLayers< Dim > | internalGuards_m |
GuardLayers< Dim > | externalGuards_m |
int | num_m |
UniformGridPartition is a layout partitioner; it is created with the information needed to partition a global domain into subdomains using a grid layout.
All the blocks in a UniformGridLayout will have the same size, and the domain that is given to a UniformGridPartition object must be of the proper size to be divided evenly into these sized blocks.
A UniformGridPartition object is constructed with the following information:
UniformGridPartition objects, once created, are generally given to Layout objects to initialize or repartition them. The Layout, in turn, will sets things up and call
UniformGridPartition::partition(domain, layoutData,mapper)
where
The partition method should divide up the global domain, and then for each subdomain call
layoutData.addDomain(domain[n], internal_guards, external_guards)
where domain[n] is the Nth subdomain, internal_guards and external_guards are the internal and external guard layer specification for that particular domain (the partitioner must determine if this domain is on an edge and assign external vs. internal guards accordingly. Note that the partitioner partitions the internal domain, not the total domain including the external guards; i.e. the set of domain objects added to the layout is independent of the external or internal guard specification. The partitioner must know about the guards, however, since it needs to check that the partitioning is consistent with the guards, and since it is up to the partitioner to calculate the guards object that is passed back to the layout so that IT can build Node objects with the appropriate owned and allocated domains.
If UniformGridPartition is asked to partition a global domain that is empty, it will generate a set of N empty subdomains, with no guard cells. This is a special case, useful for the Particles UniformLayout.
UniformGridPartition also has accessor method to query how it will divide the space: maxSize(), blocks(), along with a set of accessors for examining guard layer data.
typedef LocalMapper<Dim> UniformGridPartition< Dim >::DefaultMapper_t |
typedef Interval<Dim> UniformGridPartition< Dim >::Domain_t |
typedef Node<Domain_t> UniformGridPartition< Dim >::Value_t |
typedef std::vector<Value_t *> UniformGridPartition< Dim >::List_t |
UniformGridPartition< Dim >::UniformGridPartition | ( | ) | [inline] |
References UniformGridPartition< Dim >::blocks_m.
UniformGridPartition< Dim >::UniformGridPartition | ( | const GuardLayers< Dim > & | gcs | ) | [inline] |
References UniformGridPartition< Dim >::blocks_m.
UniformGridPartition< Dim >::UniformGridPartition | ( | const Loc< Dim > & | a | ) | [inline] |
References UniformGridPartition< Dim >::calcNum().
UniformGridPartition< Dim >::UniformGridPartition | ( | const Loc< Dim > & | a, |
const GuardLayers< Dim > & | gcs | ||
) | [inline] |
References UniformGridPartition< Dim >::calcNum().
UniformGridPartition< Dim >::UniformGridPartition | ( | const Loc< Dim > & | a, |
const GuardLayers< Dim > & | igcs, | ||
const GuardLayers< Dim > & | egcs | ||
) | [inline] |
References UniformGridPartition< Dim >::calcNum().
UniformGridPartition< Dim >::UniformGridPartition | ( | const UniformGridPartition< Dim > & | b | ) | [inline] |
UniformGridPartition< Dim >::~UniformGridPartition | ( | ) | [inline] |
UniformGridPartition<Dim>& UniformGridPartition< Dim >::operator= | ( | const UniformGridPartition< Dim > & | g | ) | [inline] |
References UniformGridPartition< Dim >::blocks(), UniformGridPartition< Dim >::blocks_m, UniformGridPartition< Dim >::externalGuards_m, UniformGridPartition< Dim >::hasCustomEdgeGuards_m, UniformGridPartition< Dim >::hasGuards_m, UniformGridPartition< Dim >::internalGuards_m, UniformGridPartition< Dim >::maxSize(), and UniformGridPartition< Dim >::num_m.
int UniformGridPartition< Dim >::maxSize | ( | ) | const [inline] |
References UniformGridPartition< Dim >::num_m.
Referenced by UniformGridPartition< Dim >::operator=().
const Loc<Dim>& UniformGridPartition< Dim >::blocks | ( | ) | const [inline] |
References UniformGridPartition< Dim >::blocks_m.
Referenced by UniformGridPartition< Dim >::operator=().
bool UniformGridPartition< Dim >::hasGuards | ( | ) | const [inline] |
bool UniformGridPartition< Dim >::hasInternalGuards | ( | ) | const [inline] |
References UniformGridPartition< Dim >::hasGuards_m, and UniformGridPartition< Dim >::internalGuards_m.
Referenced by UniformGridPartition< Dim >::hasGuards().
bool UniformGridPartition< Dim >::hasExternalGuards | ( | ) | const [inline] |
References UniformGridPartition< Dim >::externalGuards_m, and UniformGridPartition< Dim >::hasGuards_m.
Referenced by UniformGridPartition< Dim >::hasGuards().
const GuardLayers<Dim>& UniformGridPartition< Dim >::internalGuards | ( | ) | const [inline] |
References UniformGridPartition< Dim >::internalGuards_m.
const GuardLayers<Dim>& UniformGridPartition< Dim >::externalGuards | ( | ) | const [inline] |
References UniformGridPartition< Dim >::externalGuards_m.
int UniformGridPartition< Dim >::partition | ( | const D & | domain, |
List_t & | all, | ||
const ContextMapper< Dim > & | cmapper | ||
) | const |
References GuardLayers< Dim >::addGuardLayers(), DomainBase< DomainTraits< Interval< Dim > > >::begin(), CTAssert, DomainBase< DomainTraits< Interval< Dim > > >::end(), GuardLayers< Dim >::lower(), ContextMapper< Dim >::map(), PAssert, PInsist, and GuardLayers< Dim >::upper().
Referenced by UniformGridPartition< Dim >::partition().
int UniformGridPartition< Dim >::partition | ( | const D & | domain, |
List_t & | list | ||
) | const [inline] |
References UniformGridPartition< Dim >::partition().
void UniformGridPartition< Dim >::calcNum | ( | ) | [inline, protected] |
References UniformGridPartition< Dim >::blocks_m, and UniformGridPartition< Dim >::num_m.
Referenced by UniformGridPartition< Dim >::UniformGridPartition().
Loc<Dim> UniformGridPartition< Dim >::blocks_m [protected] |
bool UniformGridPartition< Dim >::hasGuards_m [protected] |
bool UniformGridPartition< Dim >::hasCustomEdgeGuards_m [protected] |
Referenced by UniformGridPartition< Dim >::operator=().
GuardLayers<Dim> UniformGridPartition< Dim >::internalGuards_m [protected] |
GuardLayers<Dim> UniformGridPartition< Dim >::externalGuards_m [protected] |
int UniformGridPartition< Dim >::num_m [protected] |