From 55ab5d568518a51914d0f4b2f76c86ac1e88897e Mon Sep 17 00:00:00 2001 From: Konstantin Kutscher <kutscher@irmb.tu-bs.de> Date: Tue, 16 Oct 2018 11:11:49 +0200 Subject: [PATCH] changes spheres intersection toleranz in CreateDemObjectsCoProcessor to 99% of diameter --- source/Applications/Thermoplast/config.txt | 10 +++++----- source/DemCoupling/CreateDemObjectsCoProcessor.cpp | 2 +- source/DemCoupling/DemCoProcessor.cpp | 2 +- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/source/Applications/Thermoplast/config.txt b/source/Applications/Thermoplast/config.txt index a8778ae13..47c3af05f 100644 --- a/source/Applications/Thermoplast/config.txt +++ b/source/Applications/Thermoplast/config.txt @@ -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 diff --git a/source/DemCoupling/CreateDemObjectsCoProcessor.cpp b/source/DemCoupling/CreateDemObjectsCoProcessor.cpp index b60c6f226..1aa6f66fa 100644 --- a/source/DemCoupling/CreateDemObjectsCoProcessor.cpp +++ b/source/DemCoupling/CreateDemObjectsCoProcessor.cpp @@ -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; } diff --git a/source/DemCoupling/DemCoProcessor.cpp b/source/DemCoupling/DemCoProcessor.cpp index a7f5a8f68..1033180a4 100644 --- a/source/DemCoupling/DemCoProcessor.cpp +++ b/source/DemCoupling/DemCoProcessor.cpp @@ -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; -- GitLab