Skip to content
Snippets Groups Projects
Commit 50b4ce3f authored by Soeren Peters's avatar Soeren Peters
Browse files

Eliminate more type mismatch warnings.

parent 73c1723f
No related branches found
No related tags found
1 merge request!20Remove all warnings in VirtualFluids CPU (Closes #6, #7)
......@@ -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);
}
......
......@@ -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;
}
/*=======================================================*/
......
......@@ -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);
......
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