MaMiCo 1.2
Loading...
Searching...
No Matches
coupling::paralleltopology::ParallelTopologyFactory Class Reference

creates the parallel topology from a given topology type and a number of processes More...

#include <ParallelTopologyFactory.h>

Static Public Member Functions

template<unsigned int dim>
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 pointer to the created parallel topology.
 

Detailed Description

creates the parallel topology from a given topology type and a number of processes

This class creates the parallel topology from a given topology type and a number of processes (typically read from a configuration). assuming ParallelTopologyType = XYZ and there is a cubic domain, splitted into 8 sub-domains (2 sub-domains in each dimension). Then the ordring of the MPI processes is: Rank=0 for x=0,y=0,z=0. Rank=1 for x=0,y=0,z=1. Rank=2 for x=0,y=1,z=0. Rank=3 for x=0,1=0,z=1. Rank=4 for x=1,y=0,z=0. Rank=5 for x=1,y=0,z=1. Rank=6 for x=1,y=1,z=0. Rank=7 for x=1,y=1,z=1.

Author
Philipp Neumann

Member Function Documentation

◆ getParallelTopology()

template<unsigned int dim>
static coupling::paralleltopology::ParallelTopology< dim > * coupling::paralleltopology::ParallelTopologyFactory::getParallelTopology ( coupling::paralleltopology::ParallelTopologyType type,
tarch::la::Vector< dim, unsigned int > numberProcesses )
inlinestatic

This template function takes ParallelTopologyType and the number of processes as inputs and returns a pointer to the created parallel topology.

Template Parameters
dimNumber of dimensions; it can be 1, 2 or 3
Parameters
typeParallelTopologyType (rdering of the MPI processes)
numberProcessesnumber of processes

The documentation for this class was generated from the following file: