WARPXM v1.10.0
Loading...
Searching...
No Matches
WxSplitRange< ID_type > Class Template Reference

WxSplitRange splits a range into smaller ranges in a cartesian manner. More...

#include <wxsplitrange.h>

Detailed Description

template<typename ID_type>
class WxSplitRange< ID_type >

WxSplitRange splits a range into smaller ranges in a cartesian manner.

Each sub-range face has a 1:1 mapping with neighbor sub-range faces.

Public Types

typedef int empty_range_t
 
typedef std::vector< ID_type > SubRangesAssigned_C_ordering_t
 

Public Member Functions

 WxSplitRange (const WxRange &range, const std::list< ID_type > &id_list)
 Split supplied range into smaller number of ranges.
 
virtual ~WxSplitRange ()
 Destory a split range.
 
unsigned ndims () const
 Dimension of range split.
 
unsigned numRanges () const
 Number of sub-ranges in split.
 
const WxRangegetGlobalRange () const
 Return the global range that was split.
 
const SubRangesAssigned_C_ordering_t getAssignedSubRangeIDs () const
 Returns the assigned subrange ids for all of the assigned subranges.
 
WxRange getRange (const ID_type &id) const
 Return neighbor for a given sub-range and side.
 
const std::vector< int > & getLowerPoints (int dim) const
 
const std::vector< int > & getUpperPoints (int dim) const
 
void stretchDimension (int dim, unsigned int stretchFactor)
 modifies the split range such that in the dimension specified all the range coordinates are stretched in the positive direction by the supplied factor.
 
WxSplitRange< ID_type > cell_to_node_center () const
 modifies the split range such that the global range and each sub-range are modified such that the lowerPoint remains the same, the upper point is incremented by 1.
 
void addDimension (int lowerPoint, int upperPoint)
 modifies the split range such that the number of dimensions is increased by one, covering the unsplit range from lowerPoint to upperPoint.
 

Member Typedef Documentation

◆ empty_range_t

template<typename ID_type >
typedef int WxSplitRange< ID_type >::empty_range_t

◆ SubRangesAssigned_C_ordering_t

template<typename ID_type >
typedef std::vector<ID_type> WxSplitRange< ID_type >::SubRangesAssigned_C_ordering_t

Constructor & Destructor Documentation

◆ WxSplitRange()

template<typename ID_type >
WxSplitRange< ID_type >::WxSplitRange ( const WxRange range,
const std::list< ID_type > &  id_list 
)
inline

Split supplied range into smaller number of ranges.

Each sub-range is labelled using elements from the supplied list of ids. Each id is used no more than once. All ids will not necessarily be used.

Parameters
rangerange to split
id_listlist of ids to give to sub-ranges. Ordering of assignment will be as done with C-style row-major counting. (incrementing highest dimension first)

◆ ~WxSplitRange()

template<typename ID_type >
virtual WxSplitRange< ID_type >::~WxSplitRange ( )
inlinevirtual

Destory a split range.

Member Function Documentation

◆ addDimension()

template<typename ID_type >
void WxSplitRange< ID_type >::addDimension ( int  lowerPoint,
int  upperPoint 
)
inline

modifies the split range such that the number of dimensions is increased by one, covering the unsplit range from lowerPoint to upperPoint.

Previous splitting in existing dimensions remains the same.

◆ cell_to_node_center()

template<typename ID_type >
WxSplitRange< ID_type > WxSplitRange< ID_type >::cell_to_node_center ( ) const
inline

modifies the split range such that the global range and each sub-range are modified such that the lowerPoint remains the same, the upper point is incremented by 1.

The id for each subrange and all other properties remain the same.

◆ getAssignedSubRangeIDs()

template<typename ID_type >
const SubRangesAssigned_C_ordering_t WxSplitRange< ID_type >::getAssignedSubRangeIDs ( ) const
inline

Returns the assigned subrange ids for all of the assigned subranges.

Ordering of vector returned is as per standard C-style ordering or highest dimension subrange index varying the fastest.

◆ getGlobalRange()

template<typename ID_type >
const WxRange & WxSplitRange< ID_type >::getGlobalRange ( ) const
inline

Return the global range that was split.

◆ getLowerPoints()

template<typename ID_type >
const std::vector< int > & WxSplitRange< ID_type >::getLowerPoints ( int  dim) const
inline

◆ getRange()

template<typename ID_type >
WxRange WxSplitRange< ID_type >::getRange ( const ID_type &  id) const
inline

Return neighbor for a given sub-range and side.

Parameters
idsub-rangefor which neighbor information is needed
dimdimension in which the adjacent side face lies
lower_or_upperin which direction in dimension dim to look for neighbor
Returns
neighboring sub-range id, or ??? if no neighbor Return a sub-range in the split.
Parameters
idsub-range number. Should be in [0..nranges)
Returns
sub-range associated with 'id'

◆ getUpperPoints()

template<typename ID_type >
const std::vector< int > & WxSplitRange< ID_type >::getUpperPoints ( int  dim) const
inline

◆ ndims()

template<typename ID_type >
unsigned WxSplitRange< ID_type >::ndims ( ) const
inline

Dimension of range split.

◆ numRanges()

template<typename ID_type >
unsigned WxSplitRange< ID_type >::numRanges ( ) const
inline

Number of sub-ranges in split.

◆ stretchDimension()

template<typename ID_type >
void WxSplitRange< ID_type >::stretchDimension ( int  dim,
unsigned int  stretchFactor 
)
inline

modifies the split range such that in the dimension specified all the range coordinates are stretched in the positive direction by the supplied factor.

(lower range point remains fixed.)


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