Skip to content
Snippets Groups Projects
Commit 76b1ca5e authored by TESLA03\Master's avatar TESLA03\Master
Browse files

Change some indices for better readability

Use level instead of dridNumber in NodeIndicesMultiGPU
and instead of i in loops in MultipleGridBuilder
parent 5cf01477
No related branches found
No related tags found
1 merge request!104Add Communication Hiding to GPU version
......@@ -609,8 +609,8 @@ void MultipleGridBuilder::findGeoFluidNodes()
const std::vector<uint> *MultipleGridBuilder::getGeoFluidSizes() const
{
std::vector<uint> geoFluidSizes;
for (uint i = 0; i < grids.size(); i++) {
geoFluidSizes.push_back(grids[i]->getGeoFluidSize());
for (uint level = 0; level < grids.size(); level++) {
geoFluidSizes.push_back(grids[level]->getGeoFluidSize());
}
return &geoFluidSizes;
}
......@@ -618,8 +618,8 @@ const std::vector<uint> *MultipleGridBuilder::getGeoFluidSizes() const
const std::vector<const uint*> *MultipleGridBuilder::getGeoFluidNodeIndices() const
{
std::vector<const uint*> getGeoFluidNodes;
for (uint i = 0; i < grids.size(); i++) {
getGeoFluidNodes.push_back(grids[i]->getGeoFluidNodes());
for (uint level = 0; level < grids.size(); level++) {
getGeoFluidNodes.push_back(grids[level]->getGeoFluidNodes());
}
return &getGeoFluidNodes;
}
......
......@@ -7,12 +7,12 @@ NodeIndicesMultiGPU::NodeIndicesMultiGPU(const std::vector<uint> *geoFluidSizes,
this->geoFluidNodeIndices = geoFluidNodesIndices;
}
uint NodeIndicesMultiGPU::getGeoFluidSize(uint gridNumber)
uint NodeIndicesMultiGPU::getGeoFluidSize(uint level)
{
return (*this->geoFluidSizes)[gridNumber];
return (*this->geoFluidSizes)[level];
}
const uint* NodeIndicesMultiGPU::getGeoFluidNodeIndices(uint gridNumber)
const uint* NodeIndicesMultiGPU::getGeoFluidNodeIndices(uint level)
{
return (*this->geoFluidNodeIndices)[gridNumber];
return (*this->geoFluidNodeIndices)[level];
}
......@@ -13,8 +13,8 @@ class NodeIndicesMultiGPU
public:
NodeIndicesMultiGPU(const std::vector<uint> *geoFluidSizes, const std::vector<const uint*> * geoFluidNodes);
uint getGeoFluidSize(uint gridNumber);
const uint* getGeoFluidNodeIndices(uint gridNumber);
uint getGeoFluidSize(uint level);
const uint *getGeoFluidNodeIndices(uint level);
};
#endif
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment