Schnek
schnek::Boundary< rank, CheckingPolicy > Class Template Reference

#include <boundary.hpp>

Public Types

enum  bound { Min, Max }
 An enum specifying the location of a ghost domain.
 
typedef Range< int, rank, CheckingPolicy > DomainType
 The range type that contains the domain size.
 
typedef DomainType::LimitType LimitType
 The array type that contains the limits of the domain.
 

Public Member Functions

 Boundary ()
 
 Boundary (const LimitType &lo, const LimitType &hi, int delta_)
 
 Boundary (DomainType &size_, int delta_)
 
int getDelta ()
 
const DomainTypegetDomain ()
 
DomainType getGhostDomain (int dim, bound b)
 
DomainType getGhostSourceDomain (int dim, bound b)
 
DomainType getBoundaryDomain (int dim, bound b, bool stagger)
 
DomainType getInnerDomain ()
 
template<class GridType >
SubGrid< GridType, CheckingPolicy > getGhostBoundary (int dim, bound b, GridType &grid)
 
template<typename T , template< int > class CheckingPolicy2, template< typename, int > class StoragePolicy>
SubGrid< Field< T, rank, CheckingPolicy2, StoragePolicy >, CheckingPolicy > getGhostBoundary (int dim, bound b, Field< T, rank, CheckingPolicy2, StoragePolicy > &field)
 

Detailed Description

template<int rank, template< int > class CheckingPolicy = ArrayNoArgCheck>
class schnek::Boundary< rank, CheckingPolicy >

A rectangular region that is aware of ghost cells.

Methods are provided that return Ranges to the boundary domains on each side of the main domain.

Constructor & Destructor Documentation

◆ Boundary() [1/3]

template<int rank, template< int > class CheckingPolicy = ArrayNoArgCheck>
schnek::Boundary< rank, CheckingPolicy >::Boundary ( )

Construct a zero boundary

◆ Boundary() [2/3]

template<int rank, template< int > class CheckingPolicy = ArrayNoArgCheck>
schnek::Boundary< rank, CheckingPolicy >::Boundary ( const LimitType lo,
const LimitType hi,
int  delta_ 
)

Construct a boundary supplying lo and hi coordinates and the number of ghost cells. The domain given should include the ghost cells.

Parameters
lothe lower corner of the domain, including the ghost cells
hithe upper corner of the domain, including the ghost cells
delta_the number of ghost cells

◆ Boundary() [3/3]

template<int rank, template< int > class CheckingPolicy = ArrayNoArgCheck>
schnek::Boundary< rank, CheckingPolicy >::Boundary ( DomainType size_,
int  delta_ 
)

Constrauct a boundary supplying a reactangular domain and the number of ghost cells. The domain given should include the ghost cells.

Parameters
size_the rectangular domain, including the ghost cells
delta_the number of ghost cells

Member Function Documentation

◆ getBoundaryDomain()

template<int rank, template< int > class CheckingPolicy = ArrayNoArgCheck>
DomainType schnek::Boundary< rank, CheckingPolicy >::getBoundaryDomain ( int  dim,
bound  b,
bool  stagger 
)

Returns the boundary domain, a rectangular region outside the inner domain. The bounadry domain has a thickness determined by the number of ghost cells. Unlike the ghost domain, the boundary domain is aware of grid staggering.

Parameters
dimthe dimanesion index of the side on which the ghost domain lies.
bthe location of the gost domain. Min will return the lower ghost domain and Max will return the upper ghost domain
Returns
A rectangular domain of boundary cells

◆ getDelta()

template<int rank, template< int > class CheckingPolicy = ArrayNoArgCheck>
int schnek::Boundary< rank, CheckingPolicy >::getDelta ( )
inline

The number of ghost cells

Returns
the number of ghost cells

◆ getDomain()

template<int rank, template< int > class CheckingPolicy = ArrayNoArgCheck>
const DomainType& schnek::Boundary< rank, CheckingPolicy >::getDomain ( )
inline

Returns the original domain, including the ghost cells

◆ getGhostBoundary() [1/2]

template<int rank, template< int > class CheckingPolicy = ArrayNoArgCheck>
template<class GridType >
SubGrid<GridType, CheckingPolicy> schnek::Boundary< rank, CheckingPolicy >::getGhostBoundary ( int  dim,
bound  b,
GridType &  grid 
)

Returns the sub-grid containing only the ghost cells. The ghost domain has a thickness given by the number of ghost cells, delta.

Parameters
dimthe dimanesion index of the side on which the ghost domain lies.
bthe location of the gost domain. Min will return the lower ghost domain and Max will return the upper ghost domain
Returns
A sub-grid containing ghost cells

◆ getGhostBoundary() [2/2]

template<int rank, template< int > class CheckingPolicy = ArrayNoArgCheck>
template<typename T , template< int > class CheckingPolicy2, template< typename, int > class StoragePolicy>
SubGrid<Field<T,rank,CheckingPolicy2,StoragePolicy>, CheckingPolicy> schnek::Boundary< rank, CheckingPolicy >::getGhostBoundary ( int  dim,
bound  b,
Field< T, rank, CheckingPolicy2, StoragePolicy > &  field 
)

Returns sub-grid containing only the boundary domain. The bounadry domain has a thickness determined by the number of ghost cells. Unlike the ghost domain, the boundary domain is aware of grid staggering.

Parameters
dimthe dimanesion index of the side on which the ghost domain lies.
bthe location of the gost domain. Min will return the lower ghost domain and Max will return the upper ghost domain
Returns
A sub-grid containing boundary cells

◆ getGhostDomain()

template<int rank, template< int > class CheckingPolicy = ArrayNoArgCheck>
DomainType schnek::Boundary< rank, CheckingPolicy >::getGhostDomain ( int  dim,
bound  b 
)

Returns the ghost domain, a rectangular region outside the inner domain. The ghost domain has a thickness given by the number of ghost cells, delta.

Parameters
dimthe dimension index of the side on which the ghost domain lies.
bthe location of the ghost domain. Min will return the lower ghost domain and Max will return the upper ghost domain
Returns
A rectangular domain of ghost cells

◆ getGhostSourceDomain()

template<int rank, template< int > class CheckingPolicy = ArrayNoArgCheck>
DomainType schnek::Boundary< rank, CheckingPolicy >::getGhostSourceDomain ( int  dim,
bound  b 
)

Returns the inner domain corresponding to the ghost domain of the neighbouring process. The domain has a thickness given by the number of ghost cells, delta.

Parameters
dimthe dimension index of the side on which the inner domain lies.
bthe location of the inner domain. Min will return the domain on the lower side and Max will return the domain on the upper side
Returns
A rectangular domain of source cells

◆ getInnerDomain()

template<int rank, template< int > class CheckingPolicy = ArrayNoArgCheck>
DomainType schnek::Boundary< rank, CheckingPolicy >::getInnerDomain ( )

Returns the inner domain, excluding the ghost cells


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