diff --git a/.github/workflows/build_and_test.yml b/.github/workflows/build_and_test.yml index 8b3405614f7..11d2761b90f 100644 --- a/.github/workflows/build_and_test.yml +++ b/.github/workflows/build_and_test.yml @@ -5,6 +5,10 @@ on: BUILD_AND_TEST_CLI_ARGS: required: false type: string + BUILD_SHARED_LIBS: + required: false + type: string + default: 'ON' BUILD_TYPE: required: false type: string @@ -184,6 +188,7 @@ jobs: docker_args+=(-e ENABLE_HYPRE=${ENABLE_HYPRE:-OFF}) docker_args+=(-e ENABLE_HYPRE_DEVICE=${ENABLE_HYPRE_DEVICE:-CPU}) docker_args+=(-e ENABLE_TRILINOS=${ENABLE_TRILINOS:-ON}) + docker_args+=(-e GEOS_BUILD_SHARED_LIBS=${{ inputs.BUILD_SHARED_LIBS }}) docker_args+=(--cap-add=SYS_PTRACE --rm) diff --git a/.github/workflows/ci_tests.yml b/.github/workflows/ci_tests.yml index 4d860f4c80c..54b0c791efa 100644 --- a/.github/workflows/ci_tests.yml +++ b/.github/workflows/ci_tests.yml @@ -149,14 +149,17 @@ jobs: - name: Ubuntu (20.04, gcc 9.4.0, open-mpi 4.0.3) CMAKE_BUILD_TYPE: Release DOCKER_REPOSITORY: geosx/ubuntu20.04-gcc9 + BUILD_SHARED_LIBS: ON - name: Ubuntu debug (20.04, gcc 10.5.0, open-mpi 4.0.3) - github codespaces CMAKE_BUILD_TYPE: Debug DOCKER_REPOSITORY: geosx/ubuntu20.04-gcc10 + BUILD_SHARED_LIBS: ON - name: Ubuntu (20.04, gcc 10.5.0, open-mpi 4.0.3) - github codespaces CMAKE_BUILD_TYPE: Release DOCKER_REPOSITORY: geosx/ubuntu20.04-gcc10 + BUILD_SHARED_LIBS: ON - name: Ubuntu (22.04, gcc 11.4.0, open-mpi 4.1.2) CMAKE_BUILD_TYPE: Release @@ -164,28 +167,31 @@ jobs: ENABLE_HYPRE: ON ENABLE_TRILINOS: OFF GCP_BUCKET: geosx/ubuntu22.04-gcc11 + BUILD_SHARED_LIBS: ON - name: Ubuntu (22.04, gcc 12.3.0, open-mpi 4.1.2) CMAKE_BUILD_TYPE: Release DOCKER_REPOSITORY: geosx/ubuntu22.04-gcc12 ENABLE_HYPRE: ON ENABLE_TRILINOS: OFF + BUILD_SHARED_LIBS: ON - name: Ubuntu (22.04, clang 15.0.7, open-mpi 4.1.2) CMAKE_BUILD_TYPE: Release DOCKER_REPOSITORY: geosx/ubuntu22.04-clang15 ENABLE_HYPRE: ON ENABLE_TRILINOS: OFF + BUILD_SHARED_LIBS: ON uses: ./.github/workflows/build_and_test.yml with: + BUILD_SHARED_LIBS: ${{ matrix.BUILD_SHARED_LIBS }} CMAKE_BUILD_TYPE: ${{ matrix.CMAKE_BUILD_TYPE }} DOCKER_IMAGE_TAG: ${{ needs.is_not_draft_pull_request.outputs.DOCKER_IMAGE_TAG }} DOCKER_REPOSITORY: ${{ matrix.DOCKER_REPOSITORY }} ENABLE_HYPRE: ${{ matrix.ENABLE_HYPRE }} ENABLE_TRILINOS: ${{ matrix.ENABLE_TRILINOS }} GCP_BUCKET: ${{ matrix.GCP_BUCKET }} - HOST_CONFIG: ${{ matrix.HOST_CONFIG }} RUNS_ON: ubuntu-22.04 secrets: inherit @@ -328,8 +334,6 @@ jobs: ENABLE_HYPRE_DEVICE: ${{ matrix.ENABLE_HYPRE_DEVICE }} ENABLE_HYPRE: ${{ matrix.ENABLE_HYPRE }} ENABLE_TRILINOS: ${{ matrix.ENABLE_TRILINOS }} - GCP_BUCKET: ${{ matrix.GCP_BUCKET }} - HOST_CONFIG: ${{ matrix.HOST_CONFIG }} NPROC: ${{ matrix.NPROC }} RUNS_ON: ${{ matrix.RUNS_ON }} REQUIRED_LABEL: "ci: run CUDA builds" diff --git a/host-configs/LBL/cori-gcc@8.1.0.cmake b/host-configs/LBL/cori-gcc@8.1.0.cmake index 57c81ea666d..b0a50872aa3 100644 --- a/host-configs/LBL/cori-gcc@8.1.0.cmake +++ b/host-configs/LBL/cori-gcc@8.1.0.cmake @@ -26,10 +26,6 @@ set(MPIEXEC_NUMPROC_FLAG "-n" CACHE STRING "") set(GEOS_TPL_DIR "/global/project/projectdirs/m1411/GEOSX/tpls/install-cori-gcc\@8.1.0-release-24-07-20" CACHE PATH "" ) - -set(GEOS_LINK_PREPEND_FLAG "-Wl,--whole-archive" CACHE STRING "" FORCE) -set(GEOS_LINK_POSTPEND_FLAG "-Wl,--no-whole-archive" CACHE STRING "" FORCE) - set(ENABLE_SPHINX_EXECUTABLE OFF CACHE BOOL "") set(ENABLE_UNCRUSTIFY OFF CACHE BOOL "") set(ENABLE_DOXYGEN OFF CACHE BOOL "") diff --git a/host-configs/LBL/cori-intel.cmake b/host-configs/LBL/cori-intel.cmake index 52387bd7ece..f9ff8ec447c 100644 --- a/host-configs/LBL/cori-intel.cmake +++ b/host-configs/LBL/cori-intel.cmake @@ -26,9 +26,6 @@ set(MPIEXEC_NUMPROC_FLAG "-n" CACHE STRING "") set(GEOS_TPL_DIR "/global/project/projectdirs/m1411/GEOSX/tpls/install-cori-intel-release-22-07-20" CACHE PATH "" ) -set(GEOS_LINK_PREPEND_FLAG "-Wl,--whole-archive" CACHE STRING "" FORCE) -set(GEOS_LINK_POSTPEND_FLAG "-Wl,--no-whole-archive" CACHE STRING "" FORCE) - set(ENABLE_SPHINX_EXECUTABLE OFF CACHE BOOL "") set(ENABLE_UNCRUSTIFY OFF CACHE BOOL "") set(ENABLE_DOXYGEN OFF CACHE BOOL "") diff --git a/host-configs/LLNL/lassen-base.cmake b/host-configs/LLNL/lassen-base.cmake index 283755be313..b8014d6410b 100644 --- a/host-configs/LLNL/lassen-base.cmake +++ b/host-configs/LLNL/lassen-base.cmake @@ -7,7 +7,6 @@ # ############################################################################### -set( GEOS_BUILD_SHARED_LIBS ON CACHE BOOL "" ) set( GEOS_BUILD_OBJ_LIBS OFF CACHE BOOL "" ) # Fortran set(ENABLE_FORTRAN OFF CACHE BOOL "") diff --git a/host-configs/ORNL/frontier-base.cmake b/host-configs/ORNL/frontier-base.cmake index c33d1fc25ba..7337dbf387b 100644 --- a/host-configs/ORNL/frontier-base.cmake +++ b/host-configs/ORNL/frontier-base.cmake @@ -31,7 +31,6 @@ set( ENABLE_DOCS OFF CACHE BOOL "" FORCE ) set( ENABLE_SCOTCH OFF CACHE BOOL "" FORCE ) set( ENABLE_SUPERLU_DIST OFF CACHE BOOL "" FORCE ) -set( GEOS_BUILD_SHARED_LIBS ON CACHE BOOL "" FORCE ) set( GEOS_BUILD_OBJ_LIBS OFF CACHE BOOL "" FORCE ) set( CMAKE_CXX_STANDARD 17 CACHE STRING "" ) diff --git a/host-configs/TOTAL/pangea3-gcc8.4.1-openmpi-4.1.2.cmake b/host-configs/TOTAL/pangea3-gcc8.4.1-openmpi-4.1.2.cmake index b62c1c45f74..320a7842279 100644 --- a/host-configs/TOTAL/pangea3-gcc8.4.1-openmpi-4.1.2.cmake +++ b/host-configs/TOTAL/pangea3-gcc8.4.1-openmpi-4.1.2.cmake @@ -77,7 +77,6 @@ set(ENABLE_MATHPRESSO OFF CACHE BOOL "") # Silo configure script doesn't recognize systype set(SILO_BUILD_TYPE powerpc64-unknown-linux-gnu CACHE STRING "") -set(GEOS_BUILD_SHARED_LIBS OFF CACHE BOOL "") set(ENABLE_PVTPackage ON CACHE BOOL "") set(ENABLE_CALIPER ON CACHE BOOL "") diff --git a/host-configs/apple/macOS_base.cmake b/host-configs/apple/macOS_base.cmake index e300aca41a7..c9cf2efc8df 100644 --- a/host-configs/apple/macOS_base.cmake +++ b/host-configs/apple/macOS_base.cmake @@ -27,7 +27,8 @@ set( LAPACK_LIBRARIES ${HOMEBREW_DIR}/opt/lapack/lib/liblapack.dylib CACHE PATH set(ENABLE_DOXYGEN OFF CACHE BOOL "" FORCE) set(ENABLE_MATHPRESSO OFF CACHE BOOL "" FORCE ) -#set(GEOS_BUILD_OBJ_LIBS ON CACHE BOOL "" FORCE) + +set(GEOS_BUILD_SHARED_LIBS ON CACHE BOOL "" FORCE) diff --git a/host-configs/environment.cmake b/host-configs/environment.cmake index b843c4ce9b7..001d28cb425 100644 --- a/host-configs/environment.cmake +++ b/host-configs/environment.cmake @@ -78,5 +78,9 @@ if(DEFINED ENV{LAPACK_LIBRARIES}) set(LAPACK_LIBRARIES "$ENV{LAPACK_LIBRARIES}" CACHE PATH "" FORCE) endif() +if(DEFINED ENV{GEOS_BUILD_SHARED_LIBS}) + set(GEOS_BUILD_SHARED_LIBS "$ENV{GEOS_BUILD_SHARED_LIBS}" CACHE BOOL "" FORCE) +endif() + set(GEOS_TPL_DIR "$ENV{GEOSX_TPL_DIR}" CACHE PATH "" FORCE) include(${CMAKE_CURRENT_LIST_DIR}/tpls.cmake) diff --git a/inputFiles/singlePhaseFlowFractures/fractureFlow_conforming_2d_vtk_input.xml b/inputFiles/singlePhaseFlowFractures/fractureFlow_conforming_2d_vtk_input.xml index 4b77e706571..a6f20653665 100644 --- a/inputFiles/singlePhaseFlowFractures/fractureFlow_conforming_2d_vtk_input.xml +++ b/inputFiles/singlePhaseFlowFractures/fractureFlow_conforming_2d_vtk_input.xml @@ -19,7 +19,7 @@ " ${otherLibs} ) + +endmacro( geos_decorate_link_dependencies ) \ No newline at end of file diff --git a/src/cmake/GeosxOptions.cmake b/src/cmake/GeosxOptions.cmake index debe45fdf62..cce8877cb28 100644 --- a/src/cmake/GeosxOptions.cmake +++ b/src/cmake/GeosxOptions.cmake @@ -158,18 +158,6 @@ if( ${CMAKE_MAKE_PROGRAM} STREQUAL "ninja" OR ${CMAKE_MAKE_PROGRAM} MATCHES ".*/ set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${GEOS_NINJA_FLAGS}" ) endif() - -if( CMAKE_HOST_APPLE ) -# set(GEOS_LINK_PREPEND_FLAG "-Wl,-force_load" CACHE STRING "") -# set(GEOS_LINK_POSTPEND_FLAG "" CACHE STRING "") -# elseif( ENABLE_CUDA ) -# set( GEOS_LINK_PREPEND_FLAG "-Xcompiler \\\\\"-Wl,--whole-archive\\\\\"" CACHE STRING "" ) -# set( GEOS_LINK_POSTPEND_FLAG "-Xcompiler \\\\\"-Wl,--no-whole-archive\\\\\"" CACHE STRING "" ) -else() - set( GEOS_LINK_PREPEND_FLAG "-Wl,--whole-archive" CACHE STRING "" ) - set( GEOS_LINK_POSTPEND_FLAG "-Wl,--no-whole-archive" CACHE STRING "" ) -endif() - set( GEOS_LOCALINDEX_TYPE "int" CACHE STRING "" ) if( ENABLE_HYPRE_MIXINT ) set( GEOS_GLOBALINDEX_TYPE "long long int" CACHE STRING "" ) @@ -216,6 +204,5 @@ message( "GEOS_GLOBALINDEX_TYPE_FLAG = ${GEOS_GLOBALINDEX_TYPE_FLAG}" ) message( "CMAKE_CXX_FLAGS = ${CMAKE_CXX_FLAGS}" ) -message( "GEOS_LINK_PREPEND_FLAG=${GEOS_LINK_PREPEND_FLAG}" ) -message( "GEOS_LINK_POSTPEND_FLAG=${GEOS_LINK_POSTPEND_FLAG}" ) + message( "Leaving GeosxOptions.cmake\n" ) diff --git a/src/coreComponents/CMakeLists.txt b/src/coreComponents/CMakeLists.txt index a58be4cdaab..014eea9d9b0 100644 --- a/src/coreComponents/CMakeLists.txt +++ b/src/coreComponents/CMakeLists.txt @@ -3,19 +3,20 @@ set( subdirs common codingUtilities dataRepository - schema + denseLinearAlgebra functions constitutive + schema + finiteElement mesh - denseLinearAlgebra linearAlgebra fieldSpecification - finiteElement finiteVolume discretizationMethods + events + constitutiveDrivers fileIO physicsSolvers - events mainInterface ) unset( parallelDeps ) @@ -56,53 +57,15 @@ foreach( lib ${subdirs} ) endif() endforeach() -# if we're building full static libs and not obj_libs -if( NOT GEOS_BUILD_SHARED_LIBS ) - set( geosx_core_list "" ) - foreach( lib ${coreLibs} ) - list( APPEND geosx_core_list ${GEOS_LINK_PREPEND_FLAG} ${lib} ${GEOS_LINK_POSTPEND_FLAG} ) - endforeach() - set ( geosx_core_libs "${geosx_core_list}" CACHE INTERNAL "" ) -endif( ) - foreach( lib ${subdirs} ) add_subdirectory( ${lib} ) endforeach() -if( GEOS_BUILD_SHARED_LIBS AND GEOS_BUILD_OBJ_LIBS ) - message( "Building shared geosx_core library with object coreComponents, executables link to geosx_core" ) - blt_add_library ( NAME geosx_core - SOURCES dummy.cpp - DEPENDS_ON mainInterface physicsSolvers HDF5::HDF5 - SHARED TRUE ) - -elseif( GEOS_BUILD_SHARED_LIBS AND NOT GEOS_BUILD_OBJ_LIBS ) - message( "Building shared geosx_core library with static coreComponents, executables link to geosx_core" ) - blt_combine_static_libraries( NAME geosx_core - SOURCE_LIBS ${coreLibs} - LIB_TYPE SHARED - LINK_PREPEND ${GEOS_LINK_PREPEND_FLAG} - LINK_POSTPEND ${GEOS_LINK_POSTPEND_FLAG} ) - -elseif( NOT GEOS_BUILD_SHARED_LIBS AND GEOS_BUILD_OBJ_LIBS ) - message( "Building object coreComponents, executables link to coreComponents" ) +add_library(geosx_core INTERFACE) +if( GEOS_BUILD_SHARED_LIBS) + target_link_libraries(geosx_core INTERFACE mainInterface ) else() - message( "Building static coreComponents, executables link to coreComponents" ) -endif() - -if ( TARGET geosx_core ) - # Seems to be required on some CMake versions (e.g. 3.16) to get enforce device linking - if( ${ENABLE_HYPRE_DEVICE} STREQUAL "CUDA" ) - set_target_properties( geosx_core PROPERTIES CUDA_RESOLVE_DEVICE_SYMBOLS TRUE ) - endif() - - # To install the library with the runtime path used during the building - set_target_properties( geosx_core PROPERTIES INSTALL_RPATH_USE_LINK_PATH TRUE ) - - # To install the shared library - install( TARGETS geosx_core LIBRARY DESTINATION ${CMAKE_INSTALL_PREFIX}/lib ) - - target_include_directories( geosx_core PUBLIC ${CMAKE_SOURCE_DIR}/coreComponents ) + target_link_libraries(geosx_core INTERFACE $ ) endif() geosx_add_code_checks( PREFIX coreComponents diff --git a/src/coreComponents/codingUtilities/CMakeLists.txt b/src/coreComponents/codingUtilities/CMakeLists.txt index a85e4046907..f936fc4135e 100644 --- a/src/coreComponents/codingUtilities/CMakeLists.txt +++ b/src/coreComponents/codingUtilities/CMakeLists.txt @@ -20,12 +20,15 @@ set( codingUtilities_sources ) set( dependencyList ${parallelDeps} common fast_float ) +geos_decorate_link_dependencies( LIST decoratedDependencies + DEPENDENCIES ${dependencyList} ) blt_add_library( NAME codingUtilities SOURCES ${codingUtilities_sources} HEADERS ${codingUtilities_headers} - DEPENDS_ON ${dependencyList} + DEPENDS_ON ${decoratedDependencies} OBJECT ${GEOS_BUILD_OBJ_LIBS} + SHARED ${GEOS_BUILD_SHARED_LIBS} ) # Avoid compiling with nvcc which sometimes crashes on fast_float diff --git a/src/coreComponents/codingUtilities/tests/CMakeLists.txt b/src/coreComponents/codingUtilities/tests/CMakeLists.txt index 33f4168e86e..1fe1863459d 100644 --- a/src/coreComponents/codingUtilities/tests/CMakeLists.txt +++ b/src/coreComponents/codingUtilities/tests/CMakeLists.txt @@ -4,8 +4,10 @@ set( testSources testParsing.cpp testUtilities.cpp ) -set( dependencyList gtest codingUtilities ${parallelDeps} ) +set( dependencyList codingUtilities ${parallelDeps} ) +geos_decorate_link_dependencies( LIST decoratedDependencies + DEPENDENCIES ${dependencyList} ) # Add gtest C++ based tests foreach( test ${testSources} ) @@ -13,7 +15,7 @@ foreach( test ${testSources} ) blt_add_executable( NAME ${test_name} SOURCES ${test} OUTPUT_DIR ${TEST_OUTPUT_DIRECTORY} - DEPENDS_ON ${dependencyList} ) + DEPENDS_ON ${decoratedDependencies} gtest ) geos_add_test( NAME ${test_name} COMMAND ${test_name} ) diff --git a/src/coreComponents/common/CMakeLists.txt b/src/coreComponents/common/CMakeLists.txt index 2a5f70ff960..3733bafb7f7 100644 --- a/src/coreComponents/common/CMakeLists.txt +++ b/src/coreComponents/common/CMakeLists.txt @@ -102,13 +102,12 @@ if( ENABLE_CALIPER ) endif() endif() -set( dependencyList ${dependencyList} ) - blt_add_library( NAME common SOURCES ${common_sources} HEADERS ${common_headers} DEPENDS_ON ${dependencyList} OBJECT ${GEOS_BUILD_OBJ_LIBS} + SHARED ${GEOS_BUILD_SHARED_LIBS} ) target_include_directories( common PUBLIC ${CMAKE_BINARY_DIR}/include ) diff --git a/src/coreComponents/constitutive/CMakeLists.txt b/src/coreComponents/constitutive/CMakeLists.txt index 38304adc24c..ce9e3c62778 100644 --- a/src/coreComponents/constitutive/CMakeLists.txt +++ b/src/coreComponents/constitutive/CMakeLists.txt @@ -39,8 +39,6 @@ set( constitutive_headers fluid/multifluid/MultiFluidConstants.hpp fluid/multifluid/MultiFluidUtils.hpp fluid/multifluid/MultiFluidFields.hpp - fluid/multifluid/PVTDriver.hpp - fluid/multifluid/PVTDriverRunTest.hpp fluid/multifluid/blackOil/BlackOilFluidBase.hpp fluid/multifluid/blackOil/BlackOilFluid.hpp fluid/multifluid/blackOil/DeadOilFluid.hpp @@ -89,8 +87,6 @@ set( constitutive_headers fluid/multifluid/reactive/ReactiveBrineFluid.hpp fluid/multifluid/reactive/ReactiveMultiFluid.hpp fluid/multifluid/reactive/ReactiveMultiFluidFields.hpp - fluid/multifluid/reactive/ReactiveFluidDriver.hpp - fluid/multifluid/reactive/ReactiveFluidSelector.hpp fluid/multifluid/reactive/chemicalReactions/EquilibriumReactions.hpp fluid/multifluid/reactive/chemicalReactions/KineticReactions.hpp fluid/multifluid/reactive/chemicalReactions/ReactionsBase.hpp @@ -116,8 +112,6 @@ set( constitutive_headers permeability/ProppantPermeability.hpp permeability/SlipDependentPermeability.hpp permeability/WillisRichardsPermeability.hpp - relativePermeability/RelpermDriver.hpp - relativePermeability/RelpermDriverRunTest.hpp relativePermeability/BrooksCoreyBakerRelativePermeability.hpp relativePermeability/BrooksCoreyStone2RelativePermeability.hpp relativePermeability/BrooksCoreyRelativePermeability.hpp @@ -161,7 +155,6 @@ set( constitutive_headers solid/SolidModelDiscretizationOpsTransverseIsotropic.hpp solid/SolidModelDiscretizationOpsOrthotropic.hpp solid/CeramicDamage.hpp - solid/TriaxialDriver.hpp solid/porosity/PorosityFields.hpp solid/porosity/BiotPorosity.hpp solid/porosity/PorosityBase.hpp @@ -203,17 +196,11 @@ set( constitutive_sources dispersion/DispersionBase.cpp dispersion/LinearIsotropicDispersion.cpp fluid/multifluid/MultiFluidBase.cpp - fluid/multifluid/PVTDriver.cpp fluid/multifluid/blackOil/BlackOilFluidBase.cpp fluid/multifluid/blackOil/BlackOilFluid.cpp fluid/multifluid/blackOil/DeadOilFluid.cpp - fluid/multifluid/blackOil/PVTDriverRunTestDeadOilFluid.cpp fluid/multifluid/blackOil/PVTOData.cpp fluid/multifluid/CO2Brine/CO2BrineFluid.cpp - fluid/multifluid/CO2Brine/PVTDriverRunTestCO2BrinePhillipsFluid.cpp - fluid/multifluid/CO2Brine/PVTDriverRunTestCO2BrinePhillipsThermalFluid.cpp - fluid/multifluid/CO2Brine/PVTDriverRunTestCO2BrineEzrokhiFluid.cpp - fluid/multifluid/CO2Brine/PVTDriverRunTestCO2BrineEzrokhiThermalFluid.cpp fluid/multifluid/CO2Brine/functions/PhillipsBrineDensity.cpp fluid/multifluid/CO2Brine/functions/PhillipsBrineViscosity.cpp fluid/multifluid/CO2Brine/functions/EzrokhiBrineDensity.cpp @@ -235,11 +222,8 @@ set( constitutive_sources fluid/multifluid/compositional/models/NegativeTwoPhaseFlashModel.cpp fluid/multifluid/compositional/CompositionalMultiphaseFluid.cpp fluid/multifluid/compositional/CompositionalMultiphaseFluidUpdates.cpp - fluid/multifluid/compositional/PVTDriverRunTestCompositionalTwoPhaseConstantViscosity.cpp - fluid/multifluid/compositional/PVTDriverRunTestCompositionalTwoPhaseLohrenzBrayClarkViscosity.cpp fluid/multifluid/reactive/ReactiveBrineFluid.cpp fluid/multifluid/reactive/ReactiveMultiFluid.cpp - fluid/multifluid/reactive/ReactiveFluidDriver.cpp fluid/multifluid/reactive/chemicalReactions/EquilibriumReactions.cpp fluid/multifluid/reactive/chemicalReactions/KineticReactions.cpp fluid/multifluid/reactive/chemicalReactions/ReactionsBase.cpp @@ -268,14 +252,6 @@ set( constitutive_sources relativePermeability/TableRelativePermeabilityHysteresis.cpp relativePermeability/VanGenuchtenBakerRelativePermeability.cpp relativePermeability/VanGenuchtenStone2RelativePermeability.cpp - relativePermeability/RelpermDriver.cpp - relativePermeability/RelpermDriverBrooksCoreyBakerRunTest.cpp - relativePermeability/RelpermDriverBrooksCoreyStone2RunTest.cpp - relativePermeability/RelpermDriverBrooksCoreyRunTest.cpp - relativePermeability/RelpermDriverVanGenuchtenBakerRunTest.cpp - relativePermeability/RelpermDriverVanGenuchtenStone2RunTest.cpp - relativePermeability/RelpermDriverTableRelativeRunTest.cpp - relativePermeability/RelpermDriverTableRelativeHysteresisRunTest.cpp solid/CompressibleSolid.cpp solid/CoupledSolidBase.cpp solid/ProppantSolid.cpp @@ -296,7 +272,6 @@ set( constitutive_sources solid/SolidBase.cpp solid/SolidInternalEnergy.cpp solid/CeramicDamage.cpp - solid/TriaxialDriver.cpp solid/porosity/BiotPorosity.cpp solid/porosity/PorosityBase.cpp solid/porosity/PressurePorosity.cpp @@ -308,7 +283,7 @@ set( constitutive_sources thermalConductivity/SinglePhaseThermalConductivityBase.cpp ) -set( dependencyList ${parallelDeps} events dataRepository functions denseLinearAlgebra ) +set( dependencyList ${parallelDeps} functions denseLinearAlgebra ) if( ENABLE_PVTPackage ) set( constitutive_headers @@ -318,18 +293,22 @@ if( ENABLE_PVTPackage ) set( constitutive_sources ${constitutive_sources} fluid/multifluid/compositional/CompositionalMultiphaseFluidPVTPackage.cpp - fluid/multifluid/compositional/PVTDriverRunTestCompositionalMultiphaseFluid.cpp ) + ) add_subdirectory( PVTPackage ) list( APPEND dependencyList PVTPackage ) endif() +geos_decorate_link_dependencies( LIST decoratedDependencies + DEPENDENCIES ${dependencyList} ) + blt_add_library( NAME constitutive SOURCES ${constitutive_sources} HEADERS ${constitutive_headers} - DEPENDS_ON ${dependencyList} + DEPENDS_ON ${decoratedDependencies} OBJECT ${GEOS_BUILD_OBJ_LIBS} + SHARED ${GEOS_BUILD_SHARED_LIBS} ) target_include_directories( constitutive PUBLIC ${CMAKE_SOURCE_DIR}/coreComponents ) diff --git a/src/coreComponents/constitutive/docs/FluidModels.rst b/src/coreComponents/constitutive/docs/FluidModels.rst index 3b7beb6c902..445f8a82f0b 100644 --- a/src/coreComponents/constitutive/docs/FluidModels.rst +++ b/src/coreComponents/constitutive/docs/FluidModels.rst @@ -15,6 +15,4 @@ single fluids and fluid mixtures. CompositionalMultiphaseFluid - CO2BrineFluid - - PVTDriver + CO2BrineFluid \ No newline at end of file diff --git a/src/coreComponents/constitutive/docs/solid/SolidModels.rst b/src/coreComponents/constitutive/docs/solid/SolidModels.rst index a62f1ce024e..de494d86bf0 100644 --- a/src/coreComponents/constitutive/docs/solid/SolidModels.rst +++ b/src/coreComponents/constitutive/docs/solid/SolidModels.rst @@ -12,7 +12,6 @@ known models. Theory Voight Plasticity - TriaxialDriver ElasticIsotropic ElasticIsotropicPressureDependent ElasticTransverseIsotropic diff --git a/src/coreComponents/constitutive/relativePermeability/TableRelativePermeabilityHysteresis.cpp b/src/coreComponents/constitutive/relativePermeability/TableRelativePermeabilityHysteresis.cpp index e55d7886024..f537f73722d 100644 --- a/src/coreComponents/constitutive/relativePermeability/TableRelativePermeabilityHysteresis.cpp +++ b/src/coreComponents/constitutive/relativePermeability/TableRelativePermeabilityHysteresis.cpp @@ -22,7 +22,6 @@ #include "constitutive/relativePermeability/RelativePermeabilityFields.hpp" #include "constitutive/relativePermeability/TableRelativePermeabilityHelpers.hpp" #include "functions/FunctionManager.hpp" -#include "constitutive/relativePermeability/RelpermDriver.hpp" namespace geos { diff --git a/src/coreComponents/constitutiveDrivers/CMakeLists.txt b/src/coreComponents/constitutiveDrivers/CMakeLists.txt new file mode 100644 index 00000000000..24570963e67 --- /dev/null +++ b/src/coreComponents/constitutiveDrivers/CMakeLists.txt @@ -0,0 +1,56 @@ +# +# Specify all headers +# +set( constitutiveDrivers_headers + fluid/multiFluid/PVTDriver.hpp + fluid/multiFluid/PVTDriverRunTest.hpp + fluid/multiFluid/reactive/ReactiveFluidDriver.hpp + relativePermeability/RelpermDriver.hpp + relativePermeability/RelpermDriverRunTest.hpp + solid/TriaxialDriver.hpp + ) +# +# Specify all sources +# +set( constitutiveDrivers_sources + fluid/multiFluid/PVTDriver.cpp + fluid/multiFluid/blackOil/PVTDriverRunTestDeadOilFluid.cpp + fluid/multiFluid/CO2Brine/PVTDriverRunTestCO2BrinePhillipsFluid.cpp + fluid/multiFluid/CO2Brine/PVTDriverRunTestCO2BrinePhillipsThermalFluid.cpp + fluid/multiFluid/CO2Brine/PVTDriverRunTestCO2BrineEzrokhiFluid.cpp + fluid/multiFluid/CO2Brine/PVTDriverRunTestCO2BrineEzrokhiThermalFluid.cpp + fluid/multiFluid/compositional/PVTDriverRunTestCompositionalTwoPhaseConstantViscosity.cpp + fluid/multiFluid/compositional/PVTDriverRunTestCompositionalTwoPhaseLohrenzBrayClarkViscosity.cpp + fluid/multiFluid/reactive/ReactiveFluidDriver.cpp + relativePermeability/RelpermDriver.cpp + relativePermeability/RelpermDriverBrooksCoreyBakerRunTest.cpp + relativePermeability/RelpermDriverBrooksCoreyStone2RunTest.cpp + relativePermeability/RelpermDriverBrooksCoreyRunTest.cpp + relativePermeability/RelpermDriverVanGenuchtenBakerRunTest.cpp + relativePermeability/RelpermDriverVanGenuchtenStone2RunTest.cpp + relativePermeability/RelpermDriverTableRelativeRunTest.cpp + relativePermeability/RelpermDriverTableRelativeHysteresisRunTest.cpp + solid/TriaxialDriver.cpp + ) + +set( dependencyList ${parallelDeps} constitutive events ) + +if( ENABLE_PVTPackage ) + set( constitutiveDrivers_sources + ${constitutiveDrivers_sources} + fluid/multiFluid/compositional/PVTDriverRunTestCompositionalMultiphaseFluid.cpp + ) +endif() + +geos_decorate_link_dependencies( LIST decoratedDependencies + DEPENDENCIES ${dependencyList} ) + +blt_add_library( NAME constitutiveDrivers + SOURCES ${constitutiveDrivers_sources} + HEADERS ${constitutiveDrivers_headers} + DEPENDS_ON ${decoratedDependencies} + OBJECT ${GEOS_BUILD_OBJ_LIBS} + SHARED ${GEOS_BUILD_SHARED_LIBS} + ) + +target_include_directories( constitutiveDrivers PUBLIC ${CMAKE_SOURCE_DIR}/coreComponents ) diff --git a/src/coreComponents/constitutiveDrivers/docs/ConstitutiveDrivers.rst b/src/coreComponents/constitutiveDrivers/docs/ConstitutiveDrivers.rst new file mode 100644 index 00000000000..dd1b29d36d3 --- /dev/null +++ b/src/coreComponents/constitutiveDrivers/docs/ConstitutiveDrivers.rst @@ -0,0 +1,13 @@ +.. _ConstitutiveDrivers: + +Constitutive Drivers +============================================ +To test and calibrate constitutive models, GEOS provides a set of drivers that can be used to run simulations with specific input parameters. +These drivers are designed to facilitate the exploration of various constitutive behaviors and to validate the models against known benchmarks. + +.. toctree:: + :maxdepth: 1 + + SolidModels + + PVTDriver diff --git a/src/coreComponents/constitutive/docs/PVTDriver.rst b/src/coreComponents/constitutiveDrivers/docs/PVTDriver.rst similarity index 100% rename from src/coreComponents/constitutive/docs/PVTDriver.rst rename to src/coreComponents/constitutiveDrivers/docs/PVTDriver.rst diff --git a/src/coreComponents/constitutive/docs/solid/TriaxialDriver.rst b/src/coreComponents/constitutiveDrivers/docs/TriaxialDriver.rst similarity index 100% rename from src/coreComponents/constitutive/docs/solid/TriaxialDriver.rst rename to src/coreComponents/constitutiveDrivers/docs/TriaxialDriver.rst diff --git a/src/coreComponents/constitutive/docs/solid/TriaxialDriver.svg b/src/coreComponents/constitutiveDrivers/docs/TriaxialDriver.svg similarity index 100% rename from src/coreComponents/constitutive/docs/solid/TriaxialDriver.svg rename to src/coreComponents/constitutiveDrivers/docs/TriaxialDriver.svg diff --git a/src/coreComponents/constitutive/fluid/multifluid/CO2Brine/PVTDriverRunTestCO2BrineEzrokhiFluid.cpp b/src/coreComponents/constitutiveDrivers/fluid/multiFluid/CO2Brine/PVTDriverRunTestCO2BrineEzrokhiFluid.cpp similarity index 92% rename from src/coreComponents/constitutive/fluid/multifluid/CO2Brine/PVTDriverRunTestCO2BrineEzrokhiFluid.cpp rename to src/coreComponents/constitutiveDrivers/fluid/multiFluid/CO2Brine/PVTDriverRunTestCO2BrineEzrokhiFluid.cpp index 37e0092277e..4df6aae9cd4 100644 --- a/src/coreComponents/constitutive/fluid/multifluid/CO2Brine/PVTDriverRunTestCO2BrineEzrokhiFluid.cpp +++ b/src/coreComponents/constitutiveDrivers/fluid/multiFluid/CO2Brine/PVTDriverRunTestCO2BrineEzrokhiFluid.cpp @@ -13,7 +13,7 @@ * ------------------------------------------------------------------------------------------------------------ */ -#include "constitutive/fluid/multifluid/PVTDriverRunTest.hpp" +#include "constitutiveDrivers/fluid/multiFluid/PVTDriverRunTest.hpp" #include "constitutive/fluid/multifluid/CO2Brine/CO2BrineFluid.hpp" namespace geos diff --git a/src/coreComponents/constitutive/fluid/multifluid/CO2Brine/PVTDriverRunTestCO2BrineEzrokhiThermalFluid.cpp b/src/coreComponents/constitutiveDrivers/fluid/multiFluid/CO2Brine/PVTDriverRunTestCO2BrineEzrokhiThermalFluid.cpp similarity index 93% rename from src/coreComponents/constitutive/fluid/multifluid/CO2Brine/PVTDriverRunTestCO2BrineEzrokhiThermalFluid.cpp rename to src/coreComponents/constitutiveDrivers/fluid/multiFluid/CO2Brine/PVTDriverRunTestCO2BrineEzrokhiThermalFluid.cpp index a42c0773420..2e91dd5c8be 100644 --- a/src/coreComponents/constitutive/fluid/multifluid/CO2Brine/PVTDriverRunTestCO2BrineEzrokhiThermalFluid.cpp +++ b/src/coreComponents/constitutiveDrivers/fluid/multiFluid/CO2Brine/PVTDriverRunTestCO2BrineEzrokhiThermalFluid.cpp @@ -13,7 +13,7 @@ * ------------------------------------------------------------------------------------------------------------ */ -#include "constitutive/fluid/multifluid/PVTDriverRunTest.hpp" +#include "constitutiveDrivers/fluid/multiFluid/PVTDriverRunTest.hpp" #include "constitutive/fluid/multifluid/CO2Brine/CO2BrineFluid.hpp" namespace geos diff --git a/src/coreComponents/constitutive/fluid/multifluid/CO2Brine/PVTDriverRunTestCO2BrinePhillipsFluid.cpp b/src/coreComponents/constitutiveDrivers/fluid/multiFluid/CO2Brine/PVTDriverRunTestCO2BrinePhillipsFluid.cpp similarity index 93% rename from src/coreComponents/constitutive/fluid/multifluid/CO2Brine/PVTDriverRunTestCO2BrinePhillipsFluid.cpp rename to src/coreComponents/constitutiveDrivers/fluid/multiFluid/CO2Brine/PVTDriverRunTestCO2BrinePhillipsFluid.cpp index a7fe70a0b0d..a36fc8c0cbd 100644 --- a/src/coreComponents/constitutive/fluid/multifluid/CO2Brine/PVTDriverRunTestCO2BrinePhillipsFluid.cpp +++ b/src/coreComponents/constitutiveDrivers/fluid/multiFluid/CO2Brine/PVTDriverRunTestCO2BrinePhillipsFluid.cpp @@ -13,7 +13,7 @@ * ------------------------------------------------------------------------------------------------------------ */ -#include "constitutive/fluid/multifluid/PVTDriverRunTest.hpp" +#include "constitutiveDrivers/fluid/multiFluid/PVTDriverRunTest.hpp" #include "constitutive/fluid/multifluid/CO2Brine/CO2BrineFluid.hpp" namespace geos diff --git a/src/coreComponents/constitutive/fluid/multifluid/CO2Brine/PVTDriverRunTestCO2BrinePhillipsThermalFluid.cpp b/src/coreComponents/constitutiveDrivers/fluid/multiFluid/CO2Brine/PVTDriverRunTestCO2BrinePhillipsThermalFluid.cpp similarity index 93% rename from src/coreComponents/constitutive/fluid/multifluid/CO2Brine/PVTDriverRunTestCO2BrinePhillipsThermalFluid.cpp rename to src/coreComponents/constitutiveDrivers/fluid/multiFluid/CO2Brine/PVTDriverRunTestCO2BrinePhillipsThermalFluid.cpp index 4536efa96f5..12c1472d97a 100644 --- a/src/coreComponents/constitutive/fluid/multifluid/CO2Brine/PVTDriverRunTestCO2BrinePhillipsThermalFluid.cpp +++ b/src/coreComponents/constitutiveDrivers/fluid/multiFluid/CO2Brine/PVTDriverRunTestCO2BrinePhillipsThermalFluid.cpp @@ -13,7 +13,7 @@ * ------------------------------------------------------------------------------------------------------------ */ -#include "constitutive/fluid/multifluid/PVTDriverRunTest.hpp" +#include "constitutiveDrivers/fluid/multiFluid/PVTDriverRunTest.hpp" #include "constitutive/fluid/multifluid/CO2Brine/CO2BrineFluid.hpp" namespace geos diff --git a/src/coreComponents/constitutive/fluid/multifluid/PVTDriver.cpp b/src/coreComponents/constitutiveDrivers/fluid/multiFluid/PVTDriver.cpp similarity index 99% rename from src/coreComponents/constitutive/fluid/multifluid/PVTDriver.cpp rename to src/coreComponents/constitutiveDrivers/fluid/multiFluid/PVTDriver.cpp index 8a987d2168b..aa20b9f12a7 100644 --- a/src/coreComponents/constitutive/fluid/multifluid/PVTDriver.cpp +++ b/src/coreComponents/constitutiveDrivers/fluid/multiFluid/PVTDriver.cpp @@ -24,7 +24,7 @@ #include "constitutive/fluid/multifluid/MultiFluidBase.hpp" #include "constitutive/fluid/multifluid/MultiFluidSelector.hpp" #include "constitutive/fluid/multifluid/MultiFluidConstants.hpp" -#include "fileIO/Outputs/OutputBase.hpp" +//#include "fileIO/Outputs/OutputBase.hpp" #include "functions/FunctionManager.hpp" #include "functions/TableFunction.hpp" #include "common/format/StringUtilities.hpp" diff --git a/src/coreComponents/constitutive/fluid/multifluid/PVTDriver.hpp b/src/coreComponents/constitutiveDrivers/fluid/multiFluid/PVTDriver.hpp similarity index 100% rename from src/coreComponents/constitutive/fluid/multifluid/PVTDriver.hpp rename to src/coreComponents/constitutiveDrivers/fluid/multiFluid/PVTDriver.hpp diff --git a/src/coreComponents/constitutive/fluid/multifluid/PVTDriverRunTest.hpp b/src/coreComponents/constitutiveDrivers/fluid/multiFluid/PVTDriverRunTest.hpp similarity index 100% rename from src/coreComponents/constitutive/fluid/multifluid/PVTDriverRunTest.hpp rename to src/coreComponents/constitutiveDrivers/fluid/multiFluid/PVTDriverRunTest.hpp diff --git a/src/coreComponents/constitutive/fluid/multifluid/blackOil/PVTDriverRunTestDeadOilFluid.cpp b/src/coreComponents/constitutiveDrivers/fluid/multiFluid/blackOil/PVTDriverRunTestDeadOilFluid.cpp similarity index 94% rename from src/coreComponents/constitutive/fluid/multifluid/blackOil/PVTDriverRunTestDeadOilFluid.cpp rename to src/coreComponents/constitutiveDrivers/fluid/multiFluid/blackOil/PVTDriverRunTestDeadOilFluid.cpp index 86ae569e672..4d47ced92ab 100644 --- a/src/coreComponents/constitutive/fluid/multifluid/blackOil/PVTDriverRunTestDeadOilFluid.cpp +++ b/src/coreComponents/constitutiveDrivers/fluid/multiFluid/blackOil/PVTDriverRunTestDeadOilFluid.cpp @@ -17,7 +17,7 @@ * PVTDriverRunTestDeadOilFluid.cpp */ -#include "constitutive/fluid/multifluid/PVTDriverRunTest.hpp" +#include "constitutiveDrivers/fluid/multiFluid/PVTDriverRunTest.hpp" #include "constitutive/fluid/multifluid/blackOil/DeadOilFluid.hpp" #include "constitutive/fluid/multifluid/blackOil/BlackOilFluid.hpp" diff --git a/src/coreComponents/constitutive/fluid/multifluid/compositional/PVTDriverRunTestCompositionalMultiphaseFluid.cpp b/src/coreComponents/constitutiveDrivers/fluid/multiFluid/compositional/PVTDriverRunTestCompositionalMultiphaseFluid.cpp similarity index 93% rename from src/coreComponents/constitutive/fluid/multifluid/compositional/PVTDriverRunTestCompositionalMultiphaseFluid.cpp rename to src/coreComponents/constitutiveDrivers/fluid/multiFluid/compositional/PVTDriverRunTestCompositionalMultiphaseFluid.cpp index 95d7805133b..f93d5039c64 100644 --- a/src/coreComponents/constitutive/fluid/multifluid/compositional/PVTDriverRunTestCompositionalMultiphaseFluid.cpp +++ b/src/coreComponents/constitutiveDrivers/fluid/multiFluid/compositional/PVTDriverRunTestCompositionalMultiphaseFluid.cpp @@ -17,7 +17,7 @@ * PVTDriverRunTestCompositionalMultiphaseFluid.cpp */ -#include "constitutive/fluid/multifluid/PVTDriverRunTest.hpp" +#include "constitutiveDrivers/fluid/multiFluid/PVTDriverRunTest.hpp" #include "constitutive/fluid/multifluid/compositional/CompositionalMultiphaseFluidPVTPackage.hpp" namespace geos diff --git a/src/coreComponents/constitutive/fluid/multifluid/compositional/PVTDriverRunTestCompositionalTwoPhaseConstantViscosity.cpp b/src/coreComponents/constitutiveDrivers/fluid/multiFluid/compositional/PVTDriverRunTestCompositionalTwoPhaseConstantViscosity.cpp similarity index 93% rename from src/coreComponents/constitutive/fluid/multifluid/compositional/PVTDriverRunTestCompositionalTwoPhaseConstantViscosity.cpp rename to src/coreComponents/constitutiveDrivers/fluid/multiFluid/compositional/PVTDriverRunTestCompositionalTwoPhaseConstantViscosity.cpp index 5e3a7da05d5..f3968bef2ad 100644 --- a/src/coreComponents/constitutive/fluid/multifluid/compositional/PVTDriverRunTestCompositionalTwoPhaseConstantViscosity.cpp +++ b/src/coreComponents/constitutiveDrivers/fluid/multiFluid/compositional/PVTDriverRunTestCompositionalTwoPhaseConstantViscosity.cpp @@ -17,7 +17,7 @@ * PVTDriverRunTestCompositionalTwoPhaseConstantViscosity.cpp */ -#include "constitutive/fluid/multifluid/PVTDriverRunTest.hpp" +#include "constitutiveDrivers/fluid/multiFluid/PVTDriverRunTest.hpp" #include "constitutive/fluid/multifluid/compositional/CompositionalMultiphaseFluid.hpp" namespace geos diff --git a/src/coreComponents/constitutive/fluid/multifluid/compositional/PVTDriverRunTestCompositionalTwoPhaseLohrenzBrayClarkViscosity.cpp b/src/coreComponents/constitutiveDrivers/fluid/multiFluid/compositional/PVTDriverRunTestCompositionalTwoPhaseLohrenzBrayClarkViscosity.cpp similarity index 93% rename from src/coreComponents/constitutive/fluid/multifluid/compositional/PVTDriverRunTestCompositionalTwoPhaseLohrenzBrayClarkViscosity.cpp rename to src/coreComponents/constitutiveDrivers/fluid/multiFluid/compositional/PVTDriverRunTestCompositionalTwoPhaseLohrenzBrayClarkViscosity.cpp index f1c85834b70..afcfd267f63 100644 --- a/src/coreComponents/constitutive/fluid/multifluid/compositional/PVTDriverRunTestCompositionalTwoPhaseLohrenzBrayClarkViscosity.cpp +++ b/src/coreComponents/constitutiveDrivers/fluid/multiFluid/compositional/PVTDriverRunTestCompositionalTwoPhaseLohrenzBrayClarkViscosity.cpp @@ -17,7 +17,7 @@ * PVTDriverRunTestCompositionalTwoPhaseLohrenzBrayClarkViscosity.cpp */ -#include "constitutive/fluid/multifluid/PVTDriverRunTest.hpp" +#include "constitutiveDrivers/fluid/multiFluid/PVTDriverRunTest.hpp" #include "constitutive/fluid/multifluid/compositional/CompositionalMultiphaseFluid.hpp" namespace geos diff --git a/src/coreComponents/constitutive/fluid/multifluid/reactive/ReactiveFluidDriver.cpp b/src/coreComponents/constitutiveDrivers/fluid/multiFluid/reactive/ReactiveFluidDriver.cpp similarity index 99% rename from src/coreComponents/constitutive/fluid/multifluid/reactive/ReactiveFluidDriver.cpp rename to src/coreComponents/constitutiveDrivers/fluid/multiFluid/reactive/ReactiveFluidDriver.cpp index 7c95359f28a..73625f11864 100644 --- a/src/coreComponents/constitutive/fluid/multifluid/reactive/ReactiveFluidDriver.cpp +++ b/src/coreComponents/constitutiveDrivers/fluid/multiFluid/reactive/ReactiveFluidDriver.cpp @@ -18,7 +18,6 @@ */ #include "ReactiveFluidDriver.hpp" -#include "fileIO/Outputs/OutputBase.hpp" #include "constitutive/fluid/multifluid/CO2Brine/functions/PureWaterProperties.hpp" #include "functions/TableFunction.hpp" #include "functions/FunctionManager.hpp" diff --git a/src/coreComponents/constitutive/fluid/multifluid/reactive/ReactiveFluidDriver.hpp b/src/coreComponents/constitutiveDrivers/fluid/multiFluid/reactive/ReactiveFluidDriver.hpp similarity index 100% rename from src/coreComponents/constitutive/fluid/multifluid/reactive/ReactiveFluidDriver.hpp rename to src/coreComponents/constitutiveDrivers/fluid/multiFluid/reactive/ReactiveFluidDriver.hpp diff --git a/src/coreComponents/constitutive/relativePermeability/RelpermDriver.cpp b/src/coreComponents/constitutiveDrivers/relativePermeability/RelpermDriver.cpp similarity index 100% rename from src/coreComponents/constitutive/relativePermeability/RelpermDriver.cpp rename to src/coreComponents/constitutiveDrivers/relativePermeability/RelpermDriver.cpp diff --git a/src/coreComponents/constitutive/relativePermeability/RelpermDriver.hpp b/src/coreComponents/constitutiveDrivers/relativePermeability/RelpermDriver.hpp similarity index 100% rename from src/coreComponents/constitutive/relativePermeability/RelpermDriver.hpp rename to src/coreComponents/constitutiveDrivers/relativePermeability/RelpermDriver.hpp diff --git a/src/coreComponents/constitutive/relativePermeability/RelpermDriverBrooksCoreyBakerRunTest.cpp b/src/coreComponents/constitutiveDrivers/relativePermeability/RelpermDriverBrooksCoreyBakerRunTest.cpp similarity index 91% rename from src/coreComponents/constitutive/relativePermeability/RelpermDriverBrooksCoreyBakerRunTest.cpp rename to src/coreComponents/constitutiveDrivers/relativePermeability/RelpermDriverBrooksCoreyBakerRunTest.cpp index c46982327aa..20601bcc9b8 100644 --- a/src/coreComponents/constitutive/relativePermeability/RelpermDriverBrooksCoreyBakerRunTest.cpp +++ b/src/coreComponents/constitutiveDrivers/relativePermeability/RelpermDriverBrooksCoreyBakerRunTest.cpp @@ -14,7 +14,7 @@ */ #include "RelpermDriverRunTest.hpp" -#include "BrooksCoreyBakerRelativePermeability.hpp" +#include "constitutive/relativePermeability/BrooksCoreyBakerRelativePermeability.hpp" namespace geos diff --git a/src/coreComponents/constitutive/relativePermeability/RelpermDriverBrooksCoreyRunTest.cpp b/src/coreComponents/constitutiveDrivers/relativePermeability/RelpermDriverBrooksCoreyRunTest.cpp similarity index 91% rename from src/coreComponents/constitutive/relativePermeability/RelpermDriverBrooksCoreyRunTest.cpp rename to src/coreComponents/constitutiveDrivers/relativePermeability/RelpermDriverBrooksCoreyRunTest.cpp index 6fb6f873dbc..b49a329e467 100644 --- a/src/coreComponents/constitutive/relativePermeability/RelpermDriverBrooksCoreyRunTest.cpp +++ b/src/coreComponents/constitutiveDrivers/relativePermeability/RelpermDriverBrooksCoreyRunTest.cpp @@ -14,7 +14,7 @@ */ #include "RelpermDriverRunTest.hpp" -#include "BrooksCoreyRelativePermeability.hpp" +#include "constitutive/relativePermeability/BrooksCoreyRelativePermeability.hpp" namespace geos diff --git a/src/coreComponents/constitutive/relativePermeability/RelpermDriverBrooksCoreyStone2RunTest.cpp b/src/coreComponents/constitutiveDrivers/relativePermeability/RelpermDriverBrooksCoreyStone2RunTest.cpp similarity index 91% rename from src/coreComponents/constitutive/relativePermeability/RelpermDriverBrooksCoreyStone2RunTest.cpp rename to src/coreComponents/constitutiveDrivers/relativePermeability/RelpermDriverBrooksCoreyStone2RunTest.cpp index 57efb4ff67a..1884ff3491d 100644 --- a/src/coreComponents/constitutive/relativePermeability/RelpermDriverBrooksCoreyStone2RunTest.cpp +++ b/src/coreComponents/constitutiveDrivers/relativePermeability/RelpermDriverBrooksCoreyStone2RunTest.cpp @@ -14,7 +14,7 @@ */ #include "RelpermDriverRunTest.hpp" -#include "BrooksCoreyStone2RelativePermeability.hpp" +#include "constitutive/relativePermeability/BrooksCoreyStone2RelativePermeability.hpp" namespace geos diff --git a/src/coreComponents/constitutive/relativePermeability/RelpermDriverRunTest.hpp b/src/coreComponents/constitutiveDrivers/relativePermeability/RelpermDriverRunTest.hpp similarity index 98% rename from src/coreComponents/constitutive/relativePermeability/RelpermDriverRunTest.hpp rename to src/coreComponents/constitutiveDrivers/relativePermeability/RelpermDriverRunTest.hpp index f361beaf00c..75315d66fb4 100644 --- a/src/coreComponents/constitutive/relativePermeability/RelpermDriverRunTest.hpp +++ b/src/coreComponents/constitutiveDrivers/relativePermeability/RelpermDriverRunTest.hpp @@ -16,9 +16,9 @@ #ifndef GEOS_RELPERMDRIVERRUNTEST_HPP_ #define GEOS_RELPERMDRIVERRUNTEST_HPP_ -#include "constitutive/relativePermeability/RelpermDriver.hpp" +#include "constitutiveDrivers/relativePermeability/RelpermDriver.hpp" #include "constitutive/relativePermeability/RelativePermeabilityFields.hpp" -#include "layouts.hpp" +#include "constitutive/relativePermeability/layouts.hpp" namespace geos diff --git a/src/coreComponents/constitutive/relativePermeability/RelpermDriverTableRelativeHysteresisRunTest.cpp b/src/coreComponents/constitutiveDrivers/relativePermeability/RelpermDriverTableRelativeHysteresisRunTest.cpp similarity index 91% rename from src/coreComponents/constitutive/relativePermeability/RelpermDriverTableRelativeHysteresisRunTest.cpp rename to src/coreComponents/constitutiveDrivers/relativePermeability/RelpermDriverTableRelativeHysteresisRunTest.cpp index b3572d74fe3..3e62792b0d7 100644 --- a/src/coreComponents/constitutive/relativePermeability/RelpermDriverTableRelativeHysteresisRunTest.cpp +++ b/src/coreComponents/constitutiveDrivers/relativePermeability/RelpermDriverTableRelativeHysteresisRunTest.cpp @@ -14,7 +14,7 @@ */ #include "RelpermDriverRunTest.hpp" -#include "TableRelativePermeabilityHysteresis.hpp" +#include "constitutive/relativePermeability/TableRelativePermeabilityHysteresis.hpp" namespace geos diff --git a/src/coreComponents/constitutive/relativePermeability/RelpermDriverTableRelativeRunTest.cpp b/src/coreComponents/constitutiveDrivers/relativePermeability/RelpermDriverTableRelativeRunTest.cpp similarity index 92% rename from src/coreComponents/constitutive/relativePermeability/RelpermDriverTableRelativeRunTest.cpp rename to src/coreComponents/constitutiveDrivers/relativePermeability/RelpermDriverTableRelativeRunTest.cpp index bfa0ad9c510..faf74231723 100644 --- a/src/coreComponents/constitutive/relativePermeability/RelpermDriverTableRelativeRunTest.cpp +++ b/src/coreComponents/constitutiveDrivers/relativePermeability/RelpermDriverTableRelativeRunTest.cpp @@ -14,7 +14,7 @@ */ #include "RelpermDriverRunTest.hpp" -#include "TableRelativePermeability.hpp" +#include "constitutive/relativePermeability/TableRelativePermeability.hpp" namespace geos diff --git a/src/coreComponents/constitutive/relativePermeability/RelpermDriverVanGenuchtenBakerRunTest.cpp b/src/coreComponents/constitutiveDrivers/relativePermeability/RelpermDriverVanGenuchtenBakerRunTest.cpp similarity index 91% rename from src/coreComponents/constitutive/relativePermeability/RelpermDriverVanGenuchtenBakerRunTest.cpp rename to src/coreComponents/constitutiveDrivers/relativePermeability/RelpermDriverVanGenuchtenBakerRunTest.cpp index 3de1845934b..2513e100131 100644 --- a/src/coreComponents/constitutive/relativePermeability/RelpermDriverVanGenuchtenBakerRunTest.cpp +++ b/src/coreComponents/constitutiveDrivers/relativePermeability/RelpermDriverVanGenuchtenBakerRunTest.cpp @@ -14,7 +14,7 @@ */ #include "RelpermDriverRunTest.hpp" -#include "VanGenuchtenBakerRelativePermeability.hpp" +#include "constitutive/relativePermeability/VanGenuchtenBakerRelativePermeability.hpp" namespace geos diff --git a/src/coreComponents/constitutive/relativePermeability/RelpermDriverVanGenuchtenStone2RunTest.cpp b/src/coreComponents/constitutiveDrivers/relativePermeability/RelpermDriverVanGenuchtenStone2RunTest.cpp similarity index 91% rename from src/coreComponents/constitutive/relativePermeability/RelpermDriverVanGenuchtenStone2RunTest.cpp rename to src/coreComponents/constitutiveDrivers/relativePermeability/RelpermDriverVanGenuchtenStone2RunTest.cpp index 4e3ef1fc796..c17b1646d3f 100644 --- a/src/coreComponents/constitutive/relativePermeability/RelpermDriverVanGenuchtenStone2RunTest.cpp +++ b/src/coreComponents/constitutiveDrivers/relativePermeability/RelpermDriverVanGenuchtenStone2RunTest.cpp @@ -14,7 +14,7 @@ */ #include "RelpermDriverRunTest.hpp" -#include "VanGenuchtenStone2RelativePermeability.hpp" +#include "constitutive/relativePermeability/VanGenuchtenStone2RelativePermeability.hpp" namespace geos diff --git a/src/coreComponents/constitutive/solid/TriaxialDriver.cpp b/src/coreComponents/constitutiveDrivers/solid/TriaxialDriver.cpp similarity index 99% rename from src/coreComponents/constitutive/solid/TriaxialDriver.cpp rename to src/coreComponents/constitutiveDrivers/solid/TriaxialDriver.cpp index 5d345e6986f..c0e2a8ecdeb 100644 --- a/src/coreComponents/constitutive/solid/TriaxialDriver.cpp +++ b/src/coreComponents/constitutiveDrivers/solid/TriaxialDriver.cpp @@ -18,7 +18,6 @@ */ #include "TriaxialDriver.hpp" -#include "fileIO/Outputs/OutputBase.hpp" namespace geos { diff --git a/src/coreComponents/constitutive/solid/TriaxialDriver.hpp b/src/coreComponents/constitutiveDrivers/solid/TriaxialDriver.hpp similarity index 100% rename from src/coreComponents/constitutive/solid/TriaxialDriver.hpp rename to src/coreComponents/constitutiveDrivers/solid/TriaxialDriver.hpp diff --git a/src/coreComponents/dataRepository/CMakeLists.txt b/src/coreComponents/dataRepository/CMakeLists.txt index bfaecd6d778..1d97ce8d11e 100644 --- a/src/coreComponents/dataRepository/CMakeLists.txt +++ b/src/coreComponents/dataRepository/CMakeLists.txt @@ -50,12 +50,16 @@ if( ENABLE_PYGEOSX ) list( APPEND dependencyList Python3::Python pylvarray ) endif() +geos_decorate_link_dependencies( LIST decoratedDependencies + DEPENDENCIES ${dependencyList} ) blt_add_library( NAME dataRepository SOURCES ${dataRepository_sources} HEADERS ${dataRepository_headers} - DEPENDS_ON ${dependencyList} - OBJECT ${GEOS_BUILD_OBJ_LIBS} ) + DEPENDS_ON ${decoratedDependencies} + OBJECT ${GEOS_BUILD_OBJ_LIBS} + SHARED ${GEOS_BUILD_SHARED_LIBS} + ) target_include_directories( dataRepository PUBLIC ${CMAKE_SOURCE_DIR}/coreComponents ) diff --git a/src/coreComponents/denseLinearAlgebra/CMakeLists.txt b/src/coreComponents/denseLinearAlgebra/CMakeLists.txt index 791767bc5c6..64a91cf1c70 100644 --- a/src/coreComponents/denseLinearAlgebra/CMakeLists.txt +++ b/src/coreComponents/denseLinearAlgebra/CMakeLists.txt @@ -10,11 +10,16 @@ set( denseLinearAlgebra_sources set( dependencyList codingUtilities blas lapack ${parallelDeps} ) +geos_decorate_link_dependencies( LIST decoratedDependencies + DEPENDENCIES ${dependencyList} ) + blt_add_library( NAME denseLinearAlgebra SOURCES ${denseLinearAlgebra_sources} HEADERS ${denseLinearAlgebra_headers} - DEPENDS_ON ${dependencyList} - OBJECT ${GEOS_BUILD_OBJ_LIBS} ) + DEPENDS_ON ${decoratedDependencies} + OBJECT ${GEOS_BUILD_OBJ_LIBS} + SHARED ${GEOS_BUILD_SHARED_LIBS} + ) target_include_directories( denseLinearAlgebra PUBLIC ${CMAKE_CURRENT_LIST_DIR} ) diff --git a/src/coreComponents/discretizationMethods/CMakeLists.txt b/src/coreComponents/discretizationMethods/CMakeLists.txt index 220d535ab28..191f8dd12c9 100644 --- a/src/coreComponents/discretizationMethods/CMakeLists.txt +++ b/src/coreComponents/discretizationMethods/CMakeLists.txt @@ -13,11 +13,15 @@ set( dependencyList ${parallelDeps} finiteVolume ) set( mainInterface_sources NumericalMethodsManager.cpp ) +geos_decorate_link_dependencies( LIST decoratedDependencies + DEPENDENCIES ${dependencyList} ) + blt_add_library( NAME discretizationMethods SOURCES ${mainInterface_sources} HEADERS ${mainInterface_headers} - DEPENDS_ON ${dependencyList} + DEPENDS_ON ${decoratedDependencies} OBJECT ${GEOS_BUILD_OBJ_LIBS} + SHARED ${GEOS_BUILD_SHARED_LIBS} ) target_include_directories( discretizationMethods PUBLIC ${CMAKE_SOURCE_DIR}/coreComponents ) diff --git a/src/coreComponents/events/CMakeLists.txt b/src/coreComponents/events/CMakeLists.txt index 59217e42f7d..184dea2f0c1 100644 --- a/src/coreComponents/events/CMakeLists.txt +++ b/src/coreComponents/events/CMakeLists.txt @@ -24,13 +24,17 @@ set( events_sources tasks/TasksManager.cpp ) -set( dependencyList ${parallelDeps} common fileIO dataRepository ) +set( dependencyList ${parallelDeps} functions ) + +geos_decorate_link_dependencies( LIST decoratedDependencies + DEPENDENCIES ${dependencyList} ) blt_add_library( NAME events SOURCES ${events_sources} HEADERS ${events_headers} - DEPENDS_ON ${dependencyList} + DEPENDS_ON ${decoratedDependencies} OBJECT ${GEOS_BUILD_OBJ_LIBS} + SHARED ${GEOS_BUILD_SHARED_LIBS} ) target_include_directories( events PUBLIC ${CMAKE_SOURCE_DIR}/coreComponents ) diff --git a/src/coreComponents/events/EventManager.cpp b/src/coreComponents/events/EventManager.cpp index 6dc12b5624d..cdb4c239a56 100644 --- a/src/coreComponents/events/EventManager.cpp +++ b/src/coreComponents/events/EventManager.cpp @@ -21,7 +21,7 @@ #include "common/TimingMacros.hpp" #include "events/EventBase.hpp" -#include "mesh/mpiCommunications/CommunicationTools.hpp" +#include "common/MpiWrapper.hpp" #include "common/Units.hpp" namespace geos diff --git a/src/coreComponents/fieldSpecification/CMakeLists.txt b/src/coreComponents/fieldSpecification/CMakeLists.txt index d13d6a6c795..f7b68eaaa1e 100644 --- a/src/coreComponents/fieldSpecification/CMakeLists.txt +++ b/src/coreComponents/fieldSpecification/CMakeLists.txt @@ -26,13 +26,17 @@ set( fieldSpecification_sources PerfectlyMatchedLayer.cpp ) -set( dependencyList ${parallelDeps} functions linearAlgebra ) +set( dependencyList ${parallelDeps} linearAlgebra ) + +geos_decorate_link_dependencies( LIST decoratedDependencies + DEPENDENCIES ${dependencyList} ) blt_add_library( NAME fieldSpecification SOURCES ${fieldSpecification_sources} HEADERS ${fieldSpecification_headers} - DEPENDS_ON ${dependencyList} + DEPENDS_ON ${decoratedDependencies} OBJECT ${GEOS_BUILD_OBJ_LIBS} + SHARED ${GEOS_BUILD_SHARED_LIBS} ) target_include_directories( fieldSpecification PUBLIC ${CMAKE_SOURCE_DIR}/coreComponents ) diff --git a/src/coreComponents/fileIO/CMakeLists.txt b/src/coreComponents/fileIO/CMakeLists.txt index 84c758fa2b2..714ea11808c 100644 --- a/src/coreComponents/fileIO/CMakeLists.txt +++ b/src/coreComponents/fileIO/CMakeLists.txt @@ -28,7 +28,7 @@ set( fileIO_sources timeHistory/PackCollection.cpp timeHistory/HDFHistoryIO.cpp ) -set( dependencyList ${parallelDeps} mesh constitutive HDF5::HDF5 ) +set( dependencyList ${parallelDeps} events mesh HDF5::HDF5 ) if( ENABLE_PYGEOSX ) list( APPEND fileIO_headers python/PyHistoryCollectionType.hpp @@ -79,11 +79,16 @@ if( ENABLE_CUDA AND ENABLE_CUDA_NVTOOLSEXT ) list( APPEND dependencyList CUDA::nvToolsExt ) endif() +geos_decorate_link_dependencies( LIST decoratedDependencies + DEPENDENCIES ${dependencyList} ) + blt_add_library( NAME fileIO SOURCES ${fileIO_sources} HEADERS ${fileIO_headers} - DEPENDS_ON ${dependencyList} - OBJECT ${GEOS_BUILD_OBJ_LIBS} ) + DEPENDS_ON ${decoratedDependencies} + OBJECT ${GEOS_BUILD_OBJ_LIBS} + SHARED ${GEOS_BUILD_SHARED_LIBS} + ) target_include_directories( fileIO PUBLIC ${CMAKE_SOURCE_DIR}/coreComponents ) diff --git a/src/coreComponents/fileIO/Outputs/OutputBase.cpp b/src/coreComponents/fileIO/Outputs/OutputBase.cpp index a09086396f4..88f8f9c8f29 100644 --- a/src/coreComponents/fileIO/Outputs/OutputBase.cpp +++ b/src/coreComponents/fileIO/Outputs/OutputBase.cpp @@ -19,13 +19,11 @@ #include "OutputBase.hpp" #include "common/MpiWrapper.hpp" +#include "functions/FunctionBase.hpp" namespace geos { -string OutputBase::m_outputDirectory; -string OutputBase::m_fileNameRoot; - using namespace dataRepository; OutputBase::OutputBase( string const & name, @@ -64,14 +62,33 @@ void OutputBase::initializePreSubGroups() // SetupDirectoryStructure(); } + + +string const & OutputBase::getOutputDirectory() +{ + static string m_outputDirectory; + return m_outputDirectory; +} + void OutputBase::setOutputDirectory( string const & outputDir ) { - m_outputDirectory = outputDir; + string & outputDirectory = const_cast< string & >( getOutputDirectory() ); + outputDirectory = outputDir; + FunctionBase::setOutputDirectory( outputDirectory ); +} + + + +string const & OutputBase::getFileNameRoot() +{ + static string m_fileNameRoot; + return m_fileNameRoot; } void OutputBase::setFileNameRoot( string const & root ) { - m_fileNameRoot = root; + string & fileRootName = const_cast< string & >( getFileNameRoot() ); + fileRootName = root; } diff --git a/src/coreComponents/fileIO/Outputs/OutputBase.hpp b/src/coreComponents/fileIO/Outputs/OutputBase.hpp index 6be32f38d2e..0f90ba1b12e 100644 --- a/src/coreComponents/fileIO/Outputs/OutputBase.hpp +++ b/src/coreComponents/fileIO/Outputs/OutputBase.hpp @@ -50,7 +50,7 @@ class OutputBase : public ExecutableGroup * @brief Getter for the output directory * @return The output directory **/ - static string getOutputDirectory() {return m_outputDirectory;} + static string const & getOutputDirectory(); /** * @brief Setter for the file name root @@ -62,7 +62,7 @@ class OutputBase : public ExecutableGroup * @brief Getter for the file name root * @return The file name root **/ - static string getFileNameRoot() { return m_fileNameRoot; } + static string const & getFileNameRoot(); /// Method for setting up output directories. virtual void setupDirectoryStructure(); @@ -92,6 +92,8 @@ class OutputBase : public ExecutableGroup **/ integer parallelThreads() const { return m_parallelThreads; } + + protected: /** * @brief Do initialization prior to calling initialization operations @@ -104,9 +106,6 @@ class OutputBase : public ExecutableGroup string m_childDirectory; integer m_parallelThreads; - static string m_outputDirectory; - static string m_fileNameRoot; - }; diff --git a/src/coreComponents/finiteElement/CMakeLists.txt b/src/coreComponents/finiteElement/CMakeLists.txt index a1e5b0b4ad4..aa3740ddd04 100644 --- a/src/coreComponents/finiteElement/CMakeLists.txt +++ b/src/coreComponents/finiteElement/CMakeLists.txt @@ -42,11 +42,15 @@ set( finiteElement_sources set( dependencyList ${parallelDeps} dataRepository ) +geos_decorate_link_dependencies( LIST decoratedDependencies + DEPENDENCIES ${dependencyList} ) + blt_add_library( NAME finiteElement SOURCES ${finiteElement_sources} HEADERS ${finiteElement_headers} - DEPENDS_ON ${dependencyList} + DEPENDS_ON ${decoratedDependencies} OBJECT ${GEOS_BUILD_OBJ_LIBS} + SHARED ${GEOS_BUILD_SHARED_LIBS} ) target_include_directories( finiteElement PUBLIC ${CMAKE_SOURCE_DIR}/coreComponents ) diff --git a/src/coreComponents/finiteVolume/CMakeLists.txt b/src/coreComponents/finiteVolume/CMakeLists.txt index 46b200344fa..9f855fc79db 100644 --- a/src/coreComponents/finiteVolume/CMakeLists.txt +++ b/src/coreComponents/finiteVolume/CMakeLists.txt @@ -40,13 +40,17 @@ set( finiteVolume_sources HybridMimeticDiscretization.cpp ) -set( dependencyList ${parallelDeps} mesh codingUtilities fieldSpecification ) +set( dependencyList ${parallelDeps} mesh fieldSpecification ) + +geos_decorate_link_dependencies( LIST decoratedDependencies + DEPENDENCIES ${dependencyList} ) blt_add_library( NAME finiteVolume SOURCES ${finiteVolume_sources} HEADERS ${finiteVolume_headers} - DEPENDS_ON ${dependencyList} + DEPENDS_ON ${decoratedDependencies} OBJECT ${GEOS_BUILD_OBJ_LIBS} + SHARED ${GEOS_BUILD_SHARED_LIBS} ) target_include_directories( finiteVolume PUBLIC ${CMAKE_SOURCE_DIR}/coreComponents ) diff --git a/src/coreComponents/functions/CMakeLists.txt b/src/coreComponents/functions/CMakeLists.txt index 5a3804dbc24..ec6542660da 100644 --- a/src/coreComponents/functions/CMakeLists.txt +++ b/src/coreComponents/functions/CMakeLists.txt @@ -27,17 +27,21 @@ if( ENABLE_MATHPRESSO ) endif() -set( dependencyList ${parallelDeps} codingUtilities dataRepository fileIO ) +set( dependencyList ${parallelDeps} dataRepository ) if( ENABLE_MATHPRESSO ) list( APPEND dependencyList mathpresso ) endif() +geos_decorate_link_dependencies( LIST decoratedDependencies + DEPENDENCIES ${dependencyList} ) + blt_add_library( NAME functions SOURCES ${functions_sources} HEADERS ${functions_headers} - DEPENDS_ON ${dependencyList} + DEPENDS_ON ${decoratedDependencies} OBJECT ${GEOS_BUILD_OBJ_LIBS} + SHARED ${GEOS_BUILD_SHARED_LIBS} ) target_include_directories( functions PUBLIC ${CMAKE_SOURCE_DIR}/coreComponents ) diff --git a/src/coreComponents/functions/FunctionBase.cpp b/src/coreComponents/functions/FunctionBase.cpp index dbc6279c727..3899ef1b3e6 100644 --- a/src/coreComponents/functions/FunctionBase.cpp +++ b/src/coreComponents/functions/FunctionBase.cpp @@ -72,5 +72,16 @@ real64_array FunctionBase::evaluateStats( dataRepository::Group const & group, return result; } +string const & FunctionBase::getOutputDirectory() +{ + static string outputDirectory; + return outputDirectory; +} +void FunctionBase::setOutputDirectory( string const & dir ) +{ + string & outputDirectory = const_cast< string & >( getOutputDirectory() ); + outputDirectory = dir; +} + } // end of namespace geos diff --git a/src/coreComponents/functions/FunctionBase.hpp b/src/coreComponents/functions/FunctionBase.hpp index 4d37ebf089c..3b160059743 100644 --- a/src/coreComponents/functions/FunctionBase.hpp +++ b/src/coreComponents/functions/FunctionBase.hpp @@ -124,6 +124,17 @@ class FunctionBase : public dataRepository::Group */ void setInputVarNames( string_array inputVarNames ) { m_inputVarNames = std::move( inputVarNames ); } + /** + * @brief Get the output directory for function output + * @return a string containing the output directory + */ + static string const & getOutputDirectory(); + + /** + * @brief Set the output directory for function output + * @param outputDir The output directory + */ + static void setOutputDirectory( string const & outputDir ); protected: /// names for the input variables diff --git a/src/coreComponents/functions/TableFunction.cpp b/src/coreComponents/functions/TableFunction.cpp index 9b71eee3805..dcd9099f7a6 100644 --- a/src/coreComponents/functions/TableFunction.cpp +++ b/src/coreComponents/functions/TableFunction.cpp @@ -20,7 +20,6 @@ #include "TableFunction.hpp" #include "codingUtilities/Parsing.hpp" #include "common/DataTypes.hpp" -#include "fileIO/Outputs/OutputBase.hpp" #include @@ -187,7 +186,7 @@ void TableFunction::checkCoord( real64 const coord, localIndex const dim ) const void TableFunction::print( std::string const & filename ) const { - std::ofstream os( joinPath( OutputBase::getOutputDirectory(), filename + ".csv" ) ); + std::ofstream os( joinPath( FunctionBase::getOutputDirectory(), filename + ".csv" ) ); integer const numDimensions = LvArray::integerConversion< integer >( m_coordinates.size() ); diff --git a/src/coreComponents/functions/unitTests/CMakeLists.txt b/src/coreComponents/functions/unitTests/CMakeLists.txt index 5aa938d9ce4..825cfe81687 100644 --- a/src/coreComponents/functions/unitTests/CMakeLists.txt +++ b/src/coreComponents/functions/unitTests/CMakeLists.txt @@ -5,12 +5,6 @@ set( gtest_geosx_tests set( dependencyList ${parallelDeps} gtest functions ) -# if ( GEOS_BUILD_SHARED_LIBS ) -# list( APPEND dependencyList geosx_core ) -# else() -# list( APPEND dependencyList ${geosx_core_libs} ) -# endif() - if (TARGET pugixml::pugixml) list( APPEND dependencyList pugixml::pugixml ) endif() diff --git a/src/coreComponents/linearAlgebra/CMakeLists.txt b/src/coreComponents/linearAlgebra/CMakeLists.txt index 07c823d8300..abbfcdf8bb2 100644 --- a/src/coreComponents/linearAlgebra/CMakeLists.txt +++ b/src/coreComponents/linearAlgebra/CMakeLists.txt @@ -48,15 +48,16 @@ set( linearAlgebra_sources utilities/ReverseCutHillMcKeeOrdering.cpp ) set( dependencyList ${parallelDeps} mesh denseLinearAlgebra ) +set( tplDependencyList "" ) list( APPEND linearAlgebra_headers interfaces/direct/SuiteSparse.hpp ) list( APPEND linearAlgebra_sources interfaces/direct/SuiteSparse.cpp ) -list( APPEND dependencyList suitesparse ) +list( APPEND tplDependencyList suitesparse ) if( ENABLE_SUPERLU_DIST ) list( APPEND linearAlgebra_headers interfaces/direct/SuperLUDist.hpp ) list( APPEND linearAlgebra_sources interfaces/direct/SuperLUDist.cpp ) - list( APPEND dependencyList superlu_dist ) + list( APPEND tplDependencyList superlu_dist ) endif( ) if( ENABLE_TRILINOS ) @@ -78,7 +79,7 @@ if( ENABLE_TRILINOS ) interfaces/trilinos/TrilinosPreconditioner.cpp interfaces/trilinos/TrilinosSolver.cpp ) - list( APPEND dependencyList trilinos ) + list( APPEND tplDependencyList trilinos ) endif() @@ -122,7 +123,7 @@ if( ENABLE_HYPRE ) interfaces/hypre/HypreUtils.cpp interfaces/hypre/HypreVector.cpp ) - list( APPEND dependencyList hypre umpire ) + list( APPEND tplDependencyList hypre umpire ) endif() @@ -145,15 +146,19 @@ if( ENABLE_PETSC ) interfaces/petsc/PetscSolver.cpp interfaces/petsc/PetscVector.cpp ) - list( APPEND dependencyList petsc ) + list( APPEND tplDependencyList petsc ) endif() +geos_decorate_link_dependencies( LIST decoratedDependencies + DEPENDENCIES ${dependencyList} ) + blt_add_library( NAME linearAlgebra SOURCES ${linearAlgebra_sources} HEADERS ${linearAlgebra_headers} - DEPENDS_ON ${dependencyList} + DEPENDS_ON ${decoratedDependencies} ${tplDependencyList} OBJECT ${GEOS_BUILD_OBJ_LIBS} + SHARED ${GEOS_BUILD_SHARED_LIBS} ) target_include_directories( linearAlgebra PUBLIC ${CMAKE_CURRENT_LIST_DIR} ) diff --git a/src/coreComponents/mainInterface/CMakeLists.txt b/src/coreComponents/mainInterface/CMakeLists.txt index 4b141ea8b7f..fb96f9ed6c5 100644 --- a/src/coreComponents/mainInterface/CMakeLists.txt +++ b/src/coreComponents/mainInterface/CMakeLists.txt @@ -18,13 +18,17 @@ set( mainInterface_sources version.cpp ) -set( dependencyList ${parallelDeps} physicsSolvers discretizationMethods fieldSpecification linearAlgebra dataRepository events fileIO optionparser ) +set( dependencyList ${parallelDeps} physicsSolvers constitutiveDrivers optionparser ) + +geos_decorate_link_dependencies( LIST decoratedDependencies + DEPENDENCIES ${dependencyList} ) blt_add_library( NAME mainInterface SOURCES ${mainInterface_sources} HEADERS ${mainInterface_headers} - DEPENDS_ON ${dependencyList} + DEPENDS_ON ${decoratedDependencies} OBJECT ${GEOS_BUILD_OBJ_LIBS} + SHARED ${GEOS_BUILD_SHARED_LIBS} ) add_dependencies( mainInterface generate_version ) diff --git a/src/coreComponents/mainInterface/ProblemManager.cpp b/src/coreComponents/mainInterface/ProblemManager.cpp index 23ca5862dc0..2319c40ee4d 100644 --- a/src/coreComponents/mainInterface/ProblemManager.cpp +++ b/src/coreComponents/mainInterface/ProblemManager.cpp @@ -24,6 +24,7 @@ #include "common/Path.hpp" #include "common/TimingMacros.hpp" #include "constitutive/ConstitutiveManager.hpp" +#include "constitutiveDrivers/solid/TriaxialDriver.hpp" #include "dataRepository/ConduitRestart.hpp" #include "dataRepository/RestartFlags.hpp" #include "dataRepository/KeyNames.hpp" @@ -141,7 +142,18 @@ ProblemManager::ProblemManager( conduit::Node & root ): } ProblemManager::~ProblemManager() -{} +{ + { + // This is a dummy to force the inclusion of constitutiveDrivers in the linking process for systems that have "--no-as-needed" as a + // default. + // The "correct" way to do this is in cmake using: + // target_link_options(constitutiveDrivers INTERFACE "SHELL:LINKER:--no-as-needed") + // but this applies "--no-as-needed" to all targets that link to constitutiveDrivers, which is not what we want. + // Also "--no-as-needed" is not supported on all platforms, so we have to guard the use of it. + // This is a workaround until we can figure out in cmake without too much trouble. + TriaxialDriver dummy( "dummy", this ); + } +} Group * ProblemManager::createChild( string const & GEOS_UNUSED_PARAM( childKey ), string const & GEOS_UNUSED_PARAM( childName ) ) diff --git a/src/coreComponents/mesh/CMakeLists.txt b/src/coreComponents/mesh/CMakeLists.txt index 7548a76d8f6..5eeb7f1a900 100644 --- a/src/coreComponents/mesh/CMakeLists.txt +++ b/src/coreComponents/mesh/CMakeLists.txt @@ -148,7 +148,7 @@ set( mesh_sources simpleGeometricObjects/ThickPlane.cpp utilities/ComputationalGeometry.cpp ) -set( dependencyList ${parallelDeps} schema dataRepository constitutive finiteElement parmetis metis ) +set( dependencyList ${parallelDeps} schema constitutive finiteElement parmetis metis ) if( ENABLE_VTK ) message(STATUS "Adding VTK readers") @@ -180,11 +180,16 @@ if( ENABLE_SCOTCH ) list( APPEND dependencyList ptscotch ) endif() +geos_decorate_link_dependencies( LIST decoratedDependencies + DEPENDENCIES ${dependencyList} ) + blt_add_library( NAME mesh SOURCES ${mesh_sources} HEADERS ${mesh_headers} - DEPENDS_ON ${dependencyList} - OBJECT ${GEOS_BUILD_OBJ_LIBS} ) + DEPENDS_ON ${decoratedDependencies} + OBJECT ${GEOS_BUILD_OBJ_LIBS} + SHARED ${GEOS_BUILD_SHARED_LIBS} + ) target_include_directories( mesh PUBLIC ${CMAKE_SOURCE_DIR}/coreComponents ) diff --git a/src/coreComponents/physicsSolvers/CMakeLists.txt b/src/coreComponents/physicsSolvers/CMakeLists.txt index cfcdce65e78..c8a6f1a002e 100644 --- a/src/coreComponents/physicsSolvers/CMakeLists.txt +++ b/src/coreComponents/physicsSolvers/CMakeLists.txt @@ -51,7 +51,8 @@ if( GEOS_ENABLE_WAVEPROPAGATION ) add_subdirectory( wavePropagation ) endif() -set( dependencyList ${parallelDeps} constitutive mesh linearAlgebra discretizationMethods events ) +set( dependencyList ${parallelDeps} fileIO discretizationMethods events ) + if( ENABLE_PYGEOSX ) list( APPEND physicsSolvers_headers python/PySolver.hpp @@ -61,11 +62,16 @@ if( ENABLE_PYGEOSX ) list( APPEND dependencyList Python3::Python pylvarray ) endif() +geos_decorate_link_dependencies( LIST decoratedDependencies + DEPENDENCIES ${dependencyList} ) + blt_add_library( NAME physicsSolvers SOURCES ${physicsSolvers_sources} HEADERS ${physicsSolvers_headers} - DEPENDS_ON ${dependencyList} ${externalComponentDeps} - OBJECT ${GEOS_BUILD_OBJ_LIBS} ) + DEPENDS_ON ${decoratedDependencies} ${externalComponentDeps} + OBJECT ${GEOS_BUILD_OBJ_LIBS} + SHARED ${GEOS_BUILD_SHARED_LIBS} + ) target_include_directories( physicsSolvers PUBLIC ${CMAKE_SOURCE_DIR}/coreComponents ) if( externalComponentDeps ) diff --git a/src/coreComponents/physicsSolvers/FieldStatisticsBase.hpp b/src/coreComponents/physicsSolvers/FieldStatisticsBase.hpp index 5edf76ab710..2afecdd6d66 100644 --- a/src/coreComponents/physicsSolvers/FieldStatisticsBase.hpp +++ b/src/coreComponents/physicsSolvers/FieldStatisticsBase.hpp @@ -22,7 +22,6 @@ #include "events/tasks/TaskBase.hpp" #include "physicsSolvers/PhysicsSolverManager.hpp" -#include "mainInterface/ProblemManager.hpp" #include "mesh/MeshLevel.hpp" #include "fileIO/Outputs/OutputBase.hpp" @@ -84,8 +83,8 @@ class FieldStatisticsBase : public TaskBase void postInputInitialization() override { - ProblemManager & problemManager = this->getGroupByPath< ProblemManager >( "/Problem" ); - PhysicsSolverManager & physicsSolverManager = problemManager.getPhysicsSolverManager(); + Group & problemManager = this->getGroupByPath( "/Problem" ); + Group & physicsSolverManager = problemManager.getGroup( "Solvers" ); m_solver = physicsSolverManager.getGroupPointer< SOLVER >( m_solverName ); GEOS_THROW_IF( m_solver == nullptr, diff --git a/src/coreComponents/physicsSolvers/fluidFlow/StencilDataCollection.cpp b/src/coreComponents/physicsSolvers/fluidFlow/StencilDataCollection.cpp index 9a4a4dc06aa..dcd795ec3ed 100644 --- a/src/coreComponents/physicsSolvers/fluidFlow/StencilDataCollection.cpp +++ b/src/coreComponents/physicsSolvers/fluidFlow/StencilDataCollection.cpp @@ -24,7 +24,6 @@ #include "constitutive/permeability/PermeabilityBase.hpp" #include "constitutive/permeability/PermeabilityFields.hpp" #include "physicsSolvers/fluidFlow/StencilAccessors.hpp" -#include "mainInterface/ProblemManager.hpp" #include "physicsSolvers/PhysicsSolverManager.hpp" #include "common/format/table/TableFormatter.hpp" @@ -61,10 +60,10 @@ StencilDataCollection::StencilDataCollection( const string & name, void StencilDataCollection::postInputInitialization() { - ProblemManager & problemManager = this->getGroupByPath< ProblemManager >( "/Problem" ); + Group & problemManager = this->getGroupByPath( "/Problem" ); { // find targeted solver - PhysicsSolverManager & physicsSolverManager = problemManager.getPhysicsSolverManager(); + Group & physicsSolverManager = problemManager.getGroup( "Solvers" ); m_solver = physicsSolverManager.getGroupPointer< FlowSolverBase >( m_solverName ); GEOS_THROW_IF( m_solver == nullptr, @@ -75,7 +74,8 @@ void StencilDataCollection::postInputInitialization() } { // find mesh & discretization - DomainPartition & domain = problemManager.getDomainPartition(); +// DomainPartition & domain = problemManager.getDomainPartition(); + DomainPartition & domain = problemManager.getGroup< DomainPartition >( "domain" ); MeshBody const & meshBody = domain.getMeshBody( m_meshName ); m_meshLevel = &meshBody.getBaseDiscretization(); diff --git a/src/coreComponents/physicsSolvers/multiphysics/PoromechanicsInitialization.cpp b/src/coreComponents/physicsSolvers/multiphysics/PoromechanicsInitialization.cpp index 9505e80bfb3..e431cf1ac06 100644 --- a/src/coreComponents/physicsSolvers/multiphysics/PoromechanicsInitialization.cpp +++ b/src/coreComponents/physicsSolvers/multiphysics/PoromechanicsInitialization.cpp @@ -25,7 +25,6 @@ #include "physicsSolvers/multiphysics/SinglePhasePoromechanicsConformingFractures.hpp" #include "physicsSolvers/multiphysics/SinglePhasePoromechanicsEmbeddedFractures.hpp" #include "physicsSolvers/multiphysics/HydrofractureSolver.hpp" -#include "mainInterface/ProblemManager.hpp" #include "physicsSolvers/fluidFlow/SinglePhaseBase.hpp" #include "physicsSolvers/multiphysics/SinglePhaseReservoirAndWells.hpp" #include "physicsSolvers/multiphysics/CompositionalMultiphaseReservoirAndWells.hpp" @@ -68,8 +67,8 @@ void PoromechanicsInitialization< POROMECHANICS_SOLVER >:: postInputInitialization() { - ProblemManager & problemManager = this->getGroupByPath< ProblemManager >( "/Problem" ); - PhysicsSolverManager & physicsSolverManager = problemManager.getPhysicsSolverManager(); + Group & problemManager = this->getGroupByPath( "/Problem" ); + Group & physicsSolverManager = problemManager.getGroup( "Solvers" ); GEOS_THROW_IF( !physicsSolverManager.hasGroup( m_poromechanicsSolverName ), GEOS_FMT( "{}: {} solver named {} not found", @@ -82,7 +81,7 @@ postInputInitialization() if( !m_solidMechanicsStatisticsName.empty()) { - TasksManager & tasksManager = problemManager.getTasksManager(); + TasksManager & tasksManager = problemManager.getGroup< TasksManager >( "Tasks" ); GEOS_THROW_IF( !tasksManager.hasGroup( m_solidMechanicsStatisticsName ), GEOS_FMT( "{}: statistics task named {} not found", diff --git a/src/coreComponents/physicsSolvers/solidMechanics/SolidMechanicsStateReset.cpp b/src/coreComponents/physicsSolvers/solidMechanics/SolidMechanicsStateReset.cpp index ceca67b46c2..b5642b135e9 100644 --- a/src/coreComponents/physicsSolvers/solidMechanics/SolidMechanicsStateReset.cpp +++ b/src/coreComponents/physicsSolvers/solidMechanics/SolidMechanicsStateReset.cpp @@ -21,7 +21,6 @@ #include "physicsSolvers/PhysicsSolverManager.hpp" #include "physicsSolvers/solidMechanics/SolidMechanicsLagrangianFEM.hpp" -#include "mainInterface/ProblemManager.hpp" #include "mesh/DomainPartition.hpp" namespace geos @@ -59,8 +58,8 @@ SolidMechanicsStateReset::~SolidMechanicsStateReset() void SolidMechanicsStateReset::postInputInitialization() { - ProblemManager & problemManager = this->getGroupByPath< ProblemManager >( "/Problem" ); - PhysicsSolverManager & physicsSolverManager = problemManager.getPhysicsSolverManager(); + Group & problemManager = this->getGroupByPath( "/Problem" ); + Group & physicsSolverManager = problemManager.getGroup( "Solvers" ); GEOS_THROW_IF( !physicsSolverManager.hasGroup( m_solidSolverName ), GEOS_FMT( "Task {}: physics solver named {} not found", diff --git a/src/coreComponents/schema/CMakeLists.txt b/src/coreComponents/schema/CMakeLists.txt index ecae0b5dd75..a6e7369b14b 100644 --- a/src/coreComponents/schema/CMakeLists.txt +++ b/src/coreComponents/schema/CMakeLists.txt @@ -14,11 +14,15 @@ set( schema_sources set( dependencyList ${parallelDeps} dataRepository ) +geos_decorate_link_dependencies( LIST decoratedDependencies + DEPENDENCIES ${dependencyList} ) + blt_add_library( NAME schema SOURCES ${schema_sources} HEADERS ${schema_headers} - DEPENDS_ON ${dependencyList} + DEPENDS_ON ${decoratedDependencies} OBJECT ${GEOS_BUILD_OBJ_LIBS} + SHARED ${GEOS_BUILD_SHARED_LIBS} ) diff --git a/src/coreComponents/schema/docs/HydraulicApertureTable.rst b/src/coreComponents/schema/docs/HydraulicApertureTable.rst new file mode 100644 index 00000000000..396fc421971 --- /dev/null +++ b/src/coreComponents/schema/docs/HydraulicApertureTable.rst @@ -0,0 +1,12 @@ + + +================= ============ ======== ============================================================================================================================================================================================================================================================================================================================================================================================================================================================= +Name Type Default Description +================= ============ ======== ============================================================================================================================================================================================================================================================================================================================================================================================================================================================= +apertureTableName groupNameRef required Name of the aperture table +apertureTolerance real64 1e-09 Value to be used to avoid floating point errors in expressions involving aperture. For example in the case of dividing by the actual aperture (not the effective aperture that results from the aperture function) this value may be used to avoid the 1/0 error. Note that this value may have some physical significance in its usage, as it may be used to smooth out highly nonlinear behavior associated with 1/0 in addition to avoiding the 1/0 error. +name groupName required A name is required for any non-unique nodes +referenceAperture real64 1e-06 Reference hydraulic aperture. It is the aperture at zero normal stress. +================= ============ ======== ============================================================================================================================================================================================================================================================================================================================================================================================================================================================= + + diff --git a/src/coreComponents/schema/docs/HydraulicApertureTable_other.rst b/src/coreComponents/schema/docs/HydraulicApertureTable_other.rst new file mode 100644 index 00000000000..adf1c1b8aec --- /dev/null +++ b/src/coreComponents/schema/docs/HydraulicApertureTable_other.rst @@ -0,0 +1,9 @@ + + +==== ==== ============================ +Name Type Description +==== ==== ============================ + (no documentation available) +==== ==== ============================ + + diff --git a/src/coreComponents/schema/docs/VTKMesh.rst b/src/coreComponents/schema/docs/VTKMesh.rst index 3c6616c3087..f8365fa847f 100644 --- a/src/coreComponents/schema/docs/VTKMesh.rst +++ b/src/coreComponents/schema/docs/VTKMesh.rst @@ -4,7 +4,7 @@ Name Type Default Description ====================== ======================== ========= ============================================================================================================================================================================================================================================================================================================================================================================================================================================================================ faceBlocks groupNameRef_array {} For multi-block files, names of the face mesh block. -fieldNamesInGEOS groupNameRef_array {} Names of the volumic fields in GEOS to import into +fieldNamesInGEOS groupNameRef_array {} Names of the volumic fields in GEOS to import into fieldsToImport groupNameRef_array {} Volumic fields to be imported from the external mesh file file path required Path to the mesh file logLevel integer 0 Log level @@ -15,7 +15,7 @@ partitionMethod geos_vtk_PartitionMethod parmetis Method (library) used partitionRefinement integer 1 Number of partitioning refinement iterations (defaults to 1, recommended value).A value of 0 disables graph partitioning and keeps simple kd-tree partitions (not recommended). Values higher than 1 may lead to slightly improved partitioning, but yield diminishing returns. regionAttribute groupNameRef attribute Name of the VTK cell attribute to use as region marker scale R1Tensor {1,1,1} Scale the coordinates of the vertices by given scale factors (after translation) -surfacicFieldsInGEOS groupNameRef_array {} Names of the surfacic fields in GEOS to import into +surfacicFieldsInGEOS groupNameRef_array {} Names of the surfacic fields in GEOS to import into surfacicFieldsToImport groupNameRef_array {} Surfacic fields to be imported from the external mesh file translate R1Tensor {0,0,0} Translate the coordinates of the vertices by a given vector (prior to scaling) useGlobalIds integer 0 Controls the use of global IDs in the input file for cells and points. If set to 0 (default value), the GlobalId arrays in the input mesh are used if available, and generated otherwise. If set to a negative value, the GlobalId arrays in the input mesh are not used, and generated global Ids are automatically generated. If set to a positive value, the GlobalId arrays in the input mesh are used and required, and the simulation aborts if they are not available diff --git a/src/coreComponents/schema/schema.xsd b/src/coreComponents/schema/schema.xsd index 2fe20af996e..f6bb47873ec 100644 --- a/src/coreComponents/schema/schema.xsd +++ b/src/coreComponents/schema/schema.xsd @@ -1691,8 +1691,8 @@ stress - traction is applied to the faces as specified by the inner product of i - - + + @@ -1711,8 +1711,8 @@ stress - traction is applied to the faces as specified by the inner product of i - - + + diff --git a/src/coreComponents/unitTests/CMakeLists.txt b/src/coreComponents/unitTests/CMakeLists.txt index 9e087f54b56..e9072bbbc1e 100644 --- a/src/coreComponents/unitTests/CMakeLists.txt +++ b/src/coreComponents/unitTests/CMakeLists.txt @@ -1,4 +1,5 @@ add_subdirectory( toolchain ) +add_subdirectory( testingUtilities ) add_subdirectory( xmlTests ) add_subdirectory( virtualElementTests ) add_subdirectory( linearAlgebraTests ) @@ -11,6 +12,5 @@ add_subdirectory( fileIOTests ) if( GEOS_ENABLE_FLUIDFLOW ) add_subdirectory( fluidFlowTests ) endif() -add_subdirectory( testingUtilities ) add_subdirectory( wellsTests ) add_subdirectory( wavePropagationTests ) diff --git a/src/coreComponents/unitTests/constitutiveTests/CMakeLists.txt b/src/coreComponents/unitTests/constitutiveTests/CMakeLists.txt index 24fb4d17cef..b30a378c542 100644 --- a/src/coreComponents/unitTests/constitutiveTests/CMakeLists.txt +++ b/src/coreComponents/unitTests/constitutiveTests/CMakeLists.txt @@ -32,35 +32,17 @@ set( gtest_pvt_xmls set( gtest_reactivefluid_xmls testReactiveFluid.xml ) -set( dependencyList ${parallelDeps} gtest ) +set( tplDependencyList ${parallelDeps} gtest ) -if ( GEOS_BUILD_SHARED_LIBS ) - list( APPEND dependencyList geosx_core HDF5::HDF5 ) -else() - list( APPEND dependencyList ${geosx_core_libs} HDF5::HDF5 ) -endif() +set( dependencyList mainInterface ) if( ENABLE_PVTPackage ) list( APPEND gtest_geosx_tests testMultiFluidCompositionalMultiphasePVTPackage.cpp ) - list( APPEND dependencyList PVTPackage ) -endif() - -if (TARGET pugixml::pugixml) - list( APPEND dependencyList pugixml::pugixml ) -endif() - -if (TARGET pugixml) - list( APPEND dependencyList pugixml ) -endif() - -if (TARGET fmt::fmt-header-only) - list( APPEND dependencyList fmt::fmt-header-only ) endif() -if (TARGET fmt) - list( APPEND dependencyList fmt ) -endif() +geos_decorate_link_dependencies( LIST decoratedDependencies + DEPENDENCIES ${dependencyList} ) # Add gtest C++ based tests foreach(test ${gtest_geosx_tests}) @@ -68,8 +50,9 @@ foreach(test ${gtest_geosx_tests}) blt_add_executable( NAME ${test_name} SOURCES ${test} OUTPUT_DIR ${TEST_OUTPUT_DIRECTORY} - DEPENDS_ON ${dependencyList} ) + DEPENDS_ON ${decoratedDependencies} ${tplDependencyList} ) + blt_print_target_properties( TARGET ${test_name} ) geos_add_test( NAME ${test_name} COMMAND ${test_name} ) @@ -79,7 +62,7 @@ endforeach() blt_add_executable( NAME testTriaxial SOURCES testTriaxial.cpp OUTPUT_DIR ${TEST_OUTPUT_DIRECTORY} - DEPENDS_ON ${dependencyList} "-lz" ) + DEPENDS_ON ${dependencyList} "-lz" ${tplDependencyList}) foreach(test ${gtest_triaxial_xmls}) get_filename_component( test_name ${test} NAME_WE ) @@ -91,7 +74,7 @@ endforeach() blt_add_executable( NAME testPVT SOURCES testPVT.cpp OUTPUT_DIR ${TEST_OUTPUT_DIRECTORY} - DEPENDS_ON ${dependencyList} "-lz" ) + DEPENDS_ON ${dependencyList} "-lz" ${tplDependencyList} ) foreach(test ${gtest_pvt_xmls}) get_filename_component( test_name ${test} NAME_WE ) @@ -104,7 +87,7 @@ endforeach() blt_add_executable( NAME testReactiveFluid SOURCES testReactiveFluid.cpp OUTPUT_DIR ${TEST_OUTPUT_DIRECTORY} - DEPENDS_ON ${dependencyList} "-lz" ) + DEPENDS_ON ${dependencyList} "-lz" ${tplDependencyList} ) foreach(test ${gtest_reactivefluid_xmls}) get_filename_component( test_name ${test} NAME_WE ) diff --git a/src/coreComponents/unitTests/dataRepositoryTests/CMakeLists.txt b/src/coreComponents/unitTests/dataRepositoryTests/CMakeLists.txt index d8e7129a73e..47b3b63d0a0 100644 --- a/src/coreComponents/unitTests/dataRepositoryTests/CMakeLists.txt +++ b/src/coreComponents/unitTests/dataRepositoryTests/CMakeLists.txt @@ -6,29 +6,12 @@ set( dataRepository_tests testWrapperHelpers.cpp testGroupPath.cpp ) -set( dependencyList ${parallelDeps} gtest ) +set( tplDependencyList ${parallelDeps} gtest ) -if ( GEOS_BUILD_SHARED_LIBS ) - list( APPEND dependencyList geosx_core HDF5::HDF5 ) -else() - list( APPEND dependencyList ${geosx_core_libs} HDF5::HDF5 ) -endif() +set( dependencyList mainInterface ) -if (TARGET pugixml::pugixml) - list( APPEND dependencyList pugixml::pugixml ) -endif() - -if (TARGET pugixml) - list( APPEND dependencyList pugixml ) -endif() - -if (TARGET fmt::fmt-header-only) - list( APPEND dependencyList fmt::fmt-header-only ) -endif() - -if (TARGET fmt) - list( APPEND dependencyList fmt ) -endif() +geos_decorate_link_dependencies( LIST decoratedDependencies + DEPENDENCIES ${dependencyList} ) # Add gtest C++ based tests foreach(test ${dataRepository_tests}) @@ -36,7 +19,7 @@ foreach(test ${dataRepository_tests}) blt_add_executable( NAME ${test_name} SOURCES ${test} OUTPUT_DIR ${TEST_OUTPUT_DIRECTORY} - DEPENDS_ON ${dependencyList} ) + DEPENDS_ON ${decoratedDependencies} ${tplDependencyList} ) geos_add_test( NAME ${test_name} COMMAND ${test_name} ) diff --git a/src/coreComponents/unitTests/fieldSpecificationTests/CMakeLists.txt b/src/coreComponents/unitTests/fieldSpecificationTests/CMakeLists.txt index 978a41e3a99..d66f6661e22 100644 --- a/src/coreComponents/unitTests/fieldSpecificationTests/CMakeLists.txt +++ b/src/coreComponents/unitTests/fieldSpecificationTests/CMakeLists.txt @@ -5,37 +5,20 @@ set( gtest_geosx_tests testRecursiveFieldApplication.cpp ) -set( dependencyList ${parallelDeps} gtest ) +set( tplDependencyList ${parallelDeps} gtest ) -if ( GEOS_BUILD_SHARED_LIBS ) - list( APPEND dependencyList geosx_core HDF5::HDF5 ) -else() - list( APPEND dependencyList ${geosx_core_libs} HDF5::HDF5 ) -endif() - -if (TARGET pugixml::pugixml) - list( APPEND dependencyList pugixml::pugixml ) -endif() - -if (TARGET pugixml) - list( APPEND dependencyList pugixml ) -endif() - -if (TARGET fmt::fmt-header-only) - list( APPEND dependencyList fmt::fmt-header-only ) -endif() - -if (TARGET fmt) - list( APPEND dependencyList fmt ) -endif() +set( dependencyList mainInterface ) +geos_decorate_link_dependencies( LIST decoratedDependencies + DEPENDENCIES ${dependencyList} ) + # Add gtest C++ based tests foreach(test ${gtest_geosx_tests}) get_filename_component( test_name ${test} NAME_WE ) blt_add_executable( NAME ${test_name} SOURCES ${test} OUTPUT_DIR ${TEST_OUTPUT_DIRECTORY} - DEPENDS_ON ${dependencyList} ) + DEPENDS_ON ${decoratedDependencies} ${tplDependencyList} ) geos_add_test( NAME ${test_name} COMMAND ${test_name} ) diff --git a/src/coreComponents/unitTests/fileIOTests/CMakeLists.txt b/src/coreComponents/unitTests/fileIOTests/CMakeLists.txt index 16aec0c79db..7bf5498da5b 100644 --- a/src/coreComponents/unitTests/fileIOTests/CMakeLists.txt +++ b/src/coreComponents/unitTests/fileIOTests/CMakeLists.txt @@ -1,13 +1,12 @@ # Specify list of tests set( geosx_fileio_tests testHDFFile.cpp ) -set( dependencyList ${parallelDeps} gtest HDF5::HDF5 ) +set( tplDependencyList ${parallelDeps} gtest ) -if ( GEOS_BUILD_SHARED_LIBS ) - list( APPEND dependencyList geosx_core ) -else() - list( APPEND dependencyList ${geosx_core_libs} ) -endif() +set( dependencyList mainInterface ) + +geos_decorate_link_dependencies( LIST decoratedDependencies + DEPENDENCIES ${dependencyList} ) # Add gtest C++ based tests foreach(test ${geosx_fileio_tests}) @@ -15,7 +14,7 @@ foreach(test ${geosx_fileio_tests}) blt_add_executable( NAME ${test_name} SOURCES ${test} OUTPUT_DIR ${TEST_OUTPUT_DIRECTORY} - DEPENDS_ON ${dependencyList} ) + DEPENDS_ON ${decoratedDependencies} ${tplDependencyList} ) geos_add_test( NAME ${test_name} COMMAND ${test_name} ) @@ -32,7 +31,7 @@ if ( ENABLE_MPI ) blt_add_executable( NAME ${test_name} SOURCES ${test} OUTPUT_DIR ${TEST_OUTPUT_DIRECTORY} - DEPENDS_ON ${dependencyList} ) + DEPENDS_ON ${decoratedDependencies} ${tplDependencyList} ) geos_add_test( NAME ${test_name} COMMAND ${test_name} diff --git a/src/coreComponents/unitTests/finiteVolumeTests/CMakeLists.txt b/src/coreComponents/unitTests/finiteVolumeTests/CMakeLists.txt index 9837bc2a1ff..d809c09d7c3 100644 --- a/src/coreComponents/unitTests/finiteVolumeTests/CMakeLists.txt +++ b/src/coreComponents/unitTests/finiteVolumeTests/CMakeLists.txt @@ -2,21 +2,20 @@ set( gtest_geosx_tests testMimeticInnerProducts.cpp ) -set( dependencyList ${parallelDeps} gtest ) - -if ( GEOS_BUILD_SHARED_LIBS ) - list( APPEND dependencyList geosx_core HDF5::HDF5 ) -else() - list( APPEND dependencyList ${geosx_core_libs} HDF5::HDF5 ) -endif() +set( tplDependencyList ${parallelDeps} gtest ) +set( dependencyList mainInterface ) + +geos_decorate_link_dependencies( LIST decoratedDependencies + DEPENDENCIES ${dependencyList} ) + # Add gtest C++ based tests foreach(test ${gtest_geosx_tests}) get_filename_component( test_name ${test} NAME_WE ) blt_add_executable( NAME ${test_name} SOURCES ${test} OUTPUT_DIR ${TEST_OUTPUT_DIRECTORY} - DEPENDS_ON ${dependencyList} ) + DEPENDS_ON ${decoratedDependencies} ${tplDependencyList} ) # Guard to prevent GCC (version 8) from giving warnings due # to some sort of possible conversion from int to long unsigned. diff --git a/src/coreComponents/unitTests/fluidFlowTests/CMakeLists.txt b/src/coreComponents/unitTests/fluidFlowTests/CMakeLists.txt index 23399171ff5..c21190560cf 100644 --- a/src/coreComponents/unitTests/fluidFlowTests/CMakeLists.txt +++ b/src/coreComponents/unitTests/fluidFlowTests/CMakeLists.txt @@ -6,40 +6,19 @@ set( gtest_geosx_tests testFlowStatistics.cpp testTransmissibility.cpp ) -set( dependencyList ${parallelDeps} gtest ) - -if ( GEOS_BUILD_SHARED_LIBS ) - list( APPEND dependencyList geosx_core HDF5::HDF5 ) -else() - list( APPEND dependencyList ${geosx_core_libs} HDF5::HDF5 ) -endif() - -set( dependencyList testingUtilities ) - if( ENABLE_PVTPackage ) list( APPEND gtest_geosx_tests testCompMultiphaseFlow.cpp testCompMultiphaseFlowHybrid.cpp testReactiveCompositionalMultiphaseOBL.cpp ) - - list( APPEND dependencyList PVTPackage ) endif() -if (TARGET pugixml::pugixml) - list( APPEND dependencyList pugixml::pugixml ) -endif() +set( tplDependencyList ${parallelDeps} gtest ) -if (TARGET pugixml) - list( APPEND dependencyList pugixml ) -endif() +set( dependencyList mainInterface testingUtilities ) -if (TARGET fmt::fmt-header-only) - list( APPEND dependencyList fmt::fmt-header-only ) -endif() - -if (TARGET fmt) - list( APPEND dependencyList fmt ) -endif() +geos_decorate_link_dependencies( LIST decoratedDependencies + DEPENDENCIES ${dependencyList} ) # Add gtest C++ based tests foreach(test ${gtest_geosx_tests}) @@ -48,7 +27,7 @@ foreach(test ${gtest_geosx_tests}) blt_add_executable( NAME ${test_name} SOURCES ${test} OUTPUT_DIR ${TEST_OUTPUT_DIRECTORY} - DEPENDS_ON ${dependencyList} ) + DEPENDS_ON ${decoratedDependencies} ${tplDependencyList} ) geos_add_test( NAME ${test_name} COMMAND ${test_name} ) diff --git a/src/coreComponents/unitTests/linearAlgebraTests/CMakeLists.txt b/src/coreComponents/unitTests/linearAlgebraTests/CMakeLists.txt index deb3d57d163..f14fe910eac 100644 --- a/src/coreComponents/unitTests/linearAlgebraTests/CMakeLists.txt +++ b/src/coreComponents/unitTests/linearAlgebraTests/CMakeLists.txt @@ -6,29 +6,13 @@ set( LAI_tests set( nranks 2 ) # Add gtest C++ based tests -set( dependencyList ${parallelDeps} gtest ) +set( tplDependencyList ${parallelDeps} gtest ) -if ( GEOS_BUILD_SHARED_LIBS ) - list( APPEND dependencyList geosx_core HDF5::HDF5 ) -else() - list( APPEND dependencyList ${geosx_core_libs} HDF5::HDF5 ) -endif() - -if (TARGET pugixml::pugixml) - set( dependencyList ${dependencyList} pugixml::pugixml ) -endif() +set( dependencyList mainInterface ) -if (TARGET pugixml) - set( dependencyList ${dependencyList} pugixml ) -endif() - -if (TARGET fmt::fmt-header-only) - set( dependencyList ${dependencyList} fmt::fmt-header-only ) -endif() +geos_decorate_link_dependencies( LIST decoratedDependencies + DEPENDENCIES ${dependencyList} ) -if (TARGET fmt) - set( dependencyList ${dependencyList} fmt ) -endif() foreach(test ${LAI_tests}) get_filename_component( test_name ${test} NAME_WE ) @@ -36,7 +20,7 @@ foreach(test ${LAI_tests}) blt_add_executable( NAME ${test_name} SOURCES ${test} OUTPUT_DIR ${TEST_OUTPUT_DIRECTORY} - DEPENDS_ON ${dependencyList} + DEPENDS_ON ${decoratedDependencies} ${tplDependencyList} ) if ( ENABLE_MPI ) diff --git a/src/coreComponents/unitTests/meshTests/CMakeLists.txt b/src/coreComponents/unitTests/meshTests/CMakeLists.txt index acd69ee16c0..fe8cca29817 100644 --- a/src/coreComponents/unitTests/meshTests/CMakeLists.txt +++ b/src/coreComponents/unitTests/meshTests/CMakeLists.txt @@ -19,29 +19,13 @@ if( ENABLE_VTK ) configure_file( ${CMAKE_CURRENT_SOURCE_DIR}/meshDirName.hpp.in ${CMAKE_BINARY_DIR}/include/tests/meshDirName.hpp ) endif() -set( dependencyList ${parallelDeps} gtest ) +set( tplDependencyList ${parallelDeps} gtest ) -if( GEOS_BUILD_SHARED_LIBS ) - list( APPEND dependencyList geosx_core HDF5::HDF5 ) -else() - list( APPEND dependencyList ${geosx_core_libs} HDF5::HDF5 ) -endif() - -if (TARGET pugixml::pugixml) - list( APPEND dependencyList pugixml::pugixml ) -endif() +set( dependencyList mainInterface ) -if (TARGET pugixml) - list( APPEND dependencyList pugixml ) -endif() +geos_decorate_link_dependencies( LIST decoratedDependencies + DEPENDENCIES ${dependencyList} ) -if (TARGET fmt::fmt-header-only) - list( APPEND dependencyList fmt::fmt-header-only ) -endif() - -if (TARGET fmt) - list( APPEND dependencyList fmt ) -endif() # Add gtest C++ based tests foreach( test ${gtest_geosx_tests} ) @@ -49,7 +33,7 @@ foreach( test ${gtest_geosx_tests} ) blt_add_executable( NAME ${test_name} SOURCES ${test} OUTPUT_DIR ${TEST_OUTPUT_DIRECTORY} - DEPENDS_ON ${dependencyList} ) + DEPENDS_ON ${decoratedDependencies} ${tplDependencyList} ) geos_add_test( NAME ${test_name} COMMAND ${test_name} ${CMAKE_CURRENT_LIST_DIR} ) @@ -75,7 +59,7 @@ if( ENABLE_MPI ) blt_add_executable( NAME ${test_name} SOURCES ${test} OUTPUT_DIR ${TEST_OUTPUT_DIRECTORY} - DEPENDS_ON ${dependencyList} ) + DEPENDS_ON ${decoratedDependencies} ${tplDependencyList} ) geos_add_test( NAME ${test_name} COMMAND ${test_name} -x ${nranks} diff --git a/src/coreComponents/unitTests/testingUtilities/CMakeLists.txt b/src/coreComponents/unitTests/testingUtilities/CMakeLists.txt index b89d54ba0f5..7534c11b82d 100644 --- a/src/coreComponents/unitTests/testingUtilities/CMakeLists.txt +++ b/src/coreComponents/unitTests/testingUtilities/CMakeLists.txt @@ -15,19 +15,19 @@ set( testingUtilities_sources # # Specify all dependencies # -set( dependencyList ${parallelDeps} gtest ) +set( tplDependencyList ${parallelDeps} gtest ) + +set( dependencyList events ) +geos_decorate_link_dependencies( LIST decoratedDependencies + DEPENDENCIES ${dependencyList} ) -if ( GEOS_BUILD_SHARED_LIBS ) - list( APPEND dependencyList geosx_core HDF5::HDF5 ) -else() - list( APPEND dependencyList ${geosx_core_libs} HDF5::HDF5 ) -endif() - blt_add_library( NAME testingUtilities SOURCES ${testingUtilities_sources} HEADERS ${testingUtilities_headers} - DEPENDS_ON ${dependencyList} + DEPENDS_ON ${decoratedDependencies} ${tplDependencyList} OBJECT ${GEOS_BUILD_OBJ_LIBS} + SHARED ${GEOS_BUILD_SHARED_LIBS} ) target_include_directories( testingUtilities PUBLIC ${CMAKE_SOURCE_DIR}/coreComponents ) +target_include_directories( testingUtilities PUBLIC ${CMAKE_BINARY_DIR}/include ) diff --git a/src/coreComponents/unitTests/toolchain/CMakeLists.txt b/src/coreComponents/unitTests/toolchain/CMakeLists.txt index f4509635eb7..e8b25319ad9 100644 --- a/src/coreComponents/unitTests/toolchain/CMakeLists.txt +++ b/src/coreComponents/unitTests/toolchain/CMakeLists.txt @@ -2,7 +2,10 @@ set( gtest_geosx_tests testToolchain.cpp ) # NOTE: we explicitly depend on internal libraries in order to check for the spurious addition of -DNDEBUG flag -set( dependencyList ${parallelDeps} gtest physicsSolvers discretizationMethods fieldSpecification linearAlgebra dataRepository events fileIO optionparser HDF5::HDF5 ) +set( dependencyList ${parallelDeps} physicsSolvers ) +set( tplDependencyList ${parallelDeps} gtest HDF5::HDF5 optionparser ) +geos_decorate_link_dependencies( LIST decoratedDependencies + DEPENDENCIES ${dependencyList} ) # Add gtest C++ based tests foreach(test ${gtest_geosx_tests}) @@ -11,7 +14,7 @@ foreach(test ${gtest_geosx_tests}) blt_add_executable( NAME ${test_name} SOURCES ${test} OUTPUT_DIR ${TEST_OUTPUT_DIRECTORY} - DEPENDS_ON ${dependencyList} ) + DEPENDS_ON ${decoratedDependencies} ${tplDependencyList} ) geos_add_test( NAME ${test_name} COMMAND ${test_name} ) diff --git a/src/coreComponents/unitTests/virtualElementTests/CMakeLists.txt b/src/coreComponents/unitTests/virtualElementTests/CMakeLists.txt index c10c31f429f..0d99a9b63ca 100644 --- a/src/coreComponents/unitTests/virtualElementTests/CMakeLists.txt +++ b/src/coreComponents/unitTests/virtualElementTests/CMakeLists.txt @@ -2,29 +2,13 @@ set( testSources testConformingVirtualElementOrder1.cpp ) -set( dependencyList ${parallelDeps} gtest ) +set( tplDependencyList ${parallelDeps} gtest ) -if ( GEOS_BUILD_SHARED_LIBS ) - list( APPEND dependencyList geosx_core HDF5::HDF5 ) -else() - list( APPEND dependencyList ${geosx_core_libs} HDF5::HDF5 ) -endif() - -if (TARGET pugixml::pugixml) - list( APPEND dependencyList pugixml::pugixml ) -endif() +set( dependencyList mainInterface ) -if (TARGET pugixml) - list( APPEND dependencyList pugixml ) -endif() +geos_decorate_link_dependencies( LIST decoratedDependencies + DEPENDENCIES ${dependencyList} ) -if (TARGET fmt::fmt-header-only) - list( APPEND dependencyList fmt::fmt-header-only ) -endif() - -if (TARGET fmt) - list( APPEND dependencyList fmt ) -endif() # Add gtest C++ based tests foreach(test ${testSources}) @@ -32,7 +16,7 @@ foreach(test ${testSources}) blt_add_executable( NAME ${test_name} SOURCES ${test} OUTPUT_DIR ${TEST_OUTPUT_DIRECTORY} - DEPENDS_ON ${dependencyList} ) + DEPENDS_ON ${decoratedDependencies} ${tplDependencyList} ) geos_add_test( NAME ${test_name} COMMAND ${test_name} ) diff --git a/src/coreComponents/unitTests/wavePropagationTests/CMakeLists.txt b/src/coreComponents/unitTests/wavePropagationTests/CMakeLists.txt index de07f14b079..fab0a741e73 100644 --- a/src/coreComponents/unitTests/wavePropagationTests/CMakeLists.txt +++ b/src/coreComponents/unitTests/wavePropagationTests/CMakeLists.txt @@ -8,29 +8,12 @@ set( gtest_geosx_tests testWavePropagationAttenuation.cpp testWavePropagationAcousticFirstOrder.cpp ) -set( dependencyList ${parallelDeps} gtest ) +set( tplDependencyList ${parallelDeps} gtest ) -if ( GEOS_BUILD_SHARED_LIBS ) - list( APPEND dependencyList geosx_core HDF5::HDF5 ) -else() - list( APPEND dependencyList ${geosx_core_libs} HDF5::HDF5 ) -endif() - -if (TARGET pugixml::pugixml) - list( APPEND dependencyList pugixml::pugixml ) -endif() - -if (TARGET pugixml) - list( APPEND dependencyList pugixml ) -endif() - -if (TARGET fmt::fmt-header-only) - list( APPEND dependencyList fmt::fmt-header-only ) -endif() +set( dependencyList mainInterface ) -if (TARGET fmt) - list( APPEND dependencyList fmt ) -endif() +geos_decorate_link_dependencies( LIST decoratedDependencies + DEPENDENCIES ${dependencyList} ) # Add gtest C++ based tests foreach(test ${gtest_geosx_tests}) @@ -38,7 +21,7 @@ foreach(test ${gtest_geosx_tests}) blt_add_executable( NAME ${test_name} SOURCES ${test} OUTPUT_DIR ${TEST_OUTPUT_DIRECTORY} - DEPENDS_ON ${dependencyList} ) + DEPENDS_ON ${decoratedDependencies} ${tplDependencyList} ) # Guard to prevent GCC (version 8) from giving warnings due # to some sort of possible conversion from int to long unsigned. diff --git a/src/coreComponents/unitTests/wellsTests/CMakeLists.txt b/src/coreComponents/unitTests/wellsTests/CMakeLists.txt index efdf46e9779..988582e06a6 100644 --- a/src/coreComponents/unitTests/wellsTests/CMakeLists.txt +++ b/src/coreComponents/unitTests/wellsTests/CMakeLists.txt @@ -3,37 +3,17 @@ set( gtest_geosx_tests testReservoirSinglePhaseMSWells.cpp testWellEnums.cpp ) -set( dependencyList ${parallelDeps} gtest ) +set( tplDependencyList ${parallelDeps} gtest ) -if ( GEOS_BUILD_SHARED_LIBS ) - list( APPEND dependencyList geosx_core ${parallelDeps} HDF5::HDF5 ) -else() - list( APPEND dependencyList ${geosx_core_libs} ${parallelDeps} HDF5::HDF5 ) -endif() +set( dependencyList mainInterface ) if( ENABLE_PVTPackage ) list( APPEND gtest_geosx_tests testReservoirCompositionalMultiphaseMSWells.cpp ) - - list( APPEND dependencyList PVTPackage ) -endif() - -if (TARGET pugixml::pugixml) - list( APPEND dependencyList pugixml::pugixml ) -endif() - -if (TARGET pugixml) - list( APPEND dependencyList pugixml ) -endif() - -if (TARGET fmt::fmt-header-only) - list( APPEND dependencyList fmt::fmt-header-only ) -endif() - -if (TARGET fmt) - list( APPEND dependencyList fmt ) endif() +geos_decorate_link_dependencies( LIST decoratedDependencies + DEPENDENCIES ${dependencyList} ) # Add gtest C++ based tests foreach(test ${gtest_geosx_tests}) get_filename_component( test_name ${test} NAME_WE ) @@ -41,7 +21,7 @@ foreach(test ${gtest_geosx_tests}) blt_add_executable( NAME ${test_name} SOURCES ${test} OUTPUT_DIR ${TEST_OUTPUT_DIRECTORY} - DEPENDS_ON ${dependencyList} ) + DEPENDS_ON ${decoratedDependencies} ${tplDependencyList} ) geos_add_test( NAME ${test_name} COMMAND ${test_name} ) diff --git a/src/coreComponents/unitTests/xmlTests/CMakeLists.txt b/src/coreComponents/unitTests/xmlTests/CMakeLists.txt index 0a5a81b1d57..28d5cc772ae 100644 --- a/src/coreComponents/unitTests/xmlTests/CMakeLists.txt +++ b/src/coreComponents/unitTests/xmlTests/CMakeLists.txt @@ -15,22 +15,12 @@ set( multi_files multifile_input/outputs.xml multifile_input/solver.xml ) -# Add gtest C++ based tests -set( dependencyList ${parallelDeps} gtest optionparser HDF5::HDF5 ) +set( tplDependencyList ${parallelDeps} gtest ) -if ( GEOS_BUILD_SHARED_LIBS ) - list( APPEND dependencyList geosx_core HDF5::HDF5 ) -else() - list( APPEND dependencyList ${geosx_core_libs} HDF5::HDF5 ) -endif() +set( dependencyList mainInterface ) -if (TARGET pugixml::pugixml) - set( dependencyList ${dependencyList} pugixml::pugixml ) -endif() - -if (TARGET pugixml) - set( dependencyList ${dependencyList} pugixml ) -endif() +geos_decorate_link_dependencies( LIST decoratedDependencies + DEPENDENCIES ${dependencyList} ) # create test executables foreach(test ${gtest_geosx_tests} ${gtest_tests_with_input}) @@ -38,7 +28,7 @@ foreach(test ${gtest_geosx_tests} ${gtest_tests_with_input}) blt_add_executable( NAME ${test_name} SOURCES ${test} OUTPUT_DIR ${TEST_OUTPUT_DIRECTORY} - DEPENDS_ON ${dependencyList} "-lz" ) + DEPENDS_ON ${decoratedDependencies} ${tplDependencyList} "-lz" ) endforeach() # add tests that don't require input files diff --git a/src/docs/sphinx/userGuide/Index.rst b/src/docs/sphinx/userGuide/Index.rst index 12ee30367f1..66a3c60cf52 100644 --- a/src/docs/sphinx/userGuide/Index.rst +++ b/src/docs/sphinx/userGuide/Index.rst @@ -17,6 +17,8 @@ Welcome to the GEOS user guide. /coreComponents/constitutive/docs/Constitutive + /coreComponents/constitutiveDrivers/docs/ConstitutiveDrivers + /coreComponents/fieldSpecification/docs/FieldSpecification /coreComponents/events/docs/EventManager diff --git a/src/externalComponents/newComponentTemplate/src/CMakeLists.txt b/src/externalComponents/newComponentTemplate/src/CMakeLists.txt index ffc7fbb9552..e79d970d05c 100644 --- a/src/externalComponents/newComponentTemplate/src/CMakeLists.txt +++ b/src/externalComponents/newComponentTemplate/src/CMakeLists.txt @@ -9,11 +9,7 @@ set( componentSources NewComponent.cpp ) unset( dependencyList ) # Specify dependencies -if ( GEOS_BUILD_SHARED_LIBS ) - list( APPEND dependencyList geosx_core) -else() - list( APPEND dependencyList ${geosx_core_libs} ) -endif() +list( APPEND dependencyList geosx_core) message("adding newComponentTemplate library") diff --git a/src/externalComponents/newComponentTemplate/tests/CMakeLists.txt b/src/externalComponents/newComponentTemplate/tests/CMakeLists.txt index b64bfbfe5b7..737c1fccebc 100644 --- a/src/externalComponents/newComponentTemplate/tests/CMakeLists.txt +++ b/src/externalComponents/newComponentTemplate/tests/CMakeLists.txt @@ -1,11 +1,7 @@ # Specify list of tests set( dependencyList gtest ) -if ( GEOS_BUILD_SHARED_LIBS ) - list( APPEND dependencyList geosx_core ) -else() - list( APPEND dependencyList ${geosx_core_libs} ) -endif() +list( APPEND dependencyList geosx_core ) set( newComponentTests testNewComponent.cpp ) diff --git a/src/pygeosx/CMakeLists.txt b/src/pygeosx/CMakeLists.txt index 9f03409ef48..74cd9dc4ba7 100644 --- a/src/pygeosx/CMakeLists.txt +++ b/src/pygeosx/CMakeLists.txt @@ -3,7 +3,7 @@ set( python_headers pygeosx.hpp ) set( python_sources pygeosx.cpp ) -set( dependencyList ${extraComponentsLinkList} ${externalComponentsLinkList} Python3::Python ) +set( dependencyList ${extraComponentsLinkList} ${externalComponentsLinkList} mainInterface Python3::Python ) blt_add_library( NAME pygeosx SOURCES ${python_sources} @@ -26,6 +26,7 @@ add_custom_command( TARGET pygeosx COMMAND ln -sf ${CMAKE_BINARY_DIR}/lib/pylvarray.so ${CMAKE_BINARY_DIR}/lib/PYGEOSX/lib/python${Python3_VERSION_MAJOR}.${Python3_VERSION_MINOR}/site-packages/ ) target_include_directories( pygeosx PUBLIC ${CMAKE_SOURCE_DIR}/coreComponents ) +target_include_directories( pygeosx PUBLIC ${CMAKE_BINARY_DIR}/include ) geosx_add_code_checks( PREFIX pygeosx )