Skip to content

Commit 9a9a990

Browse files
committed
fff
1 parent 82a13fb commit 9a9a990

File tree

1 file changed

+15
-3
lines changed

1 file changed

+15
-3
lines changed

src/patchkernel/patch_kernel.cpp

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1132,7 +1132,7 @@ std::vector<adaption::Info> PatchKernel::_resetInterfaces(bool trackAdaption, bo
11321132
// Track interfaces that will be deleted
11331133
//
11341134
// Only interfaces on interior cells will be tracked.
1135-
std::size_t adaptionInfoId = adaptionData.insert(adaption::TYPE_DELETION, adaption::ENTITY_INTERFACE, getRank());
1135+
std::size_t adaptionInfoId = adaptionData.insert(adaption::TYPE_DELETION, adaption::ENTITY_INTERFACE);
11361136
adaption::Info &adaptionInfo = adaptionData[adaptionInfoId];
11371137
adaptionInfo.previous = std::vector<long>(internalInterfaces.begin(), internalInterfaces.end());
11381138
}
@@ -5747,6 +5747,16 @@ std::vector<long> PatchKernel::getOrderedCellsVertices(const std::vector<long> &
57475747
bool interior, bool ghost) const
57485748
{
57495749
std::vector<long> orderedVertices;
5750+
#if BITPIT_ENABLE_MPI==1
5751+
if (!interior && (!ghost || !isPartitioned())) {
5752+
return orderedVertices;
5753+
}
5754+
#else
5755+
if (!interior) {
5756+
return orderedVertices;
5757+
}
5758+
#endif
5759+
57505760
std::unordered_set<long> verticesSet;
57515761
for (long cellId : cellIds) {
57525762
const Cell &cell = getCell(cellId);
@@ -5755,6 +5765,7 @@ std::vector<long> PatchKernel::getOrderedCellsVertices(const std::vector<long> &
57555765
continue;
57565766
}
57575767

5768+
#if BITPIT_ENABLE_MPI==1
57585769
if (!interior || !ghost) {
57595770
auto vertexGhostInfoItr = m_ghostVertexInfo.find(vertexId);
57605771
if (!interior && vertexGhostInfoItr == m_ghostVertexInfo.cend()) {
@@ -5763,6 +5774,7 @@ std::vector<long> PatchKernel::getOrderedCellsVertices(const std::vector<long> &
57635774
continue;
57645775
}
57655776
}
5777+
#endif
57665778

57675779
verticesSet.insert(vertexId);
57685780
orderedVertices.push_back(vertexId);
@@ -6553,7 +6565,7 @@ std::vector<adaption::Info> PatchKernel::pruneStaleInterfaces(bool trackAdaption
65536565
// Track changes
65546566
adaption::InfoCollection adaptionData;
65556567
if (trackAdaption) {
6556-
std::size_t adaptionInfoId = adaptionData.insert(adaption::TYPE_DELETION, adaption::ENTITY_INTERFACE, getRank());
6568+
std::size_t adaptionInfoId = adaptionData.insert(adaption::TYPE_DELETION, adaption::ENTITY_INTERFACE);
65576569
adaption::Info &adaptionInfo = adaptionData[adaptionInfoId];
65586570
adaptionInfo.previous = std::move(danglingInterfaces);
65596571
}
@@ -6635,7 +6647,7 @@ std::vector<adaption::Info> PatchKernel::_updateInterfaces(bool trackAdaption)
66356647
// Track changes
66366648
adaption::InfoCollection adaptionData;
66376649
if (trackAdaption) {
6638-
std::size_t adaptionInfoId = adaptionData.insert(adaption::TYPE_CREATION, adaption::ENTITY_INTERFACE, getRank());
6650+
std::size_t adaptionInfoId = adaptionData.insert(adaption::TYPE_CREATION, adaption::ENTITY_INTERFACE);
66396651
adaption::Info &adaptionInfo = adaptionData[adaptionInfoId];
66406652
adaptionInfo.current = std::move(createdInterfaces);
66416653
}

0 commit comments

Comments
 (0)