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

adds spheres intersection toleranz parameter in CreateDemObjectsCoProcessor

parent ad2b6241
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 ...@@ -9,8 +9,8 @@ boundingBox = 60 1370 130 190 1530 320 #test bb
blocknx = 10 10 10 blocknx = 10 10 10
#blocknx = 300 420 320 #blocknx = 300 420 320
endTime = 2000 endTime = 3000
outTime = 2000 outTime = 3000
availMem = 25e9 availMem = 25e9
uLB = 0.1 uLB = 0.1
...@@ -36,9 +36,9 @@ pathOut = g:/temp/thermoplast2 ...@@ -36,9 +36,9 @@ pathOut = g:/temp/thermoplast2
logToFile = false logToFile = false
#restart #restart
cpStart = 2000 cpStart = 3000
cpStep = 2000 cpStep = 3000
restart = true restart = true
restartStep = 1000 restartStep = 2000
nupsTime = 10 10 1000000 nupsTime = 10 10 1000000
\ No newline at end of file
...@@ -516,7 +516,7 @@ void thermoplast(string configname) ...@@ -516,7 +516,7 @@ void thermoplast(string configname)
////generating spheres ////generating spheres
//UBLOG(logINFO, "generating spheres - start, rank="<<myid); //UBLOG(logINFO, "generating spheres - start, rank="<<myid);
SPtr<UbScheduler> sphereScheduler(new UbScheduler(sphereTime/*10,10,10*/)); SPtr<UbScheduler> sphereScheduler(new UbScheduler(sphereTime/*10,10,10*/));
SPtr<CreateDemObjectsCoProcessor> createSphereCoProcessor(new CreateDemObjectsCoProcessor(grid, sphereScheduler, comm, demCoProcessor, sphereMaterial)); SPtr<CreateDemObjectsCoProcessor> createSphereCoProcessor(new CreateDemObjectsCoProcessor(grid, sphereScheduler, comm, demCoProcessor, sphereMaterial, 0.03));
//UBLOG(logINFO, "generating spheres - stop, rank="<<myid); //UBLOG(logINFO, "generating spheres - stop, rank="<<myid);
////restart ////restart
......
...@@ -20,11 +20,12 @@ ...@@ -20,11 +20,12 @@
CreateDemObjectsCoProcessor::CreateDemObjectsCoProcessor(SPtr<Grid3D> grid, SPtr<UbScheduler> s, std::shared_ptr<Communicator> comm, SPtr<DemCoProcessor> demCoProcessor, SPtr<PhysicsEngineMaterialAdapter> demObjectMaterial) : CreateDemObjectsCoProcessor::CreateDemObjectsCoProcessor(SPtr<Grid3D> grid, SPtr<UbScheduler> s, std::shared_ptr<Communicator> comm, SPtr<DemCoProcessor> demCoProcessor, SPtr<PhysicsEngineMaterialAdapter> demObjectMaterial, double toleranz) :
CoProcessor(grid, s), CoProcessor(grid, s),
comm(comm), comm(comm),
demCoProcessor(demCoProcessor), demCoProcessor(demCoProcessor),
demObjectMaterial(demObjectMaterial) demObjectMaterial(demObjectMaterial),
toleranz(toleranz)
{ {
mu::Parser fct; mu::Parser fct;
fct.SetExpr("U"); fct.SetExpr("U");
...@@ -91,7 +92,7 @@ void CreateDemObjectsCoProcessor::createGeoObjects() ...@@ -91,7 +92,7 @@ void CreateDemObjectsCoProcessor::createGeoObjects()
for (int i = 0; i < size; i++) for (int i = 0; i < size; i++)
{ {
SPtr<GbSphere3D> sphere = std::dynamic_pointer_cast<GbSphere3D>(geoObjectPrototypeVector[i]); SPtr<GbSphere3D> sphere = std::dynamic_pointer_cast<GbSphere3D>(geoObjectPrototypeVector[i]);
if (demCoProcessor->isSpheresIntersection(sphere->getX1Centroid(), sphere->getX2Centroid(), sphere->getX3Centroid(), sphere->getRadius()*2.0*0.99)) if (demCoProcessor->isSpheresIntersection(sphere->getX1Centroid(), sphere->getX2Centroid(), sphere->getX3Centroid(), sphere->getRadius()*2.0*(1.0-toleranz)))
{ {
continue; continue;
} }
......
...@@ -27,7 +27,7 @@ class PhysicsEngineMaterialAdapter; ...@@ -27,7 +27,7 @@ class PhysicsEngineMaterialAdapter;
class CreateDemObjectsCoProcessor : public CoProcessor class CreateDemObjectsCoProcessor : public CoProcessor
{ {
public: public:
CreateDemObjectsCoProcessor(SPtr<Grid3D> grid, SPtr<UbScheduler> s, std::shared_ptr<Communicator> comm, SPtr<DemCoProcessor> demCoProcessor, SPtr<PhysicsEngineMaterialAdapter> geoObjectMaterial); CreateDemObjectsCoProcessor(SPtr<Grid3D> grid, SPtr<UbScheduler> s, std::shared_ptr<Communicator> comm, SPtr<DemCoProcessor> demCoProcessor, SPtr<PhysicsEngineMaterialAdapter> geoObjectMaterial, double toleranz = 0);
void process(double step) override; void process(double step) override;
void addGeoObject(SPtr<GbObject3D> geoObjectPrototype, Vector3D initalVelocity); void addGeoObject(SPtr<GbObject3D> geoObjectPrototype, Vector3D initalVelocity);
void clearGeoObjects(); void clearGeoObjects();
...@@ -42,6 +42,7 @@ private: ...@@ -42,6 +42,7 @@ private:
SPtr<BCAdapter> velocityBcParticleAdapter; SPtr<BCAdapter> velocityBcParticleAdapter;
SPtr<Reconstructor> extrapolationReconstructor; SPtr<Reconstructor> extrapolationReconstructor;
int demCounter; int demCounter;
double toleranz;
#ifdef TIMING #ifdef TIMING
UbTimer timer; UbTimer timer;
#endif #endif
......
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