From e7e69712965faaed705545673e1200ed97e89b8e Mon Sep 17 00:00:00 2001 From: iasonmanolas Date: Thu, 3 Jun 2021 12:29:19 +0300 Subject: [PATCH] Changed the magnitude of the simulation scenarios --- src/reducedmodeloptimizer.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/reducedmodeloptimizer.cpp b/src/reducedmodeloptimizer.cpp index a9d64d9..737c487 100644 --- a/src/reducedmodeloptimizer.cpp +++ b/src/reducedmodeloptimizer.cpp @@ -237,7 +237,8 @@ double ReducedModelOptimizer::objective(long n, const double *x) { } #ifdef POLYSCOPE_DEFINED ++global.numberOfFunctionCalls; - if (global.numberOfFunctionCalls % 1000 == 0) { + if (global.numberOfFunctionCalls % (global.optimizationSettings.numberOfFunctionCalls / 100) + == 0) { std::cout << "Number of function calls:" << global.numberOfFunctionCalls << std::endl; } #endif @@ -1058,7 +1059,7 @@ double ReducedModelOptimizer::getFullPatternMaxSimulationForce(const BaseSimulat const double optimizationEpsilon = 1e-1; switch (scenario) { case Axial: - global.desiredMaxDisplacementValue = 0.04 + global.desiredMaxDisplacementValue = 0.03 * vcg::Distance(global.baseTriangle.cP(0), (global.baseTriangle.cP(1) + global.baseTriangle.cP(2)) @@ -1086,7 +1087,7 @@ double ReducedModelOptimizer::getFullPatternMaxSimulationForce(const BaseSimulat optimizationEpsilon); break; case Bending: - global.desiredMaxDisplacementValue = 0.05 + global.desiredMaxDisplacementValue = 0.1 * vcg::Distance(global.baseTriangle.cP(0), (global.baseTriangle.cP(1) + global.baseTriangle.cP(2)) @@ -1100,7 +1101,7 @@ double ReducedModelOptimizer::getFullPatternMaxSimulationForce(const BaseSimulat optimizationEpsilon); break; case Dome: - global.desiredMaxRotationAngle = vcg::math::ToRad(20.0); + global.desiredMaxRotationAngle = vcg::math::ToRad(35.0); global.constructScenarioFunction = &ReducedModelOptimizer::constructDomeSimulationScenario; global.interfaceViForComputingScenarioError = global.fullPatternInterfaceViPairs[1].first; dlib::find_min_single_variable( @@ -1115,7 +1116,7 @@ double ReducedModelOptimizer::getFullPatternMaxSimulationForce(const BaseSimulat break; case Saddle: // global.desiredMaxDisplacementValue *= 2; - global.desiredMaxDisplacementValue = 0.05 + global.desiredMaxDisplacementValue = 0.1 * vcg::Distance(global.baseTriangle.cP(0), (global.baseTriangle.cP(1) + global.baseTriangle.cP(2)) @@ -1409,7 +1410,6 @@ void ReducedModelOptimizer::optimize( simulationSettings.shouldDraw = false; #ifdef POLYSCOPE_DEFINED const bool drawFullPatternSimulationResults = false; - ; if (drawFullPatternSimulationResults) { global.fullPatternSimulationJobs[0]->pMesh->registerForDrawing( ReducedPatternOptimization::Colors::fullInitial);