MaMiCo 1.2
Loading...
Searching...
No Matches
ParallelTopologyFactory.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_PARALLELTOPOLOGYFACTORY_H_
6#define _MOLECULARDYNAMICS_COUPLING_PARALLELTOPOLOGY_PARALLELTOPOLOGYFACTORY_H_
7
8#include "coupling/paralleltopology/ParallelTopology.h"
9#include "coupling/paralleltopology/XYZTopology.h"
10#include "coupling/paralleltopology/ZYXTopology.h"
11
12namespace coupling {
13namespace paralleltopology {
26 ,
27 XYZ = 1
30 ,
31 ZYX = 2
34};
35} // namespace paralleltopology
36} // namespace coupling
49public:
56 template <unsigned int dim>
59 if (type == XYZ) {
60 return new coupling::paralleltopology::XYZTopology<dim>(numberProcesses);
61 } else if (type == ZYX) {
62 return new coupling::paralleltopology::ZYXTopology<dim>(numberProcesses);
63 } else {
64 return NULL;
65 }
66 }
67};
68#endif
creates the parallel topology from a given topology type and a number of processes
Definition ParallelTopologyFactory.h:48
static coupling::paralleltopology::ParallelTopology< dim > * getParallelTopology(coupling::paralleltopology::ParallelTopologyType type, tarch::la::Vector< dim, unsigned int > numberProcesses)
This template function takes ParallelTopologyType and the number of processes as inputs and returns a...
Definition ParallelTopologyFactory.h:57
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
The ZYXTopology orders the ranks in z-y-x manner.
Definition ZYXTopology.h:31
Definition Vector.h:24
Definition ParallelTopology.h:12
ParallelTopologyType
Definition ParallelTopologyFactory.h:24
@ UNDEFINED
Definition ParallelTopologyFactory.h:25
@ XYZ
Definition ParallelTopologyFactory.h:27
@ ZYX
Definition ParallelTopologyFactory.h:31
everything necessary for coupling operations, is defined in here
Definition AdditiveMomentumInsertion.h:15