Skip to content
Snippets Groups Projects
Commit 0a389fc0 authored by Henrik Asmuth's avatar Henrik Asmuth
Browse files

Small refactoring and mods in TransientBCSetter

parent e457c991
No related branches found
No related tags found
1 merge request!170Kernel templetization and efficiency improvements
......@@ -156,7 +156,7 @@ void VTKFile::unloadFile()
this->loaded = false;
}
void VTKFile::getData(real* data, uint numberOfNodes, std::vector<uint> readIndeces, std::vector<uint> writeIndices, uint offsetRead, uint offsetWrite)
void VTKFile::getData(real* data, uint numberOfNodes, const std::vector<uint>& readIndices, const std::vector<uint>& writeIndices, uint offsetRead, uint offsetWrite)
{
if(!this->loaded) loadFile();
......@@ -167,7 +167,7 @@ void VTKFile::getData(real* data, uint numberOfNodes, std::vector<uint> readInde
real* quant = &data[j*numberOfNodes];
for(size_t i=0; i<nPoints; i++)
{
quant[offsetWrite+writeIndices[i]] = this->quantities[j].values[readIndeces[i]+offsetRead];
quant[offsetWrite+writeIndices[i]] = this->quantities[j].values[readIndices[i]+offsetRead];
}
}
}
......
......@@ -40,7 +40,7 @@ public:
// printFileInfo();
};
void getData(real* data, uint numberOfNodes, std::vector<uint> readIndeces, std::vector<uint> writeIndices, uint offsetRead, uint offsetWrite);
void getData(real* data, uint numberOfNodes, const std::vector<uint>& readIndices, const std::vector<uint>& writeIndices, uint offsetRead, uint offsetWrite);
bool markNANs(std::vector<uint> readIndices);
bool inBoundingBox(real posX, real posY, real posZ){return inXBounds(posX) && inYBounds(posY) && inZBounds(posZ); };
bool inXBounds(real posX){ return posX<=maxX && posX>=minX; };
......
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