preCICE
v3.2.0
Toggle main menu visibility
Main Page
Related Pages
Namespaces
Namespace List
Namespace Members
All
_
a
b
c
d
e
f
g
h
i
l
m
n
o
p
r
s
t
u
v
w
x
Functions
a
b
c
d
e
f
g
h
i
l
m
n
o
p
r
s
t
u
v
w
x
Variables
_
a
b
c
d
e
f
h
i
m
n
p
r
s
t
Typedefs
b
d
e
g
l
m
p
r
s
t
u
v
Enumerations
Enumerator
Classes
Class List
Class Index
Class Hierarchy
Class Members
All
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
~
Functions
_
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
x
~
Variables
_
a
b
c
d
e
f
g
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
Typedefs
a
b
c
d
e
f
i
k
m
n
o
p
r
s
t
v
w
Enumerations
Enumerator
c
d
e
i
l
m
n
o
r
s
u
v
w
Related Symbols
Files
File List
File Members
All
_
a
b
c
d
e
g
i
j
m
n
o
p
r
s
t
v
Functions
a
b
c
g
m
p
r
s
t
v
Variables
Typedefs
Macros
b
d
m
n
p
t
•
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Pages
Loading...
Searching...
No Matches
src
mesh
tests
DataConfigurationTest.cpp
Go to the documentation of this file.
1
#include <
memory
>
2
#include <
string
>
3
#include <
vector
>
4
#include "
logging/Logger.hpp
"
5
#include "
mesh/config/DataConfiguration.hpp
"
6
#include "
testing/TestContext.hpp
"
7
#include "
testing/Testing.hpp
"
8
#include "
xml/XMLTag.hpp
"
9
10
using namespace
precice
;
11
12
BOOST_AUTO_TEST_SUITE
(MeshTests)
13
14
PRECICE_TEST_SETUP
(1_rank)
15
BOOST_AUTO_TEST_CASE
(DataConfig)
16
{
17
PRECICE_TEST
();
18
std::string
filename(
testing::getPathToSources
() +
"/mesh/tests/data-config.xml"
);
19
using
xml::XMLTag
;
20
XMLTag tag =
xml::getRootTag
();
21
mesh::DataConfiguration
dataConfig(tag);
22
xml::configure
(tag,
xml::ConfigurationContext
{}, filename);
23
BOOST_TEST(dataConfig.
data
().size() == 3);
24
BOOST_TEST(dataConfig.
data
().at(0).name ==
"vector-data"
);
25
BOOST_TEST(dataConfig.
data
().at(1).name ==
"floating-data"
);
26
BOOST_TEST(dataConfig.
data
().at(2).name ==
"second-vector-data"
);
27
}
15
BOOST_AUTO_TEST_CASE
(DataConfig) {
…
}
28
29
BOOST_AUTO_TEST_SUITE_END
()
BOOST_AUTO_TEST_CASE
BOOST_AUTO_TEST_CASE(DataConfig)
Definition
DataConfigurationTest.cpp:15
DataConfiguration.hpp
Logger.hpp
BOOST_AUTO_TEST_SUITE
BOOST_AUTO_TEST_SUITE(PreProcess)
BOOST_AUTO_TEST_SUITE_END
BOOST_AUTO_TEST_SUITE_END()
TestContext.hpp
Testing.hpp
PRECICE_TEST
#define PRECICE_TEST()
Definition
Testing.hpp:39
PRECICE_TEST_SETUP
#define PRECICE_TEST_SETUP(...)
Creates and attaches a TestSetup to a Boost test case.
Definition
Testing.hpp:29
XMLTag.hpp
std::string
precice::mesh::DataConfiguration
Performs and provides configuration for Data objects from XML files.
Definition
DataConfiguration.hpp:14
precice::mesh::DataConfiguration::data
const std::vector< ConfiguredData > & data() const
Definition
DataConfiguration.cpp:35
precice::xml::XMLTag
Represents an XML tag to be configured automatically.
Definition
XMLTag.hpp:28
memory
precice::testing::getPathToSources
std::string getPathToSources()
Returns the base path to the sources.
Definition
Testing.cpp:33
precice::xml::getRootTag
XMLTag getRootTag()
Returns an empty root tag with name "configuration".
Definition
XMLTag.cpp:278
precice::xml::configure
std::string configure(XMLTag &tag, const precice::xml::ConfigurationContext &context, std::string_view configurationFilename)
Configures the given configuration from file configurationFilename.
Definition
XMLTag.cpp:284
precice
Main namespace of the precice library.
Definition
Acceleration.cpp:5
string
precice::xml::ConfigurationContext
Tightly coupled to the parameters of Participant()
Definition
XMLTag.hpp:21
vector