FreePOOMA  2.4.1
Public Types | Public Member Functions | Protected Member Functions | Protected Attributes
UniformGridPartition< Dim > Class Template Reference

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>

List of all members.

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_tValue_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

Detailed Description

template<int Dim>
class UniformGridPartition< Dim >

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.


Member Typedef Documentation

template<int Dim>
typedef LocalMapper<Dim> UniformGridPartition< Dim >::DefaultMapper_t
template<int Dim>
typedef Interval<Dim> UniformGridPartition< Dim >::Domain_t
template<int Dim>
typedef Node<Domain_t> UniformGridPartition< Dim >::Value_t
template<int Dim>
typedef std::vector<Value_t *> UniformGridPartition< Dim >::List_t

Member Enumeration Documentation

template<int Dim>
anonymous enum
Enumerator:
uniform 
template<int Dim>
anonymous enum
Enumerator:
gridded 
template<int Dim>
anonymous enum
Enumerator:
tile 
template<int Dim>
anonymous enum
Enumerator:
general 
template<int Dim>
anonymous enum
Enumerator:
dimensions 

Constructor & Destructor Documentation

template<int Dim>
UniformGridPartition< Dim >::UniformGridPartition ( ) [inline]
template<int Dim>
UniformGridPartition< Dim >::UniformGridPartition ( const GuardLayers< Dim > &  gcs) [inline]
template<int Dim>
UniformGridPartition< Dim >::UniformGridPartition ( const Loc< Dim > &  a) [inline]
template<int Dim>
UniformGridPartition< Dim >::UniformGridPartition ( const Loc< Dim > &  a,
const GuardLayers< Dim > &  gcs 
) [inline]
template<int Dim>
UniformGridPartition< Dim >::UniformGridPartition ( const Loc< Dim > &  a,
const GuardLayers< Dim > &  igcs,
const GuardLayers< Dim > &  egcs 
) [inline]
template<int Dim>
UniformGridPartition< Dim >::UniformGridPartition ( const UniformGridPartition< Dim > &  b) [inline]
template<int Dim>
UniformGridPartition< Dim >::~UniformGridPartition ( ) [inline]

Member Function Documentation

template<int Dim>
UniformGridPartition<Dim>& UniformGridPartition< Dim >::operator= ( const UniformGridPartition< Dim > &  g) [inline]
template<int Dim>
int UniformGridPartition< Dim >::maxSize ( ) const [inline]
template<int Dim>
const Loc<Dim>& UniformGridPartition< Dim >::blocks ( ) const [inline]
template<int Dim>
bool UniformGridPartition< Dim >::hasGuards ( ) const [inline]
template<int Dim>
bool UniformGridPartition< Dim >::hasInternalGuards ( ) const [inline]
template<int Dim>
bool UniformGridPartition< Dim >::hasExternalGuards ( ) const [inline]
template<int Dim>
const GuardLayers<Dim>& UniformGridPartition< Dim >::internalGuards ( ) const [inline]
template<int Dim>
const GuardLayers<Dim>& UniformGridPartition< Dim >::externalGuards ( ) const [inline]
template<int Dim>
template<class D >
int UniformGridPartition< Dim >::partition ( const D &  domain,
List_t all,
const ContextMapper< Dim > &  cmapper 
) const
template<int Dim>
template<class D >
int UniformGridPartition< Dim >::partition ( const D &  domain,
List_t list 
) const [inline]
template<int Dim>
void UniformGridPartition< Dim >::calcNum ( ) [inline, protected]

Member Data Documentation

template<int Dim>
Loc<Dim> UniformGridPartition< Dim >::blocks_m [protected]
template<int Dim>
bool UniformGridPartition< Dim >::hasGuards_m [protected]
template<int Dim>
bool UniformGridPartition< Dim >::hasCustomEdgeGuards_m [protected]
template<int Dim>
GuardLayers<Dim> UniformGridPartition< Dim >::internalGuards_m [protected]
template<int Dim>
GuardLayers<Dim> UniformGridPartition< Dim >::externalGuards_m [protected]
template<int Dim>
int UniformGridPartition< Dim >::num_m [protected]

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