45 auto m2n = context.connectPrimaryRanks(
"NASTIN",
"SOLIDZ");
49 if (context.isNamed(
"NASTIN")) {
52 double safetyFactor = 0.1;
58 BOOST_TEST(pSolidzMesh->nVertices() == 6);
59 BOOST_TEST(pSolidzMesh->edges().size() == 4);
61 for (
int i = 0; i < 6; i++) {
62 BOOST_TEST(pSolidzMesh->vertex(i).getGlobalIndex() == i);
67 if (context.isPrimary()) {
68 Eigen::VectorXd position(dimensions);
73 pSolidzMesh->createEdge(v1, v2);
74 }
else if (context.isRank(1)) {
75 }
else if (context.isRank(2)) {
76 Eigen::VectorXd position(dimensions);
85 pSolidzMesh->createEdge(v3, v4);
86 pSolidzMesh->createEdge(v4, v5);
87 pSolidzMesh->createEdge(v5, v6);
89 pSolidzMesh->computeBoundingBox();
96 BOOST_REQUIRE(pSolidzMesh->getVertexOffsets().size() == 3);
97 if (context.isPrimary()) {
98 BOOST_TEST(pSolidzMesh->getVertexOffsets().at(0) == 2);
99 BOOST_TEST(pSolidzMesh->getVertexOffsets().at(1) == 2);
100 BOOST_TEST(pSolidzMesh->getVertexOffsets().at(2) == 6);
101 }
else if (context.isRank(1)) {
102 BOOST_TEST(pSolidzMesh->getVertexOffsets().at(0) == 2);
103 BOOST_TEST(pSolidzMesh->getVertexOffsets().at(1) == 2);
104 BOOST_TEST(pSolidzMesh->getVertexOffsets().at(2) == 6);
106 BOOST_TEST(pSolidzMesh->getVertexOffsets().at(0) == 2);
107 BOOST_TEST(pSolidzMesh->getVertexOffsets().at(1) == 2);
108 BOOST_TEST(pSolidzMesh->getVertexOffsets().at(2) == 6);
117 auto m2n = context.connectPrimaryRanks(
"NASTIN",
"SOLIDZ");
121 if (context.isNamed(
"NASTIN")) {
124 double safetyFactor = 0.1;
130 BOOST_TEST(pSolidzMesh->nVertices() == 6);
131 BOOST_TEST(pSolidzMesh->edges().size() == 6);
132 BOOST_TEST(pSolidzMesh->triangles().size() == 2);
134 for (
int i = 0; i < 6; i++) {
135 BOOST_TEST(pSolidzMesh->vertex(i).getGlobalIndex() == i);
140 if (context.isPrimary()) {
141 Eigen::VectorXd position(dimensions);
142 position << 0.0, 0.0, 0.0;
144 position << 0.0, 1.5, 1.0;
146 pSolidzMesh->createEdge(v1, v2);
147 }
else if (context.isRank(1)) {
148 }
else if (context.isRank(2)) {
149 Eigen::VectorXd position(dimensions);
150 position << 0.0, 3.5, 0.1;
152 position << 0.0, 4.5, 0.2;
154 position << 0.0, 5.5, 0.8;
156 position << 0.0, 7.0, 0.4;
158 mesh::Edge &e1 = pSolidzMesh->createEdge(v3, v4);
159 mesh::Edge &e2 = pSolidzMesh->createEdge(v4, v5);
160 mesh::Edge &e3 = pSolidzMesh->createEdge(v5, v3);
161 mesh::Edge &e4 = pSolidzMesh->createEdge(v3, v6);
162 mesh::Edge &e5 = pSolidzMesh->createEdge(v6, v5);
164 pSolidzMesh->createTriangle(e1, e2, e3);
165 pSolidzMesh->createTriangle(e4, e5, e3);
167 pSolidzMesh->computeBoundingBox();
174 BOOST_TEST(pSolidzMesh->getGlobalNumberOfVertices() == 6);
175 const auto &vertices = pSolidzMesh->vertices();
176 const auto &vertexOffsets = pSolidzMesh->getVertexOffsets();
177 const auto &vertexDistribution = pSolidzMesh->getVertexDistribution();
179 if (context.isPrimary()) {
180 BOOST_REQUIRE(vertexOffsets.size() == 3);
181 BOOST_TEST(vertexOffsets.at(0) == 2);
182 BOOST_TEST(vertexOffsets.at(1) == 2);
183 BOOST_TEST(vertexOffsets.at(2) == 6);
185 BOOST_REQUIRE(vertices.size() == 2);
186 BOOST_TEST(vertices.at(0).getGlobalIndex() == 0);
187 BOOST_TEST(vertices.at(1).getGlobalIndex() == 1);
188 BOOST_TEST(vertices.at(0).isOwner() ==
true);
189 BOOST_TEST(vertices.at(1).isOwner() ==
true);
191 BOOST_REQUIRE((vertexDistribution.size()) == 3);
192 BOOST_TEST(vertexDistribution.at(0).size() == 2);
193 BOOST_TEST(vertexDistribution.at(1).size() == 0);
194 BOOST_TEST(vertexDistribution.at(2).size() == 4);
195 BOOST_TEST(vertexDistribution.at(0).at(0) == 0);
196 BOOST_TEST(vertexDistribution.at(0).at(1) == 1);
197 BOOST_TEST(vertexDistribution.at(2).at(0) == 2);
198 BOOST_TEST(vertexDistribution.at(2).at(1) == 3);
199 BOOST_TEST(vertexDistribution.at(2).at(2) == 4);
200 BOOST_TEST(vertexDistribution.at(2).at(3) == 5);
201 }
else if (context.isRank(1)) {
202 BOOST_REQUIRE(vertexOffsets.size() == 3);
203 BOOST_TEST(vertexOffsets.at(0) == 2);
204 BOOST_TEST(vertexOffsets.at(1) == 2);
205 BOOST_TEST(vertexOffsets.at(2) == 6);
206 }
else if (context.isRank(2)) {
207 BOOST_REQUIRE(vertexOffsets.size() == 3);
208 BOOST_TEST(vertexOffsets.at(0) == 2);
209 BOOST_TEST(vertexOffsets.at(1) == 2);
210 BOOST_TEST(vertexOffsets.at(2) == 6);
212 BOOST_REQUIRE(vertices.size() == 4);
213 BOOST_TEST(vertices.at(0).getGlobalIndex() == 2);
214 BOOST_TEST(vertices.at(1).getGlobalIndex() == 3);
215 BOOST_TEST(vertices.at(2).getGlobalIndex() == 4);
216 BOOST_TEST(vertices.at(3).getGlobalIndex() == 5);
217 BOOST_TEST(vertices.at(0).isOwner() ==
true);
218 BOOST_TEST(vertices.at(1).isOwner() ==
true);
219 BOOST_TEST(vertices.at(2).isOwner() ==
true);
220 BOOST_TEST(vertices.at(3).isOwner() ==
true);
234 if (context.isPrimary()) {
235 Eigen::VectorXd position(dim);
236 position << 0.0, 0.0;
237 pMesh->createVertex(position);
238 position << 1.0, 0.0;
239 pMesh->createVertex(position);
240 }
else if (context.isRank(1)) {
241 Eigen::VectorXd position(dim);
242 position << 2.0, 0.0;
243 pMesh->createVertex(position);
244 }
else if (context.isRank(2)) {
245 }
else if (context.isRank(3)) {
246 Eigen::VectorXd position(dim);
247 position << 3.0, 0.0;
248 pMesh->createVertex(position);
249 position << 4.0, 0.0;
250 pMesh->createVertex(position);
252 pMesh->computeBoundingBox();
258 BOOST_TEST_CONTEXT(*pMesh)
260 if (context.isPrimary()) {
261 BOOST_TEST(pMesh->getGlobalNumberOfVertices() == 5);
262 BOOST_TEST_REQUIRE(pMesh->getVertexOffsets().size() == 4);
263 BOOST_TEST(pMesh->getVertexOffsets().at(0) == 2);
264 BOOST_TEST(pMesh->getVertexOffsets().at(1) == 3);
265 BOOST_TEST(pMesh->getVertexOffsets().at(2) == 3);
266 BOOST_TEST(pMesh->getVertexOffsets().at(3) == 5);
267 BOOST_TEST(pMesh->vertex(0).getGlobalIndex() == 0);
268 BOOST_TEST(pMesh->vertex(1).getGlobalIndex() == 1);
269 BOOST_TEST(pMesh->vertex(0).isOwner() ==
true);
270 BOOST_TEST(pMesh->vertex(1).isOwner() ==
true);
271 }
else if (context.isRank(1)) {
272 BOOST_TEST(pMesh->getGlobalNumberOfVertices() == 5);
273 BOOST_TEST_REQUIRE(pMesh->getVertexOffsets().size() == 4);
274 BOOST_TEST(pMesh->getVertexOffsets().at(0) == 2);
275 BOOST_TEST(pMesh->getVertexOffsets().at(1) == 3);
276 BOOST_TEST(pMesh->getVertexOffsets().at(2) == 3);
277 BOOST_TEST(pMesh->getVertexOffsets().at(3) == 5);
278 BOOST_TEST(pMesh->vertex(0).getGlobalIndex() == 2);
279 BOOST_TEST(pMesh->vertex(0).isOwner() ==
true);
280 }
else if (context.isRank(2)) {
281 BOOST_TEST(pMesh->getGlobalNumberOfVertices() == 5);
282 BOOST_TEST_REQUIRE(pMesh->getVertexOffsets().size() == 4);
283 BOOST_TEST(pMesh->getVertexOffsets().at(0) == 2);
284 BOOST_TEST(pMesh->getVertexOffsets().at(1) == 3);
285 BOOST_TEST(pMesh->getVertexOffsets().at(2) == 3);
286 BOOST_TEST(pMesh->getVertexOffsets().at(3) == 5);
287 }
else if (context.isRank(3)) {
288 BOOST_TEST(pMesh->getGlobalNumberOfVertices() == 5);
289 BOOST_TEST_REQUIRE(pMesh->getVertexOffsets().size() == 4);
290 BOOST_TEST(pMesh->getVertexOffsets().at(0) == 2);
291 BOOST_TEST(pMesh->getVertexOffsets().at(1) == 3);
292 BOOST_TEST(pMesh->getVertexOffsets().at(2) == 3);
293 BOOST_TEST(pMesh->getVertexOffsets().at(3) == 5);
294 BOOST_TEST(pMesh->vertex(0).getGlobalIndex() == 3);
295 BOOST_TEST(pMesh->vertex(1).getGlobalIndex() == 4);
296 BOOST_TEST(pMesh->vertex(0).isOwner() ==
true);
297 BOOST_TEST(pMesh->vertex(1).isOwner() ==
true);
309 auto m2n = context.connectPrimaryRanks(
"NASTIN",
"SOLIDZ", options);
313 if (context.isNamed(
"SOLIDZ")) {
317 if (context.isPrimary()) {
318 Eigen::VectorXd position(dimensions);
319 position << -1.0, 0.0;
321 position << 1.0, 2.0;
323 position << 5.0, 3.0;
325 pSolidzMesh->createEdge(v0, v1);
326 pSolidzMesh->createEdge(v1, v2);
329 else if (context.isRank(1)) {
330 Eigen::VectorXd position(dimensions);
331 position << 1.0, 3.5;
333 position << 0.0, 4.5;
335 pSolidzMesh->createEdge(v3, v4);
336 }
else if (context.isRank(2)) {
337 Eigen::VectorXd position(dimensions);
338 position << 2.5, 5.5;
340 position << 4.5, 7.0;
342 pSolidzMesh->createEdge(v5, v6);
344 pSolidzMesh->computeBoundingBox();
350 if (context.isPrimary()) {
351 BOOST_TEST(pSolidzMesh->getConnectedRanks().size() == 2);
352 BOOST_TEST(pSolidzMesh->getConnectedRanks().at(0) == 1);
353 BOOST_TEST(pSolidzMesh->getConnectedRanks().at(1) == 2);
354 }
else if (context.isRank(1)) {
355 BOOST_TEST(pSolidzMesh->getConnectedRanks().size() == 2);
356 BOOST_TEST(pSolidzMesh->getConnectedRanks().at(0) == 0);
357 BOOST_TEST(pSolidzMesh->getConnectedRanks().at(1) == 2);
358 }
else if (context.isRank(2)) {
359 BOOST_TEST(pSolidzMesh->getConnectedRanks().size() == 2);
360 BOOST_TEST(pSolidzMesh->getConnectedRanks().at(0) == 0);
361 BOOST_TEST(pSolidzMesh->getConnectedRanks().at(1) == 1);
365 BOOST_TEST(context.isNamed(
"NASTIN"));
376 int receivedFeedbackSize = 3;
377 m2n->getPrimaryRankCommunication()->receive(receivedFeedbackSize, 0);
379 for (
int i = 0; i < receivedFeedbackSize; i++) {
380 receivedGlobalBB.
emplace(i, localBB);
386 BOOST_TEST(receivedFeedbackSize == 3);
389 BOOST_TEST(receivedGlobalBB.
at(0) == compareBB.
at(0));
390 BOOST_TEST(receivedGlobalBB.
at(1) == compareBB.
at(1));
391 BOOST_TEST(receivedGlobalBB.
at(2) == compareBB.
at(2));
394 m2n->getPrimaryRankCommunication()->sendRange(connectedRanks, 0);
398 connectionMap[0].push_back(1);
399 connectionMap[0].push_back(2);
400 connectionMap[1].push_back(0);
401 connectionMap[1].push_back(2);
402 connectionMap[2].push_back(0);
403 connectionMap[2].push_back(1);
416 auto m2n = context.connectPrimaryRanks(
"NASTIN",
"SOLIDZ", options);
420 if (context.isNamed(
"SOLIDZ")) {
424 if (context.isPrimary()) {
425 Eigen::VectorXd position(dimensions);
426 position << -1.0, 0.0, -1.0;
428 position << 1.0, 2.0, 1.0;
430 position << 5.0, 3.0, 5.0;
432 pSolidzMesh->createEdge(v0, v1);
433 pSolidzMesh->createEdge(v1, v2);
436 else if (context.isRank(1)) {
437 Eigen::VectorXd position(dimensions);
438 position << 1.0, 3.5, 1.0;
440 position << 0.0, 4.5, 0.0;
442 pSolidzMesh->createEdge(v3, v4);
443 }
else if (context.isRank(2)) {
444 Eigen::VectorXd position(dimensions);
445 position << 2.5, 5.5, 2.5;
447 position << 4.5, 7.0, 4.5;
449 pSolidzMesh->createEdge(v5, v6);
451 pSolidzMesh->computeBoundingBox();
455 part.compareBoundingBoxes();
458 BOOST_TEST(context.isNamed(
"NASTIN"));
469 int remoteParComSize = 3;
470 m2n->getPrimaryRankCommunication()->receive(remoteParComSize, 0);
472 for (
int i = 0; i < remoteParComSize; i++) {
473 receivedGlobalBB.
emplace(i, localBB);
480 BOOST_TEST(remoteParComSize == 3);
483 BOOST_TEST(receivedGlobalBB.
at(0) == compareBB.
at(0));
484 BOOST_TEST(receivedGlobalBB.
at(1) == compareBB.
at(1));
485 BOOST_TEST(receivedGlobalBB.
at(2) == compareBB.
at(2));
489 m2n->getPrimaryRankCommunication()->sendRange(connectedRanksList, 0);
499 double safetyFactor = 0.1;
506 auto m2n = context.connectPrimaryRanks(
"Fluid",
"Solid", options);
508 if (context.isNamed(
"Solid")) {
509 if (context.isPrimary()) {
510 Eigen::VectorXd position(dimensions);
511 position << 0.5, 0.0;
513 position << 1.5, 0.0;
515 position << 2.0, 1.0;
517 position << 0.5, 1.0;
519 mesh->createEdge(v1, v2);
520 mesh->createEdge(v2, v3);
521 mesh->createEdge(v3, v4);
522 mesh->createEdge(v4, v1);
524 mesh->setConnectedRanks({0});
527 Eigen::VectorXd position(dimensions);
528 position << 2.5, 0.0;
530 position << 3.5, 0.0;
532 position << 3.5, 1.0;
534 position << 2.0, 1.0;
536 mesh->createEdge(v1, v2);
537 mesh->createEdge(v2, v3);
538 mesh->createEdge(v3, v4);
539 mesh->createEdge(v4, v1);
541 mesh->setConnectedRanks({1});
544 BOOST_TEST(context.isNamed(
"Fluid"));
545 if (context.isPrimary()) {
546 mesh->setConnectedRanks({0});
548 mesh->setConnectedRanks({1});
551 mesh->computeBoundingBox();
553 if (context.isNamed(
"Solid")) {
554 m2n->createDistributedCommunication(
mesh);
556 m2n->acceptSecondaryRanksPreConnection(
"SolidSecondaryRanks",
"FluidSecondaryRanks");
560 m2n->createDistributedCommunication(
mesh);
562 m2n->requestSecondaryRanksPreConnection(
"SolidSecondaryRanks",
"FluidSecondaryRanks");
567 BOOST_TEST(
mesh->nVertices() == 4);
569 if (context.isPrimary()) {
570 BOOST_TEST(
mesh->vertex(0).coord(0) == 0.5);
571 BOOST_TEST(
mesh->vertex(0).coord(1) == 0.0);
572 BOOST_TEST(
mesh->vertex(1).coord(0) == 1.5);
573 BOOST_TEST(
mesh->vertex(1).coord(1) == 0.0);
574 BOOST_TEST(
mesh->vertex(2).coord(0) == 2.0);
575 BOOST_TEST(
mesh->vertex(2).coord(1) == 1.0);
576 BOOST_TEST(
mesh->vertex(3).coord(0) == 0.5);
577 BOOST_TEST(
mesh->vertex(3).coord(1) == 1.0);
579 BOOST_TEST(
mesh->vertex(0).coord(0) == 2.5);
580 BOOST_TEST(
mesh->vertex(0).coord(1) == 0.0);
581 BOOST_TEST(
mesh->vertex(1).coord(0) == 3.5);
582 BOOST_TEST(
mesh->vertex(1).coord(1) == 0.0);
583 BOOST_TEST(
mesh->vertex(2).coord(0) == 3.5);
584 BOOST_TEST(
mesh->vertex(2).coord(1) == 1.0);
585 BOOST_TEST(
mesh->vertex(3).coord(0) == 2.0);
586 BOOST_TEST(
mesh->vertex(3).coord(1) == 1.0);
597 double safetyFactor = 0;
605 auto m2n = context.connectPrimaryRanks(
"Fluid",
"Solid", options);
607 if (context.isNamed(
"Solid")) {
608 if (context.isPrimary()) {
609 Eigen::VectorXd position(dimensions);
610 position << -2.0, 0.0;
611 mesh->createVertex(position);
612 position << -1.0, 0.0;
613 mesh->createVertex(position);
614 position << 0.0, 1.0;
615 mesh->createVertex(position);
616 position << -1.0, 1.0;
617 mesh->createVertex(position);
618 position << -2.0, 1.0;
619 mesh->createVertex(position);
620 position << -2.0, 2.0;
621 mesh->createVertex(position);
622 position << -1.0, 2.0;
623 mesh->createVertex(position);
624 position << 0.0, 2.0;
625 mesh->createVertex(position);
627 Eigen::VectorXd position(dimensions);
628 position << -0.5, 0.0;
629 mesh->createVertex(position);
630 position << 1.0, 0.0;
631 mesh->createVertex(position);
632 position << 2.0, 0.0;
633 mesh->createVertex(position);
634 position << 2.0, 1.0;
635 mesh->createVertex(position);
636 position << 1.0, 1.0;
637 mesh->createVertex(position);
638 position << 1.0, 2.0;
639 mesh->createVertex(position);
640 position << 2.0, 2.0;
641 mesh->createVertex(position);
644 BOOST_TEST(context.isNamed(
"Fluid"));
645 if (context.isPrimary()) {
646 Eigen::VectorXd position(dimensions);
647 position << 0.0, 0.0;
648 mesh->createVertex(position);
649 position << 0.0, -1.0;
650 mesh->createVertex(position);
651 position << -1.0, 0.0;
652 mesh->createVertex(position);
653 position << -1.0, -1.0;
654 mesh->createVertex(position);
655 position << -2.0, -0.0;
656 mesh->createVertex(position);
657 position << -2.0, -1.0;
658 mesh->createVertex(position);
660 Eigen::VectorXd position(dimensions);
661 position << 0.0, 0.0;
662 mesh->createVertex(position);
663 position << 1.0, 0.0;
664 mesh->createVertex(position);
665 position << 0.0, -1.0;
666 mesh->createVertex(position);
667 position << 1.0, -1.0;
668 mesh->createVertex(position);
669 position << 2.0, 0.0;
670 mesh->createVertex(position);
671 position << 2.0, -1.0;
672 mesh->createVertex(position);
675 mesh->computeBoundingBox();
677 if (context.isNamed(
"Solid")) {
678 m2n->createDistributedCommunication(
mesh);
682 part.compareBoundingBoxes();
684 if (context.isPrimary()) {
685 BOOST_TEST(
mesh->getConnectedRanks().size() == 2);
686 BOOST_TEST(
mesh->getConnectedRanks().at(0) == 0);
687 BOOST_TEST(
mesh->getConnectedRanks().at(1) == 1);
689 BOOST_TEST(
mesh->getConnectedRanks().size() == 2);
690 BOOST_TEST(
mesh->getConnectedRanks().at(0) == 0);
691 BOOST_TEST(
mesh->getConnectedRanks().at(1) == 1);
694 m2n->acceptSecondaryRanksPreConnection(
"FluidSecondaryRanks",
"SolidSecondaryRanks");
699 if (context.isPrimary()) {
700 BOOST_TEST(
mesh->getCommunicationMap().at(0).at(0) == 0);
701 BOOST_TEST(
mesh->getCommunicationMap().at(0).at(1) == 1);
703 BOOST_TEST(
mesh->getCommunicationMap().at(0).at(0) == 0);
704 BOOST_TEST(
mesh->getCommunicationMap().at(1).at(0) == 1);
705 BOOST_TEST(
mesh->getCommunicationMap().at(1).at(1) == 2);
708 m2n->createDistributedCommunication(receivedMesh);
711 boundingFromMapping->setMeshes(receivedMesh,
mesh);
712 boundingToMapping->setMeshes(
mesh, receivedMesh);
718 part.addFromMapping(boundingFromMapping);
719 part.addToMapping(boundingToMapping);
721 part.compareBoundingBoxes();
723 m2n->requestSecondaryRanksPreConnection(
"FluidSecondaryRanks",
"SolidSecondaryRanks");
737 double safetyFactor = 0.0;
746 auto m2n = context.connectPrimaryRanks(
"Fluid",
"Solid", options);
748 if (context.isNamed(
"Solid")) {
749 if (context.isPrimary()) {
750 Eigen::VectorXd position(dimensions);
751 position << -2.0, 0.0, 0.0;
752 mesh->createVertex(position);
753 position << -1.0, 0.0, 0.0;
754 mesh->createVertex(position);
755 position << 0.0, 1.0, 1.0;
756 mesh->createVertex(position);
757 position << -1.0, 1.0, 1.0;
758 mesh->createVertex(position);
759 position << -2.0, 1.0, 1.0;
760 mesh->createVertex(position);
762 Eigen::VectorXd position(dimensions);
763 position << -0.5, 0.0, 0.0;
764 mesh->createVertex(position);
765 position << 1.0, 0.0, 0.0;
766 mesh->createVertex(position);
767 position << 2.0, 0.0, 0.0;
768 mesh->createVertex(position);
769 position << 2.0, 1.0, 1.0;
770 mesh->createVertex(position);
771 position << 1.0, 1.0, 1.0;
772 mesh->createVertex(position);
775 if (context.isPrimary()) {
776 Eigen::VectorXd position(dimensions);
777 position << 0.0, 0.0, 0.0;
778 mesh->createVertex(position);
779 position << 0.0, -1.0, 1.0;
780 mesh->createVertex(position);
781 position << -1.0, 0.0, 0.0;
782 mesh->createVertex(position);
783 position << -1.0, -1.0, 1.0;
784 mesh->createVertex(position);
785 position << -2.0, -0.0, 0.0;
786 mesh->createVertex(position);
787 position << -2.0, -1.0, 1.0;
788 mesh->createVertex(position);
790 Eigen::VectorXd position(dimensions);
791 position << 0.0, 0.0, 0.0;
792 mesh->createVertex(position);
793 position << 1.0, 0.0, 0.0;
794 mesh->createVertex(position);
795 position << 0.0, -1.0, 1.0;
796 mesh->createVertex(position);
797 position << 1.0, -1.0, 1.0;
798 mesh->createVertex(position);
799 position << 2.0, 0.0, 0.0;
800 mesh->createVertex(position);
801 position << 2.0, -1.0, 0.0;
802 mesh->createVertex(position);
805 mesh->computeBoundingBox();
807 if (context.isNamed(
"Solid")) {
808 m2n->createDistributedCommunication(
mesh);
812 part.compareBoundingBoxes();
814 if (context.isPrimary()) {
815 BOOST_TEST(
mesh->getConnectedRanks().size() == 2);
816 BOOST_TEST(
mesh->getConnectedRanks().at(0) == 0);
817 BOOST_TEST(
mesh->getConnectedRanks().at(1) == 1);
819 BOOST_TEST(
mesh->getConnectedRanks().size() == 2);
820 BOOST_TEST(
mesh->getConnectedRanks().at(0) == 0);
821 BOOST_TEST(
mesh->getConnectedRanks().at(1) == 1);
824 m2n->acceptSecondaryRanksPreConnection(
"FluidSecondaryRanks",
"SolidSecondaryRanks");
829 if (context.isPrimary()) {
830 BOOST_TEST(
mesh->getCommunicationMap().at(0).at(0) == 0);
831 BOOST_TEST(
mesh->getCommunicationMap().at(0).at(1) == 1);
833 BOOST_TEST(
mesh->getCommunicationMap().at(0).at(0) == 0);
834 BOOST_TEST(
mesh->getCommunicationMap().at(1).at(0) == 1);
835 BOOST_TEST(
mesh->getCommunicationMap().at(1).at(1) == 2);
838 m2n->createDistributedCommunication(receivedMesh);
841 boundingFromMapping->setMeshes(receivedMesh,
mesh);
842 boundingToMapping->setMeshes(
mesh, receivedMesh);
847 part.addFromMapping(boundingFromMapping);
848 part.addToMapping(boundingToMapping);
850 part.compareBoundingBoxes();
852 m2n->requestSecondaryRanksPreConnection(
"FluidSecondaryRanks",
"SolidSecondaryRanks");
BOOST_AUTO_TEST_CASE(testIQNIMVJPPWithSubsteps)
BOOST_AUTO_TEST_SUITE(PreProcess)
BOOST_AUTO_TEST_SUITE_END()
#define PRECICE_TEST_SETUP(...)
Creates and attaches a TestSetup to a Boost test case.
Mapping using nearest neighboring vertices.
An axis-aligned bounding box around a (partition of a) mesh.
Linear edge of a mesh, defined by two Vertex objects.
Container and creator for meshes.
std::map< int, BoundingBox > BoundingBoxMap
void addM2N(m2n::PtrM2N m2n)
A partition that is provided by the participant.
void compute() override
All distribution data structures are set up.
void communicate() override
The mesh is gathered and sent to another participant (if required)
void compareBoundingBoxes() override
Intersections between bounding boxes around each rank are computed.
A partition that is computed from a mesh received from another participant.
@ ON_SECONDARY_RANKS
Filter after communication on all secondary ranks.
void communicate() override
The mesh is communicated between both primary ranks (if required)
void receiveBoundingBoxMap(Communication &communication, int rankSender, mesh::Mesh::BoundingBoxMap &bbm)
void sendConnectionMap(Communication &communication, int rankReceiver, const mesh::Mesh::ConnectionMap &cm)
contains the logic of the parallel communication between participants.
std::shared_ptr< Mapping > PtrMapping
provides Mesh, Data and primitives.
std::shared_ptr< Mesh > PtrMesh
contains the partitioning of distributed meshes.
@ Events
Require to initialize Event.
Main namespace of the precice library.