Skip to content
Snippets Groups Projects
Commit edb48707 authored by Konstantin Kutscher's avatar Konstantin Kutscher
Browse files

fix warnings

parent 0edd1944
No related branches found
No related tags found
2 merge requests!171Newest Update,!83Fix MPICommunicator
......@@ -103,17 +103,6 @@ void CalculateTorqueCoProcessor::calculateForces()
SPtr<ILBMKernel> kernel = block->getKernel();
//if (kernel->getCompressible())
//{
// calcMacrosFct = &D3Q27System::calcCompMacroscopicValues;
// compressibleFactor = 1.0;
//}
//else
//{
// calcMacrosFct = &D3Q27System::calcIncompMacroscopicValues;
// compressibleFactor = 0.0;
//}
SPtr<BCArray3D> bcArray = kernel->getBCProcessor()->getBCArray();
SPtr<DistributionArray3D> distributions = kernel->getDataSet()->getFdistributions();
distributions->swap();
......@@ -151,29 +140,14 @@ void CalculateTorqueCoProcessor::calculateForces()
torqueX1 += ry * Fz - rz * Fy;
torqueX2 += rz * Fx - rx * Fz;
torqueX3 += rx * Fy - ry * Fx;
counter++;
//UBLOG(logINFO, "x1="<<(worldCoordinates[1] - x2Centre)<<",x2=" << (worldCoordinates[2] - x3Centre)<< ",x3=" << (worldCoordinates[0] - x1Centre) <<" forceX3 = " << forceX3);
}
}
//if we have got discretization with more level
// deltaX is LBM deltaX and equal LBM deltaT
//double deltaX = 0.5; // LBMSystem::getDeltaT(block->getLevel()); //grid->getDeltaT(block);
//double deltaXquadrat = deltaX*deltaX;
//torqueX1 *= deltaXquadrat;
//torqueX2 *= deltaXquadrat;
//torqueX3 *= deltaXquadrat;
distributions->swap();
torqueX1global += torqueX1;
torqueX2global += torqueX2;
torqueX3global += torqueX3;
//UBLOG(logINFO, "torqueX1global = " << torqueX1global);
//UBLOG(logINFO, "counter = " << counter);
}
}
std::vector<double> values;
......@@ -182,8 +156,6 @@ void CalculateTorqueCoProcessor::calculateForces()
values.push_back(torqueX2global);
values.push_back(torqueX3global);
//UBLOG(logINFO, "counter = " << counter);
rvalues = comm->gather(values);
if (comm->getProcessID() == comm->getRoot())
{
......@@ -206,9 +178,6 @@ UbTupleDouble3 CalculateTorqueCoProcessor::getForces(int x1, int x2, int x3, SP
LBMReal fs[D3Q27System::ENDF + 1];
distributions->getDistributionInv(fs, x1, x2, x3);
//LBMReal /*rho = 0.0,*/ vx1 = 0.0, vx2 = 0.0, vx3 = 0.0, drho = 0.0;
//calcMacrosFct(fs, drho, vx1, vx2, vx3);
//rho = 1.0 + drho * compressibleFactor;
if(bc)
{
......@@ -226,22 +195,9 @@ UbTupleDouble3 CalculateTorqueCoProcessor::getForces(int x1, int x2, int x3, SP
f = dynamicPointerCast<EsoTwist3D>(distributions)->getDistributionInvForDirection(x1, x2, x3, invDir);
fnbr = dynamicPointerCast<EsoTwist3D>(distributions)->getDistributionInvForDirection(x1+D3Q27System::DX1[invDir], x2+D3Q27System::DX2[invDir], x3+D3Q27System::DX3[invDir], fdir);
// Vector3D boundaryVelocity;
// boundaryVelocity[0] = bc->getBoundaryVelocityX1();
// boundaryVelocity[1] = bc->getBoundaryVelocityX2();
// boundaryVelocity[2] = bc->getBoundaryVelocityX3();
//double correction[3] = { 0.0, 0.0, 0.0 };
// if (bc->hasVelocityBoundaryFlag(fdir))
// {
// const double forceTerm = f - fnbr;
// correction[0] = forceTerm * boundaryVelocity[0];
// correction[1] = forceTerm * boundaryVelocity[1];
// correction[2] = forceTerm * boundaryVelocity[2];
// }
forceX1 += (f + fnbr) * D3Q27System::DX1[invDir];// - 2.0 * D3Q27System::WEIGTH[invDir] * rho - correction[0];
forceX2 += (f + fnbr) * D3Q27System::DX2[invDir];// - 2.0 * D3Q27System::WEIGTH[invDir] * rho - correction[1];
forceX3 += (f + fnbr) * D3Q27System::DX3[invDir];// - 2.0 * D3Q27System::WEIGTH[invDir] * rho - correction[2];
forceX1 += (f + fnbr) * D3Q27System::DX1[invDir];
forceX2 += (f + fnbr) * D3Q27System::DX2[invDir];
forceX3 += (f + fnbr) * D3Q27System::DX3[invDir];
}
}
}
......
......@@ -43,10 +43,6 @@ private:
double torqueX1global;
double torqueX2global;
double torqueX3global;
typedef void(*CalcMacrosFct)(const LBMReal* const& /*f[27]*/, LBMReal& /*rho*/, LBMReal& /*vx1*/, LBMReal& /*vx2*/, LBMReal& /*vx3*/);
CalcMacrosFct calcMacrosFct;
LBMReal compressibleFactor;
};
......
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