Windows refactoring
This commit is contained in:
parent
795257d53e
commit
3cd5bcf13d
|
|
@ -15,7 +15,13 @@ else()
|
||||||
set(UPDATE_DISCONNECTED_IF_AVAILABLE "UPDATE_DISCONNECTED 1")
|
set(UPDATE_DISCONNECTED_IF_AVAILABLE "UPDATE_DISCONNECTED 1")
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
set(EXTERNAL_DEPS_DIR "/home/iason/Coding/build/external dependencies")
|
|
||||||
|
if(NOT CMAKE_BUILD_TYPE)
|
||||||
|
set(CMAKE_BUILD_TYPE "RelWithDebInfo")
|
||||||
|
set(EXTERNAL_DEPS_DIR "C:/Users/iason/Downloads/ReducedModelOptimization/build/externalDependencies/")
|
||||||
|
else()
|
||||||
|
set(EXTERNAL_DEPS_DIR "/home/iason/Coding/build/external dependencies/")
|
||||||
|
endif()
|
||||||
##Create directory for the external libraries
|
##Create directory for the external libraries
|
||||||
file(MAKE_DIRECTORY ${EXTERNAL_DEPS_DIR})
|
file(MAKE_DIRECTORY ${EXTERNAL_DEPS_DIR})
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -69,7 +69,7 @@ int main(int argc, char *argv[]) {
|
||||||
const std::string optimizationResultsDirectory = input_resultDirectoryDefined
|
const std::string optimizationResultsDirectory = input_resultDirectoryDefined
|
||||||
? argv[5]
|
? argv[5]
|
||||||
: std::filesystem::current_path().append(
|
: std::filesystem::current_path().append(
|
||||||
"OptimizationResults");
|
"OptimizationResults").string();
|
||||||
std::string resultsOutputDir;
|
std::string resultsOutputDir;
|
||||||
bool optimizationResultFolderExists = false;
|
bool optimizationResultFolderExists = false;
|
||||||
const std::filesystem::path crashedJobsDirPath(std::filesystem::path(optimizationResultsDirectory)
|
const std::filesystem::path crashedJobsDirPath(std::filesystem::path(optimizationResultsDirectory)
|
||||||
|
|
|
||||||
|
|
@ -1055,10 +1055,10 @@ double ReducedModelOptimizer::getFullPatternMaxSimulationForce(const BaseSimulat
|
||||||
(global.baseTriangle.cP(1)
|
(global.baseTriangle.cP(1)
|
||||||
+ global.baseTriangle.cP(2))
|
+ global.baseTriangle.cP(2))
|
||||||
/ 2);
|
/ 2);
|
||||||
const double optimizationEpsilon = 1e-2;
|
const double optimizationEpsilon = 1e-1;
|
||||||
switch (scenario) {
|
switch (scenario) {
|
||||||
case Axial:
|
case Axial:
|
||||||
global.desiredMaxDisplacementValue = 0.042
|
global.desiredMaxDisplacementValue = 0.04
|
||||||
* 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))
|
||||||
|
|
@ -1072,7 +1072,7 @@ double ReducedModelOptimizer::getFullPatternMaxSimulationForce(const BaseSimulat
|
||||||
optimizationEpsilon);
|
optimizationEpsilon);
|
||||||
break;
|
break;
|
||||||
case Shear:
|
case Shear:
|
||||||
global.desiredMaxDisplacementValue = 0.1
|
global.desiredMaxDisplacementValue = 0.04
|
||||||
* 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 +1086,7 @@ double ReducedModelOptimizer::getFullPatternMaxSimulationForce(const BaseSimulat
|
||||||
optimizationEpsilon);
|
optimizationEpsilon);
|
||||||
break;
|
break;
|
||||||
case Bending:
|
case Bending:
|
||||||
global.desiredMaxDisplacementValue = 0.2
|
global.desiredMaxDisplacementValue = 0.05
|
||||||
* 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))
|
||||||
|
|
@ -1101,7 +1101,7 @@ double ReducedModelOptimizer::getFullPatternMaxSimulationForce(const BaseSimulat
|
||||||
200);
|
200);
|
||||||
break;
|
break;
|
||||||
case Dome:
|
case Dome:
|
||||||
global.desiredMaxRotationAngle = vcg::math::ToRad(40.0);
|
global.desiredMaxRotationAngle = vcg::math::ToRad(20.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(
|
||||||
|
|
@ -1109,14 +1109,14 @@ double ReducedModelOptimizer::getFullPatternMaxSimulationForce(const BaseSimulat
|
||||||
forceMagnitude,
|
forceMagnitude,
|
||||||
1e-8,
|
1e-8,
|
||||||
1e8,
|
1e8,
|
||||||
vcg::math::ToRad(0.1),
|
vcg::math::ToRad(1.0),
|
||||||
// global.desiredMaxRotationAngle * 0.5,
|
// global.desiredMaxRotationAngle * 0.5,
|
||||||
// optimizationEpsilon,
|
// optimizationEpsilon,
|
||||||
500);
|
500);
|
||||||
break;
|
break;
|
||||||
case Saddle:
|
case Saddle:
|
||||||
// global.desiredMaxDisplacementValue *= 2;
|
// global.desiredMaxDisplacementValue *= 2;
|
||||||
global.desiredMaxDisplacementValue = 0.2
|
global.desiredMaxDisplacementValue = 0.05
|
||||||
* 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))
|
||||||
|
|
@ -1128,7 +1128,7 @@ double ReducedModelOptimizer::getFullPatternMaxSimulationForce(const BaseSimulat
|
||||||
forceMagnitude,
|
forceMagnitude,
|
||||||
1e-8,
|
1e-8,
|
||||||
1e8,
|
1e8,
|
||||||
optimizationEpsilon,
|
1e-2,
|
||||||
150);
|
150);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue