diff --git a/src/gpu/GridGenerator/VelocitySetter/VelocitySetter.cpp b/src/gpu/GridGenerator/VelocitySetter/VelocitySetter.cpp index d2d4cd9785f8582ef34c463bd14ff0047ae4d880..980475d8fc757252b98255e1d1bae0bf2bdd720c 100644 --- a/src/gpu/GridGenerator/VelocitySetter/VelocitySetter.cpp +++ b/src/gpu/GridGenerator/VelocitySetter/VelocitySetter.cpp @@ -283,12 +283,12 @@ void VTKReader::fillArrays(std::vector<real>& coordsY, std::vector<real>& coords for(int fileId=0; fileId<(int)this->fileCollection->files[level].size(); fileId++) { VTKFile &file = this->fileCollection->files[level][fileId][0]; - printf("Point %u at \t(%f \t %f) is in BB %u)\n", i, posY, posZ,file.inBoundingBox(posY, posZ, 0.0f) ); if(!file.inBoundingBox(posY, posZ, 0.0f)) continue; + // y in simulation is x in precursor/file, z in simulation is y in precursor/file // simulation -> file: N -> E, S -> W, T -> N, B -> S int idx = file.findNeighborWSB(posY, posZ, 0.f); //!> index of nearest WSB neighbor on precursor file - printf("Point %u at \t(%f \t %f): nearest neighbor %u at (%f \t %f)\n", i, posY, posZ, idx, file.getX(idx), file.getY(idx)); + if(idx!=-1) { // Filter for exact matches diff --git a/src/gpu/VirtualFluids_GPU/PreCollisionInteractor/PrecursorWriter.cu b/src/gpu/VirtualFluids_GPU/PreCollisionInteractor/PrecursorWriter.cu index 677699c55d52fa88d346406ed991b4d15673b93e..875d3f2a0d36bef575900082efd0bd51edb0b263 100644 --- a/src/gpu/VirtualFluids_GPU/PreCollisionInteractor/PrecursorWriter.cu +++ b/src/gpu/VirtualFluids_GPU/PreCollisionInteractor/PrecursorWriter.cu @@ -296,7 +296,7 @@ void PrecursorWriter::write(Parameter* para, int level, uint timestepsBuffered) } std::vector<std::vector<double>> celldata; - getWriter()->writeData(wholeName, nodedatanames, celldatanames, nodedata, celldata, extent, origin, precursorStructs[level]->spacing, extent, writePrecision); + getWriter()->writeData(wholeName, nodedatanames, celldatanames, nodedata, celldata, extent, origin, precursorStructs[level]->spacing, extent, this->writePrecision); precursorStructs[level]->filesWritten++; }