MaMiCo
1.2
Toggle main menu visibility
Loading...
Searching...
No Matches
coupling
configurations
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
12
namespace
coupling
{
13
namespace
configurations {
14
template
<
unsigned
int
dim>
class
CouplingCellConfiguration
;
15
}
16
}
// namespace coupling
17
24
template
<
unsigned
int
dim>
class
coupling::configurations::CouplingCellConfiguration
:
public
tarch::configuration::Configuration
{
25
public
:
27
CouplingCellConfiguration
()
28
: _isValid(true), _couplingCellSize(0.0), _linkedCellsPerCouplingCell(0), _writeEveryMicroscopicTimestep(0), _microscopicFilename(
""
),
29
_writeEveryMacroscopicTimestep(0), _macroscopicFilename(
""
) {}
30
32
~CouplingCellConfiguration
() {}
33
37
void
parseSubtag
(
tinyxml2::XMLElement
* node);
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
81
protected
:
82
CouplingCellConfiguration
(
tarch::la::Vector<dim, double>
couplingCellSize,
tarch::la::Vector<dim, unsigned int>
linkedCellsPerCouplingCell,
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
89
private
:
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_
coupling::configurations::CouplingCellConfiguration
configuration for output of coupling cell data to vtk files.
Definition
CouplingCellConfiguration.h:24
coupling::configurations::CouplingCellConfiguration::getWriteEveryMicroscopicTimestep
unsigned int getWriteEveryMicroscopicTimestep() const
Definition
CouplingCellConfiguration.h:66
coupling::configurations::CouplingCellConfiguration::getCouplingCellSize
tarch::la::Vector< dim, double > getCouplingCellSize() const
Definition
CouplingCellConfiguration.h:56
coupling::configurations::CouplingCellConfiguration::parseSubtag
void parseSubtag(tinyxml2::XMLElement *node)
coupling::configurations::CouplingCellConfiguration::getWriteEveryMacroscopicTimestep
unsigned int getWriteEveryMacroscopicTimestep() const
Definition
CouplingCellConfiguration.h:75
coupling::configurations::CouplingCellConfiguration::isValid
bool isValid() const
Definition
CouplingCellConfiguration.h:51
coupling::configurations::CouplingCellConfiguration::CouplingCellConfiguration
CouplingCellConfiguration()
Definition
CouplingCellConfiguration.h:27
coupling::configurations::CouplingCellConfiguration::getMicroscopicFilename
std::string getMicroscopicFilename() const
Definition
CouplingCellConfiguration.h:70
coupling::configurations::CouplingCellConfiguration::getTag
std::string getTag() const
coupling::configurations::CouplingCellConfiguration::~CouplingCellConfiguration
~CouplingCellConfiguration()
Definition
CouplingCellConfiguration.h:32
coupling::configurations::CouplingCellConfiguration::getMacroscopicFilename
std::string getMacroscopicFilename() const
Definition
CouplingCellConfiguration.h:79
coupling::configurations::CouplingCellConfiguration::getNumberLinkedCellsPerCouplingCell
tarch::la::Vector< dim, unsigned int > getNumberLinkedCellsPerCouplingCell() const
Definition
CouplingCellConfiguration.h:61
tarch::configuration::Configuration
Definition
Configuration.h:22
tarch::la::Vector
Definition
Vector.h:25
tinyxml2::XMLElement
Definition
tinyxml2.h:1124
coupling
everything necessary for coupling operations, is defined in here
Definition
AdditiveMomentumInsertion.h:15
Generated by
1.17.0