MaMiCo 1.2
Loading...
Searching...
No Matches
ParallelTopologyConfiguration.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_CONFIGURATIONS_PARALLELTOPOLOGYCONFIGURATION_H_
6#define _MOLECULARDYNAMICS_COUPLING_CONFIGURATIONS_PARALLELTOPOLOGYCONFIGURATION_H_
7
8#include "coupling/paralleltopology/ParallelTopologyFactory.h"
9#include "tarch/configuration/Configuration.h"
10#include "tarch/configuration/ParseConfiguration.h"
11#include "tarch/la/Vector.h"
12#include <iostream>
13
14namespace coupling {
15namespace configurations {
17}
18} // namespace coupling
19
26public:
28 ParallelTopologyConfiguration() : _type(coupling::paralleltopology::UNDEFINED), _isValid(true) {}
29
32
34 std::string value;
36 if (value == "xyz") {
38 } else if (value == "zyx") {
40 } else {
41 std::cout << "ERROR coupling::ParallelTopologyConfiguration: Wrong type!" << std::endl;
42 _isValid = false;
43 exit(EXIT_FAILURE);
44 }
45 }
46
50 std::string getTag() const { return "parallel-topology"; }
51
59 bool isValid() const { return _isValid; }
60
65
66protected:
68
69private:
71
72 bool _isValid;
73};
74
75#endif // _MOLECULARDYNAMICS_COUPLING_CONFIGURATIONS_PARALLELTOPOLOGYCONFIGURATION_H_
reads parallel topology configuration. XYZ and ZYX are supported.
Definition ParallelTopologyConfiguration.h:25
ParallelTopologyConfiguration()
Definition ParallelTopologyConfiguration.h:28
std::string getTag() const
Definition ParallelTopologyConfiguration.h:50
bool isValid() const
Definition ParallelTopologyConfiguration.h:59
virtual ~ParallelTopologyConfiguration()
Definition ParallelTopologyConfiguration.h:31
void parseSubtag(tinyxml2::XMLElement *node)
Definition ParallelTopologyConfiguration.h:33
coupling::paralleltopology::ParallelTopologyType getParallelTopologyType() const
Definition ParallelTopologyConfiguration.h:64
Definition Configuration.h:22
static void readStringMandatory(std::string &storage, tinyxml2::XMLElement *node, std::string tag)
Definition ParseConfiguration.h:201
Definition tinyxml2.h:1268
Definition ParallelTopology.h:12
ParallelTopologyType
Definition ParallelTopologyFactory.h:24
@ XYZ
Definition ParallelTopologyFactory.h:27
@ ZYX
Definition ParallelTopologyFactory.h:31
everything necessary for coupling operations, is defined in here
Definition AdditiveMomentumInsertion.h:15