43 PRECICE_TEST(
"NASTIN"_on(1_rank),
"SOLIDZ"_on(3_ranks).setupIntraComm(), Require::Events);
44 auto m2n = context.connectPrimaryRanks(
"NASTIN",
"SOLIDZ");
48 if (context.isNamed(
"NASTIN")) {
51 double safetyFactor = 0.1;
57 BOOST_TEST(pSolidzMesh->nVertices() == 6);
58 BOOST_TEST(pSolidzMesh->edges().size() == 4);
60 for (
int i = 0; i < 6; i++) {
61 BOOST_TEST(pSolidzMesh->vertex(i).getGlobalIndex() == i);
66 if (context.isPrimary()) {
67 Eigen::VectorXd position(dimensions);
72 pSolidzMesh->createEdge(v1, v2);
73 }
else if (context.isRank(1)) {
74 }
else if (context.isRank(2)) {
75 Eigen::VectorXd position(dimensions);
84 pSolidzMesh->createEdge(v3, v4);
85 pSolidzMesh->createEdge(v4, v5);
86 pSolidzMesh->createEdge(v5, v6);
88 pSolidzMesh->computeBoundingBox();
95 BOOST_REQUIRE(pSolidzMesh->getVertexOffsets().size() == 3);
96 if (context.isPrimary()) {
97 BOOST_TEST(pSolidzMesh->getVertexOffsets().at(0) == 2);
98 BOOST_TEST(pSolidzMesh->getVertexOffsets().at(1) == 2);
99 BOOST_TEST(pSolidzMesh->getVertexOffsets().at(2) == 6);
100 }
else if (context.isRank(1)) {
101 BOOST_TEST(pSolidzMesh->getVertexOffsets().at(0) == 2);
102 BOOST_TEST(pSolidzMesh->getVertexOffsets().at(1) == 2);
103 BOOST_TEST(pSolidzMesh->getVertexOffsets().at(2) == 6);
105 BOOST_TEST(pSolidzMesh->getVertexOffsets().at(0) == 2);
106 BOOST_TEST(pSolidzMesh->getVertexOffsets().at(1) == 2);
107 BOOST_TEST(pSolidzMesh->getVertexOffsets().at(2) == 6);
114 PRECICE_TEST(
"NASTIN"_on(1_rank),
"SOLIDZ"_on(3_ranks).setupIntraComm(), Require::Events);
115 auto m2n = context.connectPrimaryRanks(
"NASTIN",
"SOLIDZ");
119 if (context.isNamed(
"NASTIN")) {
122 double safetyFactor = 0.1;
128 BOOST_TEST(pSolidzMesh->nVertices() == 6);
129 BOOST_TEST(pSolidzMesh->edges().size() == 6);
130 BOOST_TEST(pSolidzMesh->triangles().size() == 2);
132 for (
int i = 0; i < 6; i++) {
133 BOOST_TEST(pSolidzMesh->vertex(i).getGlobalIndex() == i);
138 if (context.isPrimary()) {
139 Eigen::VectorXd position(dimensions);
140 position << 0.0, 0.0, 0.0;
142 position << 0.0, 1.5, 1.0;
144 pSolidzMesh->createEdge(v1, v2);
145 }
else if (context.isRank(1)) {
146 }
else if (context.isRank(2)) {
147 Eigen::VectorXd position(dimensions);
148 position << 0.0, 3.5, 0.1;
150 position << 0.0, 4.5, 0.2;
152 position << 0.0, 5.5, 0.8;
154 position << 0.0, 7.0, 0.4;
156 mesh::Edge & e1 = pSolidzMesh->createEdge(v3, v4);
157 mesh::Edge & e2 = pSolidzMesh->createEdge(v4, v5);
158 mesh::Edge & e3 = pSolidzMesh->createEdge(v5, v3);
159 mesh::Edge & e4 = pSolidzMesh->createEdge(v3, v6);
160 mesh::Edge & e5 = pSolidzMesh->createEdge(v6, v5);
162 pSolidzMesh->createTriangle(e1, e2, e3);
163 pSolidzMesh->createTriangle(e4, e5, e3);
165 pSolidzMesh->computeBoundingBox();
172 BOOST_TEST(pSolidzMesh->getGlobalNumberOfVertices() == 6);
173 const auto &vertices = pSolidzMesh->vertices();
174 const auto &vertexOffsets = pSolidzMesh->getVertexOffsets();
175 const auto &vertexDistribution = pSolidzMesh->getVertexDistribution();
177 if (context.isPrimary()) {
178 BOOST_REQUIRE(vertexOffsets.size() == 3);
179 BOOST_TEST(vertexOffsets.at(0) == 2);
180 BOOST_TEST(vertexOffsets.at(1) == 2);
181 BOOST_TEST(vertexOffsets.at(2) == 6);
183 BOOST_REQUIRE(vertices.size() == 2);
184 BOOST_TEST(vertices.at(0).getGlobalIndex() == 0);
185 BOOST_TEST(vertices.at(1).getGlobalIndex() == 1);
186 BOOST_TEST(vertices.at(0).isOwner() ==
true);
187 BOOST_TEST(vertices.at(1).isOwner() ==
true);
189 BOOST_REQUIRE((vertexDistribution.size()) == 3);
190 BOOST_TEST(vertexDistribution.at(0).size() == 2);
191 BOOST_TEST(vertexDistribution.at(1).size() == 0);
192 BOOST_TEST(vertexDistribution.at(2).size() == 4);
193 BOOST_TEST(vertexDistribution.at(0).at(0) == 0);
194 BOOST_TEST(vertexDistribution.at(0).at(1) == 1);
195 BOOST_TEST(vertexDistribution.at(2).at(0) == 2);
196 BOOST_TEST(vertexDistribution.at(2).at(1) == 3);
197 BOOST_TEST(vertexDistribution.at(2).at(2) == 4);
198 BOOST_TEST(vertexDistribution.at(2).at(3) == 5);
199 }
else if (context.isRank(1)) {
200 BOOST_REQUIRE(vertexOffsets.size() == 3);
201 BOOST_TEST(vertexOffsets.at(0) == 2);
202 BOOST_TEST(vertexOffsets.at(1) == 2);
203 BOOST_TEST(vertexOffsets.at(2) == 6);
204 }
else if (context.isRank(2)) {
205 BOOST_REQUIRE(vertexOffsets.size() == 3);
206 BOOST_TEST(vertexOffsets.at(0) == 2);
207 BOOST_TEST(vertexOffsets.at(1) == 2);
208 BOOST_TEST(vertexOffsets.at(2) == 6);
210 BOOST_REQUIRE(vertices.size() == 4);
211 BOOST_TEST(vertices.at(0).getGlobalIndex() == 2);
212 BOOST_TEST(vertices.at(1).getGlobalIndex() == 3);
213 BOOST_TEST(vertices.at(2).getGlobalIndex() == 4);
214 BOOST_TEST(vertices.at(3).getGlobalIndex() == 5);
215 BOOST_TEST(vertices.at(0).isOwner() ==
true);
216 BOOST_TEST(vertices.at(1).isOwner() ==
true);
217 BOOST_TEST(vertices.at(2).isOwner() ==
true);
218 BOOST_TEST(vertices.at(3).isOwner() ==
true);
225 PRECICE_TEST(
"NASTIN"_on(4_ranks).setupIntraComm(), Require::Events);
231 if (context.isPrimary()) {
232 Eigen::VectorXd position(dim);
233 position << 0.0, 0.0;
234 pMesh->createVertex(position);
235 position << 1.0, 0.0;
236 pMesh->createVertex(position);
237 }
else if (context.isRank(1)) {
238 Eigen::VectorXd position(dim);
239 position << 2.0, 0.0;
240 pMesh->createVertex(position);
241 }
else if (context.isRank(2)) {
242 }
else if (context.isRank(3)) {
243 Eigen::VectorXd position(dim);
244 position << 3.0, 0.0;
245 pMesh->createVertex(position);
246 position << 4.0, 0.0;
247 pMesh->createVertex(position);
249 pMesh->computeBoundingBox();
255 BOOST_TEST_CONTEXT(*pMesh)
257 if (context.isPrimary()) {
258 BOOST_TEST(pMesh->getGlobalNumberOfVertices() == 5);
259 BOOST_TEST_REQUIRE(pMesh->getVertexOffsets().size() == 4);
260 BOOST_TEST(pMesh->getVertexOffsets().at(0) == 2);
261 BOOST_TEST(pMesh->getVertexOffsets().at(1) == 3);
262 BOOST_TEST(pMesh->getVertexOffsets().at(2) == 3);
263 BOOST_TEST(pMesh->getVertexOffsets().at(3) == 5);
264 BOOST_TEST(pMesh->vertex(0).getGlobalIndex() == 0);
265 BOOST_TEST(pMesh->vertex(1).getGlobalIndex() == 1);
266 BOOST_TEST(pMesh->vertex(0).isOwner() ==
true);
267 BOOST_TEST(pMesh->vertex(1).isOwner() ==
true);
268 }
else if (context.isRank(1)) {
269 BOOST_TEST(pMesh->getGlobalNumberOfVertices() == 5);
270 BOOST_TEST_REQUIRE(pMesh->getVertexOffsets().size() == 4);
271 BOOST_TEST(pMesh->getVertexOffsets().at(0) == 2);
272 BOOST_TEST(pMesh->getVertexOffsets().at(1) == 3);
273 BOOST_TEST(pMesh->getVertexOffsets().at(2) == 3);
274 BOOST_TEST(pMesh->getVertexOffsets().at(3) == 5);
275 BOOST_TEST(pMesh->vertex(0).getGlobalIndex() == 2);
276 BOOST_TEST(pMesh->vertex(0).isOwner() ==
true);
277 }
else if (context.isRank(2)) {
278 BOOST_TEST(pMesh->getGlobalNumberOfVertices() == 5);
279 BOOST_TEST_REQUIRE(pMesh->getVertexOffsets().size() == 4);
280 BOOST_TEST(pMesh->getVertexOffsets().at(0) == 2);
281 BOOST_TEST(pMesh->getVertexOffsets().at(1) == 3);
282 BOOST_TEST(pMesh->getVertexOffsets().at(2) == 3);
283 BOOST_TEST(pMesh->getVertexOffsets().at(3) == 5);
284 }
else if (context.isRank(3)) {
285 BOOST_TEST(pMesh->getGlobalNumberOfVertices() == 5);
286 BOOST_TEST_REQUIRE(pMesh->getVertexOffsets().size() == 4);
287 BOOST_TEST(pMesh->getVertexOffsets().at(0) == 2);
288 BOOST_TEST(pMesh->getVertexOffsets().at(1) == 3);
289 BOOST_TEST(pMesh->getVertexOffsets().at(2) == 3);
290 BOOST_TEST(pMesh->getVertexOffsets().at(3) == 5);
291 BOOST_TEST(pMesh->vertex(0).getGlobalIndex() == 3);
292 BOOST_TEST(pMesh->vertex(1).getGlobalIndex() == 4);
293 BOOST_TEST(pMesh->vertex(0).isOwner() ==
true);
294 BOOST_TEST(pMesh->vertex(1).isOwner() ==
true);
301 PRECICE_TEST(
"SOLIDZ"_on(3_ranks).setupIntraComm(),
"NASTIN"_on(1_rank), Require::Events);
305 auto m2n = context.connectPrimaryRanks(
"NASTIN",
"SOLIDZ", options);
309 if (context.isNamed(
"SOLIDZ")) {
313 if (context.isPrimary()) {
314 Eigen::VectorXd position(dimensions);
315 position << -1.0, 0.0;
317 position << 1.0, 2.0;
319 position << 5.0, 3.0;
321 pSolidzMesh->createEdge(v0, v1);
322 pSolidzMesh->createEdge(v1, v2);
325 else if (context.isRank(1)) {
326 Eigen::VectorXd position(dimensions);
327 position << 1.0, 3.5;
329 position << 0.0, 4.5;
331 pSolidzMesh->createEdge(v3, v4);
332 }
else if (context.isRank(2)) {
333 Eigen::VectorXd position(dimensions);
334 position << 2.5, 5.5;
336 position << 4.5, 7.0;
338 pSolidzMesh->createEdge(v5, v6);
340 pSolidzMesh->computeBoundingBox();
346 if (context.isPrimary()) {
347 BOOST_TEST(pSolidzMesh->getConnectedRanks().size() == 2);
348 BOOST_TEST(pSolidzMesh->getConnectedRanks().at(0) == 1);
349 BOOST_TEST(pSolidzMesh->getConnectedRanks().at(1) == 2);
350 }
else if (context.isRank(1)) {
351 BOOST_TEST(pSolidzMesh->getConnectedRanks().size() == 2);
352 BOOST_TEST(pSolidzMesh->getConnectedRanks().at(0) == 0);
353 BOOST_TEST(pSolidzMesh->getConnectedRanks().at(1) == 2);
354 }
else if (context.isRank(2)) {
355 BOOST_TEST(pSolidzMesh->getConnectedRanks().size() == 2);
356 BOOST_TEST(pSolidzMesh->getConnectedRanks().at(0) == 0);
357 BOOST_TEST(pSolidzMesh->getConnectedRanks().at(1) == 1);
361 BOOST_TEST(context.isNamed(
"NASTIN"));
372 int receivedFeedbackSize = 3;
373 m2n->getPrimaryRankCommunication()->receive(receivedFeedbackSize, 0);
375 for (
int i = 0; i < receivedFeedbackSize; i++) {
376 receivedGlobalBB.
emplace(i, localBB);
382 BOOST_TEST(receivedFeedbackSize == 3);
385 BOOST_TEST(receivedGlobalBB.
at(0) == compareBB.
at(0));
386 BOOST_TEST(receivedGlobalBB.
at(1) == compareBB.
at(1));
387 BOOST_TEST(receivedGlobalBB.
at(2) == compareBB.
at(2));
390 m2n->getPrimaryRankCommunication()->sendRange(connectedRanks, 0);
394 connectionMap[0].push_back(1);
395 connectionMap[0].push_back(2);
396 connectionMap[1].push_back(0);
397 connectionMap[1].push_back(2);
398 connectionMap[2].push_back(0);
399 connectionMap[2].push_back(1);
407 PRECICE_TEST(
"SOLIDZ"_on(3_ranks).setupIntraComm(),
"NASTIN"_on(1_rank), Require::Events);
411 auto m2n = context.connectPrimaryRanks(
"NASTIN",
"SOLIDZ", options);
415 if (context.isNamed(
"SOLIDZ")) {
419 if (context.isPrimary()) {
420 Eigen::VectorXd position(dimensions);
421 position << -1.0, 0.0, -1.0;
423 position << 1.0, 2.0, 1.0;
425 position << 5.0, 3.0, 5.0;
427 pSolidzMesh->createEdge(v0, v1);
428 pSolidzMesh->createEdge(v1, v2);
431 else if (context.isRank(1)) {
432 Eigen::VectorXd position(dimensions);
433 position << 1.0, 3.5, 1.0;
435 position << 0.0, 4.5, 0.0;
437 pSolidzMesh->createEdge(v3, v4);
438 }
else if (context.isRank(2)) {
439 Eigen::VectorXd position(dimensions);
440 position << 2.5, 5.5, 2.5;
442 position << 4.5, 7.0, 4.5;
444 pSolidzMesh->createEdge(v5, v6);
446 pSolidzMesh->computeBoundingBox();
453 BOOST_TEST(context.isNamed(
"NASTIN"));
464 int remoteParComSize = 3;
465 m2n->getPrimaryRankCommunication()->receive(remoteParComSize, 0);
467 for (
int i = 0; i < remoteParComSize; i++) {
468 receivedGlobalBB.
emplace(i, localBB);
475 BOOST_TEST(remoteParComSize == 3);
478 BOOST_TEST(receivedGlobalBB.
at(0) == compareBB.
at(0));
479 BOOST_TEST(receivedGlobalBB.
at(1) == compareBB.
at(1));
480 BOOST_TEST(receivedGlobalBB.
at(2) == compareBB.
at(2));
484 m2n->getPrimaryRankCommunication()->sendRange(connectedRanksList, 0);
490 PRECICE_TEST(
"Solid"_on(2_ranks).setupIntraComm(),
"Fluid"_on(2_ranks).setupIntraComm(), Require::Events);
493 double safetyFactor = 0.1;
499 options.
type = testing::ConnectionType::PointToPoint;
500 auto m2n = context.connectPrimaryRanks(
"Fluid",
"Solid", options);
502 if (context.isNamed(
"Solid")) {
503 if (context.isPrimary()) {
504 Eigen::VectorXd position(dimensions);
505 position << 0.5, 0.0;
507 position << 1.5, 0.0;
509 position << 2.0, 1.0;
511 position << 0.5, 1.0;
513 mesh->createEdge(v1, v2);
514 mesh->createEdge(v2, v3);
515 mesh->createEdge(v3, v4);
516 mesh->createEdge(v4, v1);
518 mesh->setConnectedRanks({0});
521 Eigen::VectorXd position(dimensions);
522 position << 2.5, 0.0;
524 position << 3.5, 0.0;
526 position << 3.5, 1.0;
528 position << 2.0, 1.0;
530 mesh->createEdge(v1, v2);
531 mesh->createEdge(v2, v3);
532 mesh->createEdge(v3, v4);
533 mesh->createEdge(v4, v1);
535 mesh->setConnectedRanks({1});
538 BOOST_TEST(context.isNamed(
"Fluid"));
539 if (context.isPrimary()) {
540 mesh->setConnectedRanks({0});
542 mesh->setConnectedRanks({1});
545 mesh->computeBoundingBox();
547 if (context.isNamed(
"Solid")) {
548 m2n->createDistributedCommunication(mesh);
550 m2n->acceptSecondaryRanksPreConnection(
"SolidSecondaryRanks",
"FluidSecondaryRanks");
554 m2n->createDistributedCommunication(mesh);
556 m2n->requestSecondaryRanksPreConnection(
"SolidSecondaryRanks",
"FluidSecondaryRanks");
561 BOOST_TEST(mesh->nVertices() == 4);
563 if (context.isPrimary()) {
564 BOOST_TEST(mesh->vertex(0).coord(0) == 0.5);
565 BOOST_TEST(mesh->vertex(0).coord(1) == 0.0);
566 BOOST_TEST(mesh->vertex(1).coord(0) == 1.5);
567 BOOST_TEST(mesh->vertex(1).coord(1) == 0.0);
568 BOOST_TEST(mesh->vertex(2).coord(0) == 2.0);
569 BOOST_TEST(mesh->vertex(2).coord(1) == 1.0);
570 BOOST_TEST(mesh->vertex(3).coord(0) == 0.5);
571 BOOST_TEST(mesh->vertex(3).coord(1) == 1.0);
573 BOOST_TEST(mesh->vertex(0).coord(0) == 2.5);
574 BOOST_TEST(mesh->vertex(0).coord(1) == 0.0);
575 BOOST_TEST(mesh->vertex(1).coord(0) == 3.5);
576 BOOST_TEST(mesh->vertex(1).coord(1) == 0.0);
577 BOOST_TEST(mesh->vertex(2).coord(0) == 3.5);
578 BOOST_TEST(mesh->vertex(2).coord(1) == 1.0);
579 BOOST_TEST(mesh->vertex(3).coord(0) == 2.0);
580 BOOST_TEST(mesh->vertex(3).coord(1) == 1.0);
587 PRECICE_TEST(
"Solid"_on(2_ranks).setupIntraComm(),
"Fluid"_on(2_ranks).setupIntraComm(), Require::Events);
590 double safetyFactor = 0;
597 options.
type = testing::ConnectionType::PointToPoint;
598 auto m2n = context.connectPrimaryRanks(
"Fluid",
"Solid", options);
600 if (context.isNamed(
"Solid")) {
601 if (context.isPrimary()) {
602 Eigen::VectorXd position(dimensions);
603 position << -2.0, 0.0;
604 mesh->createVertex(position);
605 position << -1.0, 0.0;
606 mesh->createVertex(position);
607 position << 0.0, 1.0;
608 mesh->createVertex(position);
609 position << -1.0, 1.0;
610 mesh->createVertex(position);
611 position << -2.0, 1.0;
612 mesh->createVertex(position);
613 position << -2.0, 2.0;
614 mesh->createVertex(position);
615 position << -1.0, 2.0;
616 mesh->createVertex(position);
617 position << 0.0, 2.0;
618 mesh->createVertex(position);
620 Eigen::VectorXd position(dimensions);
621 position << -0.5, 0.0;
622 mesh->createVertex(position);
623 position << 1.0, 0.0;
624 mesh->createVertex(position);
625 position << 2.0, 0.0;
626 mesh->createVertex(position);
627 position << 2.0, 1.0;
628 mesh->createVertex(position);
629 position << 1.0, 1.0;
630 mesh->createVertex(position);
631 position << 1.0, 2.0;
632 mesh->createVertex(position);
633 position << 2.0, 2.0;
634 mesh->createVertex(position);
637 BOOST_TEST(context.isNamed(
"Fluid"));
638 if (context.isPrimary()) {
639 Eigen::VectorXd position(dimensions);
640 position << 0.0, 0.0;
641 mesh->createVertex(position);
642 position << 0.0, -1.0;
643 mesh->createVertex(position);
644 position << -1.0, 0.0;
645 mesh->createVertex(position);
646 position << -1.0, -1.0;
647 mesh->createVertex(position);
648 position << -2.0, -0.0;
649 mesh->createVertex(position);
650 position << -2.0, -1.0;
651 mesh->createVertex(position);
653 Eigen::VectorXd position(dimensions);
654 position << 0.0, 0.0;
655 mesh->createVertex(position);
656 position << 1.0, 0.0;
657 mesh->createVertex(position);
658 position << 0.0, -1.0;
659 mesh->createVertex(position);
660 position << 1.0, -1.0;
661 mesh->createVertex(position);
662 position << 2.0, 0.0;
663 mesh->createVertex(position);
664 position << 2.0, -1.0;
665 mesh->createVertex(position);
668 mesh->computeBoundingBox();
670 if (context.isNamed(
"Solid")) {
671 m2n->createDistributedCommunication(mesh);
677 if (context.isPrimary()) {
678 BOOST_TEST(mesh->getConnectedRanks().size() == 2);
679 BOOST_TEST(mesh->getConnectedRanks().at(0) == 0);
680 BOOST_TEST(mesh->getConnectedRanks().at(1) == 1);
682 BOOST_TEST(mesh->getConnectedRanks().size() == 2);
683 BOOST_TEST(mesh->getConnectedRanks().at(0) == 0);
684 BOOST_TEST(mesh->getConnectedRanks().at(1) == 1);
687 m2n->acceptSecondaryRanksPreConnection(
"FluidSecondaryRanks",
"SolidSecondaryRanks");
692 if (context.isPrimary()) {
693 BOOST_TEST(mesh->getCommunicationMap().at(0).at(0) == 0);
694 BOOST_TEST(mesh->getCommunicationMap().at(0).at(1) == 1);
696 BOOST_TEST(mesh->getCommunicationMap().at(0).at(0) == 0);
697 BOOST_TEST(mesh->getCommunicationMap().at(1).at(0) == 1);
698 BOOST_TEST(mesh->getCommunicationMap().at(1).at(1) == 2);
701 m2n->createDistributedCommunication(receivedMesh);
704 boundingFromMapping->setMeshes(receivedMesh, mesh);
705 boundingToMapping->setMeshes(mesh, receivedMesh);
716 m2n->requestSecondaryRanksPreConnection(
"FluidSecondaryRanks",
"SolidSecondaryRanks");
725 PRECICE_TEST(
"Solid"_on(2_ranks).setupIntraComm(),
"Fluid"_on(2_ranks).setupIntraComm(), Require::Events);
729 double safetyFactor = 0.0;
737 options.
type = testing::ConnectionType::PointToPoint;
738 auto m2n = context.connectPrimaryRanks(
"Fluid",
"Solid", options);
740 if (context.isNamed(
"Solid")) {
741 if (context.isPrimary()) {
742 Eigen::VectorXd position(dimensions);
743 position << -2.0, 0.0, 0.0;
744 mesh->createVertex(position);
745 position << -1.0, 0.0, 0.0;
746 mesh->createVertex(position);
747 position << 0.0, 1.0, 1.0;
748 mesh->createVertex(position);
749 position << -1.0, 1.0, 1.0;
750 mesh->createVertex(position);
751 position << -2.0, 1.0, 1.0;
752 mesh->createVertex(position);
754 Eigen::VectorXd position(dimensions);
755 position << -0.5, 0.0, 0.0;
756 mesh->createVertex(position);
757 position << 1.0, 0.0, 0.0;
758 mesh->createVertex(position);
759 position << 2.0, 0.0, 0.0;
760 mesh->createVertex(position);
761 position << 2.0, 1.0, 1.0;
762 mesh->createVertex(position);
763 position << 1.0, 1.0, 1.0;
764 mesh->createVertex(position);
767 if (context.isPrimary()) {
768 Eigen::VectorXd position(dimensions);
769 position << 0.0, 0.0, 0.0;
770 mesh->createVertex(position);
771 position << 0.0, -1.0, 1.0;
772 mesh->createVertex(position);
773 position << -1.0, 0.0, 0.0;
774 mesh->createVertex(position);
775 position << -1.0, -1.0, 1.0;
776 mesh->createVertex(position);
777 position << -2.0, -0.0, 0.0;
778 mesh->createVertex(position);
779 position << -2.0, -1.0, 1.0;
780 mesh->createVertex(position);
782 Eigen::VectorXd position(dimensions);
783 position << 0.0, 0.0, 0.0;
784 mesh->createVertex(position);
785 position << 1.0, 0.0, 0.0;
786 mesh->createVertex(position);
787 position << 0.0, -1.0, 1.0;
788 mesh->createVertex(position);
789 position << 1.0, -1.0, 1.0;
790 mesh->createVertex(position);
791 position << 2.0, 0.0, 0.0;
792 mesh->createVertex(position);
793 position << 2.0, -1.0, 0.0;
794 mesh->createVertex(position);
797 mesh->computeBoundingBox();
799 if (context.isNamed(
"Solid")) {
800 m2n->createDistributedCommunication(mesh);
806 if (context.isPrimary()) {
807 BOOST_TEST(mesh->getConnectedRanks().size() == 2);
808 BOOST_TEST(mesh->getConnectedRanks().at(0) == 0);
809 BOOST_TEST(mesh->getConnectedRanks().at(1) == 1);
811 BOOST_TEST(mesh->getConnectedRanks().size() == 2);
812 BOOST_TEST(mesh->getConnectedRanks().at(0) == 0);
813 BOOST_TEST(mesh->getConnectedRanks().at(1) == 1);
816 m2n->acceptSecondaryRanksPreConnection(
"FluidSecondaryRanks",
"SolidSecondaryRanks");
821 if (context.isPrimary()) {
822 BOOST_TEST(mesh->getCommunicationMap().at(0).at(0) == 0);
823 BOOST_TEST(mesh->getCommunicationMap().at(0).at(1) == 1);
825 BOOST_TEST(mesh->getCommunicationMap().at(0).at(0) == 0);
826 BOOST_TEST(mesh->getCommunicationMap().at(1).at(0) == 1);
827 BOOST_TEST(mesh->getCommunicationMap().at(1).at(1) == 2);
830 m2n->createDistributedCommunication(receivedMesh);
833 boundingFromMapping->setMeshes(receivedMesh, mesh);
834 boundingToMapping->setMeshes(mesh, receivedMesh);
844 m2n->requestSecondaryRanksPreConnection(
"FluidSecondaryRanks",
"SolidSecondaryRanks");