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

changes spheres intersection toleranz in CreateDemObjectsCoProcessor to 99% of diameter

parent 490c4717
No related branches found
No related tags found
No related merge requests found
......@@ -9,8 +9,8 @@ boundingBox = 60 1370 130 190 1530 320 #test bb
blocknx = 10 10 10
#blocknx = 300 420 320
endTime = 1000
outTime = 1000
endTime = 2000
outTime = 2000
availMem = 25e9
uLB = 0.1
......@@ -36,9 +36,9 @@ pathOut = g:/temp/thermoplast2
logToFile = false
#restart
cpStart = 1000
cpStep = 1000
cpStart = 2000
cpStep = 2000
restart = true
restartStep = 20
restartStep = 1000
nupsTime = 10 10 1000000
\ No newline at end of file
......@@ -91,7 +91,7 @@ void CreateDemObjectsCoProcessor::createGeoObjects()
for (int i = 0; i < size; i++)
{
SPtr<GbSphere3D> sphere = std::dynamic_pointer_cast<GbSphere3D>(geoObjectPrototypeVector[i]);
if (demCoProcessor->isSpheresIntersection(sphere->getX1Centroid(), sphere->getX2Centroid(), sphere->getX3Centroid(), sphere->getRadius()*2.0))
if (demCoProcessor->isSpheresIntersection(sphere->getX1Centroid(), sphere->getX2Centroid(), sphere->getX3Centroid(), sphere->getRadius()*2.0*0.99))
{
continue;
}
......
......@@ -427,7 +427,7 @@ bool DemCoProcessor::isSpheresIntersection(double centerX1, double centerX2, dou
if (std::dynamic_pointer_cast<PePhysicsEngineGeometryAdapter>(physicsEngineGeometrieAdapters[i])->isActive())
{
SPtr<GbObject3D> sphere = interactors[i]->getGbObject3D();
result = result || (sqrt(pow(sphere->getX1Centroid()-centerX1, 2)+pow(sphere->getX2Centroid()-centerX2, 2)+pow(sphere->getX3Centroid()-centerX3, 2)) < d);
result = result || (sqrt(pow(sphere->getX1Centroid()-centerX1, 2.0)+pow(sphere->getX2Centroid()-centerX2, 2.0)+pow(sphere->getX3Centroid()-centerX3, 2.0)) <= d);
}
}
std::vector<int> values;
......
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