FreePOOMA  2.4.1
Public Types | Public Member Functions
SpatialPartition< ReferenceLayout > Class Template Reference

SpatialPartition is a layout partitioner; it is created with the info needed to partition a global domain into subdomains based on information in a second "reference" layout. More...

#include <SpatialPartition.h>

List of all members.

Public Types

enum  { uniform = false }
enum  { gridded = true }
enum  { tile = false }
enum  { general = false }
enum  { dimensions = 1 }
typedef DefaultSPmapper DefaultMapper_t
typedef ReferenceLayout Layout_t
typedef Interval< 1 > Domain_t
typedef Node< Domain_tValue_t
typedef std::vector< Value_t * > List_t
typedef SpatialPartition
< ReferenceLayout > 
This_t
typedef GuardLayers< 1 > GuardLayers_t
typedef ReferenceLayout RefLayout_t

Public Member Functions

 SpatialPartition (const RefLayout_t &layout)
 SpatialPartition (const This_t &sp)
This_toperator= (const This_t &sp)
 ~SpatialPartition ()
int maxSize () const
Loc< 1 > blocks () const
int context () const
bool hasGuards () const
bool hasCustomEdgeGuards () const
bool hasInternalGuards () const
bool hasExternalGuards () const
GuardLayers_t internalGuards () const
GuardLayers_t externalGuards () const
const RefLayout_treference () const
template<class D , class Dom >
int partition (const D &domain, std::vector< Node< Dom > * > &all, const ContextMapper< 1 > &cmapper) const
template<class D , class Dom >
int partition (const D &domain, std::vector< Node< Dom > * > &all) const
template<class Out >
void print (Out &o) const

Detailed Description

template<class ReferenceLayout>
class SpatialPartition< ReferenceLayout >

SpatialPartition is a layout partitioner; it is created with the info needed to partition a global domain into subdomains based on information in a second "reference" layout.

This partitioner will generate initially empty patches, and so is only useful if it is asked to partition an empty global domain. It is primarily used in situations where you need a second layout to have the same number of patches as a reference domain, with the same memory affinity for each patch. The size of the new patches, and their dimension, can be different than for the reference layout.

The template parameter of SpatialLayout is the type of reference layout; an instance of an object of this type must be provided in the constructor, for later use in the "partition" method. This can be any layout-like type that follows the normal layout interface rules.

The main interface to SpatialPartition is via its "partition" method, where it is provided the layout object that will get new domains after they are created and assigned to contexts, plus the global domain to partition. The global domain to partition in this case should be an empty domain, if it is not it is an error. For this partitioner, the generated domains will have the same dimensionality as the provided layout (but not necessarily the same dimensionality as the reference layout). "partition" will go through the patches of the reference layout, and generate the same number of patches for the layout being partitioned. The generated patches will have empty domains and no guard cells. They will have the same memory affinity as the corresponding patches in the reference domain.


Member Typedef Documentation

template<class ReferenceLayout >
typedef DefaultSPmapper SpatialPartition< ReferenceLayout >::DefaultMapper_t
template<class ReferenceLayout >
typedef ReferenceLayout SpatialPartition< ReferenceLayout >::Layout_t
template<class ReferenceLayout >
typedef Interval<1> SpatialPartition< ReferenceLayout >::Domain_t
template<class ReferenceLayout >
typedef Node<Domain_t> SpatialPartition< ReferenceLayout >::Value_t
template<class ReferenceLayout >
typedef std::vector<Value_t *> SpatialPartition< ReferenceLayout >::List_t
template<class ReferenceLayout >
typedef SpatialPartition<ReferenceLayout> SpatialPartition< ReferenceLayout >::This_t
template<class ReferenceLayout >
typedef GuardLayers<1> SpatialPartition< ReferenceLayout >::GuardLayers_t
template<class ReferenceLayout >
typedef ReferenceLayout SpatialPartition< ReferenceLayout >::RefLayout_t

Member Enumeration Documentation

template<class ReferenceLayout >
anonymous enum
Enumerator:
uniform 
template<class ReferenceLayout >
anonymous enum
Enumerator:
gridded 
template<class ReferenceLayout >
anonymous enum
Enumerator:
tile 
template<class ReferenceLayout >
anonymous enum
Enumerator:
general 
template<class ReferenceLayout >
anonymous enum
Enumerator:
dimensions 

Constructor & Destructor Documentation

template<class ReferenceLayout >
SpatialPartition< ReferenceLayout >::SpatialPartition ( const RefLayout_t layout) [inline]
template<class ReferenceLayout >
SpatialPartition< ReferenceLayout >::SpatialPartition ( const This_t sp) [inline]
template<class ReferenceLayout >
SpatialPartition< ReferenceLayout >::~SpatialPartition ( ) [inline]

Member Function Documentation

template<class ReferenceLayout >
This_t& SpatialPartition< ReferenceLayout >::operator= ( const This_t sp) [inline]
template<class ReferenceLayout >
int SpatialPartition< ReferenceLayout >::maxSize ( ) const [inline]
template<class ReferenceLayout >
Loc<1> SpatialPartition< ReferenceLayout >::blocks ( ) const [inline]
template<class ReferenceLayout >
int SpatialPartition< ReferenceLayout >::context ( ) const [inline]
template<class ReferenceLayout >
bool SpatialPartition< ReferenceLayout >::hasGuards ( ) const [inline]
template<class ReferenceLayout >
bool SpatialPartition< ReferenceLayout >::hasCustomEdgeGuards ( ) const [inline]
template<class ReferenceLayout >
bool SpatialPartition< ReferenceLayout >::hasInternalGuards ( ) const [inline]
template<class ReferenceLayout >
bool SpatialPartition< ReferenceLayout >::hasExternalGuards ( ) const [inline]
template<class ReferenceLayout >
GuardLayers_t SpatialPartition< ReferenceLayout >::internalGuards ( ) const [inline]
template<class ReferenceLayout >
GuardLayers_t SpatialPartition< ReferenceLayout >::externalGuards ( ) const [inline]
template<class ReferenceLayout >
const RefLayout_t& SpatialPartition< ReferenceLayout >::reference ( ) const [inline]
template<class ReferenceLayout >
template<class D , class Dom >
int SpatialPartition< ReferenceLayout >::partition ( const D &  domain,
std::vector< Node< Dom > * > &  all,
const ContextMapper< 1 > &  cmapper 
) const
template<class ReferenceLayout >
template<class D , class Dom >
int SpatialPartition< ReferenceLayout >::partition ( const D &  domain,
std::vector< Node< Dom > * > &  all 
) const [inline]
template<class ReferenceLayout >
template<class Out >
void SpatialPartition< ReferenceLayout >::print ( Out &  o) const

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