SkelGIS  3.0
skelgis::DMatrix_impl< T, R, line > Struct Template Reference

DMatrix_impl class. More...

#include <dmatrix_impl.hpp>

Inheritance diagram for skelgis::DMatrix_impl< T, R, line >:
skelgis::DMatrix_base< T >

List of all members.

Public Member Functions

 DMatrix_impl ()
 default constructor of the distributed matrix interface
 DMatrix_impl (HEADER h, const T value, bool loc=false)
 constructor of the distributed matrix
 DMatrix_impl (const char *binFile, bool loc=false)
 constructor of the distributed matrix
 ~DMatrix_impl ()
 destructor of the distributed matrix
void setGlobalMiddleValue (T val)
 Set value in the global middle.
void setPhysicalBorder (T val)
 to set all the values of the physical border of the matrix
void setRightPhysicalBorder (T val)
 to set all the values on the right of physical border of the matrix
void setLeftPhysicalBorder (T val)
 to set all the values on the left of physical border of the matrix
void setUpPhysicalBorder (T val)
 to set all the values on the up of physical border of the matrix
void setDownPhysicalBorder (T val)
 to set all the values on the down of physical border of the matrix
iterator< T, R > begin ()
 Get the beginning iterator of the DMatrix (on the first element of the DMatrix)
iterator_cont< T, R > begin_cont ()
iterator_rev< T, R > begin_rev ()
iterator_step< T, R > begin_step (int step, int nb)
iterator_phb_left< T, R > begin_phb_left ()
iterator_phb_right< T, R > begin_phb_right ()
iterator_phb_up< T, R > begin_phb_up ()
iterator_phb_down< T, R > begin_phb_down ()
iterator_line< T, R > begin_line ()
iterator< T, R > end ()
 Get the ending iterator of the DMatrix (on the last element of the DMatrix)
iterator_cont< T, R > end_cont ()
iterator_rev< T, R > end_rev ()
iterator_step< T, R > end_step ()
iterator_phb_left< T, R > end_phb_left ()
iterator_phb_right< T, R > end_phb_right ()
iterator_phb_up< T, R > end_phb_up ()
iterator_phb_down< T, R > end_phb_down ()
iterator_line< T, R > end_line ()
iterator< T, R > getIterator (int col, int li)
 get the iterator on the matrix at position (x,y)
iterator_cont< T, R > getIterator_cont (int col, int li)
 get the iterator contiguous on the matrix at position (x,y)
iterator_rev< T, R > getIterator_rev (int col, int li)
 get the iterator reverse on the matrix at position (x,y)
void getIndexes (iterator< T, R > it, int &col, int &li)
 get the indexes of the iterator on the matrix
void getIndexes (iterator_cont< T, R > it, int &col, int &li)
void getIndexes (iterator_rev< T, R > it, int &col, int &li)
void print ()
 Print the matrix by bloc.
void printAll ()
 Print the matrix by bloc with borders.
void write (char *binFile)
 Write the zone file concerned for the current MPI process.
void getBorders ()
 get borders
T * getAllRight (iterator< T, R > it)
 Get all neighbor right values for the element at iterator it.
T * getAllRight (iterator_cont< T, R > it)
T * getAllRight (iterator_step< T, R > it)
T * getAllRight (iterator_rev< T, R > it)
T * getAllRight (iterator_phb_left< T, R > it)
T * getAllLeft (iterator< T, R > it)
 Get all neighbor left values for the element at iterator it.
T * getAllLeft (iterator_cont< T, R > it)
T * getAllLeft (iterator_step< T, R > it)
T * getAllLeft (iterator_rev< T, R > it)
T * getAllLeft (iterator_phb_right< T, R > it)
T * getAllUp (iterator< T, R > it)
 Get all neighbor up values for the element at iterator it.
T * getAllUp (iterator_cont< T, R > it)
T * getAllUp (iterator_step< T, R > it)
T * getAllUp (iterator_rev< T, R > it)
T * getAllUp (iterator_phb_down< T, R > it)
T * getAllDown (iterator< T, R > it)
 Get all neighbor down values for the element at iterator it.
T * getAllDown (iterator_cont< T, R > it)
T * getAllDown (iterator_step< T, R > it)
T * getAllDown (iterator_rev< T, R > it)
T * getAllDown (iterator_phb_up< T, R > it)
T * getAllRightDown (iterator< T, R > it)
 Get all neighbor right down values for the element at iterator it.
T * getAllRightDown (iterator_cont< T, R > it)
T * getAllRightDown (iterator_step< T, R > it)
T * getAllRightDown (iterator_rev< T, R > it)
T * getAllLeftDown (iterator< T, R > it)
 Get all neighbor left down values for the element at iterator it.
T * getAllLeftDown (iterator_cont< T, R > it)
T * getAllLeftDown (iterator_step< T, R > it)
T * getAllLeftDown (iterator_rev< T, R > it)
T * getAllRightUp (iterator< T, R > it)
 Get all neighbor right up values for the element at iterator it.
T * getAllRightUp (iterator_cont< T, R > it)
T * getAllRightUp (iterator_step< T, R > it)
T * getAllRightUp (iterator_rev< T, R > it)
T * getAllLeftUp (iterator< T, R > it)
 Get all neighbor left up values for the element at iterator it.
T * getAllLeftUp (iterator_cont< T, R > it)
T * getAllLeftUp (iterator_step< T, R > it)
T * getAllLeftUp (iterator_rev< T, R > it)
getRight (iterator< T, R > it)
 Get the nearest right neighbor value for the element at iterator it.
getRight (iterator_cont< T, R > it)
getRight (iterator_step< T, R > it)
getRight (iterator_rev< T, R > it)
getRight (iterator_phb_left< T, R > it)
getLeft (iterator< T, R > it)
 Get the nearest left neighbor value for the element at iterator it.
getLeft (iterator_cont< T, R > it)
getLeft (iterator_step< T, R > it)
getLeft (iterator_rev< T, R > it)
getLeft (iterator_phb_right< T, R > it)
getUp (iterator< T, R > it)
 Get the nearest up neighbor value for the element at iterator it.
getUp (iterator_cont< T, R > it)
getUp (iterator_step< T, R > it)
getUp (iterator_rev< T, R > it)
getUp (iterator_phb_down< T, R > it)
getDown (iterator< T, R > it)
 Get the nearest down neighbor value for the element at iterator it.
getDown (iterator_cont< T, R > it)
getDown (iterator_step< T, R > it)
getDown (iterator_rev< T, R > it)
getDown (iterator_phb_up< T, R > it)
getRightDown (iterator< T, R > it)
 Get the nearest right down neighbor value for the element at iterator it.
getRightDown (iterator_cont< T, R > it)
getRightDown (iterator_step< T, R > it)
getRightDown (iterator_rev< T, R > it)
getLeftDown (iterator< T, R > it)
 Get the nearest left down neighbor value for the element at iterator it.
getLeftDown (iterator_cont< T, R > it)
getLeftDown (iterator_step< T, R > it)
getLeftDown (iterator_rev< T, R > it)
getRightUp (iterator< T, R > it)
 Get the nearest right up neighbor value for the element at iterator it.
getRightUp (iterator_cont< T, R > it)
getRightUp (iterator_step< T, R > it)
getRightUp (iterator_rev< T, R > it)
getLeftUp (iterator< T, R > it)
 Get the nearest left up neighbor value for the element at iterator it.
getLeftUp (iterator_cont< T, R > it)
getLeftUp (iterator_step< T, R > it)
getLeftUp (iterator_rev< T, R > it)
T * getAllX (iterator< T, R > it)
 Get all values along X axe for the element at iterator it.
T * getAllX (iterator_cont< T, R > it)
T * getAllX (iterator_step< T, R > it)
T * getAllX (iterator_rev< T, R > it)
void getAllX (iterator< T, R > it, T *t)
 Get all values along X axe for the element at iterator it.
void getAllX (iterator_cont< T, R > it, T *t)
void getAllX (iterator_rev< T, R > it, T *t)
void getAllX (iterator_step< T, R > it, T *t)
T * getAllY (iterator< T, R > it)
 Get all values along Y axe for the element at iterator it.
T * getAllY (iterator_cont< T, R > it)
T * getAllY (iterator_step< T, R > it)
T * getAllY (iterator_rev< T, R > it)
void getAllY (iterator< T, R > it, T *t)
 Get all values along Y axe for the element at iterator it.
void getAllY (iterator_cont< T, R > it, T *t)
void getAllY (iterator_rev< T, R > it, T *t)
void getAllY (iterator_step< T, R > it, T *t)
T * get8 (iterator< T, R > it)
 Get all 8 directions neighbor values for the element at iterator it.
T * get8 (iterator_cont< T, R > it)
T * get8 (iterator_step< T, R > it)
T * get8 (iterator_rev< T, R > it)
T * get4 (iterator< T, R > it)
 Get all 4 directions neighbor values for the element at iterator it.
T * get4 (iterator_cont< T, R > it)
T * get4 (iterator_step< T, R > it)
T * get4 (iterator_rev< T, R > it)
getInRight (iterator_phb_left< T, R > it)
 Get the nearest right neighbor value inside the domain, for physical left border iterators.
getInLeft (iterator_phb_right< T, R > it)
 Get the nearest left neighbor value inside the domain, for physical right border iterators.
getInUp (iterator_phb_down< T, R > it)
 Get the nearest up neighbor value inside the domain, for physical down border iterators.
getInDown (iterator_phb_up< T, R > it)
 Get the nearest down neighbor value inside the domain, for physical up border iterators.

Public Attributes

HEADER border_head

Protected Member Functions

void create ()
 Creation of the ditributed matrix.
void initValues (T value)
 Values initialization of the elements of the DMatrix_impl.
void phBLimits ()
 Calculation of the physical border limits.
void read (const char *binFile)
 Read the zone of the binary file concerned for the current MPI process.
void getNeighborRanks ()
 Get ranks.
T * getUpBorderToSend ()
 Get the up border to send to neighbor processors.
void setUpBorder (T *values)
 Set the up border ghost cells with neighbor values from processors.
T * getDownBorderToSend ()
 Get the down border to send to neighbor processors.
void setDownBorder (T *values)
 Set the down border ghost cells with neighbor values from processors.
T * allRight (unsigned int rank)
 Get all neighbor right values for the element to a precise rank.
T * allLeft (unsigned int rank)
 Get all neighbor left values for the element to a precise rank.
T * allUp (unsigned int rank, unsigned int width)
 Get all neighbor up values for the element to a precise rank.
T * allDown (unsigned int rank, unsigned int width)
 Get all neighbor down values for the element to a precise rank.
T * allRightDown (unsigned int rank, unsigned int width)
 Get all neighbor right down values for the element to a precise rank.
T * allLeftDown (unsigned int rank, unsigned int width)
 Get all neighbor left down values for the element to a precise rank.
T * allRightUp (unsigned int rank, unsigned int width)
 Get all neighbor right up values for the element to a precise rank.
T * allLeftUp (unsigned int rank, unsigned int width)
 Get all neighbor left up values for the element to a precise rank.
right (unsigned int rank)
 Get the nearest neighbor right value for the element to a precise rank.
left (unsigned int rank)
 Get the nearest neighbor left value for the element to a precise rank.
up (unsigned int rank, unsigned int width)
 Get the nearest neighbor up value for the element to a precise rank.
down (unsigned int rank, unsigned int width)
 Get the nearest neighbor down value for the element to a precise rank.
rightDown (unsigned int rank, unsigned int width)
 Get the nearest neighbor right down value for the element to a precise rank.
leftDown (unsigned int rank, unsigned int width)
 Get the nearest neighbor left down value for the element to a precise rank.
rightUp (unsigned int rank, unsigned int width)
 Get the nearest neighbor right up value for the element to a precise rank.
leftUp (unsigned int rank, unsigned int width)
 Get the nearest neighbor left up value for the element to a precise rank.
T * allX (unsigned int rank)
 Get all values along X axe for the element to a precise rank.
void allX (unsigned int rank, T *t)
 Get all values along X axe for the element to a precise rank.
T * allY (unsigned int rank, unsigned int width)
 Get all values along Y axe for the element to a precise rank.
void allY (unsigned int rank, unsigned int width, T *t)
 Get all values along Y axe for the element to a precise rank.
T * eight (unsigned int rank, unsigned int width)
 Get all 8 directions neighbor values for the element to a precise rank.
T * four (unsigned int rank, unsigned int width)
 Get all 4 directions neighbor values for the element to a precise rank.
inright (unsigned int rank)
 Get the nearest right neighbor value inside the domain to a precise rank.
inleft (unsigned int rank)
 Get the nearest left neighbor value inside the domain to a precise rank.
inup (unsigned int rank, unsigned int width)
 Get the nearest up neighbor value inside the domain to a precise rank.
indown (unsigned int rank, unsigned int width)
 Get the nearest down neighbor value inside the domain to a precise rank.
void indexesIt (unsigned int rank, int &col, int &li)
 Get the indexes associated to a precise rank.

Protected Attributes

int mpi_ranks [2]
unsigned int beginPhBLeft
unsigned int beginPhBRight
unsigned int beginPhBUp
unsigned int beginPhBDown
unsigned int endPhBLeft
unsigned int endPhBRight
unsigned int endPhBUp
unsigned int endPhBDown

Detailed Description

template<class T, int R, bool line = true>
struct skelgis::DMatrix_impl< T, R, line >

DMatrix_impl class.

template of the distributed matrix implementation of SkelGIS. This is the first specialization of the DMatrix_impl.

Template Parameters:
Tis the type of data to store in the DMatrix_impl
Ris the overlap distance needed by the calculation, in other words, the size of the physical border needed
lineis the parallel distribution wanted, the default value is true, then the parallel distribution will be divided along height but not along width

Definition at line 80 of file dmatrix_impl.hpp.


Constructor & Destructor Documentation

template<class T, int R, bool line = true>
skelgis::DMatrix_impl< T, R, line >::DMatrix_impl ( HEADER  h,
const T  value,
bool  loc = false 
) [inline]

constructor of the distributed matrix

This constructor will simply allocate the good space.

Parameters:
his the header to use to build the matrix
valueis the default value to put in the matrix
locis a boolean value to indicate if the DMatrix_impl has to stay local to one MPI process (used in ApplyReduction).

Definition at line 808 of file dmatrix_impl.hpp.

template<class T, int R, bool line = true>
skelgis::DMatrix_impl< T, R, line >::DMatrix_impl ( const char *  binFile,
bool  loc = false 
) [inline]

constructor of the distributed matrix

The constructor evaluate how to divide the matrix in submatrice and do the work.

Parameters:
binFileis the path of the binary file you want to work on
locis a boolean value to indicate if the DMatrix_impl has to stay local to one MPI process (used in ApplyReduction).

Definition at line 826 of file dmatrix_impl.hpp.


Member Function Documentation

template<class T, int R, bool line = true>
T* skelgis::DMatrix_impl< T, R, line >::allDown ( unsigned int  rank,
unsigned int  width 
) [inline, protected]

Get all neighbor down values for the element to a precise rank.

Parameters:
rankis the rank at which the neighbor values are wanted
Returns:
table of neighbor values

Definition at line 388 of file dmatrix_impl.hpp.

template<class T, int R, bool line = true>
T* skelgis::DMatrix_impl< T, R, line >::allLeft ( unsigned int  rank) [inline, protected]

Get all neighbor left values for the element to a precise rank.

Parameters:
rankis the rank at which the neighbor values are wanted
Returns:
table of neighbor values

Definition at line 350 of file dmatrix_impl.hpp.

template<class T, int R, bool line = true>
T* skelgis::DMatrix_impl< T, R, line >::allLeftDown ( unsigned int  rank,
unsigned int  width 
) [inline, protected]

Get all neighbor left down values for the element to a precise rank.

Parameters:
rankis the rank at which the neighbor values are wanted
Returns:
table of neighbor values

Definition at line 426 of file dmatrix_impl.hpp.

template<class T, int R, bool line = true>
T* skelgis::DMatrix_impl< T, R, line >::allLeftUp ( unsigned int  rank,
unsigned int  width 
) [inline, protected]

Get all neighbor left up values for the element to a precise rank.

Parameters:
rankis the rank at which the neighbor values are wanted
Returns:
table of neighbor values

Definition at line 464 of file dmatrix_impl.hpp.

template<class T, int R, bool line = true>
T* skelgis::DMatrix_impl< T, R, line >::allRight ( unsigned int  rank) [inline, protected]

Get all neighbor right values for the element to a precise rank.

Parameters:
rankis the rank at which the neighbor values are wanted
Returns:
table of neighbor values

Definition at line 331 of file dmatrix_impl.hpp.

template<class T, int R, bool line = true>
T* skelgis::DMatrix_impl< T, R, line >::allRightDown ( unsigned int  rank,
unsigned int  width 
) [inline, protected]

Get all neighbor right down values for the element to a precise rank.

Parameters:
rankis the rank at which the neighbor values are wanted
Returns:
table of neighbor values

Definition at line 407 of file dmatrix_impl.hpp.

template<class T, int R, bool line = true>
T* skelgis::DMatrix_impl< T, R, line >::allRightUp ( unsigned int  rank,
unsigned int  width 
) [inline, protected]

Get all neighbor right up values for the element to a precise rank.

Parameters:
rankis the rank at which the neighbor values are wanted
Returns:
table of neighbor values

Definition at line 445 of file dmatrix_impl.hpp.

template<class T, int R, bool line = true>
T* skelgis::DMatrix_impl< T, R, line >::allUp ( unsigned int  rank,
unsigned int  width 
) [inline, protected]

Get all neighbor up values for the element to a precise rank.

Parameters:
rankis the rank at which the neighbor values are wanted
Returns:
table of neighbor values

Definition at line 369 of file dmatrix_impl.hpp.

template<class T, int R, bool line = true>
T* skelgis::DMatrix_impl< T, R, line >::allX ( unsigned int  rank) [inline, protected]

Get all values along X axe for the element to a precise rank.

Equivalent to allLeft and allRight with a single call.

Parameters:
rankis the rank at which the neighbor value is wanted
Returns:
a table of all neighbor values along X

Definition at line 588 of file dmatrix_impl.hpp.

template<class T, int R, bool line = true>
void skelgis::DMatrix_impl< T, R, line >::allX ( unsigned int  rank,
T *  t 
) [inline, protected]

Get all values along X axe for the element to a precise rank.

Equivalent to allLeft and allRight with a single call.

Parameters:
rankis the rank at which the neighbor value is wanted
resulttable of all neighbor values along X

Definition at line 614 of file dmatrix_impl.hpp.

template<class T, int R, bool line = true>
T* skelgis::DMatrix_impl< T, R, line >::allY ( unsigned int  rank,
unsigned int  width 
) [inline, protected]

Get all values along Y axe for the element to a precise rank.

Equivalent to allDown and allUp with a single call.

Parameters:
rankis the rank at which the neighbor value is wanted
Returns:
a table of all neighbor values along X

Definition at line 638 of file dmatrix_impl.hpp.

template<class T, int R, bool line = true>
void skelgis::DMatrix_impl< T, R, line >::allY ( unsigned int  rank,
unsigned int  width,
T *  t 
) [inline, protected]

Get all values along Y axe for the element to a precise rank.

Equivalent to allDown and allUp with a single call.

Parameters:
rankis the rank at which the neighbor value is wanted
resulttable of all neighbor values along X

Definition at line 665 of file dmatrix_impl.hpp.

template<class T, int R, bool line = true>
iterator<T,R> skelgis::DMatrix_impl< T, R, line >::begin ( ) [inline]

Get the beginning iterator of the DMatrix (on the first element of the DMatrix)

This method exists for each type of iterator in SkelGIS.

Returns:
the iterator of the first element

Definition at line 954 of file dmatrix_impl.hpp.

template<class T, int R, bool line = true>
void skelgis::DMatrix_impl< T, R, line >::create ( ) [inline, protected]

Creation of the ditributed matrix.

Data distribution and construction of the parallel data structure.

Definition at line 97 of file dmatrix_impl.hpp.

template<class T, int R, bool line = true>
T skelgis::DMatrix_impl< T, R, line >::down ( unsigned int  rank,
unsigned int  width 
) [inline, protected]

Get the nearest neighbor down value for the element to a precise rank.

Parameters:
rankis the rank at which the neighbor value is wanted
Returns:
the neighbor value

Definition at line 522 of file dmatrix_impl.hpp.

template<class T, int R, bool line = true>
T* skelgis::DMatrix_impl< T, R, line >::eight ( unsigned int  rank,
unsigned int  width 
) [inline, protected]

Get all 8 directions neighbor values for the element to a precise rank.

Equivalent to leftUp, up, rightUp, right, rightDown, down, leftDown and left with a single call.

Parameters:
rankis the rank at which the neighbor value is wanted
Returns:
a table of all 8 directions neighbor values

Definition at line 690 of file dmatrix_impl.hpp.

template<class T, int R, bool line = true>
iterator<T,R> skelgis::DMatrix_impl< T, R, line >::end ( ) [inline]

Get the ending iterator of the DMatrix (on the last element of the DMatrix)

This method exists for each type of iterator in SkelGIS.

Returns:
the iterator of the last element

Definition at line 970 of file dmatrix_impl.hpp.

template<class T, int R, bool line = true>
T* skelgis::DMatrix_impl< T, R, line >::four ( unsigned int  rank,
unsigned int  width 
) [inline, protected]

Get all 4 directions neighbor values for the element to a precise rank.

Equivalent to up, right, down and left with a single call.

Parameters:
rankis the rank at which the neighbor value is wanted
Returns:
a table of all 8 directions neighbor values

Definition at line 712 of file dmatrix_impl.hpp.

template<class T, int R, bool line = true>
T* skelgis::DMatrix_impl< T, R, line >::get4 ( iterator< T, R >  it) [inline]

Get all 4 directions neighbor values for the element at iterator it.

Equivalent to getUp, getRight, getDown and getLeft with a single call.

Parameters:
itis the iterator position
Returns:
a table of all 4 directions neighbor values

Definition at line 1428 of file dmatrix_impl.hpp.

template<class T, int R, bool line = true>
T* skelgis::DMatrix_impl< T, R, line >::get8 ( iterator< T, R >  it) [inline]

Get all 8 directions neighbor values for the element at iterator it.

Equivalent to getLeftUp, getUp, getRightUp, getRight, getRightDown, getDown, getLeftDown and getLeft with a single call.

Parameters:
itis the iterator position
Returns:
a table of all 8 directions neighbor values

Definition at line 1416 of file dmatrix_impl.hpp.

template<class T, int R, bool line = true>
T* skelgis::DMatrix_impl< T, R, line >::getAllDown ( iterator< T, R >  it) [inline]

Get all neighbor down values for the element at iterator it.

The returned table will contain R elements. These elements are the R values on the down of the current it. This method exists for each type of iterator with down values in SkelGIS.

Parameters:
itis the iterator position
Returns:
a table of down values

Definition at line 1195 of file dmatrix_impl.hpp.

template<class T, int R, bool line = true>
T* skelgis::DMatrix_impl< T, R, line >::getAllLeft ( iterator< T, R >  it) [inline]

Get all neighbor left values for the element at iterator it.

The returned table will contain R elements. These elements are the R values on the left of the current it. This method exists for each type of iterator with left values in SkelGIS.

Parameters:
itis the iterator position
Returns:
a table of left values

Definition at line 1165 of file dmatrix_impl.hpp.

template<class T, int R, bool line = true>
T* skelgis::DMatrix_impl< T, R, line >::getAllLeftDown ( iterator< T, R >  it) [inline]

Get all neighbor left down values for the element at iterator it.

The returned table will contain R elements. These elements are the R values on the left down of the current it. This method exists for each type of iterator with left down values in SkelGIS.

Parameters:
itis the iterator position
Returns:
a table of left down values

Definition at line 1224 of file dmatrix_impl.hpp.

template<class T, int R, bool line = true>
T* skelgis::DMatrix_impl< T, R, line >::getAllLeftUp ( iterator< T, R >  it) [inline]

Get all neighbor left up values for the element at iterator it.

The returned table will contain R elements. These elements are the R values on the left up of the current it. This method exists for each type of iterator with left up values in SkelGIS.

Parameters:
itis the iterator position
Returns:
a table of left up values

Definition at line 1252 of file dmatrix_impl.hpp.

template<class T, int R, bool line = true>
T* skelgis::DMatrix_impl< T, R, line >::getAllRight ( iterator< T, R >  it) [inline]

Get all neighbor right values for the element at iterator it.

The returned table will contain R elements. These elements are the R values on the right of the current it. This method exists for each type of iterator with right values in SkelGIS.

Parameters:
itis the iterator position
Returns:
a table of right values

Definition at line 1150 of file dmatrix_impl.hpp.

template<class T, int R, bool line = true>
T* skelgis::DMatrix_impl< T, R, line >::getAllRightDown ( iterator< T, R >  it) [inline]

Get all neighbor right down values for the element at iterator it.

The returned table will contain R elements. These elements are the R values on the right down of the current it. This method exists for each type of iterator with right down values in SkelGIS.

Parameters:
itis the iterator position
Returns:
a table of right down values

Definition at line 1210 of file dmatrix_impl.hpp.

template<class T, int R, bool line = true>
T* skelgis::DMatrix_impl< T, R, line >::getAllRightUp ( iterator< T, R >  it) [inline]

Get all neighbor right up values for the element at iterator it.

The returned table will contain R elements. These elements are the R values on the right up of the current it. This method exists for each type of iterator with right up values in SkelGIS.

Parameters:
itis the iterator position
Returns:
a table of right up values

Definition at line 1238 of file dmatrix_impl.hpp.

template<class T, int R, bool line = true>
T* skelgis::DMatrix_impl< T, R, line >::getAllUp ( iterator< T, R >  it) [inline]

Get all neighbor up values for the element at iterator it.

The returned table will contain R elements. These elements are the R values on the up of the current it. This method exists for each type of iterator with up values in SkelGIS.

Parameters:
itis the iterator position
Returns:
a table of up values

Definition at line 1180 of file dmatrix_impl.hpp.

template<class T, int R, bool line = true>
T* skelgis::DMatrix_impl< T, R, line >::getAllX ( iterator< T, R >  it) [inline]

Get all values along X axe for the element at iterator it.

Equivalent to getAllLeft and getAllRight with a single call. This method exists for each type of iterator with left and right values in SkelGIS.

Parameters:
itis the iterator position
Returns:
a table of all neighbor values along X

Definition at line 1365 of file dmatrix_impl.hpp.

template<class T, int R, bool line = true>
void skelgis::DMatrix_impl< T, R, line >::getAllX ( iterator< T, R >  it,
T *  t 
) [inline]

Get all values along X axe for the element at iterator it.

Equivalent to getAllLeft and getAllRight with a single call. This method exists for each type of iterator with left and right values in SkelGIS.

Parameters:
itis the iterator position
resulttable of all neighbor values along X

Definition at line 1378 of file dmatrix_impl.hpp.

template<class T, int R, bool line = true>
T* skelgis::DMatrix_impl< T, R, line >::getAllY ( iterator< T, R >  it) [inline]

Get all values along Y axe for the element at iterator it.

Equivalent to getAllUp and getAllDown with a single call. This method exists for each type of iterator with left and right values in SkelGIS.

Parameters:
itis the iterator position
Returns:
a table of all neighbor values along Y

Definition at line 1391 of file dmatrix_impl.hpp.

template<class T, int R, bool line = true>
void skelgis::DMatrix_impl< T, R, line >::getAllY ( iterator< T, R >  it,
T *  t 
) [inline]

Get all values along Y axe for the element at iterator it.

Equivalent to getAllUp and getAllDown with a single call. This method exists for each type of iterator with left and right values in SkelGIS.

Parameters:
itis the iterator position
resulttable of all neighbor values along Y

Definition at line 1404 of file dmatrix_impl.hpp.

template<class T, int R, bool line = true>
void skelgis::DMatrix_impl< T, R, line >::getBorders ( ) [inline]

get borders

Get the borders from other processors MPI exchanges

Definition at line 1117 of file dmatrix_impl.hpp.

template<class T, int R, bool line = true>
T skelgis::DMatrix_impl< T, R, line >::getDown ( iterator< T, R >  it) [inline]

Get the nearest down neighbor value for the element at iterator it.

This method exists for each type of iterator with down value in SkelGIS.

Parameters:
itis the iterator position
Returns:
the down neighbor element value

Definition at line 1303 of file dmatrix_impl.hpp.

template<class T, int R, bool line = true>
T* skelgis::DMatrix_impl< T, R, line >::getDownBorderToSend ( ) [inline, protected]

Get the down border to send to neighbor processors.

Returns:
table of values to send

Definition at line 294 of file dmatrix_impl.hpp.

template<class T, int R, bool line = true>
void skelgis::DMatrix_impl< T, R, line >::getIndexes ( iterator< T, R >  it,
int &  col,
int &  li 
) [inline]

get the indexes of the iterator on the matrix

Parameters:
itis the iterator from which the indexes will be taken
xis the iterator position x returned
yis the iterator position y returned

Definition at line 1034 of file dmatrix_impl.hpp.

template<class T, int R, bool line = true>
T skelgis::DMatrix_impl< T, R, line >::getInDown ( iterator_phb_up< T, R >  it) [inline]

Get the nearest down neighbor value inside the domain, for physical up border iterators.

This work for every size of R and will always give the nearest down inside-domain value.

Parameters:
itis the physical border iterator position
Returns:
the neighbor value

Definition at line 1467 of file dmatrix_impl.hpp.

template<class T, int R, bool line = true>
T skelgis::DMatrix_impl< T, R, line >::getInLeft ( iterator_phb_right< T, R >  it) [inline]

Get the nearest left neighbor value inside the domain, for physical right border iterators.

This work for every size of R and will always give the nearest left inside-domain value.

Parameters:
itis the physical border iterator position
Returns:
the neighbor value

Definition at line 1449 of file dmatrix_impl.hpp.

template<class T, int R, bool line = true>
T skelgis::DMatrix_impl< T, R, line >::getInRight ( iterator_phb_left< T, R >  it) [inline]

Get the nearest right neighbor value inside the domain, for physical left border iterators.

This work for every size of R and will always give the nearest right inside-domain value.

Parameters:
itis the physical border iterator position
Returns:
the neighbor value

Definition at line 1440 of file dmatrix_impl.hpp.

template<class T, int R, bool line = true>
T skelgis::DMatrix_impl< T, R, line >::getInUp ( iterator_phb_down< T, R >  it) [inline]

Get the nearest up neighbor value inside the domain, for physical down border iterators.

This work for every size of R and will always give the nearest up inside-domain value.

Parameters:
itis the physical border iterator position
Returns:
the neighbor value

Definition at line 1458 of file dmatrix_impl.hpp.

template<class T, int R, bool line = true>
iterator<T,R> skelgis::DMatrix_impl< T, R, line >::getIterator ( int  col,
int  li 
) [inline]

get the iterator on the matrix at position (x,y)

Parameters:
xis row index y is column index
Returns:
returns the iterator at position (x,y)

Definition at line 986 of file dmatrix_impl.hpp.

template<class T, int R, bool line = true>
iterator_cont<T,R> skelgis::DMatrix_impl< T, R, line >::getIterator_cont ( int  col,
int  li 
) [inline]

get the iterator contiguous on the matrix at position (x,y)

Parameters:
xis row index y is column index
Returns:
returns the iterator at position (x,y)

Definition at line 1002 of file dmatrix_impl.hpp.

template<class T, int R, bool line = true>
iterator_rev<T,R> skelgis::DMatrix_impl< T, R, line >::getIterator_rev ( int  col,
int  li 
) [inline]

get the iterator reverse on the matrix at position (x,y)

Parameters:
xis row index y is column index
Returns:
returns the iterator at position (x,y)

Definition at line 1018 of file dmatrix_impl.hpp.

template<class T, int R, bool line = true>
T skelgis::DMatrix_impl< T, R, line >::getLeft ( iterator< T, R >  it) [inline]

Get the nearest left neighbor value for the element at iterator it.

This method exists for each type of iterator with left value in SkelGIS.

Parameters:
itis the iterator position
Returns:
the left neighbor element value

Definition at line 1277 of file dmatrix_impl.hpp.

template<class T, int R, bool line = true>
T skelgis::DMatrix_impl< T, R, line >::getLeftDown ( iterator< T, R >  it) [inline]

Get the nearest left down neighbor value for the element at iterator it.

This method exists for each type of iterator with left down value in SkelGIS.

Parameters:
itis the iterator position
Returns:
the left down neighbor element value

Definition at line 1328 of file dmatrix_impl.hpp.

template<class T, int R, bool line = true>
T skelgis::DMatrix_impl< T, R, line >::getLeftUp ( iterator< T, R >  it) [inline]

Get the nearest left up neighbor value for the element at iterator it.

This method exists for each type of iterator with left up value in SkelGIS.

Parameters:
itis the iterator position
Returns:
the left up neighbor element value

Definition at line 1352 of file dmatrix_impl.hpp.

template<class T, int R, bool line = true>
void skelgis::DMatrix_impl< T, R, line >::getNeighborRanks ( ) [inline, protected]

Get ranks.

Get the ranks of the 2 neighbors for MPI exchanges

Returns:
if the value is -55555 then there is no neighbor in this direction if the value is >0 it represent the MPI rank concerned by the exchange

Definition at line 240 of file dmatrix_impl.hpp.

template<class T, int R, bool line = true>
T skelgis::DMatrix_impl< T, R, line >::getRight ( iterator< T, R >  it) [inline]

Get the nearest right neighbor value for the element at iterator it.

This method exists for each type of iterator with right value in SkelGIS.

Parameters:
itis the iterator position
Returns:
the right neighbor element value

Definition at line 1264 of file dmatrix_impl.hpp.

template<class T, int R, bool line = true>
T skelgis::DMatrix_impl< T, R, line >::getRightDown ( iterator< T, R >  it) [inline]

Get the nearest right down neighbor value for the element at iterator it.

This method exists for each type of iterator with right down value in SkelGIS.

Parameters:
itis the iterator position
Returns:
the right down neighbor element value

Definition at line 1316 of file dmatrix_impl.hpp.

template<class T, int R, bool line = true>
T skelgis::DMatrix_impl< T, R, line >::getRightUp ( iterator< T, R >  it) [inline]

Get the nearest right up neighbor value for the element at iterator it.

This method exists for each type of iterator with right up value in SkelGIS.

Parameters:
itis the iterator position
Returns:
the right up neighbor element value

Definition at line 1340 of file dmatrix_impl.hpp.

template<class T, int R, bool line = true>
T skelgis::DMatrix_impl< T, R, line >::getUp ( iterator< T, R >  it) [inline]

Get the nearest up neighbor value for the element at iterator it.

This method exists for each type of iterator with up value in SkelGIS.

Parameters:
itis the iterator position
Returns:
the up neighbor element value

Definition at line 1290 of file dmatrix_impl.hpp.

template<class T, int R, bool line = true>
T* skelgis::DMatrix_impl< T, R, line >::getUpBorderToSend ( ) [inline, protected]

Get the up border to send to neighbor processors.

Returns:
table of values to send

Definition at line 258 of file dmatrix_impl.hpp.

template<class T, int R, bool line = true>
void skelgis::DMatrix_impl< T, R, line >::indexesIt ( unsigned int  rank,
int &  col,
int &  li 
) [inline, protected]

Get the indexes associated to a precise rank.

Parameters:
rankis the rank at which the indexes values are wanted
colis the column return value
liis the line return value

Definition at line 786 of file dmatrix_impl.hpp.

template<class T, int R, bool line = true>
T skelgis::DMatrix_impl< T, R, line >::indown ( unsigned int  rank,
unsigned int  width 
) [inline, protected]

Get the nearest down neighbor value inside the domain to a precise rank.

This work for every size of R and will always give the nearest down inside-domain value.

Parameters:
rankis the rank at which the neighbor value is wanted
Returns:
the neighbor value

Definition at line 772 of file dmatrix_impl.hpp.

template<class T, int R, bool line = true>
void skelgis::DMatrix_impl< T, R, line >::initValues ( value) [inline, protected]

Values initialization of the elements of the DMatrix_impl.

Parameters:
valueis the value to set to the elements

Definition at line 158 of file dmatrix_impl.hpp.

template<class T, int R, bool line = true>
T skelgis::DMatrix_impl< T, R, line >::inleft ( unsigned int  rank) [inline, protected]

Get the nearest left neighbor value inside the domain to a precise rank.

This work for every size of R and will always give the nearest left inside-domain value.

Parameters:
rankis the rank at which the neighbor value is wanted
Returns:
the neighbor value

Definition at line 744 of file dmatrix_impl.hpp.

template<class T, int R, bool line = true>
T skelgis::DMatrix_impl< T, R, line >::inright ( unsigned int  rank) [inline, protected]

Get the nearest right neighbor value inside the domain to a precise rank.

This work for every size of R and will always give the nearest right inside-domain value.

Parameters:
rankis the rank at which the neighbor value is wanted
Returns:
the neighbor value

Definition at line 730 of file dmatrix_impl.hpp.

template<class T, int R, bool line = true>
T skelgis::DMatrix_impl< T, R, line >::inup ( unsigned int  rank,
unsigned int  width 
) [inline, protected]

Get the nearest up neighbor value inside the domain to a precise rank.

This work for every size of R and will always give the nearest up inside-domain value.

Parameters:
rankis the rank at which the neighbor value is wanted
Returns:
the neighbor value

Definition at line 758 of file dmatrix_impl.hpp.

template<class T, int R, bool line = true>
T skelgis::DMatrix_impl< T, R, line >::left ( unsigned int  rank) [inline, protected]

Get the nearest neighbor left value for the element to a precise rank.

Parameters:
rankis the rank at which the neighbor value is wanted
Returns:
the neighbor value

Definition at line 496 of file dmatrix_impl.hpp.

template<class T, int R, bool line = true>
T skelgis::DMatrix_impl< T, R, line >::leftDown ( unsigned int  rank,
unsigned int  width 
) [inline, protected]

Get the nearest neighbor left down value for the element to a precise rank.

Parameters:
rankis the rank at which the neighbor value is wanted
Returns:
the neighbor value

Definition at line 548 of file dmatrix_impl.hpp.

template<class T, int R, bool line = true>
T skelgis::DMatrix_impl< T, R, line >::leftUp ( unsigned int  rank,
unsigned int  width 
) [inline, protected]

Get the nearest neighbor left up value for the element to a precise rank.

Parameters:
rankis the rank at which the neighbor value is wanted
Returns:
the neighbor value

Definition at line 574 of file dmatrix_impl.hpp.

template<class T, int R, bool line = true>
void skelgis::DMatrix_impl< T, R, line >::read ( const char *  binFile) [inline, protected]

Read the zone of the binary file concerned for the current MPI process.

Parameters:
binFileis binary file to read

Definition at line 204 of file dmatrix_impl.hpp.

template<class T, int R, bool line = true>
T skelgis::DMatrix_impl< T, R, line >::right ( unsigned int  rank) [inline, protected]

Get the nearest neighbor right value for the element to a precise rank.

Parameters:
rankis the rank at which the neighbor value is wanted
Returns:
the neighbor value

Definition at line 483 of file dmatrix_impl.hpp.

template<class T, int R, bool line = true>
T skelgis::DMatrix_impl< T, R, line >::rightDown ( unsigned int  rank,
unsigned int  width 
) [inline, protected]

Get the nearest neighbor right down value for the element to a precise rank.

Parameters:
rankis the rank at which the neighbor value is wanted
Returns:
the neighbor value

Definition at line 535 of file dmatrix_impl.hpp.

template<class T, int R, bool line = true>
T skelgis::DMatrix_impl< T, R, line >::rightUp ( unsigned int  rank,
unsigned int  width 
) [inline, protected]

Get the nearest neighbor right up value for the element to a precise rank.

Parameters:
rankis the rank at which the neighbor value is wanted
Returns:
the neighbor value

Definition at line 561 of file dmatrix_impl.hpp.

template<class T, int R, bool line = true>
void skelgis::DMatrix_impl< T, R, line >::setDownBorder ( T *  values) [inline, protected]

Set the down border ghost cells with neighbor values from processors.

Parameters:
valuesis the table values to fill ghost cells with

Definition at line 315 of file dmatrix_impl.hpp.

template<class T, int R, bool line = true>
void skelgis::DMatrix_impl< T, R, line >::setDownPhysicalBorder ( val) [inline]

to set all the values on the down of physical border of the matrix

Parameters:
valis the value to set

Definition at line 940 of file dmatrix_impl.hpp.

template<class T, int R, bool line = true>
void skelgis::DMatrix_impl< T, R, line >::setGlobalMiddleValue ( val) [inline]

Set value in the global middle.

Parameters:
valis the value to affect

Definition at line 855 of file dmatrix_impl.hpp.

template<class T, int R, bool line = true>
void skelgis::DMatrix_impl< T, R, line >::setLeftPhysicalBorder ( val) [inline]

to set all the values on the left of physical border of the matrix

Parameters:
valis the value to set

Definition at line 914 of file dmatrix_impl.hpp.

template<class T, int R, bool line = true>
void skelgis::DMatrix_impl< T, R, line >::setPhysicalBorder ( val) [inline]

to set all the values of the physical border of the matrix

Parameters:
valis the value to set

Definition at line 876 of file dmatrix_impl.hpp.

template<class T, int R, bool line = true>
void skelgis::DMatrix_impl< T, R, line >::setRightPhysicalBorder ( val) [inline]

to set all the values on the right of physical border of the matrix

Parameters:
valis the value to set

Definition at line 901 of file dmatrix_impl.hpp.

template<class T, int R, bool line = true>
void skelgis::DMatrix_impl< T, R, line >::setUpBorder ( T *  values) [inline, protected]

Set the up border ghost cells with neighbor values from processors.

Parameters:
valuesis the table values to fill ghost cells with

Definition at line 279 of file dmatrix_impl.hpp.

template<class T, int R, bool line = true>
void skelgis::DMatrix_impl< T, R, line >::setUpPhysicalBorder ( val) [inline]

to set all the values on the up of physical border of the matrix

Parameters:
valis the value to set

Definition at line 927 of file dmatrix_impl.hpp.

template<class T, int R, bool line = true>
T skelgis::DMatrix_impl< T, R, line >::up ( unsigned int  rank,
unsigned int  width 
) [inline, protected]

Get the nearest neighbor up value for the element to a precise rank.

Parameters:
rankis the rank at which the neighbor value is wanted
Returns:
the neighbor value

Definition at line 509 of file dmatrix_impl.hpp.

template<class T, int R, bool line = true>
void skelgis::DMatrix_impl< T, R, line >::write ( char *  binFile) [inline]

Write the zone file concerned for the current MPI process.

write the MPI prcess zone, and spread the data in the subMatrices OpenMP only one submatrice if OpenMP is disabled

Parameters:
binFileis binary file to read

Definition at line 1079 of file dmatrix_impl.hpp.


Member Data Documentation

template<class T, int R, bool line = true>
unsigned int skelgis::DMatrix_impl< T, R, line >::beginPhBDown [protected]

begining indexes for the physical borders iterators

Definition at line 89 of file dmatrix_impl.hpp.

template<class T, int R, bool line = true>
HEADER skelgis::DMatrix_impl< T, R, line >::border_head

Header defining the current local matrix with overlap R

Definition at line 85 of file dmatrix_impl.hpp.

template<class T, int R, bool line = true>
unsigned int skelgis::DMatrix_impl< T, R, line >::endPhBDown [protected]

ending indexes for the physical borders iterators

Definition at line 90 of file dmatrix_impl.hpp.

template<class T, int R, bool line = true>
int skelgis::DMatrix_impl< T, R, line >::mpi_ranks[2] [protected]

table of size 2 for the neighbor processes to make MPI exchanges

Definition at line 88 of file dmatrix_impl.hpp.


The documentation for this struct was generated from the following file:
 All Classes Files Functions Variables Defines