MaMiCo 1.2
Loading...
Searching...
No Matches
CouplingCellConfiguration.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_COUPLINGCELLCONFIGURATION_H_
6#define _MOLECULARDYNAMICS_COUPLING_CONFIGURATIONS_COUPLINGCELLCONFIGURATION_H_
7
8#include "tarch/configuration/Configuration.h"
9#include "tarch/la/Vector.h"
10#include <iostream>
11
12namespace coupling {
13namespace configurations {
14template <unsigned int dim> class CouplingCellConfiguration;
15}
16} // namespace coupling
17
25public:
28 : _isValid(true), _couplingCellSize(0.0), _linkedCellsPerCouplingCell(0), _writeEveryMicroscopicTimestep(0), _microscopicFilename(""),
29 _writeEveryMacroscopicTimestep(0), _macroscopicFilename("") {}
30
33
38
42 std::string getTag() const;
43
51 bool isValid() const { return _isValid; }
52
56 tarch::la::Vector<dim, double> getCouplingCellSize() const { return _couplingCellSize; }
57
61 tarch::la::Vector<dim, unsigned int> getNumberLinkedCellsPerCouplingCell() const { return _linkedCellsPerCouplingCell; }
62
66 unsigned int getWriteEveryMicroscopicTimestep() const { return _writeEveryMicroscopicTimestep; }
70 std::string getMicroscopicFilename() const { return _microscopicFilename; }
71
75 unsigned int getWriteEveryMacroscopicTimestep() const { return _writeEveryMacroscopicTimestep; }
79 std::string getMacroscopicFilename() const { return _macroscopicFilename; }
80
81protected:
83 unsigned int writeEveryMicroscopicTimestep, std::string microscopicFilename, unsigned int writeEveryMacroscopicTimestep,
84 std::string macroscopicFilename)
85 : _isValid(true), _couplingCellSize(couplingCellSize), _linkedCellsPerCouplingCell(linkedCellsPerCouplingCell),
86 _writeEveryMicroscopicTimestep(writeEveryMicroscopicTimestep), _microscopicFilename(microscopicFilename),
87 _writeEveryMacroscopicTimestep(writeEveryMacroscopicTimestep), _macroscopicFilename(macroscopicFilename) {}
88
89private:
90 static const std::string COUPLING_CELL_SIZE;
91 static const std::string LINKED_CELLS_PER_COUPLING_CELL;
92 static const std::string WRITE_EVERY_MICROSCOPIC_TIMESTEP;
93 static const std::string WRITE_EVERY_MACROSCOPIC_TIMESTEP;
94 static const std::string MICROSCOPIC_FILENAME;
95 static const std::string MACROSCOPIC_FILENAME;
96
97 bool _isValid;
98 tarch::la::Vector<dim, double> _couplingCellSize;
99 tarch::la::Vector<dim, unsigned int> _linkedCellsPerCouplingCell;
100 unsigned int _writeEveryMicroscopicTimestep;
101 std::string _microscopicFilename;
102 unsigned int _writeEveryMacroscopicTimestep;
103 std::string _macroscopicFilename;
104};
105#include "coupling/configurations/CouplingCellConfiguration.cpph"
106
107#endif // _MOLECULARDYNAMICS_COUPLING_CONFIGURATIONS_COUPLINGCELLCONFIGURATION_H_
configuration for output of coupling cell data to vtk files.
Definition CouplingCellConfiguration.h:24
unsigned int getWriteEveryMicroscopicTimestep() const
Definition CouplingCellConfiguration.h:66
tarch::la::Vector< dim, double > getCouplingCellSize() const
Definition CouplingCellConfiguration.h:56
void parseSubtag(tinyxml2::XMLElement *node)
unsigned int getWriteEveryMacroscopicTimestep() const
Definition CouplingCellConfiguration.h:75
bool isValid() const
Definition CouplingCellConfiguration.h:51
CouplingCellConfiguration()
Definition CouplingCellConfiguration.h:27
std::string getMicroscopicFilename() const
Definition CouplingCellConfiguration.h:70
~CouplingCellConfiguration()
Definition CouplingCellConfiguration.h:32
std::string getMacroscopicFilename() const
Definition CouplingCellConfiguration.h:79
tarch::la::Vector< dim, unsigned int > getNumberLinkedCellsPerCouplingCell() const
Definition CouplingCellConfiguration.h:61
Definition Configuration.h:22
Definition Vector.h:24
Definition tinyxml2.h:1268
everything necessary for coupling operations, is defined in here
Definition AdditiveMomentumInsertion.h:15