diff --git a/src/basics/geometry3d/GbTriFaceMesh3D.cpp b/src/basics/geometry3d/GbTriFaceMesh3D.cpp index 59892223a505aa87b1919652b84f89b903d5171f..9c098f14c802a5ac7fba4328d99e412cc6b453f4 100644 --- a/src/basics/geometry3d/GbTriFaceMesh3D.cpp +++ b/src/basics/geometry3d/GbTriFaceMesh3D.cpp @@ -1072,7 +1072,7 @@ void GbTriFaceMesh3D::readMeshFromSTLFileBinary(string filename, bool removeRedu float v[12]; // normal=3, vertices=3*3 = 12 unsigned short uint16; // Every Face is 50 Bytes: Normal(3*float), Vertices(9*float), 2 Bytes Spacer - for (size_t i = 0; i < nFaces; ++i) { + for (int i = 0; i < nFaces; ++i) { for (size_t j = 0; j < 12; ++j) { fread((void *)&v[j], sizeof(float), 1, f); } diff --git a/src/basics/geometry3d/GbVoxelMatrix3D.cpp b/src/basics/geometry3d/GbVoxelMatrix3D.cpp index bc2a89bc8cb7a78ba5c77b528ce48c7223d6698c..d4a047323abea561947abe662ba404dee08b519f 100644 --- a/src/basics/geometry3d/GbVoxelMatrix3D.cpp +++ b/src/basics/geometry3d/GbVoxelMatrix3D.cpp @@ -169,8 +169,8 @@ double GbVoxelMatrix3D::getIntersectionRaytraceFactor(const double &x1, const do int nix3 = UbMath::integerRounding((x3 - minX3) / deltaX3) + ndx3; // test ob nachbar solid - if (nix1 >= 0 && nix2 >= 0 && nix3 >= 0 && nix1 < voxelMatrix.getNX1() && nix2 < voxelMatrix.getNX2() && - nix3 < voxelMatrix.getNX3()) { + if (nix1 >= 0 && nix2 >= 0 && nix3 >= 0 && nix1 < (int)voxelMatrix.getNX1() && nix2 < (int)voxelMatrix.getNX2() && + nix3 < (int)voxelMatrix.getNX3()) { if (UbMath::equal(voxelMatrix(nix1, nix2, nix3), SOLID)) { // return halber abstand der beiden knoten return 0.5 * sqrt((ndx1 * deltaX1) * (ndx1 * deltaX1) + (ndx2 * deltaX2) * (ndx2 * deltaX2) + @@ -183,17 +183,15 @@ double GbVoxelMatrix3D::getIntersectionRaytraceFactor(const double &x1, const do /*=======================================================*/ bool GbVoxelMatrix3D::isPointInGbObject3D(const double &x1p, const double &x2p, const double &x3p) { - // index ermitteln int ix1 = UbMath::integerRounding((x1p - minX1) / deltaX1); int ix2 = UbMath::integerRounding((x2p - minX2) / deltaX2); int ix3 = UbMath::integerRounding((x3p - minX3) / deltaX3); - if (ix1 >= 0 && ix2 >= 0 && ix3 >= 0 && ix1 < voxelMatrix.getNX1() && ix2 < voxelMatrix.getNX2() && - ix3 < voxelMatrix.getNX3()) { + if (ix1 >= 0 && ix2 >= 0 && ix3 >= 0 && ix1 < (int)voxelMatrix.getNX1() && ix2 < (int)voxelMatrix.getNX2() && + ix3 < (int)voxelMatrix.getNX3()) { if (UbMath::equal(voxelMatrix(ix1, ix2, ix3), SOLID)) return true; } - return false; } /*=======================================================*/ diff --git a/src/cpu/VirtualFluidsCore/CoProcessors/MPIIOMigrationCoProcessor.cpp b/src/cpu/VirtualFluidsCore/CoProcessors/MPIIOMigrationCoProcessor.cpp index dea392f99f628f14af8b7107c56210f80ad90066..dc894e9a5056633fdc1e4fb29f391b2f11be7f7f 100644 --- a/src/cpu/VirtualFluidsCore/CoProcessors/MPIIOMigrationCoProcessor.cpp +++ b/src/cpu/VirtualFluidsCore/CoProcessors/MPIIOMigrationCoProcessor.cpp @@ -1779,7 +1779,7 @@ void MPIIOMigrationCoProcessor::readArray(int step, Arrays arrType, std::string size_t nextVectorSize = dataSetParamStr.nx[0] * dataSetParamStr.nx[1] * dataSetParamStr.nx[2] * dataSetParamStr.nx[3]; std::vector<double> vectorsOfValues; - for (int n = 0; n < blocksCount; n++) { + for (std::size_t n = 0; n < blocksCount; n++) { SPtr<Block3D> block = grid->getBlock(dataSetSmallArray[n].globalID); vectorsOfValues.assign(doubleValuesArray.data() + index, doubleValuesArray.data() + index + nextVectorSize);