Refactoring. Increased the magnitude of forces in the simulation scenarios since now I am working with more rigid patterns.
This commit is contained in:
parent
1a27ec16a2
commit
73dda7e33f
|
@ -12,20 +12,20 @@ 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")
|
||||||
##Create directory for the external libraries
|
##Create directory for the external libraries
|
||||||
file(MAKE_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/build/external)
|
file(MAKE_DIRECTORY ${EXTERNAL_DEPS_DIR})
|
||||||
#find_package(OpenMP REQUIRED)
|
|
||||||
|
|
||||||
##Polyscope
|
##Polyscope
|
||||||
set(USE_POLYSCOPE FALSE)
|
set(USE_POLYSCOPE TRUE)
|
||||||
if(${USE_POLYSCOPE})
|
if(${USE_POLYSCOPE})
|
||||||
download_project(PROJ POLYSCOPE
|
download_project(PROJ POLYSCOPE
|
||||||
GIT_REPOSITORY https://github.com/nmwsharp/polyscope.git
|
GIT_REPOSITORY https://github.com/nmwsharp/polyscope.git
|
||||||
GIT_TAG master
|
GIT_TAG master
|
||||||
PREFIX ${CMAKE_CURRENT_SOURCE_DIR}/build/external/
|
PREFIX ${EXTERNAL_DEPS_DIR}
|
||||||
${UPDATE_DISCONNECTED_IF_AVAILABLE}
|
${UPDATE_DISCONNECTED_IF_AVAILABLE}
|
||||||
)
|
)
|
||||||
add_subdirectory(${POLYSCOPE_SOURCE_DIR})
|
add_subdirectory(${POLYSCOPE_SOURCE_DIR} ${POLYSCOPE_BINARY_DIR})
|
||||||
add_compile_definitions(POLYSCOPE_DEFINED)
|
add_compile_definitions(POLYSCOPE_DEFINED)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
@ -37,27 +37,29 @@ else()
|
||||||
download_project(PROJ MYSOURCES
|
download_project(PROJ MYSOURCES
|
||||||
GIT_REPOSITORY https://gitea-s2i2s.isti.cnr.it/manolas/MySources.git
|
GIT_REPOSITORY https://gitea-s2i2s.isti.cnr.it/manolas/MySources.git
|
||||||
GIT_TAG master
|
GIT_TAG master
|
||||||
PREFIX ${CMAKE_CURRENT_SOURCE_DIR}/build/external/
|
PREFIX ${EXTERNAL_DEPS_DIR}
|
||||||
${UPDATE_DISCONNECTED_IF_AVAILABLE}
|
${UPDATE_DISCONNECTED_IF_AVAILABLE}
|
||||||
)
|
)
|
||||||
endif()
|
endif()
|
||||||
add_subdirectory(${MYSOURCES_SOURCE_DIR} ${CMAKE_CURRENT_BINARY_DIR}/MySourcesBinDir)
|
add_subdirectory(${MYSOURCES_SOURCE_DIR} ${CMAKE_CURRENT_BINARY_DIR}/MySourcesBinDir)
|
||||||
|
|
||||||
##dlib
|
#dlib
|
||||||
|
set(DLIB_BIN_DIR ${CMAKE_CURRENT_BINARY_DIR}/dlib_bin)
|
||||||
|
file(MAKE_DIRECTORY ${DLIB_BIN_DIR})
|
||||||
download_project(PROJ DLIB
|
download_project(PROJ DLIB
|
||||||
GIT_REPOSITORY https://github.com/davisking/dlib.git
|
GIT_REPOSITORY https://github.com/davisking/dlib.git
|
||||||
GIT_TAG master
|
GIT_TAG master
|
||||||
PREFIX ${CMAKE_CURRENT_SOURCE_DIR}/build/external/
|
BINARY_DIR ${DLIB_BIN_DIR}
|
||||||
|
PREFIX ${EXTERNAL_DEPS_DIR}
|
||||||
${UPDATE_DISCONNECTED_IF_AVAILABLE}
|
${UPDATE_DISCONNECTED_IF_AVAILABLE}
|
||||||
)
|
)
|
||||||
add_subdirectory(${DLIB_SOURCE_DIR})
|
add_subdirectory(${DLIB_SOURCE_DIR} ${DLIB_BINARY_DIR})
|
||||||
|
|
||||||
|
|
||||||
##vcglib devel branch
|
##vcglib devel branch
|
||||||
download_project(PROJ vcglib_devel
|
download_project(PROJ vcglib_devel
|
||||||
GIT_REPOSITORY https://github.com/IasonManolas/vcglib.git
|
GIT_REPOSITORY https://github.com/IasonManolas/vcglib.git
|
||||||
GIT_TAG devel
|
GIT_TAG devel
|
||||||
PREFIX ${CMAKE_CURRENT_SOURCE_DIR}/build/external/
|
PREFIX ${EXTERNAL_DEPS_DIR}
|
||||||
${UPDATE_DISCONNECTED_IF_AVAILABLE}
|
${UPDATE_DISCONNECTED_IF_AVAILABLE}
|
||||||
)
|
)
|
||||||
file(GLOB EXT_SOURCES ${vcglib_devel_SOURCE_DIR}/wrap/ply/plylib.cpp)
|
file(GLOB EXT_SOURCES ${vcglib_devel_SOURCE_DIR}/wrap/ply/plylib.cpp)
|
||||||
|
@ -66,7 +68,7 @@ file(GLOB EXT_SOURCES ${vcglib_devel_SOURCE_DIR}/wrap/ply/plylib.cpp)
|
||||||
download_project(PROJ threed-beam-fea
|
download_project(PROJ threed-beam-fea
|
||||||
GIT_REPOSITORY https://github.com/IasonManolas/threed-beam-fea.git
|
GIT_REPOSITORY https://github.com/IasonManolas/threed-beam-fea.git
|
||||||
GIT_TAG master
|
GIT_TAG master
|
||||||
PREFIX ${CMAKE_CURRENT_SOURCE_DIR}/build/external/
|
PREFIX ${EXTERNAL_DEPS_DIR}
|
||||||
${UPDATE_DISCONNECTED_IF_AVAILABLE}
|
${UPDATE_DISCONNECTED_IF_AVAILABLE}
|
||||||
)
|
)
|
||||||
add_subdirectory(${threed-beam-fea_SOURCE_DIR} ${threed-beam-fea_BINARY_DIR})
|
add_subdirectory(${threed-beam-fea_SOURCE_DIR} ${threed-beam-fea_BINARY_DIR})
|
||||||
|
@ -96,7 +98,7 @@ target_include_directories(${PROJECT_NAME}
|
||||||
|
|
||||||
target_link_directories(${PROJECT_NAME} PRIVATE ${MYSOURCES_SOURCE_DIR}/boost_graph/libs/)
|
target_link_directories(${PROJECT_NAME} PRIVATE ${MYSOURCES_SOURCE_DIR}/boost_graph/libs/)
|
||||||
if(${USE_POLYSCOPE})
|
if(${USE_POLYSCOPE})
|
||||||
target_link_libraries(${PROJECT_NAME} polyscope Eigen3::Eigen matplot dlib::dlib ThreedBeamFEA MySources)
|
target_link_libraries(${PROJECT_NAME} polyscope Eigen3::Eigen dlib::dlib ThreedBeamFEA MySources)
|
||||||
else()
|
else()
|
||||||
target_link_libraries(${PROJECT_NAME} -static Eigen3::Eigen matplot dlib::dlib ThreedBeamFEA MySources)
|
target_link_libraries(${PROJECT_NAME} -static Eigen3::Eigen dlib::dlib ThreedBeamFEA MySources)
|
||||||
endif()
|
endif()
|
||||||
|
|
|
@ -1,21 +0,0 @@
|
||||||
#include "linearsimulationmodel.hpp"
|
|
||||||
#include <Eigen/Core>
|
|
||||||
#include <filesystem>
|
|
||||||
//#include <igl/list_to_matrix.h>
|
|
||||||
#include <iostream>
|
|
||||||
#include <vcg/complex/algorithms/create/platonic.h>
|
|
||||||
#include <vcg/complex/algorithms/update/normal.h>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -69,7 +69,7 @@ int main(int argc, char *argv[]) {
|
||||||
// Export results
|
// Export results
|
||||||
const bool input_resultDirectoryDefined = argc >= 5;
|
const bool input_resultDirectoryDefined = argc >= 5;
|
||||||
std::string optimizationResultsDirectory =
|
std::string optimizationResultsDirectory =
|
||||||
input_resultDirectoryDefined ? argv[4] : "OptimizationResults";
|
input_resultDirectoryDefined ? argv[4] : std::filesystem::current_path().append("OptimizationResults");
|
||||||
std::string resultsOutputDir;
|
std::string resultsOutputDir;
|
||||||
if (optimizationResults.numberOfSimulationCrashes != 0) {
|
if (optimizationResults.numberOfSimulationCrashes != 0) {
|
||||||
const auto crashedJobsDirPath =
|
const auto crashedJobsDirPath =
|
||||||
|
|
|
@ -752,7 +752,7 @@ ReducedModelOptimizer::createScenarios(
|
||||||
scenarios.resize(SimulationScenario::NumberOfSimulationScenarios);
|
scenarios.resize(SimulationScenario::NumberOfSimulationScenarios);
|
||||||
std::unordered_map<VertexIndex, std::unordered_set<DoFType>> fixedVertices;
|
std::unordered_map<VertexIndex, std::unordered_set<DoFType>> fixedVertices;
|
||||||
std::unordered_map<VertexIndex, Vector6d> nodalForces;
|
std::unordered_map<VertexIndex, Vector6d> nodalForces;
|
||||||
const double forceMagnitude = 1;
|
const double forceMagnitude = 10;
|
||||||
|
|
||||||
//// Axial
|
//// Axial
|
||||||
SimulationScenario scenarioName = SimulationScenario::Axial;
|
SimulationScenario scenarioName = SimulationScenario::Axial;
|
||||||
|
@ -765,7 +765,7 @@ ReducedModelOptimizer::createScenarios(
|
||||||
nodalForces[viPair.first] =
|
nodalForces[viPair.first] =
|
||||||
Vector6d({forceDirection[0], forceDirection[1], forceDirection[2], 0,
|
Vector6d({forceDirection[0], forceDirection[1], forceDirection[2], 0,
|
||||||
0, 0}) *
|
0, 0}) *
|
||||||
forceMagnitude * 2;
|
forceMagnitude * 8;
|
||||||
fixedVertices[viPair.second] =
|
fixedVertices[viPair.second] =
|
||||||
std::unordered_set<DoFType>{0, 1, 2, 3, 4, 5};
|
std::unordered_set<DoFType>{0, 1, 2, 3, 4, 5};
|
||||||
}
|
}
|
||||||
|
@ -799,7 +799,7 @@ ReducedModelOptimizer::createScenarios(
|
||||||
nodalForces[viPair.first] =
|
nodalForces[viPair.first] =
|
||||||
Vector6d({forceDirection[0], forceDirection[1], forceDirection[2], 0,
|
Vector6d({forceDirection[0], forceDirection[1], forceDirection[2], 0,
|
||||||
0, 0}) *
|
0, 0}) *
|
||||||
forceMagnitude * 1;
|
forceMagnitude * 8;
|
||||||
fixedVertices[viPair.second] =
|
fixedVertices[viPair.second] =
|
||||||
std::unordered_set<DoFType>{0, 1, 2, 3, 4, 5};
|
std::unordered_set<DoFType>{0, 1, 2, 3, 4, 5};
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue