5#ifndef _MOLECULARDYNAMICS_COUPLING_PARALLELTOPOLOGY_XYZTOPOLOGY_H_
6#define _MOLECULARDYNAMICS_COUPLING_PARALLELTOPOLOGY_XYZTOPOLOGY_H_
8#include "coupling/CouplingMDDefinitions.h"
9#include "coupling/paralleltopology/ParallelTopology.h"
43#if (COUPLING_MD_DEBUG == COUPLING_MD_YES)
44 std::cout <<
"Rank=" << rank
52 unsigned int index = processCoordinates[dim - 1];
53 for (
int d = dim - 2; d > -1; d--) {
54 index = _numberProcesses[d] * index + processCoordinates[d];
56 return index + topologyOffset;
This class performs the conversion rank <-> process coordinates.
Definition ParallelTopology.h:27
The XYZTopology orders the ranks in x-y-z manner.
Definition XYZTopology.h:32
XYZTopology(tarch::la::Vector< dim, unsigned int > numberProcesses)
Definition XYZTopology.h:35
unsigned int getRank(tarch::la::Vector< dim, unsigned int > processCoordinates, unsigned int topologyOffset) const
converts process coordinates into a rank.
Definition XYZTopology.h:51
virtual ~XYZTopology()
Definition XYZTopology.h:40
tarch::la::Vector< dim, unsigned int > getProcessCoordinates(unsigned int rank, unsigned int topologyOffset) const
converts rank into process coordinates.
Definition XYZTopology.h:42
Definition ParallelTopology.h:12
everything necessary for coupling operations, is defined in here
Definition AdditiveMomentumInsertion.h:15
tarch::la::Vector< dim, unsigned int > initDivisionFactor(tarch::la::Vector< dim, unsigned int > numberCells)
Definition CouplingMDDefinitions.h:89
tarch::la::Vector< dim, unsigned int > getVectorCellIndex(unsigned int cellIndex, const tarch::la::Vector< dim, unsigned int > &divisionFactor)
converts linearised cell index to a vector cell index using predefined division factors.
Definition CouplingMDDefinitions.h:108