diff --git a/Applications/ApplicationsLib/ProjectData.cpp b/Applications/ApplicationsLib/ProjectData.cpp index 9fe6549e7d82d4e4b079179cc4066fc832877417..95eece383956bcc27c23e692e1850f3feb30ab84 100644 --- a/Applications/ApplicationsLib/ProjectData.cpp +++ b/Applications/ApplicationsLib/ProjectData.cpp @@ -94,10 +94,12 @@ #ifdef OGS_BUILD_PROCESS_LARGEDEFORMATION #include "ProcessLib/LargeDeformation/CreateLargeDeformationProcess.h" #endif -#ifdef OGS_BUILD_PROCESS_LIE -#include "ProcessLib/LIE/HydroMechanics/CreateHydroMechanicsProcess.h" +#ifdef OGS_BUILD_PROCESS_LIE_M #include "ProcessLib/LIE/SmallDeformation/CreateSmallDeformationProcess.h" #endif +#ifdef OGS_BUILD_PROCESS_LIE_HM +#include "ProcessLib/LIE/HydroMechanics/CreateHydroMechanicsProcess.h" +#endif #ifdef OGS_BUILD_PROCESS_LIQUIDFLOW #include "ProcessLib/LiquidFlow/CreateLiquidFlowProcess.h" #endif @@ -897,7 +899,7 @@ void ProjectData::parseProcesses( } else #endif -#ifdef OGS_BUILD_PROCESS_LIE +#ifdef OGS_BUILD_PROCESS_LIE_HM if (type == "HYDRO_MECHANICS_WITH_LIE") { if ( //! \ogs_file_param{prj__processes__process__HYDRO_MECHANICS_WITH_LIE__dimension} @@ -1058,7 +1060,7 @@ void ProjectData::parseProcesses( } else #endif -#ifdef OGS_BUILD_PROCESS_LIE +#ifdef OGS_BUILD_PROCESS_LIE_M if (type == "SMALL_DEFORMATION_WITH_LIE") { if ( //! \ogs_file_param{prj__processes__process__SMALL_DEFORMATION_WITH_LIE__dimension} diff --git a/Applications/Utils/PostProcessing/CMakeLists.txt b/Applications/Utils/PostProcessing/CMakeLists.txt index dd7f5165c1ad1ca7cc3378bfdab2419e0db19e85..5d0474842a0b53daf697ac5132a70f4a5a815bac 100644 --- a/Applications/Utils/PostProcessing/CMakeLists.txt +++ b/Applications/Utils/PostProcessing/CMakeLists.txt @@ -1,4 +1,4 @@ -if(OGS_BUILD_PROCESS_LIE) +if(OGS_BUILD_PROCESS_LIE_M OR OGS_BUILD_PROCESS_LIE_HM) ogs_add_executable(postLIE postLIE.cpp) target_link_libraries(postLIE GitInfoLib LIECommon MeshToolsLib tclap) install(TARGETS postLIE RUNTIME DESTINATION bin) diff --git a/Applications/Utils/Tests.cmake b/Applications/Utils/Tests.cmake index 40f982958d2a8e1b55bbe769da0830b1fb6ddc6a..dba8d3eb0e74f201dea475eb0e15ac9c55f17f2c 100644 --- a/Applications/Utils/Tests.cmake +++ b/Applications/Utils/Tests.cmake @@ -57,7 +57,7 @@ AddTest( WORKING_DIRECTORY ${Data_SOURCE_DIR}/LIE/PostProcessing EXECUTABLE postLIE EXECUTABLE_ARGS -i single_joint.pvd -o ${Data_BINARY_DIR}/LIE/PostProcessing/post_single_joint.pvd - REQUIREMENTS OGS_BUILD_PROCESS_LIE + REQUIREMENTS OGS_BUILD_PROCESS_LIE_M OR OGS_BUILD_PROCESS_LIE_HM TESTER vtkdiff DIFF_DATA expected_post_single_joint_ts_1_t_1.000000.vtu post_single_joint_ts_1_t_1.000000.vtu u u 1e-14 1e-14 @@ -69,7 +69,7 @@ AddTest( WORKING_DIRECTORY ${Data_SOURCE_DIR}/LIE/PostProcessing EXECUTABLE postLIE EXECUTABLE_ARGS -i single_joint_3D.pvd -o ${Data_BINARY_DIR}/LIE/PostProcessing/post_single_joint_3D.pvd - REQUIREMENTS OGS_BUILD_PROCESS_LIE + REQUIREMENTS OGS_BUILD_PROCESS_LIE_M OR OGS_BUILD_PROCESS_LIE_HM TESTER vtkdiff DIFF_DATA post_single_joint_3D_ts_1_t_1.000000.vtu post_single_joint_3D_ts_1_t_1.000000.vtu u u 1e-14 1e-14 diff --git a/ProcessLib/CMakeLists.txt b/ProcessLib/CMakeLists.txt index 0ba3ad42c8a98236c86cb227b8ab496cbe1152c6..134c385e63527e50aae7ad5608365fd42a48fb43 100644 --- a/ProcessLib/CMakeLists.txt +++ b/ProcessLib/CMakeLists.txt @@ -1,8 +1,32 @@ # Collect the process libraries in interface library add_library(Processes INTERFACE) +# Check whether LIE processes are enabled +function(check_enabled_processes_for_LIE contains_LIE) + set(${contains_hm_process} FALSE PARENT_SCOPE) + foreach(process ${_enabled_processes}) + if(process STREQUAL "LIE_M" + OR process STREQUAL "LIE_HM" + ) + set(${contains_LIE} TRUE PARENT_SCOPE) + return() + endif() + endforeach() +endfunction() +check_enabled_processes_for_LIE(contains_LIE) + +if (contains_LIE) + add_subdirectory(LIE/Common) +endif() + foreach(process ${_enabled_processes}) - add_subdirectory(${process}) + if (process STREQUAL "LIE_HM") + add_subdirectory(LIE/HydroMechanics) + elseif (process STREQUAL "LIE_M") + add_subdirectory(LIE/SmallDeformation) + else() + add_subdirectory(${process}) + endif() target_link_libraries(Processes INTERFACE ${process}) set_target_properties(${process} PROPERTIES JOB_POOL_COMPILE heavy_tasks) endforeach() @@ -24,7 +48,7 @@ append_source_files(SOURCES Graph) function(check_enabled_processes contains_hm_process) set(${contains_hm_process} FALSE PARENT_SCOPE) foreach(process ${_enabled_processes}) - if(process STREQUAL "LIE" + if(process STREQUAL "LIE_HM" OR process STREQUAL "HydroMechanics" OR process STREQUAL "ThermoHydroMechanics" OR process STREQUAL "RichardsMechanics" diff --git a/ProcessLib/LIE/CMakeLists.txt b/ProcessLib/LIE/CMakeLists.txt deleted file mode 100644 index 0f4f73ee02164a9b771531f44e6b1ca9850cafb6..0000000000000000000000000000000000000000 --- a/ProcessLib/LIE/CMakeLists.txt +++ /dev/null @@ -1,18 +0,0 @@ -add_subdirectory(Common) -get_source_files(SOURCES HydroMechanics) -append_source_files(SOURCES HydroMechanics/LocalAssembler) -append_source_files(SOURCES SmallDeformation) -append_source_files(SOURCES SmallDeformation/LocalAssembler) - -ogs_add_library(LIE ${SOURCES}) -target_link_libraries(LIE PUBLIC ProcessLib LIECommon PRIVATE ParameterLib) - -target_precompile_headers(LIE PRIVATE [["BaseLib/Error.h"]] - [["BaseLib/ConfigTree.h"]] [["BaseLib/Logging.h"]] - [["ProcessLib/Process.h"]] [["MaterialLib/MPL/Medium.h"]] - [["MaterialLib/MPL/Property.h"]] <Eigen/Core>) - -if(OGS_BUILD_TESTING) - include(HydroMechanics/Tests.cmake) - include(SmallDeformation/Tests.cmake) -endif() diff --git a/ProcessLib/LIE/HydroMechanics/CMakeLists.txt b/ProcessLib/LIE/HydroMechanics/CMakeLists.txt new file mode 100644 index 0000000000000000000000000000000000000000..5b5f08991ddabfe1f791c2264946bd0a9a043ecf --- /dev/null +++ b/ProcessLib/LIE/HydroMechanics/CMakeLists.txt @@ -0,0 +1,14 @@ +get_source_files(SOURCES) +append_source_files(SOURCES LocalAssembler) + +ogs_add_library(LIE_HM ${SOURCES}) +target_link_libraries(LIE_HM PUBLIC ProcessLib LIECommon PRIVATE ParameterLib) + +target_precompile_headers(LIE_HM PRIVATE [["BaseLib/Error.h"]] + [["BaseLib/ConfigTree.h"]] [["BaseLib/Logging.h"]] + [["ProcessLib/Process.h"]] [["MaterialLib/MPL/Medium.h"]] + [["MaterialLib/MPL/Property.h"]] <Eigen/Core>) + +if(OGS_BUILD_TESTING) + include(Tests.cmake) +endif() diff --git a/ProcessLib/LIE/SmallDeformation/CMakeLists.txt b/ProcessLib/LIE/SmallDeformation/CMakeLists.txt new file mode 100644 index 0000000000000000000000000000000000000000..239308c7898d694e315604483980b343167ac839 --- /dev/null +++ b/ProcessLib/LIE/SmallDeformation/CMakeLists.txt @@ -0,0 +1,14 @@ +get_source_files(SOURCES) +append_source_files(SOURCES LocalAssembler) + +ogs_add_library(LIE_M ${SOURCES}) +target_link_libraries(LIE_M PUBLIC ProcessLib LIECommon PRIVATE ParameterLib) + +target_precompile_headers(LIE_M PRIVATE [["BaseLib/Error.h"]] + [["BaseLib/ConfigTree.h"]] [["BaseLib/Logging.h"]] + [["ProcessLib/Process.h"]] [["MaterialLib/MPL/Medium.h"]] + [["MaterialLib/MPL/Property.h"]] <Eigen/Core>) + +if(OGS_BUILD_TESTING) + include(Tests.cmake) +endif() diff --git a/scripts/cmake/ProcessesSetup.cmake b/scripts/cmake/ProcessesSetup.cmake index 9acebf1b6f362fb26ff9cce7ac561de97e77984b..e29191542f147680ff3da3df546410ce94e0c283 100644 --- a/scripts/cmake/ProcessesSetup.cmake +++ b/scripts/cmake/ProcessesSetup.cmake @@ -7,7 +7,8 @@ set(_processes_list HeatTransportBHE HydroMechanics LiquidFlow - LIE + LIE_M + LIE_HM ThermoRichardsMechanics RichardsComponentTransport RichardsFlow