ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/OpenMD/trunk/src/parallel/Communicator.hpp
(Generate patch)

Comparing branches/development/src/parallel/Communicator.hpp (file contents):
Revision 1539 by gezelter, Fri Jan 14 22:31:31 2011 UTC vs.
Revision 1540 by gezelter, Mon Jan 17 21:34:36 2011 UTC

# Line 58 | Line 58 | namespace OpenMD{
58   #ifdef IS_MPI
59  
60    enum direction {
61 <    I = 0,
62 <    J = 1
61 >    Row = 0,
62 >    Column = 1
63    };
64      
65    template<typename T>
# Line 79 | Line 79 | namespace OpenMD{
79    template<> const int MPITraits<Mat3x3d>::dim = 9;
80    
81    template<direction D, typename T>
82 <  class Comm {
82 >  class Communicator {
83    public:
84      
85 <    Comm<D, T>(int nObjects) {
85 >    Communicator<D, T>(int nObjects) {
86        
87        int nProc = MPI::COMM_WORLD.Get_size();
88        int myRank = MPI::COMM_WORLD.Get_rank();
# Line 98 | Line 98 | namespace OpenMD{
98        rowIndex_ = myRank / nColumns;      
99        columnIndex_ = myRank % nColumns;
100  
101 <      if (D == I) {
101 >      if (D == Row) {
102          myComm = MPI::COMM_WORLD.Split(rowIndex_, 0);
103        } else {
104          myComm = MPI::COMM_WORLD.Split(columnIndex_, 0);

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines