Skip to content

Commit

Permalink
ShyLU, FROSch : fix compile errors with deprecated codes off
Browse files Browse the repository at this point in the history
  • Loading branch information
iyamazaki committed Feb 18, 2022
1 parent d9bc1c4 commit 7bf3d14
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,8 @@ namespace FROSch {
using GOVecVec = Array<GOVec>;
using GOVecVecPtr = ArrayRCP<GOVec>;

using GOView = Kokkos::View<GO*, Kokkos::HostSpace>;

public:
LowerPIDTieBreak(CommPtr comm,
ConstXMapPtr originalMap,
Expand Down
14 changes: 7 additions & 7 deletions packages/shylu/shylu_dd/frosch/src/Tools/FROSch_Tools_def.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ namespace FROSch {

const int packetSize = 2;
IntVec sendImageIDs(numPackages);
GOVec exportEntries(packetSize*numPackages); // data to send out
GOView exportEntries("FROSch::sendDataToOriginalMap::exportEntries", packetSize*numPackages); // data to send out
{
typename OverlappingDataPtrVec::iterator tmpODPtrVecIt;
typename IntVec::iterator tmpIntVecIt;
Expand All @@ -151,8 +151,8 @@ namespace FROSch {
tmpLOVecIt = (*tmpODPtrVecIt)->LIDs_.begin();
for (tmpIntVecIt = (*tmpODPtrVecIt)->PIDs_.begin(); tmpIntVecIt != (*tmpODPtrVecIt)->PIDs_.end(); tmpIntVecIt++) {
for (tmpIntVecIt2 = (*tmpODPtrVecIt)->PIDs_.begin(); tmpIntVecIt2 != (*tmpODPtrVecIt)->PIDs_.end(); tmpIntVecIt2++) {
exportEntries[exportIndex++] = (*tmpODPtrVecIt)->GID_;
exportEntries[exportIndex++] = as<GO>(*tmpIntVecIt2);
exportEntries(exportIndex++) = (*tmpODPtrVecIt)->GID_;
exportEntries(exportIndex++) = as<GO>(*tmpIntVecIt2);
sendImageIDs[exportIndex2++] = *tmpIntVecIt;
}
tmpLOVecIt++;
Expand All @@ -161,13 +161,13 @@ namespace FROSch {
}
distor.createFromSends(sendImageIDs);

GOVec importElements(packetSize*distor.getTotalReceiveLength());
GOView importElements("FROSch::sendDataToOriginalMap::importElements", packetSize*distor.getTotalReceiveLength());

distor.doPostsAndWaits(exportEntries().getConst(),packetSize,importElements());
distor.doPostsAndWaits(exportEntries,packetSize,importElements);

LO length = importElements.size()/packetSize;
LO length = importElements.extent(0)/packetSize;
for (LO i=0; i<length; i++) {
ComponentsSubdomains_[OriginalMap_->getLocalElement(importElements[2*i])].push_back(importElements[2*i+1]);
ComponentsSubdomains_[OriginalMap_->getLocalElement(importElements(2*i))].push_back(importElements(2*i+1));
}

return 0;
Expand Down

0 comments on commit 7bf3d14

Please sign in to comment.