#include <LayoutBase.h>
Public Types | |
enum | { supportsGuards = true } |
typedef LayoutBaseData< Dim > | LayoutData_t |
typedef LayoutData_t::Domain_t | Domain_t |
typedef LayoutData_t::BaseDomain_t | BaseDomain_t |
typedef LayoutData_t::Context_t | Context_t |
typedef LayoutData_t::ID_t | ID_t |
typedef LayoutData_t::Value_t | Value_t |
typedef LayoutData_t::List_t | List_t |
typedef LayoutBase< Dim, LBD > | This_t |
typedef Observable< This_t > | Observable_t |
typedef DerefIterator< Value_t > | iterator |
Iterator through nodes. | |
typedef ConstDerefIterator < Value_t > | const_iterator |
typedef LayoutData_t::GCFillInfo_t | GCFillInfo_t |
Iterator through guard-cell-fill requests. | |
typedef std::vector < GCFillInfo_t > ::const_iterator | FillIterator_t |
typedef GuardLayers< Dim > | GuardLayers_t |
Public Member Functions | |
LayoutBase (LBD *Ldata) | |
LayoutBase (RefCountedPtr< LBD > pdata) | |
~LayoutBase () | |
ID_t | ID () const |
ID_t | baseID () const |
bool | initialized () const |
Return whether or not this layout has been initialized. | |
template<class DT > | |
BaseDomain_t & | localToBase (const Domain< Dim, DT > &dlocal, BaseDomain_t &base) const |
Domain translation utility. | |
int | first (int d) const |
d'th component of the lower left of the inner domain. | |
Loc< Dim > | blocks () const |
const Domain_t | patchDomain (int lid) const |
Return the domain of a local patch. | |
int | localToGlobalPatchID (int lid) const |
Convert a local patch ID to a global patch ID. | |
template<class L > | |
bool | operator== (const L &layout) const |
Compare to another Layout. | |
template<class L > | |
bool | operator!= (const L &layout) const |
Compare for inequality. | |
Domain accessors | |
const Domain_t & | domain () const |
The global domain, including external guards. | |
const Domain_t & | innerDomain () const |
The global domain, excluding external guards. | |
const Domain_t & | baseDomain () const |
The global domain, including external guards. | |
const Domain_t & | domain (int i) const |
The global domain, including internal guards, i'th patch. | |
const Domain_t & | ownedDomain (int i) const |
The global domain, excluding internal guards, i'th patch. | |
const Domain_t & | allocatedDomain (int i) const |
The global domain, including internal guards, i'th patch. | |
Node list accessors. | |
const List_t & | nodeListGlobal () const |
const List_t & | nodeListLocal () const |
const List_t & | nodeListRemote () const |
Guard layer access. | |
GuardLayers_t | internalGuards () const |
Internal (between cells) guard layers. | |
GuardLayers_t | externalGuards () const |
External (beyond physical domain) guard layers. | |
globalID accessors | |
Return the globalID of the node containing the given element, expressed either as a single Loc or as a set of int's. | |
int | globalID (const Loc< Dim > &loc) const |
int | globalID (int i0) const |
int | globalID (int i0, int i1) const |
int | globalID (int i0, int i1, int i2) const |
int | globalID (int i0, int i1, int i2, int i3) const |
int | globalID (int i0, int i1, int i2, int i3, int i4) const |
int | globalID (int i0, int i1, int i2, int i3, int i4, int i5) const |
int | globalID (int i0, int i1, int i2, int i3, int i4, int i5, int i6) const |
Partition methods | |
Repartition the layout using a new Partitioner scheme.
The initial domain lists are cleared out, the partitioner is invoked, and then all the observers are notified. This can only be done with a GridParition partitioner. | |
template<class Partitioner > | |
bool | repartition (const Partitioner &gp, const ContextMapper< Dim > &cmap) |
template<class Partitioner > | |
bool | repartition (const Partitioner &gp) |
Return begin and end iterators for the list of all subdomains | |
iterator | beginGlobal () |
iterator | endGlobal () |
const_iterator | beginGlobal () const |
const_iterator | endGlobal () const |
int | sizeGlobal () const |
Return begin and end iterators for the list of local subdomains | |
iterator | beginLocal () |
iterator | endLocal () |
const_iterator | beginLocal () const |
const_iterator | endLocal () const |
int | sizeLocal () const |
Return begin and end iterators for the list of remote subdomains | |
iterator | beginRemote () |
iterator | endRemote () |
const_iterator | beginRemote () const |
const_iterator | endRemote () const |
int | sizeRemote () const |
Iterators through local guard-cell-fill requests. | |
FillIterator_t | beginFillList () const |
FillIterator_t | endFillList () const |
Touch methods | |
template<class OtherDomain , class OutIter , class ConstructTag > | |
int | touches (const OtherDomain &d, OutIter o, const ConstructTag &ctag) const |
Find all subdomains that touch on a given domain, and insert the intersection of these subdomains into the given output iterator. | |
template<class OtherDomain , class OutIter , class ConstructTag > | |
int | touchesAlloc (const OtherDomain &d, OutIter o, const ConstructTag &ctag) const |
Version that does the calculation based on allocated instead of owned domains. | |
template<class OtherDomain , class OutIter , class ConstructTag > | |
int | touchesLocal (const OtherDomain &d, OutIter o, const ConstructTag &ctag) const |
Find local subdomains that touch on a given domain, and insert the intersection of these subdomains into the given output iterator. | |
template<class OtherDomain , class OutIter , class ConstructTag > | |
int | touchesAllocLocal (const OtherDomain &d, OutIter o, const ConstructTag &ctag) const |
Allocated version:. | |
template<class OtherDomain , class OutIter , class ConstructTag > | |
int | touchesRemote (const OtherDomain &d, OutIter o, const ConstructTag &ctag) const |
Find remote subdomains that touch on a given domain, and insert the intersection of these subdomains into the given output iterator. | |
template<class OtherDomain , class OutIter , class ConstructTag > | |
int | touchesAllocRemote (const OtherDomain &d, OutIter o, const ConstructTag &ctag) const |
Allocated version:. | |
template<class OtherDomain , class OutIter > | |
int | touches (const OtherDomain &d, OutIter o) const |
Find all subdomains that touch on a given domain, and insert the intersection of these subdomains into the given output iterator. | |
template<class OtherDomain , class OutIter > | |
int | touchesLocal (const OtherDomain &d, OutIter o) const |
template<class OtherDomain , class OutIter > | |
int | touchesRemote (const OtherDomain &d, OutIter o) const |
template<class OtherDomain , class OutIter > | |
int | touchesAlloc (const OtherDomain &d, OutIter o) const |
Versions of the above that do the allocated, instead of the owned, domains. | |
template<class OtherDomain , class OutIter > | |
int | touchesAllocLocal (const OtherDomain &d, OutIter o) const |
template<class OtherDomain , class OutIter > | |
int | touchesAllocRemote (const OtherDomain &d, OutIter o) const |
Public Attributes | |
RefCountedPtr< LBD > | pdata_m |
LayoutBase stores its data in a RefCounted class to simplify memory management. | |
Friends | |
class | LayoutBaseView |
class | LayoutBaseData< Dim > |
typedef LayoutBaseData<Dim> LayoutBase< Dim, LBD >::LayoutData_t |
typedef LayoutData_t::Domain_t LayoutBase< Dim, LBD >::Domain_t |
typedef LayoutData_t::BaseDomain_t LayoutBase< Dim, LBD >::BaseDomain_t |
typedef LayoutData_t::Context_t LayoutBase< Dim, LBD >::Context_t |
typedef LayoutData_t::ID_t LayoutBase< Dim, LBD >::ID_t |
typedef LayoutData_t::Value_t LayoutBase< Dim, LBD >::Value_t |
typedef LayoutData_t::List_t LayoutBase< Dim, LBD >::List_t |
typedef LayoutBase<Dim,LBD> LayoutBase< Dim, LBD >::This_t |
typedef Observable<This_t> LayoutBase< Dim, LBD >::Observable_t |
typedef DerefIterator<Value_t> LayoutBase< Dim, LBD >::iterator |
Iterator through nodes.
Basically the same as the vector iterator except it dereferences automatically.
Reimplemented in GridLayout< Dim >, SparseTileLayout< Dim >, UniformGridLayout< Dim >, GridLayout< Dim2 >, SparseTileLayout< Dim2 >, and UniformGridLayout< Dim2 >.
typedef ConstDerefIterator<Value_t> LayoutBase< Dim, LBD >::const_iterator |
typedef LayoutData_t::GCFillInfo_t LayoutBase< Dim, LBD >::GCFillInfo_t |
Iterator through guard-cell-fill requests.
Reimplemented in GridLayout< Dim >, SparseTileLayout< Dim >, UniformGridLayout< Dim >, GridLayout< Dim2 >, SparseTileLayout< Dim2 >, and UniformGridLayout< Dim2 >.
typedef std::vector<GCFillInfo_t>::const_iterator LayoutBase< Dim, LBD >::FillIterator_t |
typedef GuardLayers<Dim> LayoutBase< Dim, LBD >::GuardLayers_t |
LayoutBase< Dim, LBD >::LayoutBase | ( | LBD * | Ldata | ) | [inline] |
LayoutBase< Dim, LBD >::LayoutBase | ( | RefCountedPtr< LBD > | pdata | ) | [inline] |
LayoutBase< Dim, LBD >::~LayoutBase | ( | ) | [inline] |
ID_t LayoutBase< Dim, LBD >::ID | ( | ) | const [inline] |
ID_t LayoutBase< Dim, LBD >::baseID | ( | ) | const [inline] |
bool LayoutBase< Dim, LBD >::initialized | ( | ) | const [inline] |
Return whether or not this layout has been initialized.
Referenced by SparseTileLayoutViewData< Dim, Dim2 >::SparseTileLayoutViewData().
BaseDomain_t& LayoutBase< Dim, LBD >::localToBase | ( | const Domain< Dim, DT > & | dlocal, | |
BaseDomain_t & | base | |||
) | const [inline] |
Domain translation utility.
const Domain_t& LayoutBase< Dim, LBD >::domain | ( | ) | const [inline] |
The global domain, including external guards.
Referenced by SparseTileLayoutViewData< Dim, Dim2 >::SparseTileLayoutViewData().
const Domain_t& LayoutBase< Dim, LBD >::innerDomain | ( | ) | const [inline] |
The global domain, excluding external guards.
const Domain_t& LayoutBase< Dim, LBD >::baseDomain | ( | ) | const [inline] |
The global domain, including external guards.
Referenced by LayoutBase< Dim, UniformGridLayoutData< Dim > >::operator==().
const Domain_t& LayoutBase< Dim, LBD >::domain | ( | int | i | ) | const [inline] |
The global domain, including internal guards, i'th patch.
const Domain_t& LayoutBase< Dim, LBD >::ownedDomain | ( | int | i | ) | const [inline] |
The global domain, excluding internal guards, i'th patch.
const Domain_t& LayoutBase< Dim, LBD >::allocatedDomain | ( | int | i | ) | const [inline] |
The global domain, including internal guards, i'th patch.
const List_t& LayoutBase< Dim, LBD >::nodeListGlobal | ( | ) | const [inline] |
const List_t& LayoutBase< Dim, LBD >::nodeListLocal | ( | ) | const [inline] |
const List_t& LayoutBase< Dim, LBD >::nodeListRemote | ( | ) | const [inline] |
GuardLayers_t LayoutBase< Dim, LBD >::internalGuards | ( | ) | const [inline] |
Internal (between cells) guard layers.
Referenced by SparseTileLayoutViewData< Dim, Dim2 >::SparseTileLayoutViewData().
GuardLayers_t LayoutBase< Dim, LBD >::externalGuards | ( | ) | const [inline] |
External (beyond physical domain) guard layers.
Referenced by SparseTileLayoutViewData< Dim, Dim2 >::SparseTileLayoutViewData().
int LayoutBase< Dim, LBD >::first | ( | int | d | ) | const [inline] |
d'th component of the lower left of the inner domain.
Loc<Dim> LayoutBase< Dim, LBD >::blocks | ( | ) | const [inline] |
Reimplemented in GridLayout< Dim >, and GridLayout< Dim2 >.
const Domain_t LayoutBase< Dim, LBD >::patchDomain | ( | int | lid | ) | const [inline] |
Return the domain of a local patch.
int LayoutBase< Dim, LBD >::localToGlobalPatchID | ( | int | lid | ) | const [inline] |
Convert a local patch ID to a global patch ID.
int LayoutBase< Dim, LBD >::globalID | ( | const Loc< Dim > & | loc | ) | const [inline] |
int LayoutBase< Dim, LBD >::globalID | ( | int | i0 | ) | const [inline] |
int LayoutBase< Dim, LBD >::globalID | ( | int | i0, | |
int | i1 | |||
) | const [inline] |
int LayoutBase< Dim, LBD >::globalID | ( | int | i0, | |
int | i1, | |||
int | i2 | |||
) | const [inline] |
int LayoutBase< Dim, LBD >::globalID | ( | int | i0, | |
int | i1, | |||
int | i2, | |||
int | i3 | |||
) | const [inline] |
int LayoutBase< Dim, LBD >::globalID | ( | int | i0, | |
int | i1, | |||
int | i2, | |||
int | i3, | |||
int | i4 | |||
) | const [inline] |
int LayoutBase< Dim, LBD >::globalID | ( | int | i0, | |
int | i1, | |||
int | i2, | |||
int | i3, | |||
int | i4, | |||
int | i5 | |||
) | const [inline] |
int LayoutBase< Dim, LBD >::globalID | ( | int | i0, | |
int | i1, | |||
int | i2, | |||
int | i3, | |||
int | i4, | |||
int | i5, | |||
int | i6 | |||
) | const [inline] |
bool LayoutBase< Dim, LBD >::repartition | ( | const Partitioner & | gp, | |
const ContextMapper< Dim > & | cmap | |||
) | [inline] |
Reimplemented in GridLayout< Dim >, and GridLayout< Dim2 >.
bool LayoutBase< Dim, LBD >::repartition | ( | const Partitioner & | gp | ) | [inline] |
bool LayoutBase< Dim, LBD >::operator== | ( | const L & | layout | ) | const [inline] |
Compare to another Layout.
The layouts are the same if:
bool LayoutBase< Dim, LBD >::operator!= | ( | const L & | layout | ) | const [inline] |
Compare for inequality.
iterator LayoutBase< Dim, LBD >::beginGlobal | ( | ) | [inline] |
iterator LayoutBase< Dim, LBD >::endGlobal | ( | ) | [inline] |
const_iterator LayoutBase< Dim, LBD >::beginGlobal | ( | ) | const [inline] |
const_iterator LayoutBase< Dim, LBD >::endGlobal | ( | ) | const [inline] |
int LayoutBase< Dim, LBD >::sizeGlobal | ( | ) | const [inline] |
iterator LayoutBase< Dim, LBD >::beginLocal | ( | ) | [inline] |
iterator LayoutBase< Dim, LBD >::endLocal | ( | ) | [inline] |
const_iterator LayoutBase< Dim, LBD >::beginLocal | ( | ) | const [inline] |
const_iterator LayoutBase< Dim, LBD >::endLocal | ( | ) | const [inline] |
int LayoutBase< Dim, LBD >::sizeLocal | ( | ) | const [inline] |
iterator LayoutBase< Dim, LBD >::beginRemote | ( | ) | [inline] |
iterator LayoutBase< Dim, LBD >::endRemote | ( | ) | [inline] |
const_iterator LayoutBase< Dim, LBD >::beginRemote | ( | ) | const [inline] |
const_iterator LayoutBase< Dim, LBD >::endRemote | ( | ) | const [inline] |
int LayoutBase< Dim, LBD >::sizeRemote | ( | ) | const [inline] |
FillIterator_t LayoutBase< Dim, LBD >::beginFillList | ( | ) | const [inline] |
FillIterator_t LayoutBase< Dim, LBD >::endFillList | ( | ) | const [inline] |
int LayoutBase< Dim, LBD >::touches | ( | const OtherDomain & | d, | |
OutIter | o, | |||
const ConstructTag & | ctag | |||
) | const [inline] |
Find all subdomains that touch on a given domain, and insert the intersection of these subdomains into the given output iterator.
Return the number of touching elements. This version of touches can build either pointers or objects.
Referenced by SparseTileLayoutViewData< Dim, Dim2 >::computeSubdomains(), SparseTileLayoutViewData< Dim, Dim2 >::touches(), and LayoutBase< Dim, UniformGridLayoutData< Dim > >::touches().
int LayoutBase< Dim, LBD >::touchesAlloc | ( | const OtherDomain & | d, | |
OutIter | o, | |||
const ConstructTag & | ctag | |||
) | const [inline] |
Version that does the calculation based on allocated instead of owned domains.
Referenced by LayoutBase< Dim, UniformGridLayoutData< Dim > >::touchesAlloc().
int LayoutBase< Dim, LBD >::touchesLocal | ( | const OtherDomain & | d, | |
OutIter | o, | |||
const ConstructTag & | ctag | |||
) | const [inline] |
Find local subdomains that touch on a given domain, and insert the intersection of these subdomains into the given output iterator.
Return the number of touching elements. This version of touches can build either pointers or objects.
Referenced by LayoutBase< Dim, UniformGridLayoutData< Dim > >::touchesLocal().
int LayoutBase< Dim, LBD >::touchesAllocLocal | ( | const OtherDomain & | d, | |
OutIter | o, | |||
const ConstructTag & | ctag | |||
) | const [inline] |
Allocated version:.
Referenced by LayoutBase< Dim, UniformGridLayoutData< Dim > >::touchesAllocLocal().
int LayoutBase< Dim, LBD >::touchesRemote | ( | const OtherDomain & | d, | |
OutIter | o, | |||
const ConstructTag & | ctag | |||
) | const [inline] |
Find remote subdomains that touch on a given domain, and insert the intersection of these subdomains into the given output iterator.
Return the number of touching elements. This version of touches can build either pointers or objects.
Referenced by LayoutBase< Dim, UniformGridLayoutData< Dim > >::touchesRemote().
int LayoutBase< Dim, LBD >::touchesAllocRemote | ( | const OtherDomain & | d, | |
OutIter | o, | |||
const ConstructTag & | ctag | |||
) | const [inline] |
Allocated version:.
Referenced by LayoutBase< Dim, UniformGridLayoutData< Dim > >::touchesAllocRemote().
int LayoutBase< Dim, LBD >::touches | ( | const OtherDomain & | d, | |
OutIter | o | |||
) | const [inline] |
Find all subdomains that touch on a given domain, and insert the intersection of these subdomains into the given output iterator.
Return the number of touching elements. These versions of touches can build only objects objects.
int LayoutBase< Dim, LBD >::touchesLocal | ( | const OtherDomain & | d, | |
OutIter | o | |||
) | const [inline] |
int LayoutBase< Dim, LBD >::touchesRemote | ( | const OtherDomain & | d, | |
OutIter | o | |||
) | const [inline] |
int LayoutBase< Dim, LBD >::touchesAlloc | ( | const OtherDomain & | d, | |
OutIter | o | |||
) | const [inline] |
Versions of the above that do the allocated, instead of the owned, domains.
int LayoutBase< Dim, LBD >::touchesAllocLocal | ( | const OtherDomain & | d, | |
OutIter | o | |||
) | const [inline] |
int LayoutBase< Dim, LBD >::touchesAllocRemote | ( | const OtherDomain & | d, | |
OutIter | o | |||
) | const [inline] |
friend class LayoutBaseView [friend] |
friend class LayoutBaseData< Dim > [friend] |
RefCountedPtr<LBD> LayoutBase< Dim, LBD >::pdata_m |
LayoutBase stores its data in a RefCounted class to simplify memory management.
Referenced by LayoutBase< Dim, UniformGridLayoutData< Dim > >::allocatedDomain(), LayoutBase< Dim, UniformGridLayoutData< Dim > >::baseDomain(), LayoutBase< Dim, UniformGridLayoutData< Dim > >::baseID(), LayoutBase< Dim, UniformGridLayoutData< Dim > >::beginFillList(), LayoutBase< Dim, UniformGridLayoutData< Dim > >::beginGlobal(), LayoutBase< Dim, UniformGridLayoutData< Dim > >::beginLocal(), LayoutBase< Dim, UniformGridLayoutData< Dim > >::beginRemote(), LayoutBase< Dim, UniformGridLayoutData< Dim > >::blocks(), LayoutBase< Dim, UniformGridLayoutData< Dim > >::domain(), LayoutBase< Dim, UniformGridLayoutData< Dim > >::endFillList(), LayoutBase< Dim, UniformGridLayoutData< Dim > >::endGlobal(), LayoutBase< Dim, UniformGridLayoutData< Dim > >::endLocal(), LayoutBase< Dim, UniformGridLayoutData< Dim > >::endRemote(), LayoutBase< Dim, UniformGridLayoutData< Dim > >::externalGuards(), LayoutBase< Dim, UniformGridLayoutData< Dim > >::first(), LayoutBase< Dim, UniformGridLayoutData< Dim > >::globalID(), LayoutBase< Dim, UniformGridLayoutData< Dim > >::ID(), LayoutBase< Dim, UniformGridLayoutData< Dim > >::innerDomain(), LayoutBase< Dim, UniformGridLayoutData< Dim > >::internalGuards(), LayoutBase< Dim, UniformGridLayoutData< Dim > >::localToBase(), LayoutBase< Dim, UniformGridLayoutData< Dim > >::nodeListGlobal(), LayoutBase< Dim, UniformGridLayoutData< Dim > >::nodeListLocal(), LayoutBase< Dim, UniformGridLayoutData< Dim > >::nodeListRemote(), SparseTileLayout< Dim2 >::operator=(), LayoutBase< Dim, UniformGridLayoutData< Dim > >::ownedDomain(), LayoutBase< Dim, UniformGridLayoutData< Dim > >::repartition(), LayoutBase< Dim, UniformGridLayoutData< Dim > >::sizeGlobal(), LayoutBase< Dim, UniformGridLayoutData< Dim > >::sizeLocal(), LayoutBase< Dim, UniformGridLayoutData< Dim > >::sizeRemote(), LayoutBase< Dim, UniformGridLayoutData< Dim > >::touches(), LayoutBase< Dim, UniformGridLayoutData< Dim > >::touchesAlloc(), LayoutBase< Dim, UniformGridLayoutData< Dim > >::touchesAllocLocal(), LayoutBase< Dim, UniformGridLayoutData< Dim > >::touchesAllocRemote(), LayoutBase< Dim, UniformGridLayoutData< Dim > >::touchesLocal(), and LayoutBase< Dim, UniformGridLayoutData< Dim > >::touchesRemote().