Line data Source code
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
4 4 : template <unsigned int dim> void coupling::configurations::MaMiCoConfiguration<dim>::parseSubtag(tinyxml2::XMLElement* node) {
5 :
6 32 : for (tinyxml2::XMLElement* child = node->FirstChildElement(); child != NULL; child = child->NextSiblingElement()) {
7 28 : std::string nodename(child->Value());
8 :
9 28 : if (nodename == _couplingCellConfiguration.getTag()) {
10 4 : _couplingCellConfiguration.parseSubtag(child);
11 24 : } else if (nodename == _particleInsertionConfiguration.getTag()) {
12 4 : _particleInsertionConfiguration.parseSubtag(child);
13 4 : _isDefinedParticleInsertion = true;
14 20 : } else if (nodename == _momentumInsertionConfiguration.getTag()) {
15 4 : _momentumInsertionConfiguration.parseSubtag(child);
16 4 : _isDefinedMomentumInsertion = true;
17 16 : } else if (nodename == _transferStrategyConfiguration.getTag()) {
18 4 : _transferStrategyConfiguration.parseSubtag(child);
19 4 : _isDefinedTransferStrategy = true;
20 12 : } else if (nodename == _parallelTopologyConfiguration.getTag()) {
21 4 : _parallelTopologyConfiguration.parseSubtag(child);
22 4 : _isDefinedParallelTopology = true;
23 8 : } else if (nodename == _boundaryForceConfiguration.getTag()) {
24 4 : _boundaryForceConfiguration.parseSubtag(child);
25 4 : _isDefinedBoundaryForce = true;
26 4 : } else if (nodename == _timeIntegrationConfiguration.getTag()) {
27 0 : _timeIntegrationConfiguration.parseSubtag(child);
28 4 : } else if (nodename == _thermostatConfiguration.getTag()) {
29 4 : _thermostatConfiguration.parseSubtag(child);
30 4 : _isDefinedThermostat = true;
31 : } else {
32 0 : std::cout << "Unknown subtag " << nodename << "!" << std::endl;
33 0 : exit(EXIT_FAILURE);
34 : }
35 : }
36 :
37 4 : _isValid = _momentumInsertionConfiguration.isValid() && _particleInsertionConfiguration.isValid() && _couplingCellConfiguration.isValid() &&
38 8 : _transferStrategyConfiguration.isValid() && _boundaryForceConfiguration.isValid() && _parallelTopologyConfiguration.isValid() &&
39 4 : _timeIntegrationConfiguration.isValid();
40 4 : }
|