MaMiCo
1.2
Toggle main menu visibility
Loading...
Searching...
No Matches
coupling
paralleltopology
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
12
namespace
coupling
{
13
namespace
paralleltopology
{
14
class
ParallelTopologyFactory
;
24
enum
ParallelTopologyType
{
25
UNDEFINED
= 0
26
,
27
XYZ
= 1
30
,
31
ZYX
= 2
34
};
35
}
// namespace paralleltopology
36
}
// namespace coupling
48
class
coupling::paralleltopology::ParallelTopologyFactory
{
49
public
:
56
template
<
unsigned
int
dim>
57
static
coupling::paralleltopology::ParallelTopology<dim>
*
getParallelTopology
(
coupling::paralleltopology::ParallelTopologyType
type,
58
tarch::la::Vector<dim, unsigned int>
numberProcesses) {
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
coupling::paralleltopology::ParallelTopologyFactory
creates the parallel topology from a given topology type and a number of processes
Definition
ParallelTopologyFactory.h:48
coupling::paralleltopology::ParallelTopologyFactory::getParallelTopology
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
coupling::paralleltopology::ParallelTopology
This class performs the conversion rank <-> process coordinates.
Definition
ParallelTopology.h:27
coupling::paralleltopology::XYZTopology
The XYZTopology orders the ranks in x-y-z manner.
Definition
XYZTopology.h:32
coupling::paralleltopology::ZYXTopology
The ZYXTopology orders the ranks in z-y-x manner.
Definition
ZYXTopology.h:31
tarch::la::Vector
Definition
Vector.h:25
coupling::paralleltopology
Definition
ParallelTopology.h:12
coupling::paralleltopology::ParallelTopologyType
ParallelTopologyType
Definition
ParallelTopologyFactory.h:24
coupling::paralleltopology::UNDEFINED
@ UNDEFINED
Definition
ParallelTopologyFactory.h:25
coupling::paralleltopology::XYZ
@ XYZ
Definition
ParallelTopologyFactory.h:27
coupling::paralleltopology::ZYX
@ ZYX
Definition
ParallelTopologyFactory.h:31
coupling
everything necessary for coupling operations, is defined in here
Definition
AdditiveMomentumInsertion.h:15
Generated by
1.17.0