Changed the magnitude of the simulation scenarios
This commit is contained in:
parent
03c7d63e5b
commit
e7e6971296
|
@ -237,7 +237,8 @@ double ReducedModelOptimizer::objective(long n, const double *x) {
|
||||||
}
|
}
|
||||||
#ifdef POLYSCOPE_DEFINED
|
#ifdef POLYSCOPE_DEFINED
|
||||||
++global.numberOfFunctionCalls;
|
++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;
|
std::cout << "Number of function calls:" << global.numberOfFunctionCalls << std::endl;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
@ -1058,7 +1059,7 @@ double ReducedModelOptimizer::getFullPatternMaxSimulationForce(const BaseSimulat
|
||||||
const double optimizationEpsilon = 1e-1;
|
const double optimizationEpsilon = 1e-1;
|
||||||
switch (scenario) {
|
switch (scenario) {
|
||||||
case Axial:
|
case Axial:
|
||||||
global.desiredMaxDisplacementValue = 0.04
|
global.desiredMaxDisplacementValue = 0.03
|
||||||
* vcg::Distance(global.baseTriangle.cP(0),
|
* vcg::Distance(global.baseTriangle.cP(0),
|
||||||
(global.baseTriangle.cP(1)
|
(global.baseTriangle.cP(1)
|
||||||
+ global.baseTriangle.cP(2))
|
+ global.baseTriangle.cP(2))
|
||||||
|
@ -1086,7 +1087,7 @@ double ReducedModelOptimizer::getFullPatternMaxSimulationForce(const BaseSimulat
|
||||||
optimizationEpsilon);
|
optimizationEpsilon);
|
||||||
break;
|
break;
|
||||||
case Bending:
|
case Bending:
|
||||||
global.desiredMaxDisplacementValue = 0.05
|
global.desiredMaxDisplacementValue = 0.1
|
||||||
* vcg::Distance(global.baseTriangle.cP(0),
|
* vcg::Distance(global.baseTriangle.cP(0),
|
||||||
(global.baseTriangle.cP(1)
|
(global.baseTriangle.cP(1)
|
||||||
+ global.baseTriangle.cP(2))
|
+ global.baseTriangle.cP(2))
|
||||||
|
@ -1100,7 +1101,7 @@ double ReducedModelOptimizer::getFullPatternMaxSimulationForce(const BaseSimulat
|
||||||
optimizationEpsilon);
|
optimizationEpsilon);
|
||||||
break;
|
break;
|
||||||
case Dome:
|
case Dome:
|
||||||
global.desiredMaxRotationAngle = vcg::math::ToRad(20.0);
|
global.desiredMaxRotationAngle = vcg::math::ToRad(35.0);
|
||||||
global.constructScenarioFunction = &ReducedModelOptimizer::constructDomeSimulationScenario;
|
global.constructScenarioFunction = &ReducedModelOptimizer::constructDomeSimulationScenario;
|
||||||
global.interfaceViForComputingScenarioError = global.fullPatternInterfaceViPairs[1].first;
|
global.interfaceViForComputingScenarioError = global.fullPatternInterfaceViPairs[1].first;
|
||||||
dlib::find_min_single_variable(
|
dlib::find_min_single_variable(
|
||||||
|
@ -1115,7 +1116,7 @@ double ReducedModelOptimizer::getFullPatternMaxSimulationForce(const BaseSimulat
|
||||||
break;
|
break;
|
||||||
case Saddle:
|
case Saddle:
|
||||||
// global.desiredMaxDisplacementValue *= 2;
|
// global.desiredMaxDisplacementValue *= 2;
|
||||||
global.desiredMaxDisplacementValue = 0.05
|
global.desiredMaxDisplacementValue = 0.1
|
||||||
* vcg::Distance(global.baseTriangle.cP(0),
|
* vcg::Distance(global.baseTriangle.cP(0),
|
||||||
(global.baseTriangle.cP(1)
|
(global.baseTriangle.cP(1)
|
||||||
+ global.baseTriangle.cP(2))
|
+ global.baseTriangle.cP(2))
|
||||||
|
@ -1409,7 +1410,6 @@ void ReducedModelOptimizer::optimize(
|
||||||
simulationSettings.shouldDraw = false;
|
simulationSettings.shouldDraw = false;
|
||||||
#ifdef POLYSCOPE_DEFINED
|
#ifdef POLYSCOPE_DEFINED
|
||||||
const bool drawFullPatternSimulationResults = false;
|
const bool drawFullPatternSimulationResults = false;
|
||||||
;
|
|
||||||
if (drawFullPatternSimulationResults) {
|
if (drawFullPatternSimulationResults) {
|
||||||
global.fullPatternSimulationJobs[0]->pMesh->registerForDrawing(
|
global.fullPatternSimulationJobs[0]->pMesh->registerForDrawing(
|
||||||
ReducedPatternOptimization::Colors::fullInitial);
|
ReducedPatternOptimization::Colors::fullInitial);
|
||||||
|
|
Loading…
Reference in New Issue