MaMiCo 1.2
Loading...
Searching...
No Matches
ParallelTopology.h
1// Copyright (C) 2015 Technische Universitaet Muenchen
2// This file is part of the Mamico project. For conditions of distribution
3// and use, please see the copyright notice in Mamico's main folder, or at
4// www5.in.tum.de/mamico
5#ifndef _MOLECULARDYNAMICS_COUPLING_PARALLELTOPOLOGY_PARALLELTOPOLOGY_H_
6#define _MOLECULARDYNAMICS_COUPLING_PARALLELTOPOLOGY_PARALLELTOPOLOGY_H_
7
8#include "tarch/la/Vector.h"
9
10namespace coupling {
14template <unsigned int dim> class ParallelTopology;
15} // namespace paralleltopology
16} // namespace coupling
17
27template <unsigned int dim> class coupling::paralleltopology::ParallelTopology {
28public:
30 virtual ~ParallelTopology() {}
36 virtual unsigned int getRank(tarch::la::Vector<dim, unsigned int> processCoordinates, unsigned int topologyOffset) const = 0;
42 virtual tarch::la::Vector<dim, unsigned int> getProcessCoordinates(unsigned int rank, unsigned int topologyOffset) const = 0;
43};
44
45#endif // _MOLECULARDYNAMICS_COUPLING_PARALLELTOPOLOGY_PARALLELTOPOLOGY_H_
This class performs the conversion rank <-> process coordinates.
Definition ParallelTopology.h:27
virtual ~ParallelTopology()
Definition ParallelTopology.h:30
virtual unsigned int getRank(tarch::la::Vector< dim, unsigned int > processCoordinates, unsigned int topologyOffset) const =0
converts process coordinates into a rank.
virtual tarch::la::Vector< dim, unsigned int > getProcessCoordinates(unsigned int rank, unsigned int topologyOffset) const =0
converts rank into process coordinates.
Definition Vector.h:24
Definition ParallelTopology.h:12
everything necessary for coupling operations, is defined in here
Definition AdditiveMomentumInsertion.h:15