Schnek
schnek::SerialSubdivision< GridType > Class Template Reference
Inheritance diagram for schnek::SerialSubdivision< GridType >:
Collaboration diagram for schnek::SerialSubdivision< GridType >:

Public Types

typedef Boundary< GridType::Rank >::LimitType LimitType
 
typedef GridType::value_type value_type
 
typedef DomainSubdivision< GridType >::DomainType DomainType
 
typedef DomainSubdivision< GridType >::BoundaryType BoundaryType
 
typedef DomainSubdivision< GridType >::BufferType BufferType
 
- Public Types inherited from schnek::DomainSubdivision< GridType >
enum  { Rank = GridType::Rank }
 
typedef GridType::IndexType LimitType
 
typedef GridType::value_type value_type
 
typedef GridType::CheckingPolicyType CheckingPolicyType
 
typedef GridType::StoragePolicyType StoragePolicyType
 
typedef Grid< unsigned char, 1, GridAssertCheckBufferType
 
typedef Range< int, Rank > DomainType
 
typedef Boundary< Rank > BoundaryType
 
typedef boost::shared_ptr< BoundaryTypepBoundaryType
 

Public Member Functions

void init (const LimitType &low, const LimitType &high, int delta)
 
const DomainTypegetGlobalDomain () const
 Return the global domain size excluding ghost cells.
 
void exchange (GridType &grid, int dim)
 Exchanges the boundaries in direction specified by dim. More...
 
void accumulate (GridType &grid, int dim)
 Exchange the boundaries of a field function summing the data from ghost cells and inner cells.
 
void exchangeData (int dim, int orientation, BufferType &in, BufferType &out)
 
double avgReduce (double val) const
 The average of a single value is the value.
 
int avgReduce (int val) const
 The average of a single value is the value.
 
double maxReduce (double val) const
 The maximum of a single value is the value.
 
int maxReduce (int val) const
 The maximum of a single value is the value.
 
double minReduce (double val) const
 Return the minimum of a single value over all the processes.
 
int minReduce (int val) const
 Return the minimum of a single value over all the processes.
 
double sumReduce (double val) const
 The sum of a single value is the value.
 
int sumReduce (int val) const
 The sum of a single value is the value.
 
bool master () const
 The process with the rank zero is designated master process.
 
int procnum () const
 Returns the comm rank as given by mpi.
 
int procCount () const
 Return the total number of processes.
 
int getUniqueId () const
 returns an ID, which consists of the Dimensions and coordinates
 
bool isBoundLo (int)
 
bool isBoundHi (int)
 
- Public Member Functions inherited from schnek::DomainSubdivision< GridType >
 DomainSubdivision ()
 Default constructor.
 
virtual ~DomainSubdivision ()
 Virtual destructor. More...
 
int getDelta ()
 
void init (const DomainType &domain, int delta)
 
void init (const GridType &grid, int delta)
 
void init (const LimitType &size, int delta)
 
const DomainTypegetDomain () const
 Return the local domain size.
 
const LimitType & getLo () const
 Return the minimum of the local domain.
 
const LimitType & getHi () const
 Return the maximum of the local domain.
 
DomainType getInnerDomain () const
 Return the local inner domain size.
 
LimitType getInnerLo () const
 Return the minimum of the local inner domain.
 
LimitType getInnerHi () const
 Return the maximum of the local inner domain.
 
template<typename T , template< int > class CheckingPolicy>
Range< T, Rank, CheckingPolicy > getInnerExtent (const Range< T, Rank, CheckingPolicy > &globalExtent) const
 Return the local inner physical extent.
 
template<typename T , template< int > class CheckingPolicy>
Range< T, Rank, CheckingPolicy > getInnerExtent (const Array< T, Rank, CheckingPolicy > &globalExtent) const
 
void exchange (GridType &grid)
 
void accumulate (GridType &grid)
 

Additional Inherited Members

- Protected Attributes inherited from schnek::DomainSubdivision< GridType >
pBoundaryType bounds
 

Member Function Documentation

◆ exchange()

template<class GridType >
void schnek::SerialSubdivision< GridType >::exchange ( GridType &  grid,
int  dim 
)
virtual

Exchanges the boundaries in direction specified by dim.

The outermost simulated cells are sent and the surrounding ghost cells are filled with values

Implements schnek::DomainSubdivision< GridType >.

◆ init()

template<class GridType >
void schnek::SerialSubdivision< GridType >::init ( const LimitType &  low,
const LimitType &  high,
int  delta 
)
virtual

Initialize the boundary with the extent of the global domain

No subdivision is carried out for serial simulations. The size of the global domain will be returned by the getDomain, getHi, and getLo methods.

Implements schnek::DomainSubdivision< GridType >.

◆ isBoundHi()

template<class GridType >
bool schnek::SerialSubdivision< GridType >::isBoundHi ( int  )
inlinevirtual

Returns true if this process is on the upper bound of the global domain.

The serial domain subdivision does not subdivide. It is always on the bound of the domain.

Parameters
dimThe dimension in which to inspect
Returns
A boolean indicating if this process is on the upper boud of the global domain

Implements schnek::DomainSubdivision< GridType >.

◆ isBoundLo()

template<class GridType >
bool schnek::SerialSubdivision< GridType >::isBoundLo ( int  )
inlinevirtual

Returns true if this process is on the lower bound of the global domain

The serial domain subdivision does not subdivide. It is always on the bound of the domain.

Parameters
dimThe dimension in which to inspect
Returns
A boolean indicating if this process is on the lower boud of the global domain

Implements schnek::DomainSubdivision< GridType >.


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