25 std::string file(pathToTests +
"mapping-config.xml");
33 BOOST_TEST(meshConfig->meshes().size() == 3);
34 BOOST_TEST(mappingConfig.
mappings().size() == 3);
35 BOOST_TEST(mappingConfig.
mappings().at(0).fromMesh == meshConfig->meshes().at(0));
36 BOOST_TEST(mappingConfig.
mappings().at(0).toMesh == meshConfig->meshes().at(2));
39 BOOST_TEST(mappingConfig.
mappings().at(1).fromMesh == meshConfig->meshes().at(2));
40 BOOST_TEST(mappingConfig.
mappings().at(1).toMesh == meshConfig->meshes().at(1));
43 BOOST_TEST(mappingConfig.
mappings().at(2).fromMesh == meshConfig->meshes().at(1));
44 BOOST_TEST(mappingConfig.
mappings().at(2).toMesh == meshConfig->meshes().at(0));
53 std::string file(pathToTests +
"mapping-rbf-direct-config.xml");
61 BOOST_TEST(meshConfig->meshes().size() == 13);
62 BOOST_TEST(mappingConfig.
mappings().size() == 12);
63 for (
unsigned int i = 0; i < mappingConfig.
mappings().size(); ++i) {
64 BOOST_TEST(mappingConfig.
mappings().at(i).mapping !=
nullptr);
65 BOOST_TEST(mappingConfig.
mappings().at(i).fromMesh == meshConfig->meshes().at(i + 1));
66 BOOST_TEST(mappingConfig.
mappings().at(i).toMesh == meshConfig->meshes().at(i));
68 BOOST_TEST(mappingConfig.
mappings().at(i).requiresBasisFunction ==
true);
69 BOOST_TEST(mappingConfig.
mappings().at(i).configuredWithAliasTag ==
false);
73 bool solverSelection = mappingConfig.
rbfConfig().
solver == MappingConfiguration::RBFConfiguration::SystemSolver::GlobalDirect;
74 BOOST_TEST(solverSelection);
89 std::string file(pathToTests +
"mapping-rbf-pum-direct-config.xml");
97 BOOST_TEST(meshConfig->meshes().size() == 13);
98 BOOST_TEST(mappingConfig.
mappings().size() == 12);
99 for (
unsigned int i = 0; i < mappingConfig.
mappings().size(); ++i) {
100 BOOST_TEST(mappingConfig.
mappings().at(i).mapping !=
nullptr);
101 BOOST_TEST(mappingConfig.
mappings().at(i).fromMesh == meshConfig->meshes().at(i + 1));
102 BOOST_TEST(mappingConfig.
mappings().at(i).toMesh == meshConfig->meshes().at(i));
104 BOOST_TEST(mappingConfig.
mappings().at(i).requiresBasisFunction ==
true);
105 BOOST_TEST(mappingConfig.
mappings().at(i).configuredWithAliasTag ==
false);
109 bool solverSelection = mappingConfig.
rbfConfig().
solver == MappingConfiguration::RBFConfiguration::SystemSolver::PUMDirect;
110 BOOST_TEST(solverSelection);
120#ifndef PRECICE_NO_PETSC
127 std::string file(pathToTests +
"mapping-rbf-iterative-config.xml");
135 BOOST_TEST(meshConfig->meshes().size() == 13);
136 BOOST_TEST(mappingConfig.
mappings().size() == 12);
137 for (
unsigned int i = 0; i < mappingConfig.
mappings().size(); ++i) {
138 BOOST_TEST(mappingConfig.
mappings().at(i).mapping !=
nullptr);
139 BOOST_TEST(mappingConfig.
mappings().at(i).fromMesh == meshConfig->meshes().at(i + 1));
140 BOOST_TEST(mappingConfig.
mappings().at(i).toMesh == meshConfig->meshes().at(i));
142 BOOST_TEST(mappingConfig.
mappings().at(i).requiresBasisFunction ==
true);
143 BOOST_TEST(mappingConfig.
mappings().at(i).configuredWithAliasTag ==
false);
147 bool solverSelection = mappingConfig.
rbfConfig().
solver == MappingConfiguration::RBFConfiguration::SystemSolver::GlobalIterative;
148 BOOST_TEST(solverSelection);
164 std::string file(pathToTests +
"mapping-rbf-alias-config.xml");
172 BOOST_TEST(meshConfig->meshes().size() == 3);
173 BOOST_TEST(mappingConfig.
mappings().size() == 2);
174 BOOST_TEST(mappingConfig.
mappings().at(0).mapping !=
nullptr);
175 BOOST_TEST(mappingConfig.
mappings().at(0).fromMesh == meshConfig->meshes().at(0));
176 BOOST_TEST(mappingConfig.
mappings().at(0).toMesh == meshConfig->meshes().at(2));
178 BOOST_TEST(mappingConfig.
mappings().at(0).requiresBasisFunction ==
true);
179 BOOST_TEST(mappingConfig.
mappings().at(0).configuredWithAliasTag ==
true);
182 BOOST_TEST(mappingConfig.
mappings().at(1).mapping !=
nullptr);
183 BOOST_TEST(mappingConfig.
mappings().at(1).fromMesh == meshConfig->meshes().at(2));
184 BOOST_TEST(mappingConfig.
mappings().at(1).toMesh == meshConfig->meshes().at(1));
186 BOOST_TEST(mappingConfig.
mappings().at(1).requiresBasisFunction ==
true);
187 BOOST_TEST(mappingConfig.
mappings().at(1).configuredWithAliasTag ==
true);
190 bool solverSelection = mappingConfig.
rbfConfig().
solver == MappingConfiguration::RBFConfiguration::SystemSolver::PUMDirect;
191 BOOST_TEST(solverSelection);
203#ifndef PRECICE_NO_GINKGO
205#ifdef PRECICE_WITH_CUDA
214 std::string file(pathToTests +
"mapping-rbf-cuda-config.xml");
222 BOOST_TEST(meshConfig->meshes().size() == 3);
223 BOOST_TEST(mappingConfig.mappings().size() == 2);
224 for (
unsigned int i = 0; i < mappingConfig.mappings().
size(); ++i) {
225 BOOST_TEST(mappingConfig.mappings().at(i).mapping !=
nullptr);
226 BOOST_TEST(mappingConfig.mappings().at(i).fromMesh == meshConfig->meshes().at(i + 1));
227 BOOST_TEST(mappingConfig.mappings().at(i).toMesh == meshConfig->meshes().at(i));
229 BOOST_TEST(mappingConfig.mappings().at(i).requiresBasisFunction ==
true);
230 BOOST_TEST(mappingConfig.mappings().at(i).configuredWithAliasTag ==
false);
234 bool solverSelection = mappingConfig.rbfConfig().solver == MappingConfiguration::RBFConfiguration::SystemSolver::GlobalIterative;
235 BOOST_TEST(solverSelection);
236 bool poly = mappingConfig.rbfConfig().polynomial == Polynomial::OFF;
238 BOOST_TEST(mappingConfig.rbfConfig().deadAxis[0] ==
true);
239 BOOST_TEST(mappingConfig.rbfConfig().deadAxis[1] ==
false);
240 BOOST_TEST(mappingConfig.rbfConfig().deadAxis[2] ==
true);
241 BOOST_TEST(mappingConfig.rbfConfig().solverRtol == 1e-6);
246#ifdef PRECICE_WITH_HIP
255 std::string file(pathToTests +
"mapping-rbf-hip-config.xml");
263 BOOST_TEST(meshConfig->meshes().size() == 3);
264 BOOST_TEST(mappingConfig.mappings().size() == 2);
265 for (
unsigned int i = 0; i < mappingConfig.mappings().
size(); ++i) {
266 BOOST_TEST(mappingConfig.mappings().at(i).mapping !=
nullptr);
267 BOOST_TEST(mappingConfig.mappings().at(i).fromMesh == meshConfig->meshes().at(i + 1));
268 BOOST_TEST(mappingConfig.mappings().at(i).toMesh == meshConfig->meshes().at(i));
270 BOOST_TEST(mappingConfig.mappings().at(i).requiresBasisFunction ==
true);
271 BOOST_TEST(mappingConfig.mappings().at(i).configuredWithAliasTag ==
false);
275 bool solverSelection = mappingConfig.rbfConfig().solver == MappingConfiguration::RBFConfiguration::SystemSolver::GlobalIterative;
276 BOOST_TEST(solverSelection);
277 bool poly = mappingConfig.rbfConfig().polynomial == Polynomial::OFF;
279 BOOST_TEST(mappingConfig.rbfConfig().deadAxis[0] ==
true);
280 BOOST_TEST(mappingConfig.rbfConfig().deadAxis[1] ==
false);
281 BOOST_TEST(mappingConfig.rbfConfig().deadAxis[2] ==
true);
282 BOOST_TEST(mappingConfig.rbfConfig().solverRtol == 1e-6);
287#ifdef PRECICE_WITH_OMP
296 std::string file(pathToTests +
"mapping-rbf-omp-config.xml");
304 BOOST_TEST(meshConfig->meshes().size() == 2);
305 BOOST_TEST(mappingConfig.mappings().size() == 1);
306 for (
unsigned int i = 0; i < mappingConfig.mappings().
size(); ++i) {
307 BOOST_TEST(mappingConfig.mappings().at(i).mapping !=
nullptr);
308 BOOST_TEST(mappingConfig.mappings().at(i).fromMesh == meshConfig->meshes().at(i + 1));
309 BOOST_TEST(mappingConfig.mappings().at(i).toMesh == meshConfig->meshes().at(i));
311 BOOST_TEST(mappingConfig.mappings().at(i).requiresBasisFunction ==
true);
312 BOOST_TEST(mappingConfig.mappings().at(i).configuredWithAliasTag ==
false);
316 bool solverSelection = mappingConfig.rbfConfig().solver == MappingConfiguration::RBFConfiguration::SystemSolver::GlobalIterative;
317 BOOST_TEST(solverSelection);
318 bool poly = mappingConfig.rbfConfig().polynomial == Polynomial::OFF;
320 BOOST_TEST(mappingConfig.rbfConfig().deadAxis[0] ==
true);
321 BOOST_TEST(mappingConfig.rbfConfig().deadAxis[1] ==
false);
322 BOOST_TEST(mappingConfig.rbfConfig().deadAxis[2] ==
true);
323 BOOST_TEST(mappingConfig.rbfConfig().solverRtol == 1e-6);
BOOST_AUTO_TEST_CASE(Configuration)
BOOST_AUTO_TEST_SUITE(PreProcess)
BOOST_AUTO_TEST_SUITE_END()
#define PRECICE_TEST(...)
Performs XML configuration and holds configured mappings.
const std::vector< ConfiguredMapping > & mappings()
Returns all configured mappings.
const RBFConfiguration & rbfConfig() const
Performs and provides configuration for Data objects from XML files.
Represents an XML tag to be configured automatically.
contains data mapping from points to meshes.
std::string getPathToSources()
Returns the base path to the sources.
XMLTag getRootTag()
Returns an XMLTag::Listener that does nothing on callbacks.
void configure(XMLTag &tag, const precice::xml::ConfigurationContext &context, std::string_view configurationFilename)
Configures the given configuration from file configurationFilename.
Main namespace of the precice library.
std::array< bool, 3 > deadAxis
Tightly coupled to the parameters of Participant()