preCICE v3.1.1
Loading...
Searching...
No Matches
Configuration.hpp
Go to the documentation of this file.
1#pragma once
2
3#include <string>
4#include "SharedPointer.hpp"
5#include "boost/smart_ptr.hpp"
7#include "logging/Logger.hpp"
9#include "m2n/M2N.hpp"
14#include "xml/XMLTag.hpp"
15
16namespace precice {
17namespace config {
18
26public:
28
32 virtual ~Configuration() {}
33
38
44 virtual void xmlTagCallback(const xml::ConfigurationContext &context, xml::XMLTag &tag);
45
51 virtual void xmlEndTagCallback(const xml::ConfigurationContext &context, xml::XMLTag &tag);
52
54 bool allowsExperimental() const
55 {
56 return _experimental;
57 }
58
60 bool waitInFinalize() const
61 {
62 return _waitInFinalize;
63 }
64
69
74
79
81
86
94
102
110
111private:
112 logging::Logger _log{"config::Configuration"};
113
115 bool _experimental = false;
116
118 bool _waitInFinalize = false;
119
120 // @brief Root tag of preCICE configuration.
122
123 // The log configuration must be constructed first to prevent log clutter
125
126 // Handle other configuration afterwards
128
130
132
134
136
138};
139
140} // namespace config
141} // namespace precice
Main class for preCICE XML configuration tree.
const PtrParticipantConfiguration & getParticipantConfiguration() const
virtual void xmlTagCallback(const xml::ConfigurationContext &context, xml::XMLTag &tag)
Callback function required for use of automatic configuration.
mesh::PtrMeshConfiguration _meshConfiguration
const mesh::PtrMeshConfiguration getMeshConfiguration() const
virtual void xmlEndTagCallback(const xml::ConfigurationContext &context, xml::XMLTag &tag)
Callback function required for use of automatic configuration.
const m2n::M2NConfiguration::SharedPointer getM2NConfiguration() const
bool waitInFinalize() const
Returns whether participants wait for each other in finalize.
virtual ~Configuration()
Destructor, empty.
void setDataConfiguration(mesh::PtrDataConfiguration config)
For manual configuration in test cases.
void setMeshConfiguration(mesh::PtrMeshConfiguration config)
For manual configuration in test cases.
const cplscheme::PtrCouplingSchemeConfiguration getCouplingSchemeConfiguration() const
precice::profiling::ProfilingConfiguration _profilingConfig
const mesh::PtrDataConfiguration getDataConfiguration() const
bool _experimental
Allow the use of experimental features.
m2n::M2NConfiguration::SharedPointer _m2nConfiguration
bool allowsExperimental() const
Returns whether experimental features are allowed or not.
PtrParticipantConfiguration _participantConfiguration
xml::XMLTag & getXMLTag()
Returns root xml tag to start the automatic configuration process.
bool _waitInFinalize
Synchronize participants in finalize.
cplscheme::PtrCouplingSchemeConfiguration _couplingSchemeConfiguration
void setParticipantConfiguration(PtrParticipantConfiguration config)
For manual configuration in test cases.
mesh::PtrDataConfiguration _dataConfiguration
Configures the log config file to use.
This class provides a lightweight logger.
Definition Logger.hpp:16
Represents an XML tag to be configured automatically.
Definition XMLTag.hpp:31
Main namespace of the precice library.
Tightly coupled to the parameters of Participant()
Definition XMLTag.hpp:24
Callback interface for configuration classes using XMLTag.
Definition XMLTag.hpp:43