Skip to content
Snippets Groups Projects
Commit 91d7d88a authored by peters's avatar peters
Browse files

Remove additional gnu compiler warnings.

parent 10314496
No related branches found
No related tags found
No related merge requests found
Showing
with 70 additions and 53 deletions
......@@ -211,8 +211,10 @@ public:
os<<std::endl;
}
os<<"pool"<<std::endl;
for(size_type i=0; i<cbPool.pool.size(); i++)
os<<cbPool.pool[i]<<","; os<<std::endl;
for(size_type i=0; i<cbPool.pool.size(); i++) {
os<<cbPool.pool[i]<<",";
os<<std::endl;
}
return os;
}
......
......@@ -660,12 +660,17 @@ std::string WbWriterAvsASCII::writeTrianglesWithNodeData(const std::string& file
for(int i=0;i<nofNodeData;i++) out.write((char*)&fdummy,sizeof(float)); //max Wert pro Datentyp
//daten ins file schreiben
for(int d=0; d<nofNodeData; ++d)
for(int d=0; d<nofNodeData; ++d){
for(int n=0; n<(int)nodedata[d].size(); n++)
{ fdummy=(float)nodedata[d][n]; out.write((char*)&fdummy,sizeof(float)); }
{
fdummy=(float)nodedata[d][n];
out.write((char*)&fdummy,sizeof(float));
}
}
fdummy = 1.;
for(int i=0;i<nofNodeData;i++) out.write((char*)&fdummy,sizeof(float)); //max Wert pro Datentyp
for(int i=0;i<nofNodeData;i++)
out.write((char*)&fdummy,sizeof(float)); //max Wert pro Datentyp
out.close();
UBLOG(logDEBUG1,"WbWriterAvsASCII::writeTrianglesWithNodeData to "<<avsfilename<<" - end");
......
......@@ -153,7 +153,10 @@ void GbCylinder3D::finalize()
/*=======================================================*/
double GbCylinder3D::getHeight()
{
if(mLine) return mLine->getLength(); return 0.0;
if(mLine)
return mLine->getLength();
return 0.0;
}
/*=======================================================*/
GbPoint3D* GbCylinder3D::getPoint1()
......@@ -453,7 +456,7 @@ GbLine3D* GbCylinder3D::createClippedLine3D(GbPoint3D& point1, GbPoint3D& point2
double x1a,y1a,z1a,x1b,y1b,z1b, //uebergebene Strecke
x2a,y2a,x2b,y2b, //erste "Kreisstrecke"
x3a,y3a,x3b,y3b, //zweite "Kreisstrecke"
y2m,z2m,y3m,z3m;
y2m,/*z2m,*/y3m,z3m;
double nenner1ab;
if(this->isParallelToX1Axis())
......@@ -467,7 +470,7 @@ GbLine3D* GbCylinder3D::createClippedLine3D(GbPoint3D& point1, GbPoint3D& point2
x2a=mLine->getPoint1()->getX1Coordinate();
y2m=mLine->getPoint1()->getX2Coordinate();
z2m=mLine->getPoint1()->getX3Coordinate();
// z2m=mLine->getPoint1()->getX3Coordinate();
y2a=y2m+mRad;
x2b=mLine->getPoint1()->getX1Coordinate();
y2b=y2m-mRad;
......@@ -490,7 +493,7 @@ GbLine3D* GbCylinder3D::createClippedLine3D(GbPoint3D& point1, GbPoint3D& point2
x2a=mLine->getPoint1()->getX2Coordinate();
y2m=mLine->getPoint1()->getX3Coordinate();
z2m=mLine->getPoint1()->getX1Coordinate();
// z2m=mLine->getPoint1()->getX1Coordinate();
y2a=y2m+mRad;
x2b=mLine->getPoint1()->getX2Coordinate();
y2b=y2m-mRad;
......@@ -513,7 +516,7 @@ GbLine3D* GbCylinder3D::createClippedLine3D(GbPoint3D& point1, GbPoint3D& point2
x2a=mLine->getPoint1()->getX3Coordinate();
y2m=mLine->getPoint1()->getX2Coordinate();
z2m=mLine->getPoint1()->getX1Coordinate();
// z2m=mLine->getPoint1()->getX1Coordinate();
y2a=y2m+mRad;
x2b=mLine->getPoint1()->getX3Coordinate();
y2b=y2m-mRad;
......
......@@ -32,15 +32,14 @@ void EqDensityBCAlgorithm::applyBC()
int nx1 = x1;
int nx2 = x2;
int nx3 = x3;
int direction = -1;
//flag points in direction of fluid
if (bcPtr->hasDensityBoundaryFlag(D3Q27System::E)) { nx1 -= 1; direction = D3Q27System::E; }
else if (bcPtr->hasDensityBoundaryFlag(D3Q27System::W)) { nx1 += 1; direction = D3Q27System::W; }
else if (bcPtr->hasDensityBoundaryFlag(D3Q27System::N)) { nx2 -= 1; direction = D3Q27System::N; }
else if (bcPtr->hasDensityBoundaryFlag(D3Q27System::S)) { nx2 += 1; direction = D3Q27System::S; }
else if (bcPtr->hasDensityBoundaryFlag(D3Q27System::T)) { nx3 -= 1; direction = D3Q27System::T; }
else if (bcPtr->hasDensityBoundaryFlag(D3Q27System::B)) { nx3 += 1; direction = D3Q27System::B; }
if (bcPtr->hasDensityBoundaryFlag(D3Q27System::E)) { nx1 -= 1;}
else if (bcPtr->hasDensityBoundaryFlag(D3Q27System::W)) { nx1 += 1;}
else if (bcPtr->hasDensityBoundaryFlag(D3Q27System::N)) { nx2 -= 1;}
else if (bcPtr->hasDensityBoundaryFlag(D3Q27System::S)) { nx2 += 1;}
else if (bcPtr->hasDensityBoundaryFlag(D3Q27System::T)) { nx3 -= 1;}
else if (bcPtr->hasDensityBoundaryFlag(D3Q27System::B)) { nx3 += 1;}
else UB_THROW(UbException(UB_EXARGS, "Danger...no orthogonal BC-Flag on density boundary..."));
LBMReal rho, vx1, vx2, vx3;
......
......@@ -31,15 +31,14 @@ void NonEqDensityBCAlgorithm::applyBC()
int nx1 = x1;
int nx2 = x2;
int nx3 = x3;
int direction = -1;
//flag points in direction of fluid
if (bcPtr->hasDensityBoundaryFlag(D3Q27System::E)) { nx1 -= 1; direction = D3Q27System::E; }
else if (bcPtr->hasDensityBoundaryFlag(D3Q27System::W)) { nx1 += 1; direction = D3Q27System::W; }
else if (bcPtr->hasDensityBoundaryFlag(D3Q27System::N)) { nx2 -= 1; direction = D3Q27System::N; }
else if (bcPtr->hasDensityBoundaryFlag(D3Q27System::S)) { nx2 += 1; direction = D3Q27System::S; }
else if (bcPtr->hasDensityBoundaryFlag(D3Q27System::T)) { nx3 -= 1; direction = D3Q27System::T; }
else if (bcPtr->hasDensityBoundaryFlag(D3Q27System::B)) { nx3 += 1; direction = D3Q27System::B; }
if (bcPtr->hasDensityBoundaryFlag(D3Q27System::E)) { nx1 -= 1;}
else if (bcPtr->hasDensityBoundaryFlag(D3Q27System::W)) { nx1 += 1;}
else if (bcPtr->hasDensityBoundaryFlag(D3Q27System::N)) { nx2 -= 1;}
else if (bcPtr->hasDensityBoundaryFlag(D3Q27System::S)) { nx2 += 1;}
else if (bcPtr->hasDensityBoundaryFlag(D3Q27System::T)) { nx3 -= 1;}
else if (bcPtr->hasDensityBoundaryFlag(D3Q27System::B)) { nx3 += 1;}
else return; //UB_THROW(UbException(UB_EXARGS, "Danger...no orthogonal BC-Flag on density boundary..."));
LBMReal rho, vx1, vx2, vx3;
......
......@@ -234,9 +234,10 @@ void MPIIOCoProcessor::writeBlocks(int step)
void MPIIOCoProcessor::readBlocks(int step)
{
int rank, size;
int rank;
// int size;
MPI_Comm_rank(MPI_COMM_WORLD, &rank);
size = 1;
// size = 1;
if (comm->isRoot())
{
UBLOG(logINFO, "MPIIOCoProcessor::readBlocks start MPI IO rank = " << rank);
......
......@@ -241,8 +241,9 @@ void QCriterionCoProcessor::getNeighborVelocities(int offx, int offy, int offz,
int rankSelf= block->getRank();
// FIXME: logical not is only applied to the left hand side of this comparison
if (!(offx+offy+offz)==1) throw UbException(UB_EXARGS,"getNeighborVelocities called for diagonal directions!");
if (!(offx+offy+offz)==1) // FIXME: logical not is only applied to the left hand side of this comparison
throw UbException(UB_EXARGS,"getNeighborVelocities called for diagonal directions!");
//////get neighbor nodes, if existent
if ((ix1==0 && offx==1) || (ix2==0 && offy==1) || (ix3==0 && offz==1))
{
......
......@@ -69,7 +69,7 @@ void BasicCalculator::calculate()
int maxInitLevel = maxLevel - minLevel;
int straightStartLevel = minInitLevel;
int internalIterations = 1 << (maxInitLevel - minInitLevel);
int forwardStartLevel;
// int forwardStartLevel;
int threshold;
#ifdef TIMING
......@@ -87,7 +87,7 @@ void BasicCalculator::calculate()
for (int staggeredStep = 1; staggeredStep <= internalIterations; staggeredStep++)
{
forwardStartLevel = straightStartLevel;
// forwardStartLevel = straightStartLevel;
if (staggeredStep == internalIterations) straightStartLevel = minInitLevel;
else
{
......
......@@ -228,11 +228,11 @@ void D3Q27TriFaceMeshInteractor::setQs(const double& timeStep)
//bounding cubes des TriFaceMesh ermitteln (pro level)
//////////////////////////////////////////////////////////////////////////
//min/max Werte des Dreiecksnetzes holen
double geoMinX1(0.0), geoMinX2(0.0), geoMinX3(0.0), geoMaxX1(0.0), geoMaxX2(0.0), geoMaxX3(0.0);
// double geoMinX1(0.0), geoMinX2(0.0), geoMinX3(0.0), geoMaxX1(0.0), geoMaxX2(0.0), geoMaxX3(0.0);
geoMinX1 = this->geoObject3D->getX1Minimum(); geoMaxX1 = this->geoObject3D->getX1Maximum();
geoMinX2 = this->geoObject3D->getX2Minimum(); geoMaxX2 = this->geoObject3D->getX2Maximum();
geoMinX3 = this->geoObject3D->getX3Minimum(); geoMaxX3 = this->geoObject3D->getX3Maximum();
// geoMinX1 = this->geoObject3D->getX1Minimum(); geoMaxX1 = this->geoObject3D->getX1Maximum();
// geoMinX2 = this->geoObject3D->getX2Minimum(); geoMaxX2 = this->geoObject3D->getX2Maximum();
// geoMinX3 = this->geoObject3D->getX3Minimum(); geoMaxX3 = this->geoObject3D->getX3Maximum();
//////////////////////////////////////////////////////////////////////////
......@@ -720,7 +720,7 @@ void D3Q27TriFaceMeshInteractor::initInteractor2(const double& timeStep)
UbTimer setQTimer; setQTimer.start();
UBLOG(logDEBUG3, " - setQs for "<<(int)triangles.size()<<" triangles");
bool solidFromOtherInteractor = false;
// bool solidFromOtherInteractor = false;
float blockMinX[3],blockMaxX[3],boxCenter[3],halfBoxSize[3];
for(size_t t=0; t<triangles.size(); t++)
......@@ -872,12 +872,12 @@ void D3Q27TriFaceMeshInteractor::initInteractor2(const double& timeStep)
//dieser nun uebersprungen wird, dann hat man spaeter beim fuellalgorithmus luecken
//in der front und der block wird u.U. faelschlicher weise komplett solid markiert
//Lsg: positionen merken und erst Nach dem fuellarlgo wieder auf not active setzen :-)
solidFromOtherInteractor = false;
// solidFromOtherInteractor = false;
if(bcMatrix->isSolid(ix1,ix2,ix3))
{
if(this->reinitWithStoredQsFlag)
{
solidFromOtherInteractor = true; //hier muss man weitermachen
//solidFromOtherInteractor = true; //hier muss man weitermachen
//SG //oje
std::vector<int> p(3);
p[0]=ix1; p[1]=ix2; p[2]=ix3;
......@@ -890,7 +890,7 @@ void D3Q27TriFaceMeshInteractor::initInteractor2(const double& timeStep)
p[0]=ix1; p[1]=ix2; p[2]=ix3;
solidsFromOtherInteractors.insert(p);
//SG continue;
solidFromOtherInteractor = true;
//solidFromOtherInteractor = true;
}
}
......
......@@ -19,8 +19,10 @@ void CheckRatioBlockVisitor::visit(SPtr<Grid3D> grid, SPtr<Block3D> block)
ix3 = block->getX3();
level = block->getLevel();
int nix1, nix2, nix3, nlev;
int neighix1, neighix2, neighix3, neighlev;
// int nix1, nix2, nix3;
int nlev;
// int neighix1, neighix2, neighix3,
int neighlev;
std::vector<SPtr<Block3D>> neighbors;
grid->getAllNeighbors(ix1, ix2, ix3, level, this->levelDepth, neighbors);
// bool hasAdded = false;
......@@ -29,13 +31,13 @@ void CheckRatioBlockVisitor::visit(SPtr<Grid3D> grid, SPtr<Block3D> block)
if ((neighbors[i]->isActive()||includeNotActiveBlocks)
&&neighbors[i]->getLevel()>level)
{
neighix1 = neighbors[i]->getX1();
neighix2 = neighbors[i]->getX2();
neighix3 = neighbors[i]->getX3();
// neighix1 = neighbors[i]->getX1();
// neighix2 = neighbors[i]->getX2();
// neighix3 = neighbors[i]->getX3();
neighlev = neighbors[i]->getLevel();
nix1 = neighix1>>1;
nix2 = neighix2>>1;
nix3 = neighix3>>1;
// nix1 = neighix1>>1;
// nix2 = neighix2>>1;
// nix3 = neighix3>>1;
nlev = neighlev-1;
if (nlev!=level)
......
......@@ -22,7 +22,7 @@ void OverlapBlockVisitor::visit(SPtr<Grid3D> grid, SPtr<Block3D> block)
int neighix1, neighix2, neighix3, neighlev;
std::vector<SPtr<Block3D>> neighbors;
grid->getAllNeighbors(ix1, ix2, ix3, level, this->levelDepth, neighbors);
bool hasAdded = false;
// bool hasAdded = false;
for(size_t i=0; i<neighbors.size(); i++)
{
if( ( neighbors[i]->isActive() || includeNotActiveBlocks )
......@@ -47,7 +47,7 @@ void OverlapBlockVisitor::visit(SPtr<Grid3D> grid, SPtr<Block3D> block)
{
newBlock = SPtr<Block3D>(new Block3D(nix1,nix2,nix3,nlev));
grid->addBlock(newBlock);
hasAdded=true;
// hasAdded=true;
}
}
}
......
......@@ -654,14 +654,19 @@ void SetUndefinedNodesBlockVisitor::visit(SPtr<Grid3D> grid, SPtr<Block3D> block
maxX2 = static_cast<int>(bcMatrix->getNX2())-1-gl;
maxX3 = static_cast<int>(bcMatrix->getNX3())-1-gl;
for (int ix3=minX3; ix3<=maxX3; ix3++)
for (int ix2=minX2; ix2<=maxX2; ix2++)
for (int ix3=minX3; ix3<=maxX3; ix3++) {
for (int ix2=minX2; ix2<=maxX2; ix2++) {
for (int ix1=minX1; ix1<=maxX1; ix1++)
{
if(bcMatrix->isUndefined(ix1, ix2, ix3)) bcMatrix->setFluid(ix1, ix2, ix3);
else bcMatrix->setUndefined(ix1, ix2, ix3);
if(bcMatrix->isUndefined(ix1, ix2, ix3))
bcMatrix->setFluid(ix1, ix2, ix3);
else
bcMatrix->setUndefined(ix1, ix2, ix3);
}
return;
}
}
return;
}
}
......
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