From 534495519b993f9af9ba5eaa94fb167f37e91304 Mon Sep 17 00:00:00 2001 From: Randolph Settgast Date: Wed, 14 Aug 2024 10:20:00 -0700 Subject: [PATCH 01/29] TEMP: comment out the use of TableFunction::print() to remove dependency on fileIO in various places --- .../CO2Brine/functions/BrineEnthalpy.cpp | 4 +- .../CO2Brine/functions/CO2Enthalpy.cpp | 4 +- .../CO2Brine/functions/CO2Solubility.cpp | 4 +- .../functions/EzrokhiBrineDensity.cpp | 4 +- .../functions/EzrokhiBrineViscosity.cpp | 4 +- .../functions/FenghourCO2Viscosity.cpp | 4 +- .../functions/PhillipsBrineDensity.cpp | 4 +- .../functions/PhillipsBrineViscosity.cpp | 4 +- .../functions/SpanWagnerCO2Density.cpp | 4 +- .../CO2Brine/functions/WaterDensity.cpp | 4 +- .../fluid/multifluid/PVTDriver.cpp | 2 +- .../reactive/ReactiveFluidDriver.cpp | 2 +- .../constitutive/solid/TriaxialDriver.cpp | 2 +- src/coreComponents/functions/CMakeLists.txt | 2 +- .../functions/TableFunction.cpp | 130 +++++++++--------- .../functions/TableFunction.hpp | 2 +- 16 files changed, 90 insertions(+), 90 deletions(-) diff --git a/src/coreComponents/constitutive/fluid/multifluid/CO2Brine/functions/BrineEnthalpy.cpp b/src/coreComponents/constitutive/fluid/multifluid/CO2Brine/functions/BrineEnthalpy.cpp index 9be9db8ac8a..3b155402adc 100644 --- a/src/coreComponents/constitutive/fluid/multifluid/CO2Brine/functions/BrineEnthalpy.cpp +++ b/src/coreComponents/constitutive/fluid/multifluid/CO2Brine/functions/BrineEnthalpy.cpp @@ -207,8 +207,8 @@ BrineEnthalpy::BrineEnthalpy( string const & name, m_brineEnthalpyTable = makeBrineEnthalpyTable( inputParams, m_functionName, FunctionManager::getInstance() ); if( printTable ) { - m_CO2EnthalpyTable->print( m_CO2EnthalpyTable->getName() ); - m_brineEnthalpyTable->print( m_brineEnthalpyTable->getName() ); + // m_CO2EnthalpyTable->print( m_CO2EnthalpyTable->getName() ); + // m_brineEnthalpyTable->print( m_brineEnthalpyTable->getName() ); } } diff --git a/src/coreComponents/constitutive/fluid/multifluid/CO2Brine/functions/CO2Enthalpy.cpp b/src/coreComponents/constitutive/fluid/multifluid/CO2Brine/functions/CO2Enthalpy.cpp index 2bb308086e6..552d47c089c 100644 --- a/src/coreComponents/constitutive/fluid/multifluid/CO2Brine/functions/CO2Enthalpy.cpp +++ b/src/coreComponents/constitutive/fluid/multifluid/CO2Brine/functions/CO2Enthalpy.cpp @@ -266,8 +266,8 @@ CO2Enthalpy::CO2Enthalpy( string const & name, m_CO2Index = PVTFunctionHelpers::findName( componentNames, expectedCO2ComponentNames, "componentNames" ); m_CO2EnthalpyTable = makeCO2EnthalpyTable( inputParams, m_functionName, FunctionManager::getInstance() ); - if( printTable ) - m_CO2EnthalpyTable->print( m_CO2EnthalpyTable->getName() ); + // if( printTable ) + // m_CO2EnthalpyTable->print( m_CO2EnthalpyTable->getName() ); } diff --git a/src/coreComponents/constitutive/fluid/multifluid/CO2Brine/functions/CO2Solubility.cpp b/src/coreComponents/constitutive/fluid/multifluid/CO2Brine/functions/CO2Solubility.cpp index 77d27b1a883..5382080b9ab 100644 --- a/src/coreComponents/constitutive/fluid/multifluid/CO2Brine/functions/CO2Solubility.cpp +++ b/src/coreComponents/constitutive/fluid/multifluid/CO2Brine/functions/CO2Solubility.cpp @@ -259,8 +259,8 @@ CO2Solubility::CO2Solubility( string const & name, if( printTable ) { - m_CO2SolubilityTable->print( m_CO2SolubilityTable->getName() ); - m_WaterVapourisationTable->print( m_WaterVapourisationTable->getName() ); + // m_CO2SolubilityTable->print( m_CO2SolubilityTable->getName() ); + // m_WaterVapourisationTable->print( m_WaterVapourisationTable->getName() ); } } diff --git a/src/coreComponents/constitutive/fluid/multifluid/CO2Brine/functions/EzrokhiBrineDensity.cpp b/src/coreComponents/constitutive/fluid/multifluid/CO2Brine/functions/EzrokhiBrineDensity.cpp index 8713454505c..73d4ca69a17 100644 --- a/src/coreComponents/constitutive/fluid/multifluid/CO2Brine/functions/EzrokhiBrineDensity.cpp +++ b/src/coreComponents/constitutive/fluid/multifluid/CO2Brine/functions/EzrokhiBrineDensity.cpp @@ -54,8 +54,8 @@ EzrokhiBrineDensity::EzrokhiBrineDensity( string const & name, m_waterSatPressureTable = PureWaterProperties::makeSaturationPressureTable( m_functionName, FunctionManager::getInstance() ); if( printTable ) { - m_waterSatDensityTable->print( m_waterSatDensityTable->getName() ); - m_waterSatPressureTable->print( m_waterSatPressureTable->getName() ); + // m_waterSatDensityTable->print( m_waterSatDensityTable->getName() ); + // m_waterSatPressureTable->print( m_waterSatPressureTable->getName() ); } } diff --git a/src/coreComponents/constitutive/fluid/multifluid/CO2Brine/functions/EzrokhiBrineViscosity.cpp b/src/coreComponents/constitutive/fluid/multifluid/CO2Brine/functions/EzrokhiBrineViscosity.cpp index 6b7ac1ed990..9e3cf5ebf87 100644 --- a/src/coreComponents/constitutive/fluid/multifluid/CO2Brine/functions/EzrokhiBrineViscosity.cpp +++ b/src/coreComponents/constitutive/fluid/multifluid/CO2Brine/functions/EzrokhiBrineViscosity.cpp @@ -51,8 +51,8 @@ EzrokhiBrineViscosity::EzrokhiBrineViscosity( string const & name, makeCoefficients( inputPara ); m_waterViscosityTable = PureWaterProperties::makeSaturationViscosityTable( m_functionName, FunctionManager::getInstance() ); - if( printTable ) - m_waterViscosityTable->print( m_waterViscosityTable->getName() ); + // if( printTable ) + // m_waterViscosityTable->print( m_waterViscosityTable->getName() ); } void EzrokhiBrineViscosity::makeCoefficients( string_array const & inputPara ) diff --git a/src/coreComponents/constitutive/fluid/multifluid/CO2Brine/functions/FenghourCO2Viscosity.cpp b/src/coreComponents/constitutive/fluid/multifluid/CO2Brine/functions/FenghourCO2Viscosity.cpp index f79cd790427..5400018d1f1 100644 --- a/src/coreComponents/constitutive/fluid/multifluid/CO2Brine/functions/FenghourCO2Viscosity.cpp +++ b/src/coreComponents/constitutive/fluid/multifluid/CO2Brine/functions/FenghourCO2Viscosity.cpp @@ -148,8 +148,8 @@ FenghourCO2Viscosity::FenghourCO2Viscosity( string const & name, componentMolarWeight ) { m_CO2ViscosityTable = makeViscosityTable( inputParams, m_functionName, FunctionManager::getInstance() ); - if( printTable ) - m_CO2ViscosityTable->print( m_CO2ViscosityTable->getName() ); +// if( printTable ) +// m_CO2ViscosityTable->print( m_CO2ViscosityTable->getName() ); } void FenghourCO2Viscosity::checkTablesParameters( real64 const pressure, diff --git a/src/coreComponents/constitutive/fluid/multifluid/CO2Brine/functions/PhillipsBrineDensity.cpp b/src/coreComponents/constitutive/fluid/multifluid/CO2Brine/functions/PhillipsBrineDensity.cpp index 6122bc4ef61..f4cb50fb88a 100644 --- a/src/coreComponents/constitutive/fluid/multifluid/CO2Brine/functions/PhillipsBrineDensity.cpp +++ b/src/coreComponents/constitutive/fluid/multifluid/CO2Brine/functions/PhillipsBrineDensity.cpp @@ -189,8 +189,8 @@ PhillipsBrineDensity::PhillipsBrineDensity( string const & name, m_waterIndex = PVTFunctionHelpers::findName( componentNames, expectedWaterComponentNames, "componentNames" ); m_brineDensityTable = makeDensityTable( inputParams, m_functionName, FunctionManager::getInstance() ); - if( printTable ) - m_brineDensityTable->print( m_brineDensityTable->getName() ); + // if( printTable ) + // m_brineDensityTable->print( m_brineDensityTable->getName() ); } PhillipsBrineDensity::KernelWrapper diff --git a/src/coreComponents/constitutive/fluid/multifluid/CO2Brine/functions/PhillipsBrineViscosity.cpp b/src/coreComponents/constitutive/fluid/multifluid/CO2Brine/functions/PhillipsBrineViscosity.cpp index c8836f67143..1ec577e4c30 100644 --- a/src/coreComponents/constitutive/fluid/multifluid/CO2Brine/functions/PhillipsBrineViscosity.cpp +++ b/src/coreComponents/constitutive/fluid/multifluid/CO2Brine/functions/PhillipsBrineViscosity.cpp @@ -43,8 +43,8 @@ PhillipsBrineViscosity::PhillipsBrineViscosity( string const & name, componentMolarWeight ) { m_waterViscosityTable = PureWaterProperties::makeSaturationViscosityTable( m_functionName, FunctionManager::getInstance() ); - if( printTable ) - m_waterViscosityTable->print( m_waterViscosityTable->getName() ); + // if( printTable ) + // m_waterViscosityTable->print( m_waterViscosityTable->getName() ); makeCoefficients( inputPara ); } diff --git a/src/coreComponents/constitutive/fluid/multifluid/CO2Brine/functions/SpanWagnerCO2Density.cpp b/src/coreComponents/constitutive/fluid/multifluid/CO2Brine/functions/SpanWagnerCO2Density.cpp index e8787ccd427..bf7bcf9ed8b 100644 --- a/src/coreComponents/constitutive/fluid/multifluid/CO2Brine/functions/SpanWagnerCO2Density.cpp +++ b/src/coreComponents/constitutive/fluid/multifluid/CO2Brine/functions/SpanWagnerCO2Density.cpp @@ -288,8 +288,8 @@ SpanWagnerCO2Density::SpanWagnerCO2Density( string const & name, m_CO2Index = PVTFunctionHelpers::findName( componentNames, expectedCO2ComponentNames, "componentNames" ); m_CO2DensityTable = makeDensityTable( inputParams, m_functionName, FunctionManager::getInstance() ); - if( printTable ) - m_CO2DensityTable->print( m_CO2DensityTable->getName() ); + // if( printTable ) + // m_CO2DensityTable->print( m_CO2DensityTable->getName() ); } void SpanWagnerCO2Density::checkTablesParameters( real64 const pressure, diff --git a/src/coreComponents/constitutive/fluid/multifluid/CO2Brine/functions/WaterDensity.cpp b/src/coreComponents/constitutive/fluid/multifluid/CO2Brine/functions/WaterDensity.cpp index 4c0d3dada34..d6accc5bc88 100644 --- a/src/coreComponents/constitutive/fluid/multifluid/CO2Brine/functions/WaterDensity.cpp +++ b/src/coreComponents/constitutive/fluid/multifluid/CO2Brine/functions/WaterDensity.cpp @@ -44,8 +44,8 @@ WaterDensity::WaterDensity( string const & name, { GEOS_UNUSED_VAR( inputParams ); m_waterDensityTable = PureWaterProperties::makeSaturationDensityTable( m_functionName, FunctionManager::getInstance() ); - if( printTable ) - m_waterDensityTable->print( m_waterDensityTable->getName() ); + // if( printTable ) + // m_waterDensityTable->print( m_waterDensityTable->getName() ); } void WaterDensity::checkTablesParameters( real64 const pressure, diff --git a/src/coreComponents/constitutive/fluid/multifluid/PVTDriver.cpp b/src/coreComponents/constitutive/fluid/multifluid/PVTDriver.cpp index 8a987d2168b..aa20b9f12a7 100644 --- a/src/coreComponents/constitutive/fluid/multifluid/PVTDriver.cpp +++ b/src/coreComponents/constitutive/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/reactive/ReactiveFluidDriver.cpp b/src/coreComponents/constitutive/fluid/multifluid/reactive/ReactiveFluidDriver.cpp index 7c95359f28a..b9f54c63166 100644 --- a/src/coreComponents/constitutive/fluid/multifluid/reactive/ReactiveFluidDriver.cpp +++ b/src/coreComponents/constitutive/fluid/multifluid/reactive/ReactiveFluidDriver.cpp @@ -18,7 +18,7 @@ */ #include "ReactiveFluidDriver.hpp" -#include "fileIO/Outputs/OutputBase.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/solid/TriaxialDriver.cpp b/src/coreComponents/constitutive/solid/TriaxialDriver.cpp index 5d345e6986f..7768a9af35d 100644 --- a/src/coreComponents/constitutive/solid/TriaxialDriver.cpp +++ b/src/coreComponents/constitutive/solid/TriaxialDriver.cpp @@ -18,7 +18,7 @@ */ #include "TriaxialDriver.hpp" -#include "fileIO/Outputs/OutputBase.hpp" +//#include "fileIO/Outputs/OutputBase.hpp" namespace geos { diff --git a/src/coreComponents/functions/CMakeLists.txt b/src/coreComponents/functions/CMakeLists.txt index 5a3804dbc24..7e402fbbffe 100644 --- a/src/coreComponents/functions/CMakeLists.txt +++ b/src/coreComponents/functions/CMakeLists.txt @@ -27,7 +27,7 @@ if( ENABLE_MATHPRESSO ) endif() -set( dependencyList ${parallelDeps} codingUtilities dataRepository fileIO ) +set( dependencyList ${parallelDeps} codingUtilities dataRepository ) if( ENABLE_MATHPRESSO ) list( APPEND dependencyList mathpresso ) diff --git a/src/coreComponents/functions/TableFunction.cpp b/src/coreComponents/functions/TableFunction.cpp index 9b71eee3805..d7e7a2404e0 100644 --- a/src/coreComponents/functions/TableFunction.cpp +++ b/src/coreComponents/functions/TableFunction.cpp @@ -20,7 +20,7 @@ #include "TableFunction.hpp" #include "codingUtilities/Parsing.hpp" #include "common/DataTypes.hpp" -#include "fileIO/Outputs/OutputBase.hpp" +//#include "fileIO/Outputs/OutputBase.hpp" #include @@ -185,76 +185,76 @@ void TableFunction::checkCoord( real64 const coord, localIndex const dim ) const SimulationError ); } -void TableFunction::print( std::string const & filename ) const -{ - std::ofstream os( joinPath( OutputBase::getOutputDirectory(), filename + ".csv" ) ); +// void TableFunction::print( std::string const & filename ) const +// { +// std::ofstream os( joinPath( OutputBase::getOutputDirectory(), filename + ".csv" ) ); - integer const numDimensions = LvArray::integerConversion< integer >( m_coordinates.size() ); +// integer const numDimensions = LvArray::integerConversion< integer >( m_coordinates.size() ); - if( numDimensions != 2 ) - { - // print header +// if( numDimensions != 2 ) +// { +// // print header - for( integer d = 0; d < numDimensions; d++ ) - { - os << units::getDescription( getDimUnit( d )) << ","; - } - os << units::getDescription( m_valueUnit ) << "\n"; +// for( integer d = 0; d < numDimensions; d++ ) +// { +// os << units::getDescription( getDimUnit( d )) << ","; +// } +// os << units::getDescription( m_valueUnit ) << "\n"; - // print values +// // print values - // prepare dividers - std::vector< integer > div( numDimensions ); - div[0] = 1; - for( integer d = 1; d < numDimensions; d++ ) - { - div[d] = div[d-1] * m_coordinates[d-1].size(); - } - // loop through all the values - for( integer v = 0; v < m_values.size(); v++ ) - { - // find coords indices - std::vector< integer > idx( numDimensions ); - integer r = v; - for( integer d = numDimensions-1; d >= 0; d-- ) - { - idx[d] = r / div[d]; - r = r % div[d]; - } - // finally print out in right order - for( integer d = 0; d < numDimensions; d++ ) - { - arraySlice1d< real64 const > const coords = m_coordinates[d]; - os << coords[idx[d]] << ","; - } - os << m_values[v] << "\n"; - } - } - else // numDimensions == 2 - { - arraySlice1d< real64 const > const coordsX = m_coordinates[0]; - arraySlice1d< real64 const > const coordsY = m_coordinates[1]; - integer const nX = coordsX.size(); - integer const nY = coordsY.size(); - os< div( numDimensions ); +// div[0] = 1; +// for( integer d = 1; d < numDimensions; d++ ) +// { +// div[d] = div[d-1] * m_coordinates[d-1].size(); +// } +// // loop through all the values +// for( integer v = 0; v < m_values.size(); v++ ) +// { +// // find coords indices +// std::vector< integer > idx( numDimensions ); +// integer r = v; +// for( integer d = numDimensions-1; d >= 0; d-- ) +// { +// idx[d] = r / div[d]; +// r = r % div[d]; +// } +// // finally print out in right order +// for( integer d = 0; d < numDimensions; d++ ) +// { +// arraySlice1d< real64 const > const coords = m_coordinates[d]; +// os << coords[idx[d]] << ","; +// } +// os << m_values[v] << "\n"; +// } +// } +// else // numDimensions == 2 +// { +// arraySlice1d< real64 const > const coordsX = m_coordinates[0]; +// arraySlice1d< real64 const > const coordsY = m_coordinates[1]; +// integer const nX = coordsX.size(); +// integer const nY = coordsY.size(); +// os< Date: Wed, 14 Aug 2024 12:34:58 -0700 Subject: [PATCH 02/29] remove events from constitutive dependency list --- src/coreComponents/constitutive/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/coreComponents/constitutive/CMakeLists.txt b/src/coreComponents/constitutive/CMakeLists.txt index 38304adc24c..934f0a961da 100644 --- a/src/coreComponents/constitutive/CMakeLists.txt +++ b/src/coreComponents/constitutive/CMakeLists.txt @@ -308,7 +308,7 @@ set( constitutive_sources thermalConductivity/SinglePhaseThermalConductivityBase.cpp ) -set( dependencyList ${parallelDeps} events dataRepository functions denseLinearAlgebra ) +set( dependencyList ${parallelDeps} dataRepository functions denseLinearAlgebra ) if( ENABLE_PVTPackage ) set( constitutive_headers From e915172fc268a6ec878be30d891b92afc0e3a91d Mon Sep 17 00:00:00 2001 From: Randolph Settgast Date: Wed, 14 Aug 2024 13:27:18 -0700 Subject: [PATCH 03/29] remove a bunch of redundant direct dependencies --- src/coreComponents/constitutive/CMakeLists.txt | 2 +- src/coreComponents/events/CMakeLists.txt | 2 +- src/coreComponents/fieldSpecification/CMakeLists.txt | 2 +- src/coreComponents/fileIO/CMakeLists.txt | 2 +- src/coreComponents/finiteVolume/CMakeLists.txt | 2 +- src/coreComponents/functions/CMakeLists.txt | 2 +- src/coreComponents/mainInterface/CMakeLists.txt | 2 +- src/coreComponents/mesh/CMakeLists.txt | 2 +- src/coreComponents/physicsSolvers/CMakeLists.txt | 2 +- 9 files changed, 9 insertions(+), 9 deletions(-) diff --git a/src/coreComponents/constitutive/CMakeLists.txt b/src/coreComponents/constitutive/CMakeLists.txt index 934f0a961da..ceb6c71f50f 100644 --- a/src/coreComponents/constitutive/CMakeLists.txt +++ b/src/coreComponents/constitutive/CMakeLists.txt @@ -308,7 +308,7 @@ set( constitutive_sources thermalConductivity/SinglePhaseThermalConductivityBase.cpp ) -set( dependencyList ${parallelDeps} dataRepository functions denseLinearAlgebra ) +set( dependencyList ${parallelDeps} functions denseLinearAlgebra ) if( ENABLE_PVTPackage ) set( constitutive_headers diff --git a/src/coreComponents/events/CMakeLists.txt b/src/coreComponents/events/CMakeLists.txt index 59217e42f7d..070be631638 100644 --- a/src/coreComponents/events/CMakeLists.txt +++ b/src/coreComponents/events/CMakeLists.txt @@ -24,7 +24,7 @@ set( events_sources tasks/TasksManager.cpp ) -set( dependencyList ${parallelDeps} common fileIO dataRepository ) +set( dependencyList ${parallelDeps} fileIO ) blt_add_library( NAME events SOURCES ${events_sources} diff --git a/src/coreComponents/fieldSpecification/CMakeLists.txt b/src/coreComponents/fieldSpecification/CMakeLists.txt index d13d6a6c795..7337cb2a73b 100644 --- a/src/coreComponents/fieldSpecification/CMakeLists.txt +++ b/src/coreComponents/fieldSpecification/CMakeLists.txt @@ -26,7 +26,7 @@ set( fieldSpecification_sources PerfectlyMatchedLayer.cpp ) -set( dependencyList ${parallelDeps} functions linearAlgebra ) +set( dependencyList ${parallelDeps} linearAlgebra ) blt_add_library( NAME fieldSpecification SOURCES ${fieldSpecification_sources} diff --git a/src/coreComponents/fileIO/CMakeLists.txt b/src/coreComponents/fileIO/CMakeLists.txt index 84c758fa2b2..1570ec71185 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} mesh HDF5::HDF5 ) if( ENABLE_PYGEOSX ) list( APPEND fileIO_headers python/PyHistoryCollectionType.hpp diff --git a/src/coreComponents/finiteVolume/CMakeLists.txt b/src/coreComponents/finiteVolume/CMakeLists.txt index 46b200344fa..5ca625a8504 100644 --- a/src/coreComponents/finiteVolume/CMakeLists.txt +++ b/src/coreComponents/finiteVolume/CMakeLists.txt @@ -40,7 +40,7 @@ set( finiteVolume_sources HybridMimeticDiscretization.cpp ) -set( dependencyList ${parallelDeps} mesh codingUtilities fieldSpecification ) +set( dependencyList ${parallelDeps} mesh fieldSpecification ) blt_add_library( NAME finiteVolume SOURCES ${finiteVolume_sources} diff --git a/src/coreComponents/functions/CMakeLists.txt b/src/coreComponents/functions/CMakeLists.txt index 7e402fbbffe..b77254f8f28 100644 --- a/src/coreComponents/functions/CMakeLists.txt +++ b/src/coreComponents/functions/CMakeLists.txt @@ -27,7 +27,7 @@ if( ENABLE_MATHPRESSO ) endif() -set( dependencyList ${parallelDeps} codingUtilities dataRepository ) +set( dependencyList ${parallelDeps} dataRepository ) if( ENABLE_MATHPRESSO ) list( APPEND dependencyList mathpresso ) diff --git a/src/coreComponents/mainInterface/CMakeLists.txt b/src/coreComponents/mainInterface/CMakeLists.txt index 4b141ea8b7f..6ffb065c37b 100644 --- a/src/coreComponents/mainInterface/CMakeLists.txt +++ b/src/coreComponents/mainInterface/CMakeLists.txt @@ -18,7 +18,7 @@ set( mainInterface_sources version.cpp ) -set( dependencyList ${parallelDeps} physicsSolvers discretizationMethods fieldSpecification linearAlgebra dataRepository events fileIO optionparser ) +set( dependencyList ${parallelDeps} physicsSolvers optionparser ) blt_add_library( NAME mainInterface SOURCES ${mainInterface_sources} diff --git a/src/coreComponents/mesh/CMakeLists.txt b/src/coreComponents/mesh/CMakeLists.txt index 7548a76d8f6..281097ec970 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") diff --git a/src/coreComponents/physicsSolvers/CMakeLists.txt b/src/coreComponents/physicsSolvers/CMakeLists.txt index cfcdce65e78..e41e5ffaf73 100644 --- a/src/coreComponents/physicsSolvers/CMakeLists.txt +++ b/src/coreComponents/physicsSolvers/CMakeLists.txt @@ -51,7 +51,7 @@ if( GEOS_ENABLE_WAVEPROPAGATION ) add_subdirectory( wavePropagation ) endif() -set( dependencyList ${parallelDeps} constitutive mesh linearAlgebra discretizationMethods events ) +set( dependencyList ${parallelDeps} discretizationMethods events ) if( ENABLE_PYGEOSX ) list( APPEND physicsSolvers_headers python/PySolver.hpp From dbcfffcf559d043e881cdf0ad38464fab2f91d99 Mon Sep 17 00:00:00 2001 From: Randolph Settgast Date: Wed, 14 Aug 2024 22:12:03 -0700 Subject: [PATCH 04/29] change cmake variable GEOS_BUILD_SHARED_LIBS to GEOS_BUILD_SHARED_CORE_LIB --- host-configs/LLNL/lassen-base.cmake | 2 +- host-configs/ORNL/frontier-base.cmake | 2 +- host-configs/TOTAL/pangea3-gcc8.4.1-openmpi-4.1.2.cmake | 2 +- src/CMakeLists.txt | 2 +- src/cmake/GeosxOptions.cmake | 2 +- src/coreComponents/CMakeLists.txt | 8 ++++---- src/coreComponents/functions/unitTests/CMakeLists.txt | 2 +- .../unitTests/constitutiveTests/CMakeLists.txt | 2 +- .../unitTests/dataRepositoryTests/CMakeLists.txt | 2 +- .../unitTests/fieldSpecificationTests/CMakeLists.txt | 2 +- src/coreComponents/unitTests/fileIOTests/CMakeLists.txt | 2 +- .../unitTests/finiteVolumeTests/CMakeLists.txt | 2 +- .../unitTests/fluidFlowTests/CMakeLists.txt | 2 +- .../unitTests/linearAlgebraTests/CMakeLists.txt | 2 +- src/coreComponents/unitTests/meshTests/CMakeLists.txt | 2 +- .../unitTests/testingUtilities/CMakeLists.txt | 2 +- .../unitTests/virtualElementTests/CMakeLists.txt | 2 +- .../unitTests/wavePropagationTests/CMakeLists.txt | 2 +- src/coreComponents/unitTests/wellsTests/CMakeLists.txt | 2 +- src/coreComponents/unitTests/xmlTests/CMakeLists.txt | 2 +- .../newComponentTemplate/src/CMakeLists.txt | 2 +- .../newComponentTemplate/tests/CMakeLists.txt | 2 +- 22 files changed, 25 insertions(+), 25 deletions(-) diff --git a/host-configs/LLNL/lassen-base.cmake b/host-configs/LLNL/lassen-base.cmake index 283755be313..9957fe075a0 100644 --- a/host-configs/LLNL/lassen-base.cmake +++ b/host-configs/LLNL/lassen-base.cmake @@ -7,7 +7,7 @@ # ############################################################################### -set( GEOS_BUILD_SHARED_LIBS ON CACHE BOOL "" ) +set( GEOS_BUILD_SHARED_CORE_LIB 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..1f143eaf8bb 100644 --- a/host-configs/ORNL/frontier-base.cmake +++ b/host-configs/ORNL/frontier-base.cmake @@ -31,7 +31,7 @@ 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_SHARED_CORE_LIB 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..151ca9975e7 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,7 @@ 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(GEOS_BUILD_SHARED_CORE_LIB OFF CACHE BOOL "") set(ENABLE_PVTPackage ON CACHE BOOL "") set(ENABLE_CALIPER ON CACHE BOOL "") diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 99b32fb3ab1..8f58f0db475 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -135,7 +135,7 @@ if( ENABLE_HIP ) list( APPEND extraComponentsLinkList blt::hip ) endif() -if ( GEOS_BUILD_SHARED_LIBS ) +if ( GEOS_BUILD_SHARED_CORE_LIB ) list( APPEND extraComponentsLinkList geosx_core ) else() list( APPEND extraComponentsLinkList ${geosx_core_libs} ) diff --git a/src/cmake/GeosxOptions.cmake b/src/cmake/GeosxOptions.cmake index debe45fdf62..22badab8849 100644 --- a/src/cmake/GeosxOptions.cmake +++ b/src/cmake/GeosxOptions.cmake @@ -89,7 +89,7 @@ option( GEOS_INSTALL_SCHEMA "Enables schema generation and installation" ON ) option( GEOS_BUILD_OBJ_LIBS "Builds coreComponent modules as object libraries" OFF ) -option( GEOS_BUILD_SHARED_LIBS "Builds geosx_core as a shared library " ON ) +option( GEOS_BUILD_SHARED_CORE_LIB "Builds geosx_core as a shared library " ON ) set( GEOS_PARALLEL_COMPILE_JOBS "" CACHE STRING "Maximum number of concurrent compilation jobs" ) if( GEOS_PARALLEL_COMPILE_JOBS ) diff --git a/src/coreComponents/CMakeLists.txt b/src/coreComponents/CMakeLists.txt index a58be4cdaab..536769096ae 100644 --- a/src/coreComponents/CMakeLists.txt +++ b/src/coreComponents/CMakeLists.txt @@ -57,7 +57,7 @@ foreach( lib ${subdirs} ) endforeach() # if we're building full static libs and not obj_libs -if( NOT GEOS_BUILD_SHARED_LIBS ) +if( NOT GEOS_BUILD_SHARED_CORE_LIB ) set( geosx_core_list "" ) foreach( lib ${coreLibs} ) list( APPEND geosx_core_list ${GEOS_LINK_PREPEND_FLAG} ${lib} ${GEOS_LINK_POSTPEND_FLAG} ) @@ -69,14 +69,14 @@ foreach( lib ${subdirs} ) add_subdirectory( ${lib} ) endforeach() -if( GEOS_BUILD_SHARED_LIBS AND GEOS_BUILD_OBJ_LIBS ) +if( GEOS_BUILD_SHARED_CORE_LIB 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 ) +elseif( GEOS_BUILD_SHARED_CORE_LIB 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} @@ -84,7 +84,7 @@ elseif( GEOS_BUILD_SHARED_LIBS AND NOT GEOS_BUILD_OBJ_LIBS ) LINK_PREPEND ${GEOS_LINK_PREPEND_FLAG} LINK_POSTPEND ${GEOS_LINK_POSTPEND_FLAG} ) -elseif( NOT GEOS_BUILD_SHARED_LIBS AND GEOS_BUILD_OBJ_LIBS ) +elseif( NOT GEOS_BUILD_SHARED_CORE_LIB AND GEOS_BUILD_OBJ_LIBS ) message( "Building object coreComponents, executables link to coreComponents" ) else() message( "Building static coreComponents, executables link to coreComponents" ) diff --git a/src/coreComponents/functions/unitTests/CMakeLists.txt b/src/coreComponents/functions/unitTests/CMakeLists.txt index 5aa938d9ce4..88377d31457 100644 --- a/src/coreComponents/functions/unitTests/CMakeLists.txt +++ b/src/coreComponents/functions/unitTests/CMakeLists.txt @@ -5,7 +5,7 @@ set( gtest_geosx_tests set( dependencyList ${parallelDeps} gtest functions ) -# if ( GEOS_BUILD_SHARED_LIBS ) +# if ( GEOS_BUILD_SHARED_CORE_LIB ) # list( APPEND dependencyList geosx_core ) # else() # list( APPEND dependencyList ${geosx_core_libs} ) diff --git a/src/coreComponents/unitTests/constitutiveTests/CMakeLists.txt b/src/coreComponents/unitTests/constitutiveTests/CMakeLists.txt index 24fb4d17cef..4d8f13fa4ec 100644 --- a/src/coreComponents/unitTests/constitutiveTests/CMakeLists.txt +++ b/src/coreComponents/unitTests/constitutiveTests/CMakeLists.txt @@ -34,7 +34,7 @@ set( gtest_reactivefluid_xmls set( dependencyList ${parallelDeps} gtest ) -if ( GEOS_BUILD_SHARED_LIBS ) +if ( GEOS_BUILD_SHARED_CORE_LIB ) list( APPEND dependencyList geosx_core HDF5::HDF5 ) else() list( APPEND dependencyList ${geosx_core_libs} HDF5::HDF5 ) diff --git a/src/coreComponents/unitTests/dataRepositoryTests/CMakeLists.txt b/src/coreComponents/unitTests/dataRepositoryTests/CMakeLists.txt index d8e7129a73e..d219274dd41 100644 --- a/src/coreComponents/unitTests/dataRepositoryTests/CMakeLists.txt +++ b/src/coreComponents/unitTests/dataRepositoryTests/CMakeLists.txt @@ -8,7 +8,7 @@ set( dataRepository_tests set( dependencyList ${parallelDeps} gtest ) -if ( GEOS_BUILD_SHARED_LIBS ) +if ( GEOS_BUILD_SHARED_CORE_LIB ) list( APPEND dependencyList geosx_core HDF5::HDF5 ) else() list( APPEND dependencyList ${geosx_core_libs} HDF5::HDF5 ) diff --git a/src/coreComponents/unitTests/fieldSpecificationTests/CMakeLists.txt b/src/coreComponents/unitTests/fieldSpecificationTests/CMakeLists.txt index 978a41e3a99..24c5e0a54b4 100644 --- a/src/coreComponents/unitTests/fieldSpecificationTests/CMakeLists.txt +++ b/src/coreComponents/unitTests/fieldSpecificationTests/CMakeLists.txt @@ -7,7 +7,7 @@ set( gtest_geosx_tests set( dependencyList ${parallelDeps} gtest ) -if ( GEOS_BUILD_SHARED_LIBS ) +if ( GEOS_BUILD_SHARED_CORE_LIB ) list( APPEND dependencyList geosx_core HDF5::HDF5 ) else() list( APPEND dependencyList ${geosx_core_libs} HDF5::HDF5 ) diff --git a/src/coreComponents/unitTests/fileIOTests/CMakeLists.txt b/src/coreComponents/unitTests/fileIOTests/CMakeLists.txt index 16aec0c79db..5f1dce38f1d 100644 --- a/src/coreComponents/unitTests/fileIOTests/CMakeLists.txt +++ b/src/coreComponents/unitTests/fileIOTests/CMakeLists.txt @@ -3,7 +3,7 @@ set( geosx_fileio_tests testHDFFile.cpp ) set( dependencyList ${parallelDeps} gtest HDF5::HDF5 ) -if ( GEOS_BUILD_SHARED_LIBS ) +if ( GEOS_BUILD_SHARED_CORE_LIB ) list( APPEND dependencyList geosx_core ) else() list( APPEND dependencyList ${geosx_core_libs} ) diff --git a/src/coreComponents/unitTests/finiteVolumeTests/CMakeLists.txt b/src/coreComponents/unitTests/finiteVolumeTests/CMakeLists.txt index 9837bc2a1ff..9d1eaecfbbb 100644 --- a/src/coreComponents/unitTests/finiteVolumeTests/CMakeLists.txt +++ b/src/coreComponents/unitTests/finiteVolumeTests/CMakeLists.txt @@ -4,7 +4,7 @@ set( gtest_geosx_tests set( dependencyList ${parallelDeps} gtest ) -if ( GEOS_BUILD_SHARED_LIBS ) +if ( GEOS_BUILD_SHARED_CORE_LIB ) list( APPEND dependencyList geosx_core HDF5::HDF5 ) else() list( APPEND dependencyList ${geosx_core_libs} HDF5::HDF5 ) diff --git a/src/coreComponents/unitTests/fluidFlowTests/CMakeLists.txt b/src/coreComponents/unitTests/fluidFlowTests/CMakeLists.txt index 23399171ff5..aa3fc90be11 100644 --- a/src/coreComponents/unitTests/fluidFlowTests/CMakeLists.txt +++ b/src/coreComponents/unitTests/fluidFlowTests/CMakeLists.txt @@ -8,7 +8,7 @@ set( gtest_geosx_tests set( dependencyList ${parallelDeps} gtest ) -if ( GEOS_BUILD_SHARED_LIBS ) +if ( GEOS_BUILD_SHARED_CORE_LIB ) list( APPEND dependencyList geosx_core HDF5::HDF5 ) else() list( APPEND dependencyList ${geosx_core_libs} HDF5::HDF5 ) diff --git a/src/coreComponents/unitTests/linearAlgebraTests/CMakeLists.txt b/src/coreComponents/unitTests/linearAlgebraTests/CMakeLists.txt index deb3d57d163..e3f31d22723 100644 --- a/src/coreComponents/unitTests/linearAlgebraTests/CMakeLists.txt +++ b/src/coreComponents/unitTests/linearAlgebraTests/CMakeLists.txt @@ -8,7 +8,7 @@ set( nranks 2 ) # Add gtest C++ based tests set( dependencyList ${parallelDeps} gtest ) -if ( GEOS_BUILD_SHARED_LIBS ) +if ( GEOS_BUILD_SHARED_CORE_LIB ) list( APPEND dependencyList geosx_core HDF5::HDF5 ) else() list( APPEND dependencyList ${geosx_core_libs} HDF5::HDF5 ) diff --git a/src/coreComponents/unitTests/meshTests/CMakeLists.txt b/src/coreComponents/unitTests/meshTests/CMakeLists.txt index acd69ee16c0..386697b2834 100644 --- a/src/coreComponents/unitTests/meshTests/CMakeLists.txt +++ b/src/coreComponents/unitTests/meshTests/CMakeLists.txt @@ -21,7 +21,7 @@ endif() set( dependencyList ${parallelDeps} gtest ) -if( GEOS_BUILD_SHARED_LIBS ) +if( GEOS_BUILD_SHARED_CORE_LIB ) list( APPEND dependencyList geosx_core HDF5::HDF5 ) else() list( APPEND dependencyList ${geosx_core_libs} HDF5::HDF5 ) diff --git a/src/coreComponents/unitTests/testingUtilities/CMakeLists.txt b/src/coreComponents/unitTests/testingUtilities/CMakeLists.txt index b89d54ba0f5..990398794f8 100644 --- a/src/coreComponents/unitTests/testingUtilities/CMakeLists.txt +++ b/src/coreComponents/unitTests/testingUtilities/CMakeLists.txt @@ -17,7 +17,7 @@ set( testingUtilities_sources # set( dependencyList ${parallelDeps} gtest ) -if ( GEOS_BUILD_SHARED_LIBS ) +if ( GEOS_BUILD_SHARED_CORE_LIB ) list( APPEND dependencyList geosx_core HDF5::HDF5 ) else() list( APPEND dependencyList ${geosx_core_libs} HDF5::HDF5 ) diff --git a/src/coreComponents/unitTests/virtualElementTests/CMakeLists.txt b/src/coreComponents/unitTests/virtualElementTests/CMakeLists.txt index c10c31f429f..2ae60a2a1a4 100644 --- a/src/coreComponents/unitTests/virtualElementTests/CMakeLists.txt +++ b/src/coreComponents/unitTests/virtualElementTests/CMakeLists.txt @@ -4,7 +4,7 @@ set( testSources set( dependencyList ${parallelDeps} gtest ) -if ( GEOS_BUILD_SHARED_LIBS ) +if ( GEOS_BUILD_SHARED_CORE_LIB ) list( APPEND dependencyList geosx_core HDF5::HDF5 ) else() list( APPEND dependencyList ${geosx_core_libs} HDF5::HDF5 ) diff --git a/src/coreComponents/unitTests/wavePropagationTests/CMakeLists.txt b/src/coreComponents/unitTests/wavePropagationTests/CMakeLists.txt index de07f14b079..b20edecab63 100644 --- a/src/coreComponents/unitTests/wavePropagationTests/CMakeLists.txt +++ b/src/coreComponents/unitTests/wavePropagationTests/CMakeLists.txt @@ -10,7 +10,7 @@ set( gtest_geosx_tests set( dependencyList ${parallelDeps} gtest ) -if ( GEOS_BUILD_SHARED_LIBS ) +if ( GEOS_BUILD_SHARED_CORE_LIB ) list( APPEND dependencyList geosx_core HDF5::HDF5 ) else() list( APPEND dependencyList ${geosx_core_libs} HDF5::HDF5 ) diff --git a/src/coreComponents/unitTests/wellsTests/CMakeLists.txt b/src/coreComponents/unitTests/wellsTests/CMakeLists.txt index efdf46e9779..53c25f97cd1 100644 --- a/src/coreComponents/unitTests/wellsTests/CMakeLists.txt +++ b/src/coreComponents/unitTests/wellsTests/CMakeLists.txt @@ -5,7 +5,7 @@ set( gtest_geosx_tests set( dependencyList ${parallelDeps} gtest ) -if ( GEOS_BUILD_SHARED_LIBS ) +if ( GEOS_BUILD_SHARED_CORE_LIB ) list( APPEND dependencyList geosx_core ${parallelDeps} HDF5::HDF5 ) else() list( APPEND dependencyList ${geosx_core_libs} ${parallelDeps} HDF5::HDF5 ) diff --git a/src/coreComponents/unitTests/xmlTests/CMakeLists.txt b/src/coreComponents/unitTests/xmlTests/CMakeLists.txt index 0a5a81b1d57..6e04a541aa2 100644 --- a/src/coreComponents/unitTests/xmlTests/CMakeLists.txt +++ b/src/coreComponents/unitTests/xmlTests/CMakeLists.txt @@ -18,7 +18,7 @@ set( multi_files # Add gtest C++ based tests set( dependencyList ${parallelDeps} gtest optionparser HDF5::HDF5 ) -if ( GEOS_BUILD_SHARED_LIBS ) +if ( GEOS_BUILD_SHARED_CORE_LIB ) list( APPEND dependencyList geosx_core HDF5::HDF5 ) else() list( APPEND dependencyList ${geosx_core_libs} HDF5::HDF5 ) diff --git a/src/externalComponents/newComponentTemplate/src/CMakeLists.txt b/src/externalComponents/newComponentTemplate/src/CMakeLists.txt index ffc7fbb9552..ea2718ae913 100644 --- a/src/externalComponents/newComponentTemplate/src/CMakeLists.txt +++ b/src/externalComponents/newComponentTemplate/src/CMakeLists.txt @@ -9,7 +9,7 @@ set( componentSources NewComponent.cpp ) unset( dependencyList ) # Specify dependencies -if ( GEOS_BUILD_SHARED_LIBS ) +if ( GEOS_BUILD_SHARED_CORE_LIB ) list( APPEND dependencyList geosx_core) else() list( APPEND dependencyList ${geosx_core_libs} ) diff --git a/src/externalComponents/newComponentTemplate/tests/CMakeLists.txt b/src/externalComponents/newComponentTemplate/tests/CMakeLists.txt index b64bfbfe5b7..8c5fc9868c9 100644 --- a/src/externalComponents/newComponentTemplate/tests/CMakeLists.txt +++ b/src/externalComponents/newComponentTemplate/tests/CMakeLists.txt @@ -1,7 +1,7 @@ # Specify list of tests set( dependencyList gtest ) -if ( GEOS_BUILD_SHARED_LIBS ) +if ( GEOS_BUILD_SHARED_CORE_LIB ) list( APPEND dependencyList geosx_core ) else() list( APPEND dependencyList ${geosx_core_libs} ) From 8fb65427af71865c498a5ddf1a30113708ea75f1 Mon Sep 17 00:00:00 2001 From: Randolph Settgast Date: Thu, 15 Aug 2024 14:22:22 -0700 Subject: [PATCH 05/29] re-introduce options for dynamic libraries for each component --- host-configs/apple/macOS_base.cmake | 4 +- src/CMakeLists.txt | 2 +- src/cmake/GeosxOptions.cmake | 2 + .../codingUtilities/CMakeLists.txt | 1 + src/coreComponents/common/CMakeLists.txt | 1 + .../constitutive/CMakeLists.txt | 54 ++++++++++--------- .../dataRepository/CMakeLists.txt | 4 +- .../denseLinearAlgebra/CMakeLists.txt | 4 +- .../discretizationMethods/CMakeLists.txt | 1 + src/coreComponents/events/CMakeLists.txt | 3 +- .../fieldSpecification/CMakeLists.txt | 1 + src/coreComponents/fileIO/CMakeLists.txt | 6 ++- .../finiteElement/CMakeLists.txt | 1 + .../finiteVolume/CMakeLists.txt | 1 + src/coreComponents/functions/CMakeLists.txt | 1 + .../linearAlgebra/CMakeLists.txt | 1 + .../mainInterface/CMakeLists.txt | 1 + src/coreComponents/mesh/CMakeLists.txt | 4 +- .../physicsSolvers/CMakeLists.txt | 6 ++- .../physicsSolvers/FieldStatisticsBase.hpp | 5 +- .../fluidFlow/StencilDataCollection.cpp | 8 +-- .../PoromechanicsInitialization.cpp | 7 ++- .../SolidMechanicsStateReset.cpp | 5 +- src/coreComponents/schema/CMakeLists.txt | 1 + .../unitTests/testingUtilities/CMakeLists.txt | 1 + 25 files changed, 75 insertions(+), 50 deletions(-) diff --git a/host-configs/apple/macOS_base.cmake b/host-configs/apple/macOS_base.cmake index e300aca41a7..45911758b50 100644 --- a/host-configs/apple/macOS_base.cmake +++ b/host-configs/apple/macOS_base.cmake @@ -27,7 +27,9 @@ 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) +set(GEOS_BUILD_SHARED_CORE_LIB OFF CACHE BOOL "" FORCE) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 8f58f0db475..eb34514c777 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -144,7 +144,7 @@ endif() blt_add_executable( NAME geosx SOURCES main/main.cpp DEPENDS_ON ${extraComponentsLinkList} - ${externalComponentsLinkList} fmt::fmt-header-only HDF5::HDF5 ) + ${externalComponentsLinkList} ) # blt_print_target_properties(TARGET geosx # CHILDREN TRUE diff --git a/src/cmake/GeosxOptions.cmake b/src/cmake/GeosxOptions.cmake index 22badab8849..b3b15983dcf 100644 --- a/src/cmake/GeosxOptions.cmake +++ b/src/cmake/GeosxOptions.cmake @@ -91,6 +91,8 @@ option( GEOS_BUILD_OBJ_LIBS "Builds coreComponent modules as object libraries" O option( GEOS_BUILD_SHARED_CORE_LIB "Builds geosx_core as a shared library " ON ) +option( GEOS_BUILD_SHARED_LIBS "Builds geosx_core as a shared library " OFF ) + set( GEOS_PARALLEL_COMPILE_JOBS "" CACHE STRING "Maximum number of concurrent compilation jobs" ) if( GEOS_PARALLEL_COMPILE_JOBS ) set_property( GLOBAL APPEND PROPERTY JOB_POOLS compile_job_pool=${GEOS_PARALLEL_COMPILE_JOBS} ) diff --git a/src/coreComponents/codingUtilities/CMakeLists.txt b/src/coreComponents/codingUtilities/CMakeLists.txt index a85e4046907..af760d67884 100644 --- a/src/coreComponents/codingUtilities/CMakeLists.txt +++ b/src/coreComponents/codingUtilities/CMakeLists.txt @@ -26,6 +26,7 @@ blt_add_library( NAME codingUtilities HEADERS ${codingUtilities_headers} DEPENDS_ON ${dependencyList} 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/common/CMakeLists.txt b/src/coreComponents/common/CMakeLists.txt index 2a5f70ff960..7fbece44c48 100644 --- a/src/coreComponents/common/CMakeLists.txt +++ b/src/coreComponents/common/CMakeLists.txt @@ -109,6 +109,7 @@ blt_add_library( NAME common 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 ceb6c71f50f..8296a95d96a 100644 --- a/src/coreComponents/constitutive/CMakeLists.txt +++ b/src/coreComponents/constitutive/CMakeLists.txt @@ -39,8 +39,8 @@ 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/PVTDriver.hpp + # fluid/multifluid/PVTDriverRunTest.hpp fluid/multifluid/blackOil/BlackOilFluidBase.hpp fluid/multifluid/blackOil/BlackOilFluid.hpp fluid/multifluid/blackOil/DeadOilFluid.hpp @@ -89,8 +89,8 @@ 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/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 +116,8 @@ set( constitutive_headers permeability/ProppantPermeability.hpp permeability/SlipDependentPermeability.hpp permeability/WillisRichardsPermeability.hpp - relativePermeability/RelpermDriver.hpp - relativePermeability/RelpermDriverRunTest.hpp + # relativePermeability/RelpermDriver.hpp + # relativePermeability/RelpermDriverRunTest.hpp relativePermeability/BrooksCoreyBakerRelativePermeability.hpp relativePermeability/BrooksCoreyStone2RelativePermeability.hpp relativePermeability/BrooksCoreyRelativePermeability.hpp @@ -161,7 +161,7 @@ set( constitutive_headers solid/SolidModelDiscretizationOpsTransverseIsotropic.hpp solid/SolidModelDiscretizationOpsOrthotropic.hpp solid/CeramicDamage.hpp - solid/TriaxialDriver.hpp + # solid/TriaxialDriver.hpp solid/porosity/PorosityFields.hpp solid/porosity/BiotPorosity.hpp solid/porosity/PorosityBase.hpp @@ -203,17 +203,17 @@ set( constitutive_sources dispersion/DispersionBase.cpp dispersion/LinearIsotropicDispersion.cpp fluid/multifluid/MultiFluidBase.cpp - fluid/multifluid/PVTDriver.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/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/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 +235,11 @@ 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/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/ReactiveFluidDriver.cpp fluid/multifluid/reactive/chemicalReactions/EquilibriumReactions.cpp fluid/multifluid/reactive/chemicalReactions/KineticReactions.cpp fluid/multifluid/reactive/chemicalReactions/ReactionsBase.cpp @@ -268,14 +268,14 @@ 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 + # 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 +296,7 @@ set( constitutive_sources solid/SolidBase.cpp solid/SolidInternalEnergy.cpp solid/CeramicDamage.cpp - solid/TriaxialDriver.cpp + # solid/TriaxialDriver.cpp solid/porosity/BiotPorosity.cpp solid/porosity/PorosityBase.cpp solid/porosity/PressurePorosity.cpp @@ -318,7 +318,8 @@ if( ENABLE_PVTPackage ) set( constitutive_sources ${constitutive_sources} fluid/multifluid/compositional/CompositionalMultiphaseFluidPVTPackage.cpp - fluid/multifluid/compositional/PVTDriverRunTestCompositionalMultiphaseFluid.cpp ) + # fluid/multifluid/compositional/PVTDriverRunTestCompositionalMultiphaseFluid.cpp + ) add_subdirectory( PVTPackage ) @@ -330,6 +331,7 @@ blt_add_library( NAME constitutive HEADERS ${constitutive_headers} DEPENDS_ON ${dependencyList} OBJECT ${GEOS_BUILD_OBJ_LIBS} + SHARED ${GEOS_BUILD_SHARED_LIBS} ) target_include_directories( constitutive PUBLIC ${CMAKE_SOURCE_DIR}/coreComponents ) diff --git a/src/coreComponents/dataRepository/CMakeLists.txt b/src/coreComponents/dataRepository/CMakeLists.txt index bfaecd6d778..596c62edecd 100644 --- a/src/coreComponents/dataRepository/CMakeLists.txt +++ b/src/coreComponents/dataRepository/CMakeLists.txt @@ -55,7 +55,9 @@ blt_add_library( NAME dataRepository SOURCES ${dataRepository_sources} HEADERS ${dataRepository_headers} DEPENDS_ON ${dependencyList} - OBJECT ${GEOS_BUILD_OBJ_LIBS} ) + 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..de751dff89a 100644 --- a/src/coreComponents/denseLinearAlgebra/CMakeLists.txt +++ b/src/coreComponents/denseLinearAlgebra/CMakeLists.txt @@ -14,7 +14,9 @@ blt_add_library( NAME denseLinearAlgebra SOURCES ${denseLinearAlgebra_sources} HEADERS ${denseLinearAlgebra_headers} DEPENDS_ON ${dependencyList} - OBJECT ${GEOS_BUILD_OBJ_LIBS} ) + 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..90818239cc7 100644 --- a/src/coreComponents/discretizationMethods/CMakeLists.txt +++ b/src/coreComponents/discretizationMethods/CMakeLists.txt @@ -18,6 +18,7 @@ blt_add_library( NAME discretizationMethods HEADERS ${mainInterface_headers} DEPENDS_ON ${dependencyList} 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 070be631638..bcee887022f 100644 --- a/src/coreComponents/events/CMakeLists.txt +++ b/src/coreComponents/events/CMakeLists.txt @@ -24,13 +24,14 @@ set( events_sources tasks/TasksManager.cpp ) -set( dependencyList ${parallelDeps} fileIO ) +set( dependencyList ${parallelDeps} mesh ) blt_add_library( NAME events SOURCES ${events_sources} HEADERS ${events_headers} DEPENDS_ON ${dependencyList} OBJECT ${GEOS_BUILD_OBJ_LIBS} + SHARED ${GEOS_BUILD_SHARED_LIBS} ) target_include_directories( events PUBLIC ${CMAKE_SOURCE_DIR}/coreComponents ) diff --git a/src/coreComponents/fieldSpecification/CMakeLists.txt b/src/coreComponents/fieldSpecification/CMakeLists.txt index 7337cb2a73b..cb7d0cd8d18 100644 --- a/src/coreComponents/fieldSpecification/CMakeLists.txt +++ b/src/coreComponents/fieldSpecification/CMakeLists.txt @@ -33,6 +33,7 @@ blt_add_library( NAME fieldSpecification HEADERS ${fieldSpecification_headers} DEPENDS_ON ${dependencyList} 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 1570ec71185..ef15f430d7c 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 HDF5::HDF5 ) +set( dependencyList ${parallelDeps} events mesh HDF5::HDF5 ) if( ENABLE_PYGEOSX ) list( APPEND fileIO_headers python/PyHistoryCollectionType.hpp @@ -83,7 +83,9 @@ blt_add_library( NAME fileIO SOURCES ${fileIO_sources} HEADERS ${fileIO_headers} DEPENDS_ON ${dependencyList} - OBJECT ${GEOS_BUILD_OBJ_LIBS} ) + OBJECT ${GEOS_BUILD_OBJ_LIBS} + SHARED ${GEOS_BUILD_SHARED_LIBS} + ) target_include_directories( fileIO PUBLIC ${CMAKE_SOURCE_DIR}/coreComponents ) diff --git a/src/coreComponents/finiteElement/CMakeLists.txt b/src/coreComponents/finiteElement/CMakeLists.txt index a1e5b0b4ad4..cca1d9cb351 100644 --- a/src/coreComponents/finiteElement/CMakeLists.txt +++ b/src/coreComponents/finiteElement/CMakeLists.txt @@ -47,6 +47,7 @@ blt_add_library( NAME finiteElement HEADERS ${finiteElement_headers} DEPENDS_ON ${dependencyList} 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 5ca625a8504..23aa1adaf63 100644 --- a/src/coreComponents/finiteVolume/CMakeLists.txt +++ b/src/coreComponents/finiteVolume/CMakeLists.txt @@ -47,6 +47,7 @@ blt_add_library( NAME finiteVolume HEADERS ${finiteVolume_headers} DEPENDS_ON ${dependencyList} 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 b77254f8f28..a3d016fc44c 100644 --- a/src/coreComponents/functions/CMakeLists.txt +++ b/src/coreComponents/functions/CMakeLists.txt @@ -38,6 +38,7 @@ blt_add_library( NAME functions HEADERS ${functions_headers} DEPENDS_ON ${dependencyList} OBJECT ${GEOS_BUILD_OBJ_LIBS} + SHARED ${GEOS_BUILD_SHARED_LIBS} ) target_include_directories( functions PUBLIC ${CMAKE_SOURCE_DIR}/coreComponents ) diff --git a/src/coreComponents/linearAlgebra/CMakeLists.txt b/src/coreComponents/linearAlgebra/CMakeLists.txt index 07c823d8300..7283f50e4f4 100644 --- a/src/coreComponents/linearAlgebra/CMakeLists.txt +++ b/src/coreComponents/linearAlgebra/CMakeLists.txt @@ -154,6 +154,7 @@ blt_add_library( NAME linearAlgebra HEADERS ${linearAlgebra_headers} DEPENDS_ON ${dependencyList} 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 6ffb065c37b..289490a8a81 100644 --- a/src/coreComponents/mainInterface/CMakeLists.txt +++ b/src/coreComponents/mainInterface/CMakeLists.txt @@ -25,6 +25,7 @@ blt_add_library( NAME mainInterface HEADERS ${mainInterface_headers} DEPENDS_ON ${dependencyList} OBJECT ${GEOS_BUILD_OBJ_LIBS} + SHARED ${GEOS_BUILD_SHARED_LIBS} ) add_dependencies( mainInterface generate_version ) diff --git a/src/coreComponents/mesh/CMakeLists.txt b/src/coreComponents/mesh/CMakeLists.txt index 281097ec970..333ef65a556 100644 --- a/src/coreComponents/mesh/CMakeLists.txt +++ b/src/coreComponents/mesh/CMakeLists.txt @@ -184,7 +184,9 @@ blt_add_library( NAME mesh SOURCES ${mesh_sources} HEADERS ${mesh_headers} DEPENDS_ON ${dependencyList} - OBJECT ${GEOS_BUILD_OBJ_LIBS} ) + 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 e41e5ffaf73..bb387031db9 100644 --- a/src/coreComponents/physicsSolvers/CMakeLists.txt +++ b/src/coreComponents/physicsSolvers/CMakeLists.txt @@ -51,7 +51,7 @@ if( GEOS_ENABLE_WAVEPROPAGATION ) add_subdirectory( wavePropagation ) endif() -set( dependencyList ${parallelDeps} discretizationMethods events ) +set( dependencyList ${parallelDeps} fileIO discretizationMethods events ) if( ENABLE_PYGEOSX ) list( APPEND physicsSolvers_headers python/PySolver.hpp @@ -65,7 +65,9 @@ blt_add_library( NAME physicsSolvers SOURCES ${physicsSolvers_sources} HEADERS ${physicsSolvers_headers} DEPENDS_ON ${dependencyList} ${externalComponentDeps} - OBJECT ${GEOS_BUILD_OBJ_LIBS} ) + 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..96bfbb29556 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..e939067dc0e 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..ec74dd5a511 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("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..9f9ee6b36b0 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..a32f052ee98 100644 --- a/src/coreComponents/schema/CMakeLists.txt +++ b/src/coreComponents/schema/CMakeLists.txt @@ -19,6 +19,7 @@ blt_add_library( NAME schema HEADERS ${schema_headers} DEPENDS_ON ${dependencyList} OBJECT ${GEOS_BUILD_OBJ_LIBS} + SHARED ${GEOS_BUILD_SHARED_LIBS} ) diff --git a/src/coreComponents/unitTests/testingUtilities/CMakeLists.txt b/src/coreComponents/unitTests/testingUtilities/CMakeLists.txt index 990398794f8..4f0f9d4096d 100644 --- a/src/coreComponents/unitTests/testingUtilities/CMakeLists.txt +++ b/src/coreComponents/unitTests/testingUtilities/CMakeLists.txt @@ -28,6 +28,7 @@ blt_add_library( NAME testingUtilities HEADERS ${testingUtilities_headers} DEPENDS_ON ${dependencyList} OBJECT ${GEOS_BUILD_OBJ_LIBS} + SHARED ${GEOS_BUILD_SHARED_LIBS} ) target_include_directories( testingUtilities PUBLIC ${CMAKE_SOURCE_DIR}/coreComponents ) From cc6cb9bb4161208b1d14dcada08a0c0144707404 Mon Sep 17 00:00:00 2001 From: Randolph Settgast Date: Thu, 15 Aug 2024 15:00:58 -0700 Subject: [PATCH 06/29] avoid unused var warnings --- .../multifluid/CO2Brine/functions/BrineEnthalpy.cpp | 7 ++++--- .../fluid/multifluid/CO2Brine/functions/CO2Enthalpy.cpp | 1 + .../multifluid/CO2Brine/functions/CO2Solubility.cpp | 7 ++++--- .../CO2Brine/functions/EzrokhiBrineDensity.cpp | 9 ++++++--- .../CO2Brine/functions/EzrokhiBrineViscosity.cpp | 1 + .../CO2Brine/functions/FenghourCO2Viscosity.cpp | 1 + .../CO2Brine/functions/PhillipsBrineDensity.cpp | 1 + .../CO2Brine/functions/PhillipsBrineViscosity.cpp | 1 + .../CO2Brine/functions/SpanWagnerCO2Density.cpp | 1 + .../fluid/multifluid/CO2Brine/functions/WaterDensity.cpp | 1 + 10 files changed, 21 insertions(+), 9 deletions(-) diff --git a/src/coreComponents/constitutive/fluid/multifluid/CO2Brine/functions/BrineEnthalpy.cpp b/src/coreComponents/constitutive/fluid/multifluid/CO2Brine/functions/BrineEnthalpy.cpp index 3b155402adc..0291ccef3dd 100644 --- a/src/coreComponents/constitutive/fluid/multifluid/CO2Brine/functions/BrineEnthalpy.cpp +++ b/src/coreComponents/constitutive/fluid/multifluid/CO2Brine/functions/BrineEnthalpy.cpp @@ -205,11 +205,12 @@ BrineEnthalpy::BrineEnthalpy( string const & name, m_CO2EnthalpyTable = makeCO2EnthalpyTable( inputParams, m_functionName, FunctionManager::getInstance() ); m_brineEnthalpyTable = makeBrineEnthalpyTable( inputParams, m_functionName, FunctionManager::getInstance() ); - if( printTable ) - { + GEOS_UNUSED_VAR( printTable ); + // if( printTable ) + // { // m_CO2EnthalpyTable->print( m_CO2EnthalpyTable->getName() ); // m_brineEnthalpyTable->print( m_brineEnthalpyTable->getName() ); - } + // } } void BrineEnthalpy::checkTablesParameters( real64 const pressure, diff --git a/src/coreComponents/constitutive/fluid/multifluid/CO2Brine/functions/CO2Enthalpy.cpp b/src/coreComponents/constitutive/fluid/multifluid/CO2Brine/functions/CO2Enthalpy.cpp index 552d47c089c..0fe42dceaab 100644 --- a/src/coreComponents/constitutive/fluid/multifluid/CO2Brine/functions/CO2Enthalpy.cpp +++ b/src/coreComponents/constitutive/fluid/multifluid/CO2Brine/functions/CO2Enthalpy.cpp @@ -266,6 +266,7 @@ CO2Enthalpy::CO2Enthalpy( string const & name, m_CO2Index = PVTFunctionHelpers::findName( componentNames, expectedCO2ComponentNames, "componentNames" ); m_CO2EnthalpyTable = makeCO2EnthalpyTable( inputParams, m_functionName, FunctionManager::getInstance() ); + GEOS_UNUSED_VAR( printTable ); // if( printTable ) // m_CO2EnthalpyTable->print( m_CO2EnthalpyTable->getName() ); } diff --git a/src/coreComponents/constitutive/fluid/multifluid/CO2Brine/functions/CO2Solubility.cpp b/src/coreComponents/constitutive/fluid/multifluid/CO2Brine/functions/CO2Solubility.cpp index 5382080b9ab..94baba5d7e7 100644 --- a/src/coreComponents/constitutive/fluid/multifluid/CO2Brine/functions/CO2Solubility.cpp +++ b/src/coreComponents/constitutive/fluid/multifluid/CO2Brine/functions/CO2Solubility.cpp @@ -257,11 +257,12 @@ CO2Solubility::CO2Solubility( string const & name, std::tie( m_CO2SolubilityTable, m_WaterVapourisationTable ) = makeSolubilityTables( m_modelName, inputParams, solubilityModel ); - if( printTable ) - { + GEOS_UNUSED_VAR( printTable ); + // if( printTable ) + // { // m_CO2SolubilityTable->print( m_CO2SolubilityTable->getName() ); // m_WaterVapourisationTable->print( m_WaterVapourisationTable->getName() ); - } + // } } void CO2Solubility::checkTablesParameters( real64 const pressure, diff --git a/src/coreComponents/constitutive/fluid/multifluid/CO2Brine/functions/EzrokhiBrineDensity.cpp b/src/coreComponents/constitutive/fluid/multifluid/CO2Brine/functions/EzrokhiBrineDensity.cpp index 73d4ca69a17..3b5e0f84535 100644 --- a/src/coreComponents/constitutive/fluid/multifluid/CO2Brine/functions/EzrokhiBrineDensity.cpp +++ b/src/coreComponents/constitutive/fluid/multifluid/CO2Brine/functions/EzrokhiBrineDensity.cpp @@ -52,11 +52,14 @@ EzrokhiBrineDensity::EzrokhiBrineDensity( string const & name, makeCoefficients( inputPara ); m_waterSatDensityTable = PureWaterProperties::makeSaturationDensityTable( m_functionName, FunctionManager::getInstance() ); m_waterSatPressureTable = PureWaterProperties::makeSaturationPressureTable( m_functionName, FunctionManager::getInstance() ); - if( printTable ) - { + + GEOS_UNUSED_VAR( printTable ); + + // if( printTable ) + // { // m_waterSatDensityTable->print( m_waterSatDensityTable->getName() ); // m_waterSatPressureTable->print( m_waterSatPressureTable->getName() ); - } + // } } void EzrokhiBrineDensity::makeCoefficients( string_array const & inputPara ) diff --git a/src/coreComponents/constitutive/fluid/multifluid/CO2Brine/functions/EzrokhiBrineViscosity.cpp b/src/coreComponents/constitutive/fluid/multifluid/CO2Brine/functions/EzrokhiBrineViscosity.cpp index 9e3cf5ebf87..558227f6c43 100644 --- a/src/coreComponents/constitutive/fluid/multifluid/CO2Brine/functions/EzrokhiBrineViscosity.cpp +++ b/src/coreComponents/constitutive/fluid/multifluid/CO2Brine/functions/EzrokhiBrineViscosity.cpp @@ -51,6 +51,7 @@ EzrokhiBrineViscosity::EzrokhiBrineViscosity( string const & name, makeCoefficients( inputPara ); m_waterViscosityTable = PureWaterProperties::makeSaturationViscosityTable( m_functionName, FunctionManager::getInstance() ); + GEOS_UNUSED_VAR( printTable ); // if( printTable ) // m_waterViscosityTable->print( m_waterViscosityTable->getName() ); } diff --git a/src/coreComponents/constitutive/fluid/multifluid/CO2Brine/functions/FenghourCO2Viscosity.cpp b/src/coreComponents/constitutive/fluid/multifluid/CO2Brine/functions/FenghourCO2Viscosity.cpp index 5400018d1f1..097e0473a09 100644 --- a/src/coreComponents/constitutive/fluid/multifluid/CO2Brine/functions/FenghourCO2Viscosity.cpp +++ b/src/coreComponents/constitutive/fluid/multifluid/CO2Brine/functions/FenghourCO2Viscosity.cpp @@ -148,6 +148,7 @@ FenghourCO2Viscosity::FenghourCO2Viscosity( string const & name, componentMolarWeight ) { m_CO2ViscosityTable = makeViscosityTable( inputParams, m_functionName, FunctionManager::getInstance() ); + GEOS_UNUSED_VAR( printTable ); // if( printTable ) // m_CO2ViscosityTable->print( m_CO2ViscosityTable->getName() ); } diff --git a/src/coreComponents/constitutive/fluid/multifluid/CO2Brine/functions/PhillipsBrineDensity.cpp b/src/coreComponents/constitutive/fluid/multifluid/CO2Brine/functions/PhillipsBrineDensity.cpp index f4cb50fb88a..984b3eed7f5 100644 --- a/src/coreComponents/constitutive/fluid/multifluid/CO2Brine/functions/PhillipsBrineDensity.cpp +++ b/src/coreComponents/constitutive/fluid/multifluid/CO2Brine/functions/PhillipsBrineDensity.cpp @@ -189,6 +189,7 @@ PhillipsBrineDensity::PhillipsBrineDensity( string const & name, m_waterIndex = PVTFunctionHelpers::findName( componentNames, expectedWaterComponentNames, "componentNames" ); m_brineDensityTable = makeDensityTable( inputParams, m_functionName, FunctionManager::getInstance() ); + GEOS_UNUSED_VAR( printTable ); // if( printTable ) // m_brineDensityTable->print( m_brineDensityTable->getName() ); } diff --git a/src/coreComponents/constitutive/fluid/multifluid/CO2Brine/functions/PhillipsBrineViscosity.cpp b/src/coreComponents/constitutive/fluid/multifluid/CO2Brine/functions/PhillipsBrineViscosity.cpp index 1ec577e4c30..0636cd4e7d1 100644 --- a/src/coreComponents/constitutive/fluid/multifluid/CO2Brine/functions/PhillipsBrineViscosity.cpp +++ b/src/coreComponents/constitutive/fluid/multifluid/CO2Brine/functions/PhillipsBrineViscosity.cpp @@ -43,6 +43,7 @@ PhillipsBrineViscosity::PhillipsBrineViscosity( string const & name, componentMolarWeight ) { m_waterViscosityTable = PureWaterProperties::makeSaturationViscosityTable( m_functionName, FunctionManager::getInstance() ); + GEOS_UNUSED_VAR( printTable ); // if( printTable ) // m_waterViscosityTable->print( m_waterViscosityTable->getName() ); makeCoefficients( inputPara ); diff --git a/src/coreComponents/constitutive/fluid/multifluid/CO2Brine/functions/SpanWagnerCO2Density.cpp b/src/coreComponents/constitutive/fluid/multifluid/CO2Brine/functions/SpanWagnerCO2Density.cpp index bf7bcf9ed8b..8e51474aec9 100644 --- a/src/coreComponents/constitutive/fluid/multifluid/CO2Brine/functions/SpanWagnerCO2Density.cpp +++ b/src/coreComponents/constitutive/fluid/multifluid/CO2Brine/functions/SpanWagnerCO2Density.cpp @@ -288,6 +288,7 @@ SpanWagnerCO2Density::SpanWagnerCO2Density( string const & name, m_CO2Index = PVTFunctionHelpers::findName( componentNames, expectedCO2ComponentNames, "componentNames" ); m_CO2DensityTable = makeDensityTable( inputParams, m_functionName, FunctionManager::getInstance() ); + GEOS_UNUSED_VAR( printTable ); // if( printTable ) // m_CO2DensityTable->print( m_CO2DensityTable->getName() ); } diff --git a/src/coreComponents/constitutive/fluid/multifluid/CO2Brine/functions/WaterDensity.cpp b/src/coreComponents/constitutive/fluid/multifluid/CO2Brine/functions/WaterDensity.cpp index d6accc5bc88..f09d1accd08 100644 --- a/src/coreComponents/constitutive/fluid/multifluid/CO2Brine/functions/WaterDensity.cpp +++ b/src/coreComponents/constitutive/fluid/multifluid/CO2Brine/functions/WaterDensity.cpp @@ -44,6 +44,7 @@ WaterDensity::WaterDensity( string const & name, { GEOS_UNUSED_VAR( inputParams ); m_waterDensityTable = PureWaterProperties::makeSaturationDensityTable( m_functionName, FunctionManager::getInstance() ); + GEOS_UNUSED_VAR( printTable ); // if( printTable ) // m_waterDensityTable->print( m_waterDensityTable->getName() ); } From 642b1105b3808fdd432e5eb427f93635d9224218 Mon Sep 17 00:00:00 2001 From: Randolph Settgast Date: Thu, 15 Aug 2024 15:01:15 -0700 Subject: [PATCH 07/29] switch a CI test to use shared libs --- .github/workflows/build_and_test.yml | 5 +++++ .github/workflows/ci_tests.yml | 2 ++ 2 files changed, 7 insertions(+) diff --git a/.github/workflows/build_and_test.yml b/.github/workflows/build_and_test.yml index 8b3405614f7..266d94292b5 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: boolean + default: false 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..6469b9dc960 100644 --- a/.github/workflows/ci_tests.yml +++ b/.github/workflows/ci_tests.yml @@ -170,6 +170,7 @@ jobs: 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 @@ -179,6 +180,7 @@ jobs: 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 }} From dd1ddf28777037b7faf566006b23847b6eed418e Mon Sep 17 00:00:00 2001 From: Randolph Settgast Date: Thu, 15 Aug 2024 15:04:07 -0700 Subject: [PATCH 08/29] switch a CI test to use shared libs --- host-configs/environment.cmake | 4 ++++ 1 file changed, 4 insertions(+) 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) From d4eefe989c0748f10468c7406586ce8757dbb1d6 Mon Sep 17 00:00:00 2001 From: Randolph Settgast Date: Thu, 15 Aug 2024 15:20:54 -0700 Subject: [PATCH 09/29] switch a CI test to use shared libs --- .github/workflows/build_and_test.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build_and_test.yml b/.github/workflows/build_and_test.yml index 266d94292b5..6de506355e4 100644 --- a/.github/workflows/build_and_test.yml +++ b/.github/workflows/build_and_test.yml @@ -7,8 +7,8 @@ on: type: string BUILD_SHARED_LIBS: required: false - type: boolean - default: false + type: string + default: 'OFF' BUILD_TYPE: required: false type: string From 26710c093eaa001a6765f59a6d37a41d8e53bb06 Mon Sep 17 00:00:00 2001 From: Randolph Settgast Date: Thu, 15 Aug 2024 22:25:41 -0700 Subject: [PATCH 10/29] move constitutive drivers outside of constitutive to resolve circular dependencies --- src/CMakeLists.txt | 2 +- src/coreComponents/CMakeLists.txt | 3 ++- .../constitutive/CMakeLists.txt | 25 ------------------- .../TableRelativePermeabilityHysteresis.cpp | 1 - .../docs/PVTDriver.rst | 0 .../docs/solid/TriaxialDriver.rst | 0 .../docs/solid/TriaxialDriver.svg | 0 .../PVTDriverRunTestCO2BrineEzrokhiFluid.cpp | 0 ...iverRunTestCO2BrineEzrokhiThermalFluid.cpp | 0 .../PVTDriverRunTestCO2BrinePhillipsFluid.cpp | 0 ...verRunTestCO2BrinePhillipsThermalFluid.cpp | 0 .../fluid/multiFluid}/PVTDriver.cpp | 0 .../fluid/multiFluid}/PVTDriver.hpp | 0 .../fluid/multiFluid}/PVTDriverRunTest.hpp | 0 .../blackOil/PVTDriverRunTestDeadOilFluid.cpp | 0 ...verRunTestCompositionalMultiphaseFluid.cpp | 0 ...CompositionalTwoPhaseConstantViscosity.cpp | 0 ...ionalTwoPhaseLohrenzBrayClarkViscosity.cpp | 0 .../reactive/ReactiveFluidDriver.cpp | 0 .../reactive/ReactiveFluidDriver.hpp | 0 .../relativePermeability/RelpermDriver.cpp | 0 .../relativePermeability/RelpermDriver.hpp | 0 .../RelpermDriverBrooksCoreyBakerRunTest.cpp | 0 .../RelpermDriverBrooksCoreyRunTest.cpp | 0 .../RelpermDriverBrooksCoreyStone2RunTest.cpp | 0 .../RelpermDriverRunTest.hpp | 0 ...rmDriverTableRelativeHysteresisRunTest.cpp | 0 .../RelpermDriverTableRelativeRunTest.cpp | 0 .../RelpermDriverVanGenuchtenBakerRunTest.cpp | 0 ...RelpermDriverVanGenuchtenStone2RunTest.cpp | 0 .../solid/TriaxialDriver.cpp | 0 .../solid/TriaxialDriver.hpp | 0 32 files changed, 3 insertions(+), 28 deletions(-) rename src/coreComponents/{constitutive => constitutiveDrivers}/docs/PVTDriver.rst (100%) rename src/coreComponents/{constitutive => constitutiveDrivers}/docs/solid/TriaxialDriver.rst (100%) rename src/coreComponents/{constitutive => constitutiveDrivers}/docs/solid/TriaxialDriver.svg (100%) rename src/coreComponents/{constitutive/fluid/multifluid => constitutiveDrivers/fluid/multiFluid}/CO2Brine/PVTDriverRunTestCO2BrineEzrokhiFluid.cpp (100%) rename src/coreComponents/{constitutive/fluid/multifluid => constitutiveDrivers/fluid/multiFluid}/CO2Brine/PVTDriverRunTestCO2BrineEzrokhiThermalFluid.cpp (100%) rename src/coreComponents/{constitutive/fluid/multifluid => constitutiveDrivers/fluid/multiFluid}/CO2Brine/PVTDriverRunTestCO2BrinePhillipsFluid.cpp (100%) rename src/coreComponents/{constitutive/fluid/multifluid => constitutiveDrivers/fluid/multiFluid}/CO2Brine/PVTDriverRunTestCO2BrinePhillipsThermalFluid.cpp (100%) rename src/coreComponents/{constitutive/fluid/multifluid => constitutiveDrivers/fluid/multiFluid}/PVTDriver.cpp (100%) rename src/coreComponents/{constitutive/fluid/multifluid => constitutiveDrivers/fluid/multiFluid}/PVTDriver.hpp (100%) rename src/coreComponents/{constitutive/fluid/multifluid => constitutiveDrivers/fluid/multiFluid}/PVTDriverRunTest.hpp (100%) rename src/coreComponents/{constitutive/fluid/multifluid => constitutiveDrivers/fluid/multiFluid}/blackOil/PVTDriverRunTestDeadOilFluid.cpp (100%) rename src/coreComponents/{constitutive/fluid/multifluid => constitutiveDrivers/fluid/multiFluid}/compositional/PVTDriverRunTestCompositionalMultiphaseFluid.cpp (100%) rename src/coreComponents/{constitutive/fluid/multifluid => constitutiveDrivers/fluid/multiFluid}/compositional/PVTDriverRunTestCompositionalTwoPhaseConstantViscosity.cpp (100%) rename src/coreComponents/{constitutive/fluid/multifluid => constitutiveDrivers/fluid/multiFluid}/compositional/PVTDriverRunTestCompositionalTwoPhaseLohrenzBrayClarkViscosity.cpp (100%) rename src/coreComponents/{constitutive/fluid/multifluid => constitutiveDrivers/fluid/multiFluid}/reactive/ReactiveFluidDriver.cpp (100%) rename src/coreComponents/{constitutive/fluid/multifluid => constitutiveDrivers/fluid/multiFluid}/reactive/ReactiveFluidDriver.hpp (100%) rename src/coreComponents/{constitutive => constitutiveDrivers}/relativePermeability/RelpermDriver.cpp (100%) rename src/coreComponents/{constitutive => constitutiveDrivers}/relativePermeability/RelpermDriver.hpp (100%) rename src/coreComponents/{constitutive => constitutiveDrivers}/relativePermeability/RelpermDriverBrooksCoreyBakerRunTest.cpp (100%) rename src/coreComponents/{constitutive => constitutiveDrivers}/relativePermeability/RelpermDriverBrooksCoreyRunTest.cpp (100%) rename src/coreComponents/{constitutive => constitutiveDrivers}/relativePermeability/RelpermDriverBrooksCoreyStone2RunTest.cpp (100%) rename src/coreComponents/{constitutive => constitutiveDrivers}/relativePermeability/RelpermDriverRunTest.hpp (100%) rename src/coreComponents/{constitutive => constitutiveDrivers}/relativePermeability/RelpermDriverTableRelativeHysteresisRunTest.cpp (100%) rename src/coreComponents/{constitutive => constitutiveDrivers}/relativePermeability/RelpermDriverTableRelativeRunTest.cpp (100%) rename src/coreComponents/{constitutive => constitutiveDrivers}/relativePermeability/RelpermDriverVanGenuchtenBakerRunTest.cpp (100%) rename src/coreComponents/{constitutive => constitutiveDrivers}/relativePermeability/RelpermDriverVanGenuchtenStone2RunTest.cpp (100%) rename src/coreComponents/{constitutive => constitutiveDrivers}/solid/TriaxialDriver.cpp (100%) rename src/coreComponents/{constitutive => constitutiveDrivers}/solid/TriaxialDriver.hpp (100%) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index eb34514c777..a75f7b10cec 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -144,7 +144,7 @@ endif() blt_add_executable( NAME geosx SOURCES main/main.cpp DEPENDS_ON ${extraComponentsLinkList} - ${externalComponentsLinkList} ) + ${externalComponentsLinkList} common fmt::fmt-header-only HDF5::HDF5 ) # blt_print_target_properties(TARGET geosx # CHILDREN TRUE diff --git a/src/coreComponents/CMakeLists.txt b/src/coreComponents/CMakeLists.txt index 536769096ae..72fc13c0e07 100644 --- a/src/coreComponents/CMakeLists.txt +++ b/src/coreComponents/CMakeLists.txt @@ -6,6 +6,7 @@ set( subdirs schema functions constitutive + constitutiveDrivers mesh denseLinearAlgebra linearAlgebra @@ -79,7 +80,7 @@ if( GEOS_BUILD_SHARED_CORE_LIB AND GEOS_BUILD_OBJ_LIBS ) elseif( GEOS_BUILD_SHARED_CORE_LIB 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} + SOURCE_LIBS mainInterface LIB_TYPE SHARED LINK_PREPEND ${GEOS_LINK_PREPEND_FLAG} LINK_POSTPEND ${GEOS_LINK_POSTPEND_FLAG} ) diff --git a/src/coreComponents/constitutive/CMakeLists.txt b/src/coreComponents/constitutive/CMakeLists.txt index 8296a95d96a..bbbc2e7ce8e 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 @@ -318,7 +294,6 @@ if( ENABLE_PVTPackage ) set( constitutive_sources ${constitutive_sources} fluid/multifluid/compositional/CompositionalMultiphaseFluidPVTPackage.cpp - # fluid/multifluid/compositional/PVTDriverRunTestCompositionalMultiphaseFluid.cpp ) add_subdirectory( PVTPackage ) 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/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/solid/TriaxialDriver.rst similarity index 100% rename from src/coreComponents/constitutive/docs/solid/TriaxialDriver.rst rename to src/coreComponents/constitutiveDrivers/docs/solid/TriaxialDriver.rst diff --git a/src/coreComponents/constitutive/docs/solid/TriaxialDriver.svg b/src/coreComponents/constitutiveDrivers/docs/solid/TriaxialDriver.svg similarity index 100% rename from src/coreComponents/constitutive/docs/solid/TriaxialDriver.svg rename to src/coreComponents/constitutiveDrivers/docs/solid/TriaxialDriver.svg diff --git a/src/coreComponents/constitutive/fluid/multifluid/CO2Brine/PVTDriverRunTestCO2BrineEzrokhiFluid.cpp b/src/coreComponents/constitutiveDrivers/fluid/multiFluid/CO2Brine/PVTDriverRunTestCO2BrineEzrokhiFluid.cpp similarity index 100% rename from src/coreComponents/constitutive/fluid/multifluid/CO2Brine/PVTDriverRunTestCO2BrineEzrokhiFluid.cpp rename to src/coreComponents/constitutiveDrivers/fluid/multiFluid/CO2Brine/PVTDriverRunTestCO2BrineEzrokhiFluid.cpp diff --git a/src/coreComponents/constitutive/fluid/multifluid/CO2Brine/PVTDriverRunTestCO2BrineEzrokhiThermalFluid.cpp b/src/coreComponents/constitutiveDrivers/fluid/multiFluid/CO2Brine/PVTDriverRunTestCO2BrineEzrokhiThermalFluid.cpp similarity index 100% rename from src/coreComponents/constitutive/fluid/multifluid/CO2Brine/PVTDriverRunTestCO2BrineEzrokhiThermalFluid.cpp rename to src/coreComponents/constitutiveDrivers/fluid/multiFluid/CO2Brine/PVTDriverRunTestCO2BrineEzrokhiThermalFluid.cpp diff --git a/src/coreComponents/constitutive/fluid/multifluid/CO2Brine/PVTDriverRunTestCO2BrinePhillipsFluid.cpp b/src/coreComponents/constitutiveDrivers/fluid/multiFluid/CO2Brine/PVTDriverRunTestCO2BrinePhillipsFluid.cpp similarity index 100% rename from src/coreComponents/constitutive/fluid/multifluid/CO2Brine/PVTDriverRunTestCO2BrinePhillipsFluid.cpp rename to src/coreComponents/constitutiveDrivers/fluid/multiFluid/CO2Brine/PVTDriverRunTestCO2BrinePhillipsFluid.cpp diff --git a/src/coreComponents/constitutive/fluid/multifluid/CO2Brine/PVTDriverRunTestCO2BrinePhillipsThermalFluid.cpp b/src/coreComponents/constitutiveDrivers/fluid/multiFluid/CO2Brine/PVTDriverRunTestCO2BrinePhillipsThermalFluid.cpp similarity index 100% rename from src/coreComponents/constitutive/fluid/multifluid/CO2Brine/PVTDriverRunTestCO2BrinePhillipsThermalFluid.cpp rename to src/coreComponents/constitutiveDrivers/fluid/multiFluid/CO2Brine/PVTDriverRunTestCO2BrinePhillipsThermalFluid.cpp diff --git a/src/coreComponents/constitutive/fluid/multifluid/PVTDriver.cpp b/src/coreComponents/constitutiveDrivers/fluid/multiFluid/PVTDriver.cpp similarity index 100% rename from src/coreComponents/constitutive/fluid/multifluid/PVTDriver.cpp rename to src/coreComponents/constitutiveDrivers/fluid/multiFluid/PVTDriver.cpp 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 100% rename from src/coreComponents/constitutive/fluid/multifluid/blackOil/PVTDriverRunTestDeadOilFluid.cpp rename to src/coreComponents/constitutiveDrivers/fluid/multiFluid/blackOil/PVTDriverRunTestDeadOilFluid.cpp diff --git a/src/coreComponents/constitutive/fluid/multifluid/compositional/PVTDriverRunTestCompositionalMultiphaseFluid.cpp b/src/coreComponents/constitutiveDrivers/fluid/multiFluid/compositional/PVTDriverRunTestCompositionalMultiphaseFluid.cpp similarity index 100% rename from src/coreComponents/constitutive/fluid/multifluid/compositional/PVTDriverRunTestCompositionalMultiphaseFluid.cpp rename to src/coreComponents/constitutiveDrivers/fluid/multiFluid/compositional/PVTDriverRunTestCompositionalMultiphaseFluid.cpp diff --git a/src/coreComponents/constitutive/fluid/multifluid/compositional/PVTDriverRunTestCompositionalTwoPhaseConstantViscosity.cpp b/src/coreComponents/constitutiveDrivers/fluid/multiFluid/compositional/PVTDriverRunTestCompositionalTwoPhaseConstantViscosity.cpp similarity index 100% rename from src/coreComponents/constitutive/fluid/multifluid/compositional/PVTDriverRunTestCompositionalTwoPhaseConstantViscosity.cpp rename to src/coreComponents/constitutiveDrivers/fluid/multiFluid/compositional/PVTDriverRunTestCompositionalTwoPhaseConstantViscosity.cpp diff --git a/src/coreComponents/constitutive/fluid/multifluid/compositional/PVTDriverRunTestCompositionalTwoPhaseLohrenzBrayClarkViscosity.cpp b/src/coreComponents/constitutiveDrivers/fluid/multiFluid/compositional/PVTDriverRunTestCompositionalTwoPhaseLohrenzBrayClarkViscosity.cpp similarity index 100% rename from src/coreComponents/constitutive/fluid/multifluid/compositional/PVTDriverRunTestCompositionalTwoPhaseLohrenzBrayClarkViscosity.cpp rename to src/coreComponents/constitutiveDrivers/fluid/multiFluid/compositional/PVTDriverRunTestCompositionalTwoPhaseLohrenzBrayClarkViscosity.cpp diff --git a/src/coreComponents/constitutive/fluid/multifluid/reactive/ReactiveFluidDriver.cpp b/src/coreComponents/constitutiveDrivers/fluid/multiFluid/reactive/ReactiveFluidDriver.cpp similarity index 100% rename from src/coreComponents/constitutive/fluid/multifluid/reactive/ReactiveFluidDriver.cpp rename to src/coreComponents/constitutiveDrivers/fluid/multiFluid/reactive/ReactiveFluidDriver.cpp 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 100% rename from src/coreComponents/constitutive/relativePermeability/RelpermDriverBrooksCoreyBakerRunTest.cpp rename to src/coreComponents/constitutiveDrivers/relativePermeability/RelpermDriverBrooksCoreyBakerRunTest.cpp diff --git a/src/coreComponents/constitutive/relativePermeability/RelpermDriverBrooksCoreyRunTest.cpp b/src/coreComponents/constitutiveDrivers/relativePermeability/RelpermDriverBrooksCoreyRunTest.cpp similarity index 100% rename from src/coreComponents/constitutive/relativePermeability/RelpermDriverBrooksCoreyRunTest.cpp rename to src/coreComponents/constitutiveDrivers/relativePermeability/RelpermDriverBrooksCoreyRunTest.cpp diff --git a/src/coreComponents/constitutive/relativePermeability/RelpermDriverBrooksCoreyStone2RunTest.cpp b/src/coreComponents/constitutiveDrivers/relativePermeability/RelpermDriverBrooksCoreyStone2RunTest.cpp similarity index 100% rename from src/coreComponents/constitutive/relativePermeability/RelpermDriverBrooksCoreyStone2RunTest.cpp rename to src/coreComponents/constitutiveDrivers/relativePermeability/RelpermDriverBrooksCoreyStone2RunTest.cpp diff --git a/src/coreComponents/constitutive/relativePermeability/RelpermDriverRunTest.hpp b/src/coreComponents/constitutiveDrivers/relativePermeability/RelpermDriverRunTest.hpp similarity index 100% rename from src/coreComponents/constitutive/relativePermeability/RelpermDriverRunTest.hpp rename to src/coreComponents/constitutiveDrivers/relativePermeability/RelpermDriverRunTest.hpp diff --git a/src/coreComponents/constitutive/relativePermeability/RelpermDriverTableRelativeHysteresisRunTest.cpp b/src/coreComponents/constitutiveDrivers/relativePermeability/RelpermDriverTableRelativeHysteresisRunTest.cpp similarity index 100% rename from src/coreComponents/constitutive/relativePermeability/RelpermDriverTableRelativeHysteresisRunTest.cpp rename to src/coreComponents/constitutiveDrivers/relativePermeability/RelpermDriverTableRelativeHysteresisRunTest.cpp diff --git a/src/coreComponents/constitutive/relativePermeability/RelpermDriverTableRelativeRunTest.cpp b/src/coreComponents/constitutiveDrivers/relativePermeability/RelpermDriverTableRelativeRunTest.cpp similarity index 100% rename from src/coreComponents/constitutive/relativePermeability/RelpermDriverTableRelativeRunTest.cpp rename to src/coreComponents/constitutiveDrivers/relativePermeability/RelpermDriverTableRelativeRunTest.cpp diff --git a/src/coreComponents/constitutive/relativePermeability/RelpermDriverVanGenuchtenBakerRunTest.cpp b/src/coreComponents/constitutiveDrivers/relativePermeability/RelpermDriverVanGenuchtenBakerRunTest.cpp similarity index 100% rename from src/coreComponents/constitutive/relativePermeability/RelpermDriverVanGenuchtenBakerRunTest.cpp rename to src/coreComponents/constitutiveDrivers/relativePermeability/RelpermDriverVanGenuchtenBakerRunTest.cpp diff --git a/src/coreComponents/constitutive/relativePermeability/RelpermDriverVanGenuchtenStone2RunTest.cpp b/src/coreComponents/constitutiveDrivers/relativePermeability/RelpermDriverVanGenuchtenStone2RunTest.cpp similarity index 100% rename from src/coreComponents/constitutive/relativePermeability/RelpermDriverVanGenuchtenStone2RunTest.cpp rename to src/coreComponents/constitutiveDrivers/relativePermeability/RelpermDriverVanGenuchtenStone2RunTest.cpp diff --git a/src/coreComponents/constitutive/solid/TriaxialDriver.cpp b/src/coreComponents/constitutiveDrivers/solid/TriaxialDriver.cpp similarity index 100% rename from src/coreComponents/constitutive/solid/TriaxialDriver.cpp rename to src/coreComponents/constitutiveDrivers/solid/TriaxialDriver.cpp 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 From 6abbacd412ab70dee0793658e091b1a8b76fac60 Mon Sep 17 00:00:00 2001 From: Randolph Settgast Date: Thu, 15 Aug 2024 22:25:57 -0700 Subject: [PATCH 11/29] move constitutive drivers outside of constitutive to resolve circular dependencies --- .../constitutiveDrivers/CMakeLists.txt | 53 +++++++++++++++++++ 1 file changed, 53 insertions(+) create mode 100644 src/coreComponents/constitutiveDrivers/CMakeLists.txt diff --git a/src/coreComponents/constitutiveDrivers/CMakeLists.txt b/src/coreComponents/constitutiveDrivers/CMakeLists.txt new file mode 100644 index 00000000000..884f4ce99be --- /dev/null +++ b/src/coreComponents/constitutiveDrivers/CMakeLists.txt @@ -0,0 +1,53 @@ +# +# 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 + ) + +set( dependencyList ${parallelDeps} constitutive events ) + +if( ENABLE_PVTPackage ) + set( constitutiveDrivers_sources + ${constitutiveDrivers_sources} + fluid/multifluid/compositional/PVTDriverRunTestCompositionalMultiphaseFluid.cpp + ) +endif() + +blt_add_library( NAME constitutiveDrivers + SOURCES ${constitutiveDrivers_sources} + HEADERS ${constitutiveDrivers_headers} + DEPENDS_ON ${dependencyList} + OBJECT ${GEOS_BUILD_OBJ_LIBS} + SHARED ${GEOS_BUILD_SHARED_LIBS} + ) + +target_include_directories( constitutiveDrivers PUBLIC ${CMAKE_SOURCE_DIR}/coreComponents ) + From fcd7008379757d87a52fddd79d947647a71fd210 Mon Sep 17 00:00:00 2001 From: Randolph Settgast Date: Fri, 16 Aug 2024 08:53:48 -0700 Subject: [PATCH 12/29] fix case sensitive issue --- host-configs/apple/macOS_base.cmake | 4 ++-- .../constitutiveDrivers/CMakeLists.txt | 24 +++++++++---------- 2 files changed, 14 insertions(+), 14 deletions(-) diff --git a/host-configs/apple/macOS_base.cmake b/host-configs/apple/macOS_base.cmake index 45911758b50..e574ee89323 100644 --- a/host-configs/apple/macOS_base.cmake +++ b/host-configs/apple/macOS_base.cmake @@ -28,8 +28,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_SHARED_LIBS ON CACHE BOOL "" FORCE) -set(GEOS_BUILD_SHARED_CORE_LIB OFF CACHE BOOL "" FORCE) +set(GEOS_BUILD_SHARED_LIBS OFF CACHE BOOL "" FORCE) +set(GEOS_BUILD_SHARED_CORE_LIB ON CACHE BOOL "" FORCE) diff --git a/src/coreComponents/constitutiveDrivers/CMakeLists.txt b/src/coreComponents/constitutiveDrivers/CMakeLists.txt index 884f4ce99be..d83ac540bcd 100644 --- a/src/coreComponents/constitutiveDrivers/CMakeLists.txt +++ b/src/coreComponents/constitutiveDrivers/CMakeLists.txt @@ -2,9 +2,9 @@ # Specify all headers # set( constitutiveDrivers_headers - fluid/multifluid/PVTDriver.hpp - fluid/multifluid/PVTDriverRunTest.hpp - fluid/multifluid/reactive/ReactiveFluidDriver.hpp + fluid/multiFluid/PVTDriver.hpp + fluid/multiFluid/PVTDriverRunTest.hpp + fluid/multiFluid/reactive/ReactiveFluidDriver.hpp relativePermeability/RelpermDriver.hpp relativePermeability/RelpermDriverRunTest.hpp solid/TriaxialDriver.hpp @@ -13,15 +13,15 @@ set( constitutiveDrivers_headers # 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 + 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 From da4b580f531d7a1f2e5423035ca936ec917d6a98 Mon Sep 17 00:00:00 2001 From: Randolph Settgast Date: Fri, 16 Aug 2024 08:54:01 -0700 Subject: [PATCH 13/29] fix case sensitive issue --- src/coreComponents/constitutiveDrivers/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/coreComponents/constitutiveDrivers/CMakeLists.txt b/src/coreComponents/constitutiveDrivers/CMakeLists.txt index d83ac540bcd..dc183e4aa37 100644 --- a/src/coreComponents/constitutiveDrivers/CMakeLists.txt +++ b/src/coreComponents/constitutiveDrivers/CMakeLists.txt @@ -37,7 +37,7 @@ set( dependencyList ${parallelDeps} constitutive events ) if( ENABLE_PVTPackage ) set( constitutiveDrivers_sources ${constitutiveDrivers_sources} - fluid/multifluid/compositional/PVTDriverRunTestCompositionalMultiphaseFluid.cpp + fluid/multiFluid/compositional/PVTDriverRunTestCompositionalMultiphaseFluid.cpp ) endif() From a8f0867f741be4274f7f6a80a170ae2a2af13e64 Mon Sep 17 00:00:00 2001 From: Randolph Settgast Date: Fri, 16 Aug 2024 09:34:40 -0700 Subject: [PATCH 14/29] fix case sensitive issue --- .../CO2Brine/PVTDriverRunTestCO2BrineEzrokhiThermalFluid.cpp | 2 +- .../CO2Brine/PVTDriverRunTestCO2BrinePhillipsFluid.cpp | 2 +- .../CO2Brine/PVTDriverRunTestCO2BrinePhillipsThermalFluid.cpp | 2 +- .../fluid/multiFluid/blackOil/PVTDriverRunTestDeadOilFluid.cpp | 2 +- .../PVTDriverRunTestCompositionalTwoPhaseConstantViscosity.cpp | 2 +- ...verRunTestCompositionalTwoPhaseLohrenzBrayClarkViscosity.cpp | 2 +- .../fluid/multiFluid/reactive/ReactiveFluidDriver.cpp | 1 - 7 files changed, 6 insertions(+), 7 deletions(-) diff --git a/src/coreComponents/constitutiveDrivers/fluid/multiFluid/CO2Brine/PVTDriverRunTestCO2BrineEzrokhiThermalFluid.cpp b/src/coreComponents/constitutiveDrivers/fluid/multiFluid/CO2Brine/PVTDriverRunTestCO2BrineEzrokhiThermalFluid.cpp index a42c0773420..64f4d242491 100644 --- a/src/coreComponents/constitutiveDrivers/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 "constitutive/fluid/multiFluid/PVTDriverRunTest.hpp" #include "constitutive/fluid/multifluid/CO2Brine/CO2BrineFluid.hpp" namespace geos diff --git a/src/coreComponents/constitutiveDrivers/fluid/multiFluid/CO2Brine/PVTDriverRunTestCO2BrinePhillipsFluid.cpp b/src/coreComponents/constitutiveDrivers/fluid/multiFluid/CO2Brine/PVTDriverRunTestCO2BrinePhillipsFluid.cpp index a7fe70a0b0d..041304bc45f 100644 --- a/src/coreComponents/constitutiveDrivers/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 "constitutive/fluid/multiFluid/PVTDriverRunTest.hpp" #include "constitutive/fluid/multifluid/CO2Brine/CO2BrineFluid.hpp" namespace geos diff --git a/src/coreComponents/constitutiveDrivers/fluid/multiFluid/CO2Brine/PVTDriverRunTestCO2BrinePhillipsThermalFluid.cpp b/src/coreComponents/constitutiveDrivers/fluid/multiFluid/CO2Brine/PVTDriverRunTestCO2BrinePhillipsThermalFluid.cpp index 4536efa96f5..551d02f7ec3 100644 --- a/src/coreComponents/constitutiveDrivers/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 "constitutive/fluid/multiFluid/PVTDriverRunTest.hpp" #include "constitutive/fluid/multifluid/CO2Brine/CO2BrineFluid.hpp" namespace geos diff --git a/src/coreComponents/constitutiveDrivers/fluid/multiFluid/blackOil/PVTDriverRunTestDeadOilFluid.cpp b/src/coreComponents/constitutiveDrivers/fluid/multiFluid/blackOil/PVTDriverRunTestDeadOilFluid.cpp index 86ae569e672..6da47ca2789 100644 --- a/src/coreComponents/constitutiveDrivers/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 "constitutive/fluid/multiFluid/PVTDriverRunTest.hpp" #include "constitutive/fluid/multifluid/blackOil/DeadOilFluid.hpp" #include "constitutive/fluid/multifluid/blackOil/BlackOilFluid.hpp" diff --git a/src/coreComponents/constitutiveDrivers/fluid/multiFluid/compositional/PVTDriverRunTestCompositionalTwoPhaseConstantViscosity.cpp b/src/coreComponents/constitutiveDrivers/fluid/multiFluid/compositional/PVTDriverRunTestCompositionalTwoPhaseConstantViscosity.cpp index 5e3a7da05d5..abb2c848a1b 100644 --- a/src/coreComponents/constitutiveDrivers/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 "constitutive/fluid/multiFluid/PVTDriverRunTest.hpp" #include "constitutive/fluid/multifluid/compositional/CompositionalMultiphaseFluid.hpp" namespace geos diff --git a/src/coreComponents/constitutiveDrivers/fluid/multiFluid/compositional/PVTDriverRunTestCompositionalTwoPhaseLohrenzBrayClarkViscosity.cpp b/src/coreComponents/constitutiveDrivers/fluid/multiFluid/compositional/PVTDriverRunTestCompositionalTwoPhaseLohrenzBrayClarkViscosity.cpp index f1c85834b70..f442aa22e9c 100644 --- a/src/coreComponents/constitutiveDrivers/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 "constitutive/fluid/multiFluid/PVTDriverRunTest.hpp" #include "constitutive/fluid/multifluid/compositional/CompositionalMultiphaseFluid.hpp" namespace geos diff --git a/src/coreComponents/constitutiveDrivers/fluid/multiFluid/reactive/ReactiveFluidDriver.cpp b/src/coreComponents/constitutiveDrivers/fluid/multiFluid/reactive/ReactiveFluidDriver.cpp index b9f54c63166..73625f11864 100644 --- a/src/coreComponents/constitutiveDrivers/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" From 3b09b0a42f5785a7f69c0356596310ff817961c1 Mon Sep 17 00:00:00 2001 From: Randolph Settgast Date: Fri, 16 Aug 2024 12:56:39 -0700 Subject: [PATCH 15/29] fix some more typos --- src/cmake/GeosxOptions.cmake | 11 +++++++++-- src/coreComponents/CMakeLists.txt | 4 ++++ .../CO2Brine/PVTDriverRunTestCO2BrineEzrokhiFluid.cpp | 2 +- .../PVTDriverRunTestCO2BrineEzrokhiThermalFluid.cpp | 2 +- .../PVTDriverRunTestCO2BrinePhillipsFluid.cpp | 2 +- .../PVTDriverRunTestCO2BrinePhillipsThermalFluid.cpp | 2 +- .../blackOil/PVTDriverRunTestDeadOilFluid.cpp | 2 +- .../PVTDriverRunTestCompositionalMultiphaseFluid.cpp | 2 +- ...rRunTestCompositionalTwoPhaseConstantViscosity.cpp | 2 +- ...CompositionalTwoPhaseLohrenzBrayClarkViscosity.cpp | 2 +- .../RelpermDriverBrooksCoreyBakerRunTest.cpp | 2 +- .../RelpermDriverBrooksCoreyRunTest.cpp | 2 +- .../RelpermDriverBrooksCoreyStone2RunTest.cpp | 2 +- .../relativePermeability/RelpermDriverRunTest.hpp | 4 ++-- .../RelpermDriverTableRelativeHysteresisRunTest.cpp | 2 +- .../RelpermDriverTableRelativeRunTest.cpp | 2 +- .../RelpermDriverVanGenuchtenBakerRunTest.cpp | 2 +- .../RelpermDriverVanGenuchtenStone2RunTest.cpp | 2 +- .../unitTests/testingUtilities/CMakeLists.txt | 3 ++- 19 files changed, 32 insertions(+), 20 deletions(-) diff --git a/src/cmake/GeosxOptions.cmake b/src/cmake/GeosxOptions.cmake index b3b15983dcf..3e49bde7e9f 100644 --- a/src/cmake/GeosxOptions.cmake +++ b/src/cmake/GeosxOptions.cmake @@ -162,8 +162,8 @@ endif() if( CMAKE_HOST_APPLE ) -# set(GEOS_LINK_PREPEND_FLAG "-Wl,-force_load" CACHE STRING "") -# set(GEOS_LINK_POSTPEND_FLAG "" CACHE STRING "") + 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 "" ) @@ -220,4 +220,11 @@ 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}" ) + + +set( GRAPHVIZ_EXTERNAL_LIBS TRUE ) +set( GRAPHVIZ_IGNORE_TARGETS "testingUtilities" ) +set( GRAPHVIZ_EXECUTABLES TRUE ) +set( GRAPHVIZ_CUSTOM_TARGETS TRUE ) + message( "Leaving GeosxOptions.cmake\n" ) diff --git a/src/coreComponents/CMakeLists.txt b/src/coreComponents/CMakeLists.txt index 72fc13c0e07..f6a0487e885 100644 --- a/src/coreComponents/CMakeLists.txt +++ b/src/coreComponents/CMakeLists.txt @@ -85,6 +85,8 @@ elseif( GEOS_BUILD_SHARED_CORE_LIB AND NOT GEOS_BUILD_OBJ_LIBS ) LINK_PREPEND ${GEOS_LINK_PREPEND_FLAG} LINK_POSTPEND ${GEOS_LINK_POSTPEND_FLAG} ) + blt_print_target_properties( TARGET geosx_core ) + elseif( NOT GEOS_BUILD_SHARED_CORE_LIB AND GEOS_BUILD_OBJ_LIBS ) message( "Building object coreComponents, executables link to coreComponents" ) else() @@ -104,6 +106,8 @@ if ( TARGET geosx_core ) install( TARGETS geosx_core LIBRARY DESTINATION ${CMAKE_INSTALL_PREFIX}/lib ) target_include_directories( geosx_core PUBLIC ${CMAKE_SOURCE_DIR}/coreComponents ) + target_include_directories( geosx_core PUBLIC ${CMAKE_BINARY_DIR}/include ) + endif() geosx_add_code_checks( PREFIX coreComponents diff --git a/src/coreComponents/constitutiveDrivers/fluid/multiFluid/CO2Brine/PVTDriverRunTestCO2BrineEzrokhiFluid.cpp b/src/coreComponents/constitutiveDrivers/fluid/multiFluid/CO2Brine/PVTDriverRunTestCO2BrineEzrokhiFluid.cpp index 37e0092277e..4df6aae9cd4 100644 --- a/src/coreComponents/constitutiveDrivers/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/constitutiveDrivers/fluid/multiFluid/CO2Brine/PVTDriverRunTestCO2BrineEzrokhiThermalFluid.cpp b/src/coreComponents/constitutiveDrivers/fluid/multiFluid/CO2Brine/PVTDriverRunTestCO2BrineEzrokhiThermalFluid.cpp index 64f4d242491..2e91dd5c8be 100644 --- a/src/coreComponents/constitutiveDrivers/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/constitutiveDrivers/fluid/multiFluid/CO2Brine/PVTDriverRunTestCO2BrinePhillipsFluid.cpp b/src/coreComponents/constitutiveDrivers/fluid/multiFluid/CO2Brine/PVTDriverRunTestCO2BrinePhillipsFluid.cpp index 041304bc45f..a36fc8c0cbd 100644 --- a/src/coreComponents/constitutiveDrivers/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/constitutiveDrivers/fluid/multiFluid/CO2Brine/PVTDriverRunTestCO2BrinePhillipsThermalFluid.cpp b/src/coreComponents/constitutiveDrivers/fluid/multiFluid/CO2Brine/PVTDriverRunTestCO2BrinePhillipsThermalFluid.cpp index 551d02f7ec3..12c1472d97a 100644 --- a/src/coreComponents/constitutiveDrivers/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/constitutiveDrivers/fluid/multiFluid/blackOil/PVTDriverRunTestDeadOilFluid.cpp b/src/coreComponents/constitutiveDrivers/fluid/multiFluid/blackOil/PVTDriverRunTestDeadOilFluid.cpp index 6da47ca2789..4d47ced92ab 100644 --- a/src/coreComponents/constitutiveDrivers/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/constitutiveDrivers/fluid/multiFluid/compositional/PVTDriverRunTestCompositionalMultiphaseFluid.cpp b/src/coreComponents/constitutiveDrivers/fluid/multiFluid/compositional/PVTDriverRunTestCompositionalMultiphaseFluid.cpp index 95d7805133b..f93d5039c64 100644 --- a/src/coreComponents/constitutiveDrivers/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/constitutiveDrivers/fluid/multiFluid/compositional/PVTDriverRunTestCompositionalTwoPhaseConstantViscosity.cpp b/src/coreComponents/constitutiveDrivers/fluid/multiFluid/compositional/PVTDriverRunTestCompositionalTwoPhaseConstantViscosity.cpp index abb2c848a1b..f3968bef2ad 100644 --- a/src/coreComponents/constitutiveDrivers/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/constitutiveDrivers/fluid/multiFluid/compositional/PVTDriverRunTestCompositionalTwoPhaseLohrenzBrayClarkViscosity.cpp b/src/coreComponents/constitutiveDrivers/fluid/multiFluid/compositional/PVTDriverRunTestCompositionalTwoPhaseLohrenzBrayClarkViscosity.cpp index f442aa22e9c..afcfd267f63 100644 --- a/src/coreComponents/constitutiveDrivers/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/constitutiveDrivers/relativePermeability/RelpermDriverBrooksCoreyBakerRunTest.cpp b/src/coreComponents/constitutiveDrivers/relativePermeability/RelpermDriverBrooksCoreyBakerRunTest.cpp index c46982327aa..20601bcc9b8 100644 --- a/src/coreComponents/constitutiveDrivers/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/constitutiveDrivers/relativePermeability/RelpermDriverBrooksCoreyRunTest.cpp b/src/coreComponents/constitutiveDrivers/relativePermeability/RelpermDriverBrooksCoreyRunTest.cpp index 6fb6f873dbc..b49a329e467 100644 --- a/src/coreComponents/constitutiveDrivers/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/constitutiveDrivers/relativePermeability/RelpermDriverBrooksCoreyStone2RunTest.cpp b/src/coreComponents/constitutiveDrivers/relativePermeability/RelpermDriverBrooksCoreyStone2RunTest.cpp index 57efb4ff67a..1884ff3491d 100644 --- a/src/coreComponents/constitutiveDrivers/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/constitutiveDrivers/relativePermeability/RelpermDriverRunTest.hpp b/src/coreComponents/constitutiveDrivers/relativePermeability/RelpermDriverRunTest.hpp index f361beaf00c..75315d66fb4 100644 --- a/src/coreComponents/constitutiveDrivers/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/constitutiveDrivers/relativePermeability/RelpermDriverTableRelativeHysteresisRunTest.cpp b/src/coreComponents/constitutiveDrivers/relativePermeability/RelpermDriverTableRelativeHysteresisRunTest.cpp index b3572d74fe3..3e62792b0d7 100644 --- a/src/coreComponents/constitutiveDrivers/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/constitutiveDrivers/relativePermeability/RelpermDriverTableRelativeRunTest.cpp b/src/coreComponents/constitutiveDrivers/relativePermeability/RelpermDriverTableRelativeRunTest.cpp index bfa0ad9c510..faf74231723 100644 --- a/src/coreComponents/constitutiveDrivers/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/constitutiveDrivers/relativePermeability/RelpermDriverVanGenuchtenBakerRunTest.cpp b/src/coreComponents/constitutiveDrivers/relativePermeability/RelpermDriverVanGenuchtenBakerRunTest.cpp index 3de1845934b..2513e100131 100644 --- a/src/coreComponents/constitutiveDrivers/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/constitutiveDrivers/relativePermeability/RelpermDriverVanGenuchtenStone2RunTest.cpp b/src/coreComponents/constitutiveDrivers/relativePermeability/RelpermDriverVanGenuchtenStone2RunTest.cpp index 4e3ef1fc796..c17b1646d3f 100644 --- a/src/coreComponents/constitutiveDrivers/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/unitTests/testingUtilities/CMakeLists.txt b/src/coreComponents/unitTests/testingUtilities/CMakeLists.txt index 4f0f9d4096d..f0652a215b6 100644 --- a/src/coreComponents/unitTests/testingUtilities/CMakeLists.txt +++ b/src/coreComponents/unitTests/testingUtilities/CMakeLists.txt @@ -18,7 +18,7 @@ set( testingUtilities_sources set( dependencyList ${parallelDeps} gtest ) if ( GEOS_BUILD_SHARED_CORE_LIB ) - list( APPEND dependencyList geosx_core HDF5::HDF5 ) + list( APPEND dependencyList mainInterface HDF5::HDF5 ) else() list( APPEND dependencyList ${geosx_core_libs} HDF5::HDF5 ) endif() @@ -32,3 +32,4 @@ blt_add_library( NAME testingUtilities ) target_include_directories( testingUtilities PUBLIC ${CMAKE_SOURCE_DIR}/coreComponents ) +target_include_directories( testingUtilities PUBLIC ${CMAKE_BINARY_DIR}/include ) From 9651c476ae7be6b0d365fb8e4952360af48c0a06 Mon Sep 17 00:00:00 2001 From: Randolph Settgast Date: Fri, 16 Aug 2024 13:54:22 -0700 Subject: [PATCH 16/29] remove the use of blt_combine_static_libraries --- host-configs/LBL/cori-gcc@8.1.0.cmake | 4 -- host-configs/LBL/cori-intel.cmake | 3 -- host-configs/LLNL/lassen-base.cmake | 1 - host-configs/ORNL/frontier-base.cmake | 1 - .../pangea3-gcc8.4.1-openmpi-4.1.2.cmake | 1 - host-configs/apple/macOS_base.cmake | 3 +- src/CMakeLists.txt | 21 ++------ src/cmake/GeosxOptions.cmake | 17 ------- src/coreComponents/CMakeLists.txt | 50 +------------------ .../functions/unitTests/CMakeLists.txt | 6 --- .../constitutiveTests/CMakeLists.txt | 6 +-- .../dataRepositoryTests/CMakeLists.txt | 6 +-- .../fieldSpecificationTests/CMakeLists.txt | 6 +-- .../unitTests/fileIOTests/CMakeLists.txt | 6 +-- .../finiteVolumeTests/CMakeLists.txt | 6 +-- .../unitTests/fluidFlowTests/CMakeLists.txt | 6 +-- .../linearAlgebraTests/CMakeLists.txt | 6 +-- .../unitTests/meshTests/CMakeLists.txt | 8 +-- .../unitTests/testingUtilities/CMakeLists.txt | 6 +-- .../virtualElementTests/CMakeLists.txt | 6 +-- .../wavePropagationTests/CMakeLists.txt | 6 +-- .../unitTests/wellsTests/CMakeLists.txt | 6 +-- .../unitTests/xmlTests/CMakeLists.txt | 6 +-- .../newComponentTemplate/src/CMakeLists.txt | 6 +-- .../newComponentTemplate/tests/CMakeLists.txt | 6 +-- 25 files changed, 21 insertions(+), 178 deletions(-) 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 9957fe075a0..b8014d6410b 100644 --- a/host-configs/LLNL/lassen-base.cmake +++ b/host-configs/LLNL/lassen-base.cmake @@ -7,7 +7,6 @@ # ############################################################################### -set( GEOS_BUILD_SHARED_CORE_LIB 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 1f143eaf8bb..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_CORE_LIB 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 151ca9975e7..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_CORE_LIB 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 e574ee89323..c9cf2efc8df 100644 --- a/host-configs/apple/macOS_base.cmake +++ b/host-configs/apple/macOS_base.cmake @@ -28,8 +28,7 @@ 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_SHARED_LIBS OFF CACHE BOOL "" FORCE) -set(GEOS_BUILD_SHARED_CORE_LIB ON CACHE BOOL "" FORCE) +set(GEOS_BUILD_SHARED_LIBS ON CACHE BOOL "" FORCE) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index a75f7b10cec..2a5843f2a12 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -135,24 +135,11 @@ if( ENABLE_HIP ) list( APPEND extraComponentsLinkList blt::hip ) endif() -if ( GEOS_BUILD_SHARED_CORE_LIB ) - list( APPEND extraComponentsLinkList geosx_core ) -else() - list( APPEND extraComponentsLinkList ${geosx_core_libs} ) -endif() - blt_add_executable( NAME geosx SOURCES main/main.cpp - DEPENDS_ON ${extraComponentsLinkList} - ${externalComponentsLinkList} common fmt::fmt-header-only HDF5::HDF5 ) - -# blt_print_target_properties(TARGET geosx -# CHILDREN TRUE -# PROPERTY_NAME_REGEX "LINK_LIBRARIES" -# ) - -# blt_print_target_properties(TARGET HDF5::HDF5 -# CHILDREN TRUE ) + DEPENDS_ON geosx_core + ${extraComponentsLinkList} + ${externalComponentsLinkList} ) # Seems to be required on some CMake versions (e.g. 3.16) to get enforce device linking if( ${ENABLE_HYPRE_DEVICE} STREQUAL "CUDA" ) @@ -160,8 +147,6 @@ if( ${ENABLE_HYPRE_DEVICE} STREQUAL "CUDA" ) endif() -target_include_directories( geosx PUBLIC ${CMAKE_SOURCE_DIR}/coreComponents ) - # To change the runtime path during installation set_target_properties( geosx PROPERTIES INSTALL_RPATH "${CMAKE_INSTALL_PREFIX}/lib" ) set_target_properties( geosx PROPERTIES INSTALL_RPATH_USE_LINK_PATH TRUE ) diff --git a/src/cmake/GeosxOptions.cmake b/src/cmake/GeosxOptions.cmake index 3e49bde7e9f..0e7821c282d 100644 --- a/src/cmake/GeosxOptions.cmake +++ b/src/cmake/GeosxOptions.cmake @@ -89,8 +89,6 @@ option( GEOS_INSTALL_SCHEMA "Enables schema generation and installation" ON ) option( GEOS_BUILD_OBJ_LIBS "Builds coreComponent modules as object libraries" OFF ) -option( GEOS_BUILD_SHARED_CORE_LIB "Builds geosx_core as a shared library " ON ) - option( GEOS_BUILD_SHARED_LIBS "Builds geosx_core as a shared library " OFF ) set( GEOS_PARALLEL_COMPILE_JOBS "" CACHE STRING "Maximum number of concurrent compilation jobs" ) @@ -160,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 "" ) @@ -218,9 +204,6 @@ 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}" ) - set( GRAPHVIZ_EXTERNAL_LIBS TRUE ) set( GRAPHVIZ_IGNORE_TARGETS "testingUtilities" ) diff --git a/src/coreComponents/CMakeLists.txt b/src/coreComponents/CMakeLists.txt index f6a0487e885..684399ab119 100644 --- a/src/coreComponents/CMakeLists.txt +++ b/src/coreComponents/CMakeLists.txt @@ -57,58 +57,12 @@ foreach( lib ${subdirs} ) endif() endforeach() -# if we're building full static libs and not obj_libs -if( NOT GEOS_BUILD_SHARED_CORE_LIB ) - 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_CORE_LIB 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_CORE_LIB 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 mainInterface - LIB_TYPE SHARED - LINK_PREPEND ${GEOS_LINK_PREPEND_FLAG} - LINK_POSTPEND ${GEOS_LINK_POSTPEND_FLAG} ) - - blt_print_target_properties( TARGET geosx_core ) - -elseif( NOT GEOS_BUILD_SHARED_CORE_LIB AND GEOS_BUILD_OBJ_LIBS ) - message( "Building object coreComponents, executables link to coreComponents" ) -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_include_directories( geosx_core PUBLIC ${CMAKE_BINARY_DIR}/include ) - -endif() +add_library(geosx_core INTERFACE) +target_link_libraries(geosx_core INTERFACE mainInterface ) geosx_add_code_checks( PREFIX coreComponents EXCLUDES cmake constitutive/PVTPackage ) diff --git a/src/coreComponents/functions/unitTests/CMakeLists.txt b/src/coreComponents/functions/unitTests/CMakeLists.txt index 88377d31457..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_CORE_LIB ) -# 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/unitTests/constitutiveTests/CMakeLists.txt b/src/coreComponents/unitTests/constitutiveTests/CMakeLists.txt index 4d8f13fa4ec..3f4db1743ae 100644 --- a/src/coreComponents/unitTests/constitutiveTests/CMakeLists.txt +++ b/src/coreComponents/unitTests/constitutiveTests/CMakeLists.txt @@ -34,11 +34,7 @@ set( gtest_reactivefluid_xmls set( dependencyList ${parallelDeps} gtest ) -if ( GEOS_BUILD_SHARED_CORE_LIB ) - list( APPEND dependencyList geosx_core HDF5::HDF5 ) -else() - list( APPEND dependencyList ${geosx_core_libs} HDF5::HDF5 ) -endif() +list( APPEND dependencyList geosx_core ) if( ENABLE_PVTPackage ) list( APPEND gtest_geosx_tests diff --git a/src/coreComponents/unitTests/dataRepositoryTests/CMakeLists.txt b/src/coreComponents/unitTests/dataRepositoryTests/CMakeLists.txt index d219274dd41..9c2949dbbc9 100644 --- a/src/coreComponents/unitTests/dataRepositoryTests/CMakeLists.txt +++ b/src/coreComponents/unitTests/dataRepositoryTests/CMakeLists.txt @@ -8,11 +8,7 @@ set( dataRepository_tests set( dependencyList ${parallelDeps} gtest ) -if ( GEOS_BUILD_SHARED_CORE_LIB ) - list( APPEND dependencyList geosx_core HDF5::HDF5 ) -else() - list( APPEND dependencyList ${geosx_core_libs} HDF5::HDF5 ) -endif() +list( APPEND dependencyList geosx_core ) if (TARGET pugixml::pugixml) list( APPEND dependencyList pugixml::pugixml ) diff --git a/src/coreComponents/unitTests/fieldSpecificationTests/CMakeLists.txt b/src/coreComponents/unitTests/fieldSpecificationTests/CMakeLists.txt index 24c5e0a54b4..f209ed6433a 100644 --- a/src/coreComponents/unitTests/fieldSpecificationTests/CMakeLists.txt +++ b/src/coreComponents/unitTests/fieldSpecificationTests/CMakeLists.txt @@ -7,11 +7,7 @@ set( gtest_geosx_tests set( dependencyList ${parallelDeps} gtest ) -if ( GEOS_BUILD_SHARED_CORE_LIB ) - list( APPEND dependencyList geosx_core HDF5::HDF5 ) -else() - list( APPEND dependencyList ${geosx_core_libs} HDF5::HDF5 ) -endif() +list( APPEND dependencyList geosx_core ) if (TARGET pugixml::pugixml) list( APPEND dependencyList pugixml::pugixml ) diff --git a/src/coreComponents/unitTests/fileIOTests/CMakeLists.txt b/src/coreComponents/unitTests/fileIOTests/CMakeLists.txt index 5f1dce38f1d..2f23c577b10 100644 --- a/src/coreComponents/unitTests/fileIOTests/CMakeLists.txt +++ b/src/coreComponents/unitTests/fileIOTests/CMakeLists.txt @@ -3,11 +3,7 @@ set( geosx_fileio_tests testHDFFile.cpp ) set( dependencyList ${parallelDeps} gtest HDF5::HDF5 ) -if ( GEOS_BUILD_SHARED_CORE_LIB ) - list( APPEND dependencyList geosx_core ) -else() - list( APPEND dependencyList ${geosx_core_libs} ) -endif() +list( APPEND dependencyList geosx_core ) # Add gtest C++ based tests foreach(test ${geosx_fileio_tests}) diff --git a/src/coreComponents/unitTests/finiteVolumeTests/CMakeLists.txt b/src/coreComponents/unitTests/finiteVolumeTests/CMakeLists.txt index 9d1eaecfbbb..5da377a9ddb 100644 --- a/src/coreComponents/unitTests/finiteVolumeTests/CMakeLists.txt +++ b/src/coreComponents/unitTests/finiteVolumeTests/CMakeLists.txt @@ -4,11 +4,7 @@ set( gtest_geosx_tests set( dependencyList ${parallelDeps} gtest ) -if ( GEOS_BUILD_SHARED_CORE_LIB ) - list( APPEND dependencyList geosx_core HDF5::HDF5 ) -else() - list( APPEND dependencyList ${geosx_core_libs} HDF5::HDF5 ) -endif() +list( APPEND dependencyList geosx_core ) # Add gtest C++ based tests foreach(test ${gtest_geosx_tests}) diff --git a/src/coreComponents/unitTests/fluidFlowTests/CMakeLists.txt b/src/coreComponents/unitTests/fluidFlowTests/CMakeLists.txt index aa3fc90be11..2c1d9047d41 100644 --- a/src/coreComponents/unitTests/fluidFlowTests/CMakeLists.txt +++ b/src/coreComponents/unitTests/fluidFlowTests/CMakeLists.txt @@ -8,11 +8,7 @@ set( gtest_geosx_tests set( dependencyList ${parallelDeps} gtest ) -if ( GEOS_BUILD_SHARED_CORE_LIB ) - list( APPEND dependencyList geosx_core HDF5::HDF5 ) -else() - list( APPEND dependencyList ${geosx_core_libs} HDF5::HDF5 ) -endif() +list( APPEND dependencyList geosx_core ) set( dependencyList testingUtilities ) diff --git a/src/coreComponents/unitTests/linearAlgebraTests/CMakeLists.txt b/src/coreComponents/unitTests/linearAlgebraTests/CMakeLists.txt index e3f31d22723..19cf441cdb8 100644 --- a/src/coreComponents/unitTests/linearAlgebraTests/CMakeLists.txt +++ b/src/coreComponents/unitTests/linearAlgebraTests/CMakeLists.txt @@ -8,11 +8,7 @@ set( nranks 2 ) # Add gtest C++ based tests set( dependencyList ${parallelDeps} gtest ) -if ( GEOS_BUILD_SHARED_CORE_LIB ) - list( APPEND dependencyList geosx_core HDF5::HDF5 ) -else() - list( APPEND dependencyList ${geosx_core_libs} HDF5::HDF5 ) -endif() +list( APPEND dependencyList geosx_core ) if (TARGET pugixml::pugixml) set( dependencyList ${dependencyList} pugixml::pugixml ) diff --git a/src/coreComponents/unitTests/meshTests/CMakeLists.txt b/src/coreComponents/unitTests/meshTests/CMakeLists.txt index 386697b2834..ddaa0dcb379 100644 --- a/src/coreComponents/unitTests/meshTests/CMakeLists.txt +++ b/src/coreComponents/unitTests/meshTests/CMakeLists.txt @@ -19,13 +19,7 @@ if( ENABLE_VTK ) configure_file( ${CMAKE_CURRENT_SOURCE_DIR}/meshDirName.hpp.in ${CMAKE_BINARY_DIR}/include/tests/meshDirName.hpp ) endif() -set( dependencyList ${parallelDeps} gtest ) - -if( GEOS_BUILD_SHARED_CORE_LIB ) - list( APPEND dependencyList geosx_core HDF5::HDF5 ) -else() - list( APPEND dependencyList ${geosx_core_libs} HDF5::HDF5 ) -endif() +set( dependencyList ${parallelDeps} gtest geosx_core ) if (TARGET pugixml::pugixml) list( APPEND dependencyList pugixml::pugixml ) diff --git a/src/coreComponents/unitTests/testingUtilities/CMakeLists.txt b/src/coreComponents/unitTests/testingUtilities/CMakeLists.txt index f0652a215b6..7e9ce8c02c6 100644 --- a/src/coreComponents/unitTests/testingUtilities/CMakeLists.txt +++ b/src/coreComponents/unitTests/testingUtilities/CMakeLists.txt @@ -17,11 +17,7 @@ set( testingUtilities_sources # set( dependencyList ${parallelDeps} gtest ) -if ( GEOS_BUILD_SHARED_CORE_LIB ) - list( APPEND dependencyList mainInterface HDF5::HDF5 ) -else() - list( APPEND dependencyList ${geosx_core_libs} HDF5::HDF5 ) -endif() +list( APPEND dependencyList geosx_core ) blt_add_library( NAME testingUtilities SOURCES ${testingUtilities_sources} diff --git a/src/coreComponents/unitTests/virtualElementTests/CMakeLists.txt b/src/coreComponents/unitTests/virtualElementTests/CMakeLists.txt index 2ae60a2a1a4..1e604ebf686 100644 --- a/src/coreComponents/unitTests/virtualElementTests/CMakeLists.txt +++ b/src/coreComponents/unitTests/virtualElementTests/CMakeLists.txt @@ -4,11 +4,7 @@ set( testSources set( dependencyList ${parallelDeps} gtest ) -if ( GEOS_BUILD_SHARED_CORE_LIB ) - list( APPEND dependencyList geosx_core HDF5::HDF5 ) -else() - list( APPEND dependencyList ${geosx_core_libs} HDF5::HDF5 ) -endif() +list( APPEND dependencyList geosx_core ) if (TARGET pugixml::pugixml) list( APPEND dependencyList pugixml::pugixml ) diff --git a/src/coreComponents/unitTests/wavePropagationTests/CMakeLists.txt b/src/coreComponents/unitTests/wavePropagationTests/CMakeLists.txt index b20edecab63..f33e03cb161 100644 --- a/src/coreComponents/unitTests/wavePropagationTests/CMakeLists.txt +++ b/src/coreComponents/unitTests/wavePropagationTests/CMakeLists.txt @@ -10,11 +10,7 @@ set( gtest_geosx_tests set( dependencyList ${parallelDeps} gtest ) -if ( GEOS_BUILD_SHARED_CORE_LIB ) - list( APPEND dependencyList geosx_core HDF5::HDF5 ) -else() - list( APPEND dependencyList ${geosx_core_libs} HDF5::HDF5 ) -endif() +list( APPEND dependencyList geosx_core ) if (TARGET pugixml::pugixml) list( APPEND dependencyList pugixml::pugixml ) diff --git a/src/coreComponents/unitTests/wellsTests/CMakeLists.txt b/src/coreComponents/unitTests/wellsTests/CMakeLists.txt index 53c25f97cd1..9e0e2f03706 100644 --- a/src/coreComponents/unitTests/wellsTests/CMakeLists.txt +++ b/src/coreComponents/unitTests/wellsTests/CMakeLists.txt @@ -5,11 +5,7 @@ set( gtest_geosx_tests set( dependencyList ${parallelDeps} gtest ) -if ( GEOS_BUILD_SHARED_CORE_LIB ) - list( APPEND dependencyList geosx_core ${parallelDeps} HDF5::HDF5 ) -else() - list( APPEND dependencyList ${geosx_core_libs} ${parallelDeps} HDF5::HDF5 ) -endif() +list( APPEND dependencyList geosx_core ${parallelDeps} HDF5::HDF5 ) if( ENABLE_PVTPackage ) list( APPEND gtest_geosx_tests diff --git a/src/coreComponents/unitTests/xmlTests/CMakeLists.txt b/src/coreComponents/unitTests/xmlTests/CMakeLists.txt index 6e04a541aa2..2c6ca51a0a6 100644 --- a/src/coreComponents/unitTests/xmlTests/CMakeLists.txt +++ b/src/coreComponents/unitTests/xmlTests/CMakeLists.txt @@ -18,11 +18,7 @@ set( multi_files # Add gtest C++ based tests set( dependencyList ${parallelDeps} gtest optionparser HDF5::HDF5 ) -if ( GEOS_BUILD_SHARED_CORE_LIB ) - list( APPEND dependencyList geosx_core HDF5::HDF5 ) -else() - list( APPEND dependencyList ${geosx_core_libs} HDF5::HDF5 ) -endif() +list( APPEND dependencyList geosx_core ) if (TARGET pugixml::pugixml) set( dependencyList ${dependencyList} pugixml::pugixml ) diff --git a/src/externalComponents/newComponentTemplate/src/CMakeLists.txt b/src/externalComponents/newComponentTemplate/src/CMakeLists.txt index ea2718ae913..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_CORE_LIB ) - 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 8c5fc9868c9..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_CORE_LIB ) - list( APPEND dependencyList geosx_core ) -else() - list( APPEND dependencyList ${geosx_core_libs} ) -endif() +list( APPEND dependencyList geosx_core ) set( newComponentTests testNewComponent.cpp ) From f080cbf200168d917ea313573784a23904bd4b66 Mon Sep 17 00:00:00 2001 From: Randolph Settgast Date: Fri, 16 Aug 2024 13:56:00 -0700 Subject: [PATCH 17/29] uncrustify --- src/cmake/GeosxOptions.cmake | 2 +- .../fluid/multifluid/CO2Brine/functions/BrineEnthalpy.cpp | 4 ++-- .../fluid/multifluid/CO2Brine/functions/CO2Solubility.cpp | 4 ++-- .../multifluid/CO2Brine/functions/EzrokhiBrineDensity.cpp | 4 ++-- src/coreComponents/physicsSolvers/FieldStatisticsBase.hpp | 2 +- .../physicsSolvers/fluidFlow/StencilDataCollection.cpp | 2 +- .../multiphysics/PoromechanicsInitialization.cpp | 4 ++-- .../solidMechanics/SolidMechanicsStateReset.cpp | 2 +- 8 files changed, 12 insertions(+), 12 deletions(-) diff --git a/src/cmake/GeosxOptions.cmake b/src/cmake/GeosxOptions.cmake index 0e7821c282d..dc62fde2147 100644 --- a/src/cmake/GeosxOptions.cmake +++ b/src/cmake/GeosxOptions.cmake @@ -89,7 +89,7 @@ option( GEOS_INSTALL_SCHEMA "Enables schema generation and installation" ON ) option( GEOS_BUILD_OBJ_LIBS "Builds coreComponent modules as object libraries" OFF ) -option( GEOS_BUILD_SHARED_LIBS "Builds geosx_core as a shared library " OFF ) +option( GEOS_BUILD_SHARED_LIBS "Builds geosx_core as a shared library " ON ) set( GEOS_PARALLEL_COMPILE_JOBS "" CACHE STRING "Maximum number of concurrent compilation jobs" ) if( GEOS_PARALLEL_COMPILE_JOBS ) diff --git a/src/coreComponents/constitutive/fluid/multifluid/CO2Brine/functions/BrineEnthalpy.cpp b/src/coreComponents/constitutive/fluid/multifluid/CO2Brine/functions/BrineEnthalpy.cpp index 0291ccef3dd..d887cddff52 100644 --- a/src/coreComponents/constitutive/fluid/multifluid/CO2Brine/functions/BrineEnthalpy.cpp +++ b/src/coreComponents/constitutive/fluid/multifluid/CO2Brine/functions/BrineEnthalpy.cpp @@ -208,8 +208,8 @@ BrineEnthalpy::BrineEnthalpy( string const & name, GEOS_UNUSED_VAR( printTable ); // if( printTable ) // { - // m_CO2EnthalpyTable->print( m_CO2EnthalpyTable->getName() ); - // m_brineEnthalpyTable->print( m_brineEnthalpyTable->getName() ); + // m_CO2EnthalpyTable->print( m_CO2EnthalpyTable->getName() ); + // m_brineEnthalpyTable->print( m_brineEnthalpyTable->getName() ); // } } diff --git a/src/coreComponents/constitutive/fluid/multifluid/CO2Brine/functions/CO2Solubility.cpp b/src/coreComponents/constitutive/fluid/multifluid/CO2Brine/functions/CO2Solubility.cpp index 94baba5d7e7..6300cef4909 100644 --- a/src/coreComponents/constitutive/fluid/multifluid/CO2Brine/functions/CO2Solubility.cpp +++ b/src/coreComponents/constitutive/fluid/multifluid/CO2Brine/functions/CO2Solubility.cpp @@ -260,8 +260,8 @@ CO2Solubility::CO2Solubility( string const & name, GEOS_UNUSED_VAR( printTable ); // if( printTable ) // { - // m_CO2SolubilityTable->print( m_CO2SolubilityTable->getName() ); - // m_WaterVapourisationTable->print( m_WaterVapourisationTable->getName() ); + // m_CO2SolubilityTable->print( m_CO2SolubilityTable->getName() ); + // m_WaterVapourisationTable->print( m_WaterVapourisationTable->getName() ); // } } diff --git a/src/coreComponents/constitutive/fluid/multifluid/CO2Brine/functions/EzrokhiBrineDensity.cpp b/src/coreComponents/constitutive/fluid/multifluid/CO2Brine/functions/EzrokhiBrineDensity.cpp index 3b5e0f84535..90c7c86b2c2 100644 --- a/src/coreComponents/constitutive/fluid/multifluid/CO2Brine/functions/EzrokhiBrineDensity.cpp +++ b/src/coreComponents/constitutive/fluid/multifluid/CO2Brine/functions/EzrokhiBrineDensity.cpp @@ -57,8 +57,8 @@ EzrokhiBrineDensity::EzrokhiBrineDensity( string const & name, // if( printTable ) // { - // m_waterSatDensityTable->print( m_waterSatDensityTable->getName() ); - // m_waterSatPressureTable->print( m_waterSatPressureTable->getName() ); + // m_waterSatDensityTable->print( m_waterSatDensityTable->getName() ); + // m_waterSatPressureTable->print( m_waterSatPressureTable->getName() ); // } } diff --git a/src/coreComponents/physicsSolvers/FieldStatisticsBase.hpp b/src/coreComponents/physicsSolvers/FieldStatisticsBase.hpp index 96bfbb29556..2afecdd6d66 100644 --- a/src/coreComponents/physicsSolvers/FieldStatisticsBase.hpp +++ b/src/coreComponents/physicsSolvers/FieldStatisticsBase.hpp @@ -84,7 +84,7 @@ class FieldStatisticsBase : public TaskBase void postInputInitialization() override { Group & problemManager = this->getGroupByPath( "/Problem" ); - Group & physicsSolverManager = problemManager.getGroup("Solvers"); + 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 e939067dc0e..dcd795ec3ed 100644 --- a/src/coreComponents/physicsSolvers/fluidFlow/StencilDataCollection.cpp +++ b/src/coreComponents/physicsSolvers/fluidFlow/StencilDataCollection.cpp @@ -63,7 +63,7 @@ void StencilDataCollection::postInputInitialization() Group & problemManager = this->getGroupByPath( "/Problem" ); { // find targeted solver - Group & physicsSolverManager = problemManager.getGroup("Solvers"); + Group & physicsSolverManager = problemManager.getGroup( "Solvers" ); m_solver = physicsSolverManager.getGroupPointer< FlowSolverBase >( m_solverName ); GEOS_THROW_IF( m_solver == nullptr, diff --git a/src/coreComponents/physicsSolvers/multiphysics/PoromechanicsInitialization.cpp b/src/coreComponents/physicsSolvers/multiphysics/PoromechanicsInitialization.cpp index ec74dd5a511..e431cf1ac06 100644 --- a/src/coreComponents/physicsSolvers/multiphysics/PoromechanicsInitialization.cpp +++ b/src/coreComponents/physicsSolvers/multiphysics/PoromechanicsInitialization.cpp @@ -68,7 +68,7 @@ PoromechanicsInitialization< POROMECHANICS_SOLVER >:: postInputInitialization() { Group & problemManager = this->getGroupByPath( "/Problem" ); - Group & physicsSolverManager = problemManager.getGroup("Solvers"); + Group & physicsSolverManager = problemManager.getGroup( "Solvers" ); GEOS_THROW_IF( !physicsSolverManager.hasGroup( m_poromechanicsSolverName ), GEOS_FMT( "{}: {} solver named {} not found", @@ -81,7 +81,7 @@ postInputInitialization() if( !m_solidMechanicsStatisticsName.empty()) { - TasksManager & tasksManager = problemManager.getGroup("Tasks"); + 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 9f9ee6b36b0..b5642b135e9 100644 --- a/src/coreComponents/physicsSolvers/solidMechanics/SolidMechanicsStateReset.cpp +++ b/src/coreComponents/physicsSolvers/solidMechanics/SolidMechanicsStateReset.cpp @@ -59,7 +59,7 @@ SolidMechanicsStateReset::~SolidMechanicsStateReset() void SolidMechanicsStateReset::postInputInitialization() { Group & problemManager = this->getGroupByPath( "/Problem" ); - Group & physicsSolverManager = problemManager.getGroup("Solvers"); + Group & physicsSolverManager = problemManager.getGroup( "Solvers" ); GEOS_THROW_IF( !physicsSolverManager.hasGroup( m_solidSolverName ), GEOS_FMT( "Task {}: physics solver named {} not found", From b315558e1b290b38a34f7bd1f3a1fa71cae8bf74 Mon Sep 17 00:00:00 2001 From: Randolph Settgast Date: Fri, 16 Aug 2024 14:06:11 -0700 Subject: [PATCH 18/29] shared libs on by default in CI --- .github/workflows/build_and_test.yml | 2 +- .github/workflows/ci_tests.yml | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/build_and_test.yml b/.github/workflows/build_and_test.yml index 6de506355e4..11d2761b90f 100644 --- a/.github/workflows/build_and_test.yml +++ b/.github/workflows/build_and_test.yml @@ -8,7 +8,7 @@ on: BUILD_SHARED_LIBS: required: false type: string - default: 'OFF' + default: 'ON' BUILD_TYPE: required: false type: string diff --git a/.github/workflows/ci_tests.yml b/.github/workflows/ci_tests.yml index 6469b9dc960..c42f79d2e5d 100644 --- a/.github/workflows/ci_tests.yml +++ b/.github/workflows/ci_tests.yml @@ -170,7 +170,6 @@ jobs: 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 From f0dd2647aafa4de3d06e4f6e3dd2cca7e294bcde Mon Sep 17 00:00:00 2001 From: Randolph Settgast Date: Fri, 16 Aug 2024 22:30:22 -0700 Subject: [PATCH 19/29] add cmake option for WHOLE_ARCHIVE --- .github/workflows/ci_tests.yml | 9 ++++++--- host-configs/apple/macOS_base.cmake | 2 +- src/coreComponents/CMakeLists.txt | 14 +++++++++++++- 3 files changed, 20 insertions(+), 5 deletions(-) diff --git a/.github/workflows/ci_tests.yml b/.github/workflows/ci_tests.yml index c42f79d2e5d..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,18 +167,21 @@ 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: @@ -186,7 +192,6 @@ jobs: 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 @@ -329,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/apple/macOS_base.cmake b/host-configs/apple/macOS_base.cmake index c9cf2efc8df..06635ad4161 100644 --- a/host-configs/apple/macOS_base.cmake +++ b/host-configs/apple/macOS_base.cmake @@ -28,7 +28,7 @@ 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_SHARED_LIBS ON CACHE BOOL "" FORCE) +set(GEOS_BUILD_SHARED_LIBS OFF CACHE BOOL "" FORCE) diff --git a/src/coreComponents/CMakeLists.txt b/src/coreComponents/CMakeLists.txt index 684399ab119..50b5e3dadbe 100644 --- a/src/coreComponents/CMakeLists.txt +++ b/src/coreComponents/CMakeLists.txt @@ -62,7 +62,19 @@ foreach( lib ${subdirs} ) endforeach() add_library(geosx_core INTERFACE) -target_link_libraries(geosx_core INTERFACE mainInterface ) +if( GEOS_BUILD_SHARED_LIBS) + target_link_libraries(geosx_core INTERFACE mainInterface ) +else() + get_target_property( libs geosx_core INTERFACE_LINK_LIBRARIES ) + + set( linkLibs "" ) + foreach( lib ${coreLibs} ) + list( APPEND linkLibs "$" ) + endforeach() + message( "linkLibs = ${linkLibs}" ) + target_link_libraries(geosx_core INTERFACE ${linkLibs} ) +endif() +blt_print_target_properties( TARGET geosx_core ) geosx_add_code_checks( PREFIX coreComponents EXCLUDES cmake constitutive/PVTPackage ) From 831436e1678eede7c7f6a85a5f15ab983998bc28 Mon Sep 17 00:00:00 2001 From: Randolph Settgast Date: Sat, 17 Aug 2024 00:04:24 -0700 Subject: [PATCH 20/29] add constitutiveDrivers to mainInterface dependency --- host-configs/apple/macOS_base.cmake | 2 +- src/coreComponents/mainInterface/CMakeLists.txt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/host-configs/apple/macOS_base.cmake b/host-configs/apple/macOS_base.cmake index 06635ad4161..c9cf2efc8df 100644 --- a/host-configs/apple/macOS_base.cmake +++ b/host-configs/apple/macOS_base.cmake @@ -28,7 +28,7 @@ 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_SHARED_LIBS OFF CACHE BOOL "" FORCE) +set(GEOS_BUILD_SHARED_LIBS ON CACHE BOOL "" FORCE) diff --git a/src/coreComponents/mainInterface/CMakeLists.txt b/src/coreComponents/mainInterface/CMakeLists.txt index 289490a8a81..788951c220d 100644 --- a/src/coreComponents/mainInterface/CMakeLists.txt +++ b/src/coreComponents/mainInterface/CMakeLists.txt @@ -18,7 +18,7 @@ set( mainInterface_sources version.cpp ) -set( dependencyList ${parallelDeps} physicsSolvers optionparser ) +set( dependencyList ${parallelDeps} physicsSolvers constitutiveDrivers optionparser ) blt_add_library( NAME mainInterface SOURCES ${mainInterface_sources} From c29a9f782337cca05e2722c546427bc999758c46 Mon Sep 17 00:00:00 2001 From: "Randolph R. Settgast" Date: Sat, 17 Aug 2024 01:24:26 -0700 Subject: [PATCH 21/29] fixed some errors with schema and pygeosx --- .../fractureFlow_conforming_2d_vtk_input.xml | 2 +- .../constitutiveDrivers/CMakeLists.txt | 1 + .../schema/docs/HydraulicApertureTable.rst | 12 ++++++++++++ .../schema/docs/HydraulicApertureTable_other.rst | 9 +++++++++ src/coreComponents/schema/docs/VTKMesh.rst | 4 ++-- src/coreComponents/schema/schema.xsd | 8 ++++---- src/pygeosx/CMakeLists.txt | 3 ++- 7 files changed, 31 insertions(+), 8 deletions(-) create mode 100644 src/coreComponents/schema/docs/HydraulicApertureTable.rst create mode 100644 src/coreComponents/schema/docs/HydraulicApertureTable_other.rst 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 @@ - - + + @@ -1711,8 +1711,8 @@ stress - traction is applied to the faces as specified by the inner product of i - - + + 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 ) From b3e1540bbb8740752c3a9accaa2a18fc25d455e8 Mon Sep 17 00:00:00 2001 From: "Randolph R. Settgast" Date: Sat, 17 Aug 2024 17:21:55 -0700 Subject: [PATCH 22/29] just cleanup --- src/coreComponents/constitutive/CMakeLists.txt | 1 - src/coreComponents/unitTests/constitutiveTests/CMakeLists.txt | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/src/coreComponents/constitutive/CMakeLists.txt b/src/coreComponents/constitutive/CMakeLists.txt index bbbc2e7ce8e..f1735d68549 100644 --- a/src/coreComponents/constitutive/CMakeLists.txt +++ b/src/coreComponents/constitutive/CMakeLists.txt @@ -272,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 diff --git a/src/coreComponents/unitTests/constitutiveTests/CMakeLists.txt b/src/coreComponents/unitTests/constitutiveTests/CMakeLists.txt index 3f4db1743ae..b6ad3af2616 100644 --- a/src/coreComponents/unitTests/constitutiveTests/CMakeLists.txt +++ b/src/coreComponents/unitTests/constitutiveTests/CMakeLists.txt @@ -34,7 +34,7 @@ set( gtest_reactivefluid_xmls set( dependencyList ${parallelDeps} gtest ) -list( APPEND dependencyList geosx_core ) +list( APPEND dependencyList mainInterface ) if( ENABLE_PVTPackage ) list( APPEND gtest_geosx_tests From 5650efba19c1e6d76f468e3375ee585d9ea68613 Mon Sep 17 00:00:00 2001 From: Randolph Settgast Date: Mon, 19 Aug 2024 20:35:15 -0700 Subject: [PATCH 23/29] add --no-as-needed link flag to constitutiveDrivers component --- src/coreComponents/constitutiveDrivers/CMakeLists.txt | 2 +- src/coreComponents/constitutiveDrivers/solid/TriaxialDriver.cpp | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/src/coreComponents/constitutiveDrivers/CMakeLists.txt b/src/coreComponents/constitutiveDrivers/CMakeLists.txt index 7861a29d031..910148e9c45 100644 --- a/src/coreComponents/constitutiveDrivers/CMakeLists.txt +++ b/src/coreComponents/constitutiveDrivers/CMakeLists.txt @@ -51,4 +51,4 @@ blt_add_library( NAME constitutiveDrivers ) target_include_directories( constitutiveDrivers PUBLIC ${CMAKE_SOURCE_DIR}/coreComponents ) - +target_link_options(constitutiveDrivers PUBLIC "LINKER:--no-as-needed") diff --git a/src/coreComponents/constitutiveDrivers/solid/TriaxialDriver.cpp b/src/coreComponents/constitutiveDrivers/solid/TriaxialDriver.cpp index 7768a9af35d..c0e2a8ecdeb 100644 --- a/src/coreComponents/constitutiveDrivers/solid/TriaxialDriver.cpp +++ b/src/coreComponents/constitutiveDrivers/solid/TriaxialDriver.cpp @@ -18,7 +18,6 @@ */ #include "TriaxialDriver.hpp" -//#include "fileIO/Outputs/OutputBase.hpp" namespace geos { From 605f0ec2b062d9f229eccf29252fb27aed81808e Mon Sep 17 00:00:00 2001 From: Randolph Settgast Date: Tue, 20 Aug 2024 11:30:00 -0700 Subject: [PATCH 24/29] drop dependency of events on mesh. create temporary TriaxialDriver object in ~ProblemManager() to avoid constitutiveDrivers from being dropped by the linker --- .../constitutiveDrivers/CMakeLists.txt | 1 - src/coreComponents/events/CMakeLists.txt | 2 +- src/coreComponents/events/EventManager.cpp | 2 +- src/coreComponents/mainInterface/ProblemManager.cpp | 13 ++++++++++++- 4 files changed, 14 insertions(+), 4 deletions(-) diff --git a/src/coreComponents/constitutiveDrivers/CMakeLists.txt b/src/coreComponents/constitutiveDrivers/CMakeLists.txt index 910148e9c45..a55bed35636 100644 --- a/src/coreComponents/constitutiveDrivers/CMakeLists.txt +++ b/src/coreComponents/constitutiveDrivers/CMakeLists.txt @@ -51,4 +51,3 @@ blt_add_library( NAME constitutiveDrivers ) target_include_directories( constitutiveDrivers PUBLIC ${CMAKE_SOURCE_DIR}/coreComponents ) -target_link_options(constitutiveDrivers PUBLIC "LINKER:--no-as-needed") diff --git a/src/coreComponents/events/CMakeLists.txt b/src/coreComponents/events/CMakeLists.txt index bcee887022f..53b6db36b19 100644 --- a/src/coreComponents/events/CMakeLists.txt +++ b/src/coreComponents/events/CMakeLists.txt @@ -24,7 +24,7 @@ set( events_sources tasks/TasksManager.cpp ) -set( dependencyList ${parallelDeps} mesh ) +set( dependencyList ${parallelDeps} functions ) blt_add_library( NAME events SOURCES ${events_sources} 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/mainInterface/ProblemManager.cpp b/src/coreComponents/mainInterface/ProblemManager.cpp index 23ca5862dc0..5b39aae64bd 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,17 @@ 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 ) ) From 3b631d4649f5a13608e86576e9a976163b3db66a Mon Sep 17 00:00:00 2001 From: Randolph Settgast Date: Tue, 20 Aug 2024 14:22:14 -0700 Subject: [PATCH 25/29] add an outputDirectory in FunctionBase instead of grabbing from OutputBase. Also remove static data members in OutputBase. Also reenable TableFunction::print --- .../CO2Brine/functions/BrineEnthalpy.cpp | 11 +- .../CO2Brine/functions/CO2Enthalpy.cpp | 5 +- .../CO2Brine/functions/CO2Solubility.cpp | 11 +- .../functions/EzrokhiBrineDensity.cpp | 13 +- .../functions/EzrokhiBrineViscosity.cpp | 5 +- .../functions/FenghourCO2Viscosity.cpp | 5 +- .../functions/PhillipsBrineDensity.cpp | 5 +- .../functions/PhillipsBrineViscosity.cpp | 5 +- .../functions/SpanWagnerCO2Density.cpp | 5 +- .../CO2Brine/functions/WaterDensity.cpp | 5 +- .../fileIO/Outputs/OutputBase.cpp | 27 +++- .../fileIO/Outputs/OutputBase.hpp | 9 +- src/coreComponents/functions/FunctionBase.cpp | 11 ++ src/coreComponents/functions/FunctionBase.hpp | 11 ++ .../functions/TableFunction.cpp | 129 +++++++++--------- .../functions/TableFunction.hpp | 2 +- .../mainInterface/ProblemManager.cpp | 3 +- 17 files changed, 144 insertions(+), 118 deletions(-) diff --git a/src/coreComponents/constitutive/fluid/multifluid/CO2Brine/functions/BrineEnthalpy.cpp b/src/coreComponents/constitutive/fluid/multifluid/CO2Brine/functions/BrineEnthalpy.cpp index d887cddff52..9be9db8ac8a 100644 --- a/src/coreComponents/constitutive/fluid/multifluid/CO2Brine/functions/BrineEnthalpy.cpp +++ b/src/coreComponents/constitutive/fluid/multifluid/CO2Brine/functions/BrineEnthalpy.cpp @@ -205,12 +205,11 @@ BrineEnthalpy::BrineEnthalpy( string const & name, m_CO2EnthalpyTable = makeCO2EnthalpyTable( inputParams, m_functionName, FunctionManager::getInstance() ); m_brineEnthalpyTable = makeBrineEnthalpyTable( inputParams, m_functionName, FunctionManager::getInstance() ); - GEOS_UNUSED_VAR( printTable ); - // if( printTable ) - // { - // m_CO2EnthalpyTable->print( m_CO2EnthalpyTable->getName() ); - // m_brineEnthalpyTable->print( m_brineEnthalpyTable->getName() ); - // } + if( printTable ) + { + m_CO2EnthalpyTable->print( m_CO2EnthalpyTable->getName() ); + m_brineEnthalpyTable->print( m_brineEnthalpyTable->getName() ); + } } void BrineEnthalpy::checkTablesParameters( real64 const pressure, diff --git a/src/coreComponents/constitutive/fluid/multifluid/CO2Brine/functions/CO2Enthalpy.cpp b/src/coreComponents/constitutive/fluid/multifluid/CO2Brine/functions/CO2Enthalpy.cpp index 0fe42dceaab..2bb308086e6 100644 --- a/src/coreComponents/constitutive/fluid/multifluid/CO2Brine/functions/CO2Enthalpy.cpp +++ b/src/coreComponents/constitutive/fluid/multifluid/CO2Brine/functions/CO2Enthalpy.cpp @@ -266,9 +266,8 @@ CO2Enthalpy::CO2Enthalpy( string const & name, m_CO2Index = PVTFunctionHelpers::findName( componentNames, expectedCO2ComponentNames, "componentNames" ); m_CO2EnthalpyTable = makeCO2EnthalpyTable( inputParams, m_functionName, FunctionManager::getInstance() ); - GEOS_UNUSED_VAR( printTable ); - // if( printTable ) - // m_CO2EnthalpyTable->print( m_CO2EnthalpyTable->getName() ); + if( printTable ) + m_CO2EnthalpyTable->print( m_CO2EnthalpyTable->getName() ); } diff --git a/src/coreComponents/constitutive/fluid/multifluid/CO2Brine/functions/CO2Solubility.cpp b/src/coreComponents/constitutive/fluid/multifluid/CO2Brine/functions/CO2Solubility.cpp index 6300cef4909..77d27b1a883 100644 --- a/src/coreComponents/constitutive/fluid/multifluid/CO2Brine/functions/CO2Solubility.cpp +++ b/src/coreComponents/constitutive/fluid/multifluid/CO2Brine/functions/CO2Solubility.cpp @@ -257,12 +257,11 @@ CO2Solubility::CO2Solubility( string const & name, std::tie( m_CO2SolubilityTable, m_WaterVapourisationTable ) = makeSolubilityTables( m_modelName, inputParams, solubilityModel ); - GEOS_UNUSED_VAR( printTable ); - // if( printTable ) - // { - // m_CO2SolubilityTable->print( m_CO2SolubilityTable->getName() ); - // m_WaterVapourisationTable->print( m_WaterVapourisationTable->getName() ); - // } + if( printTable ) + { + m_CO2SolubilityTable->print( m_CO2SolubilityTable->getName() ); + m_WaterVapourisationTable->print( m_WaterVapourisationTable->getName() ); + } } void CO2Solubility::checkTablesParameters( real64 const pressure, diff --git a/src/coreComponents/constitutive/fluid/multifluid/CO2Brine/functions/EzrokhiBrineDensity.cpp b/src/coreComponents/constitutive/fluid/multifluid/CO2Brine/functions/EzrokhiBrineDensity.cpp index 90c7c86b2c2..8713454505c 100644 --- a/src/coreComponents/constitutive/fluid/multifluid/CO2Brine/functions/EzrokhiBrineDensity.cpp +++ b/src/coreComponents/constitutive/fluid/multifluid/CO2Brine/functions/EzrokhiBrineDensity.cpp @@ -52,14 +52,11 @@ EzrokhiBrineDensity::EzrokhiBrineDensity( string const & name, makeCoefficients( inputPara ); m_waterSatDensityTable = PureWaterProperties::makeSaturationDensityTable( m_functionName, FunctionManager::getInstance() ); m_waterSatPressureTable = PureWaterProperties::makeSaturationPressureTable( m_functionName, FunctionManager::getInstance() ); - - GEOS_UNUSED_VAR( printTable ); - - // if( printTable ) - // { - // m_waterSatDensityTable->print( m_waterSatDensityTable->getName() ); - // m_waterSatPressureTable->print( m_waterSatPressureTable->getName() ); - // } + if( printTable ) + { + m_waterSatDensityTable->print( m_waterSatDensityTable->getName() ); + m_waterSatPressureTable->print( m_waterSatPressureTable->getName() ); + } } void EzrokhiBrineDensity::makeCoefficients( string_array const & inputPara ) diff --git a/src/coreComponents/constitutive/fluid/multifluid/CO2Brine/functions/EzrokhiBrineViscosity.cpp b/src/coreComponents/constitutive/fluid/multifluid/CO2Brine/functions/EzrokhiBrineViscosity.cpp index 558227f6c43..6b7ac1ed990 100644 --- a/src/coreComponents/constitutive/fluid/multifluid/CO2Brine/functions/EzrokhiBrineViscosity.cpp +++ b/src/coreComponents/constitutive/fluid/multifluid/CO2Brine/functions/EzrokhiBrineViscosity.cpp @@ -51,9 +51,8 @@ EzrokhiBrineViscosity::EzrokhiBrineViscosity( string const & name, makeCoefficients( inputPara ); m_waterViscosityTable = PureWaterProperties::makeSaturationViscosityTable( m_functionName, FunctionManager::getInstance() ); - GEOS_UNUSED_VAR( printTable ); - // if( printTable ) - // m_waterViscosityTable->print( m_waterViscosityTable->getName() ); + if( printTable ) + m_waterViscosityTable->print( m_waterViscosityTable->getName() ); } void EzrokhiBrineViscosity::makeCoefficients( string_array const & inputPara ) diff --git a/src/coreComponents/constitutive/fluid/multifluid/CO2Brine/functions/FenghourCO2Viscosity.cpp b/src/coreComponents/constitutive/fluid/multifluid/CO2Brine/functions/FenghourCO2Viscosity.cpp index 097e0473a09..f79cd790427 100644 --- a/src/coreComponents/constitutive/fluid/multifluid/CO2Brine/functions/FenghourCO2Viscosity.cpp +++ b/src/coreComponents/constitutive/fluid/multifluid/CO2Brine/functions/FenghourCO2Viscosity.cpp @@ -148,9 +148,8 @@ FenghourCO2Viscosity::FenghourCO2Viscosity( string const & name, componentMolarWeight ) { m_CO2ViscosityTable = makeViscosityTable( inputParams, m_functionName, FunctionManager::getInstance() ); - GEOS_UNUSED_VAR( printTable ); -// if( printTable ) -// m_CO2ViscosityTable->print( m_CO2ViscosityTable->getName() ); + if( printTable ) + m_CO2ViscosityTable->print( m_CO2ViscosityTable->getName() ); } void FenghourCO2Viscosity::checkTablesParameters( real64 const pressure, diff --git a/src/coreComponents/constitutive/fluid/multifluid/CO2Brine/functions/PhillipsBrineDensity.cpp b/src/coreComponents/constitutive/fluid/multifluid/CO2Brine/functions/PhillipsBrineDensity.cpp index 984b3eed7f5..6122bc4ef61 100644 --- a/src/coreComponents/constitutive/fluid/multifluid/CO2Brine/functions/PhillipsBrineDensity.cpp +++ b/src/coreComponents/constitutive/fluid/multifluid/CO2Brine/functions/PhillipsBrineDensity.cpp @@ -189,9 +189,8 @@ PhillipsBrineDensity::PhillipsBrineDensity( string const & name, m_waterIndex = PVTFunctionHelpers::findName( componentNames, expectedWaterComponentNames, "componentNames" ); m_brineDensityTable = makeDensityTable( inputParams, m_functionName, FunctionManager::getInstance() ); - GEOS_UNUSED_VAR( printTable ); - // if( printTable ) - // m_brineDensityTable->print( m_brineDensityTable->getName() ); + if( printTable ) + m_brineDensityTable->print( m_brineDensityTable->getName() ); } PhillipsBrineDensity::KernelWrapper diff --git a/src/coreComponents/constitutive/fluid/multifluid/CO2Brine/functions/PhillipsBrineViscosity.cpp b/src/coreComponents/constitutive/fluid/multifluid/CO2Brine/functions/PhillipsBrineViscosity.cpp index 0636cd4e7d1..c8836f67143 100644 --- a/src/coreComponents/constitutive/fluid/multifluid/CO2Brine/functions/PhillipsBrineViscosity.cpp +++ b/src/coreComponents/constitutive/fluid/multifluid/CO2Brine/functions/PhillipsBrineViscosity.cpp @@ -43,9 +43,8 @@ PhillipsBrineViscosity::PhillipsBrineViscosity( string const & name, componentMolarWeight ) { m_waterViscosityTable = PureWaterProperties::makeSaturationViscosityTable( m_functionName, FunctionManager::getInstance() ); - GEOS_UNUSED_VAR( printTable ); - // if( printTable ) - // m_waterViscosityTable->print( m_waterViscosityTable->getName() ); + if( printTable ) + m_waterViscosityTable->print( m_waterViscosityTable->getName() ); makeCoefficients( inputPara ); } diff --git a/src/coreComponents/constitutive/fluid/multifluid/CO2Brine/functions/SpanWagnerCO2Density.cpp b/src/coreComponents/constitutive/fluid/multifluid/CO2Brine/functions/SpanWagnerCO2Density.cpp index 8e51474aec9..e8787ccd427 100644 --- a/src/coreComponents/constitutive/fluid/multifluid/CO2Brine/functions/SpanWagnerCO2Density.cpp +++ b/src/coreComponents/constitutive/fluid/multifluid/CO2Brine/functions/SpanWagnerCO2Density.cpp @@ -288,9 +288,8 @@ SpanWagnerCO2Density::SpanWagnerCO2Density( string const & name, m_CO2Index = PVTFunctionHelpers::findName( componentNames, expectedCO2ComponentNames, "componentNames" ); m_CO2DensityTable = makeDensityTable( inputParams, m_functionName, FunctionManager::getInstance() ); - GEOS_UNUSED_VAR( printTable ); - // if( printTable ) - // m_CO2DensityTable->print( m_CO2DensityTable->getName() ); + if( printTable ) + m_CO2DensityTable->print( m_CO2DensityTable->getName() ); } void SpanWagnerCO2Density::checkTablesParameters( real64 const pressure, diff --git a/src/coreComponents/constitutive/fluid/multifluid/CO2Brine/functions/WaterDensity.cpp b/src/coreComponents/constitutive/fluid/multifluid/CO2Brine/functions/WaterDensity.cpp index f09d1accd08..4c0d3dada34 100644 --- a/src/coreComponents/constitutive/fluid/multifluid/CO2Brine/functions/WaterDensity.cpp +++ b/src/coreComponents/constitutive/fluid/multifluid/CO2Brine/functions/WaterDensity.cpp @@ -44,9 +44,8 @@ WaterDensity::WaterDensity( string const & name, { GEOS_UNUSED_VAR( inputParams ); m_waterDensityTable = PureWaterProperties::makeSaturationDensityTable( m_functionName, FunctionManager::getInstance() ); - GEOS_UNUSED_VAR( printTable ); - // if( printTable ) - // m_waterDensityTable->print( m_waterDensityTable->getName() ); + if( printTable ) + m_waterDensityTable->print( m_waterDensityTable->getName() ); } void WaterDensity::checkTablesParameters( real64 const pressure, 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/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..b0e8bdb59d1 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 dir 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 d7e7a2404e0..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 @@ -185,76 +184,76 @@ void TableFunction::checkCoord( real64 const coord, localIndex const dim ) const SimulationError ); } -// void TableFunction::print( std::string const & filename ) const -// { -// std::ofstream os( joinPath( OutputBase::getOutputDirectory(), filename + ".csv" ) ); +void TableFunction::print( std::string const & filename ) const +{ + std::ofstream os( joinPath( FunctionBase::getOutputDirectory(), filename + ".csv" ) ); -// integer const numDimensions = LvArray::integerConversion< integer >( m_coordinates.size() ); + integer const numDimensions = LvArray::integerConversion< integer >( m_coordinates.size() ); -// if( numDimensions != 2 ) -// { -// // print header + if( numDimensions != 2 ) + { + // print header -// for( integer d = 0; d < numDimensions; d++ ) -// { -// os << units::getDescription( getDimUnit( d )) << ","; -// } -// os << units::getDescription( m_valueUnit ) << "\n"; + for( integer d = 0; d < numDimensions; d++ ) + { + os << units::getDescription( getDimUnit( d )) << ","; + } + os << units::getDescription( m_valueUnit ) << "\n"; -// // print values + // print values -// // prepare dividers -// std::vector< integer > div( numDimensions ); -// div[0] = 1; -// for( integer d = 1; d < numDimensions; d++ ) -// { -// div[d] = div[d-1] * m_coordinates[d-1].size(); -// } -// // loop through all the values -// for( integer v = 0; v < m_values.size(); v++ ) -// { -// // find coords indices -// std::vector< integer > idx( numDimensions ); -// integer r = v; -// for( integer d = numDimensions-1; d >= 0; d-- ) -// { -// idx[d] = r / div[d]; -// r = r % div[d]; -// } -// // finally print out in right order -// for( integer d = 0; d < numDimensions; d++ ) -// { -// arraySlice1d< real64 const > const coords = m_coordinates[d]; -// os << coords[idx[d]] << ","; -// } -// os << m_values[v] << "\n"; -// } -// } -// else // numDimensions == 2 -// { -// arraySlice1d< real64 const > const coordsX = m_coordinates[0]; -// arraySlice1d< real64 const > const coordsY = m_coordinates[1]; -// integer const nX = coordsX.size(); -// integer const nY = coordsY.size(); -// os< div( numDimensions ); + div[0] = 1; + for( integer d = 1; d < numDimensions; d++ ) + { + div[d] = div[d-1] * m_coordinates[d-1].size(); + } + // loop through all the values + for( integer v = 0; v < m_values.size(); v++ ) + { + // find coords indices + std::vector< integer > idx( numDimensions ); + integer r = v; + for( integer d = numDimensions-1; d >= 0; d-- ) + { + idx[d] = r / div[d]; + r = r % div[d]; + } + // finally print out in right order + for( integer d = 0; d < numDimensions; d++ ) + { + arraySlice1d< real64 const > const coords = m_coordinates[d]; + os << coords[idx[d]] << ","; + } + os << m_values[v] << "\n"; + } + } + else // numDimensions == 2 + { + arraySlice1d< real64 const > const coordsX = m_coordinates[0]; + arraySlice1d< real64 const > const coordsY = m_coordinates[1]; + integer const nX = coordsX.size(); + integer const nY = coordsY.size(); + os< Date: Wed, 21 Aug 2024 08:57:33 -0700 Subject: [PATCH 26/29] add WHOLE_ARCHIVE cmake decorations to linking for static libs. Lots of CMakeLists.txt cleanup --- host-configs/apple/macOS_base.cmake | 2 +- src/cmake/GeosxMacros.cmake | 36 +++++++++++++++++++ src/cmake/GeosxOptions.cmake | 2 +- src/coreComponents/CMakeLists.txt | 20 ++++------- .../codingUtilities/CMakeLists.txt | 4 ++- .../codingUtilities/tests/CMakeLists.txt | 6 ++-- src/coreComponents/common/CMakeLists.txt | 2 -- .../constitutive/CMakeLists.txt | 5 ++- .../constitutiveDrivers/CMakeLists.txt | 5 ++- .../dataRepository/CMakeLists.txt | 4 ++- .../denseLinearAlgebra/CMakeLists.txt | 5 ++- .../discretizationMethods/CMakeLists.txt | 5 ++- src/coreComponents/events/CMakeLists.txt | 5 ++- .../fieldSpecification/CMakeLists.txt | 5 ++- src/coreComponents/fileIO/CMakeLists.txt | 5 ++- .../finiteElement/CMakeLists.txt | 5 ++- .../finiteVolume/CMakeLists.txt | 5 ++- src/coreComponents/functions/CMakeLists.txt | 5 ++- .../linearAlgebra/CMakeLists.txt | 16 +++++---- .../mainInterface/CMakeLists.txt | 5 ++- src/coreComponents/mesh/CMakeLists.txt | 5 ++- .../physicsSolvers/CMakeLists.txt | 6 +++- src/coreComponents/schema/CMakeLists.txt | 5 ++- src/coreComponents/unitTests/CMakeLists.txt | 2 +- .../constitutiveTests/CMakeLists.txt | 31 +++++----------- .../unitTests/fluidFlowTests/CMakeLists.txt | 27 +++----------- .../unitTests/testingUtilities/CMakeLists.txt | 10 +++--- .../unitTests/toolchain/CMakeLists.txt | 7 ++-- .../unitTests/wellsTests/CMakeLists.txt | 26 +++----------- 29 files changed, 152 insertions(+), 114 deletions(-) diff --git a/host-configs/apple/macOS_base.cmake b/host-configs/apple/macOS_base.cmake index c9cf2efc8df..06635ad4161 100644 --- a/host-configs/apple/macOS_base.cmake +++ b/host-configs/apple/macOS_base.cmake @@ -28,7 +28,7 @@ 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_SHARED_LIBS ON CACHE BOOL "" FORCE) +set(GEOS_BUILD_SHARED_LIBS OFF CACHE BOOL "" FORCE) diff --git a/src/cmake/GeosxMacros.cmake b/src/cmake/GeosxMacros.cmake index af5105678ee..d658076cb6a 100644 --- a/src/cmake/GeosxMacros.cmake +++ b/src/cmake/GeosxMacros.cmake @@ -95,3 +95,39 @@ macro( geos_add_test ) COMMAND ${arg_COMMAND} ${ARGN} ) endmacro( geos_add_test ) + + +macro( geos_decorate_link_dependencies ) + + set( options ) + set( singleValueArgs LIST ) + set( multiValueArgs DEPENDENCIES ) + + # Parse the arguments to the macro + cmake_parse_arguments( arg + "${options}" "${singleValueArgs}" "${multiValueArgs}" ${ARGN} ) + + set( staticLibs "" ) + set( otherLibs "" ) + foreach( dep ${arg_DEPENDENCIES} ) + if( NOT TARGET ${dep} ) + message( FATAL_ERROR "Dependency ${dep} not found" ) + endif() + + get_target_property( targetType ${dep} TYPE) + # message( " ${dep} targetType = ${targetType}" ) # debug + + if (targetType STREQUAL STATIC_LIBRARY) + list( APPEND staticLibs ${dep} ) + else() + list( APPEND otherLibs ${dep} ) + endif() + endforeach() + + # message( " staticLibs = ${staticLibs}" ) # debug + # message( " otherLibs = ${otherLibs}" ) # debug + + string (REPLACE ";" "," staticLibsString "${staticLibs}") + set( ${arg_LIST} "$" ${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 dc62fde2147..0e7821c282d 100644 --- a/src/cmake/GeosxOptions.cmake +++ b/src/cmake/GeosxOptions.cmake @@ -89,7 +89,7 @@ option( GEOS_INSTALL_SCHEMA "Enables schema generation and installation" ON ) option( GEOS_BUILD_OBJ_LIBS "Builds coreComponent modules as object libraries" OFF ) -option( GEOS_BUILD_SHARED_LIBS "Builds geosx_core as a shared library " ON ) +option( GEOS_BUILD_SHARED_LIBS "Builds geosx_core as a shared library " OFF ) set( GEOS_PARALLEL_COMPILE_JOBS "" CACHE STRING "Maximum number of concurrent compilation jobs" ) if( GEOS_PARALLEL_COMPILE_JOBS ) diff --git a/src/coreComponents/CMakeLists.txt b/src/coreComponents/CMakeLists.txt index 50b5e3dadbe..014eea9d9b0 100644 --- a/src/coreComponents/CMakeLists.txt +++ b/src/coreComponents/CMakeLists.txt @@ -3,20 +3,20 @@ set( subdirs common codingUtilities dataRepository - schema + denseLinearAlgebra functions constitutive - constitutiveDrivers + schema + finiteElement mesh - denseLinearAlgebra linearAlgebra fieldSpecification - finiteElement finiteVolume discretizationMethods + events + constitutiveDrivers fileIO physicsSolvers - events mainInterface ) unset( parallelDeps ) @@ -65,16 +65,8 @@ add_library(geosx_core INTERFACE) if( GEOS_BUILD_SHARED_LIBS) target_link_libraries(geosx_core INTERFACE mainInterface ) else() - get_target_property( libs geosx_core INTERFACE_LINK_LIBRARIES ) - - set( linkLibs "" ) - foreach( lib ${coreLibs} ) - list( APPEND linkLibs "$" ) - endforeach() - message( "linkLibs = ${linkLibs}" ) - target_link_libraries(geosx_core INTERFACE ${linkLibs} ) + target_link_libraries(geosx_core INTERFACE $ ) endif() -blt_print_target_properties( TARGET geosx_core ) geosx_add_code_checks( PREFIX coreComponents EXCLUDES cmake constitutive/PVTPackage ) diff --git a/src/coreComponents/codingUtilities/CMakeLists.txt b/src/coreComponents/codingUtilities/CMakeLists.txt index af760d67884..f936fc4135e 100644 --- a/src/coreComponents/codingUtilities/CMakeLists.txt +++ b/src/coreComponents/codingUtilities/CMakeLists.txt @@ -20,11 +20,13 @@ 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} ) 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 7fbece44c48..3733bafb7f7 100644 --- a/src/coreComponents/common/CMakeLists.txt +++ b/src/coreComponents/common/CMakeLists.txt @@ -102,8 +102,6 @@ if( ENABLE_CALIPER ) endif() endif() -set( dependencyList ${dependencyList} ) - blt_add_library( NAME common SOURCES ${common_sources} HEADERS ${common_headers} diff --git a/src/coreComponents/constitutive/CMakeLists.txt b/src/coreComponents/constitutive/CMakeLists.txt index f1735d68549..ce9e3c62778 100644 --- a/src/coreComponents/constitutive/CMakeLists.txt +++ b/src/coreComponents/constitutive/CMakeLists.txt @@ -300,10 +300,13 @@ if( ENABLE_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} ) diff --git a/src/coreComponents/constitutiveDrivers/CMakeLists.txt b/src/coreComponents/constitutiveDrivers/CMakeLists.txt index a55bed35636..24570963e67 100644 --- a/src/coreComponents/constitutiveDrivers/CMakeLists.txt +++ b/src/coreComponents/constitutiveDrivers/CMakeLists.txt @@ -42,10 +42,13 @@ if( ENABLE_PVTPackage ) ) endif() +geos_decorate_link_dependencies( LIST decoratedDependencies + DEPENDENCIES ${dependencyList} ) + blt_add_library( NAME constitutiveDrivers SOURCES ${constitutiveDrivers_sources} HEADERS ${constitutiveDrivers_headers} - DEPENDS_ON ${dependencyList} + DEPENDS_ON ${decoratedDependencies} OBJECT ${GEOS_BUILD_OBJ_LIBS} SHARED ${GEOS_BUILD_SHARED_LIBS} ) diff --git a/src/coreComponents/dataRepository/CMakeLists.txt b/src/coreComponents/dataRepository/CMakeLists.txt index 596c62edecd..1d97ce8d11e 100644 --- a/src/coreComponents/dataRepository/CMakeLists.txt +++ b/src/coreComponents/dataRepository/CMakeLists.txt @@ -50,11 +50,13 @@ 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} + DEPENDS_ON ${decoratedDependencies} OBJECT ${GEOS_BUILD_OBJ_LIBS} SHARED ${GEOS_BUILD_SHARED_LIBS} ) diff --git a/src/coreComponents/denseLinearAlgebra/CMakeLists.txt b/src/coreComponents/denseLinearAlgebra/CMakeLists.txt index de751dff89a..64a91cf1c70 100644 --- a/src/coreComponents/denseLinearAlgebra/CMakeLists.txt +++ b/src/coreComponents/denseLinearAlgebra/CMakeLists.txt @@ -10,10 +10,13 @@ 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} + DEPENDS_ON ${decoratedDependencies} OBJECT ${GEOS_BUILD_OBJ_LIBS} SHARED ${GEOS_BUILD_SHARED_LIBS} ) diff --git a/src/coreComponents/discretizationMethods/CMakeLists.txt b/src/coreComponents/discretizationMethods/CMakeLists.txt index 90818239cc7..191f8dd12c9 100644 --- a/src/coreComponents/discretizationMethods/CMakeLists.txt +++ b/src/coreComponents/discretizationMethods/CMakeLists.txt @@ -13,10 +13,13 @@ 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} ) diff --git a/src/coreComponents/events/CMakeLists.txt b/src/coreComponents/events/CMakeLists.txt index 53b6db36b19..184dea2f0c1 100644 --- a/src/coreComponents/events/CMakeLists.txt +++ b/src/coreComponents/events/CMakeLists.txt @@ -26,10 +26,13 @@ set( events_sources 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} ) diff --git a/src/coreComponents/fieldSpecification/CMakeLists.txt b/src/coreComponents/fieldSpecification/CMakeLists.txt index cb7d0cd8d18..f7b68eaaa1e 100644 --- a/src/coreComponents/fieldSpecification/CMakeLists.txt +++ b/src/coreComponents/fieldSpecification/CMakeLists.txt @@ -28,10 +28,13 @@ set( fieldSpecification_sources 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} ) diff --git a/src/coreComponents/fileIO/CMakeLists.txt b/src/coreComponents/fileIO/CMakeLists.txt index ef15f430d7c..714ea11808c 100644 --- a/src/coreComponents/fileIO/CMakeLists.txt +++ b/src/coreComponents/fileIO/CMakeLists.txt @@ -79,10 +79,13 @@ 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} + DEPENDS_ON ${decoratedDependencies} OBJECT ${GEOS_BUILD_OBJ_LIBS} SHARED ${GEOS_BUILD_SHARED_LIBS} ) diff --git a/src/coreComponents/finiteElement/CMakeLists.txt b/src/coreComponents/finiteElement/CMakeLists.txt index cca1d9cb351..aa3740ddd04 100644 --- a/src/coreComponents/finiteElement/CMakeLists.txt +++ b/src/coreComponents/finiteElement/CMakeLists.txt @@ -42,10 +42,13 @@ 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} ) diff --git a/src/coreComponents/finiteVolume/CMakeLists.txt b/src/coreComponents/finiteVolume/CMakeLists.txt index 23aa1adaf63..9f855fc79db 100644 --- a/src/coreComponents/finiteVolume/CMakeLists.txt +++ b/src/coreComponents/finiteVolume/CMakeLists.txt @@ -42,10 +42,13 @@ set( finiteVolume_sources 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} ) diff --git a/src/coreComponents/functions/CMakeLists.txt b/src/coreComponents/functions/CMakeLists.txt index a3d016fc44c..ec6542660da 100644 --- a/src/coreComponents/functions/CMakeLists.txt +++ b/src/coreComponents/functions/CMakeLists.txt @@ -33,10 +33,13 @@ 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} ) diff --git a/src/coreComponents/linearAlgebra/CMakeLists.txt b/src/coreComponents/linearAlgebra/CMakeLists.txt index 7283f50e4f4..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,14 +146,17 @@ 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} ) diff --git a/src/coreComponents/mainInterface/CMakeLists.txt b/src/coreComponents/mainInterface/CMakeLists.txt index 788951c220d..fb96f9ed6c5 100644 --- a/src/coreComponents/mainInterface/CMakeLists.txt +++ b/src/coreComponents/mainInterface/CMakeLists.txt @@ -20,10 +20,13 @@ set( mainInterface_sources 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} ) diff --git a/src/coreComponents/mesh/CMakeLists.txt b/src/coreComponents/mesh/CMakeLists.txt index 333ef65a556..5eeb7f1a900 100644 --- a/src/coreComponents/mesh/CMakeLists.txt +++ b/src/coreComponents/mesh/CMakeLists.txt @@ -180,10 +180,13 @@ 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} + DEPENDS_ON ${decoratedDependencies} OBJECT ${GEOS_BUILD_OBJ_LIBS} SHARED ${GEOS_BUILD_SHARED_LIBS} ) diff --git a/src/coreComponents/physicsSolvers/CMakeLists.txt b/src/coreComponents/physicsSolvers/CMakeLists.txt index bb387031db9..c8a6f1a002e 100644 --- a/src/coreComponents/physicsSolvers/CMakeLists.txt +++ b/src/coreComponents/physicsSolvers/CMakeLists.txt @@ -52,6 +52,7 @@ if( GEOS_ENABLE_WAVEPROPAGATION ) endif() set( dependencyList ${parallelDeps} fileIO discretizationMethods events ) + if( ENABLE_PYGEOSX ) list( APPEND physicsSolvers_headers python/PySolver.hpp @@ -61,10 +62,13 @@ 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} + DEPENDS_ON ${decoratedDependencies} ${externalComponentDeps} OBJECT ${GEOS_BUILD_OBJ_LIBS} SHARED ${GEOS_BUILD_SHARED_LIBS} ) diff --git a/src/coreComponents/schema/CMakeLists.txt b/src/coreComponents/schema/CMakeLists.txt index a32f052ee98..a6e7369b14b 100644 --- a/src/coreComponents/schema/CMakeLists.txt +++ b/src/coreComponents/schema/CMakeLists.txt @@ -14,10 +14,13 @@ 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/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 b6ad3af2616..b30a378c542 100644 --- a/src/coreComponents/unitTests/constitutiveTests/CMakeLists.txt +++ b/src/coreComponents/unitTests/constitutiveTests/CMakeLists.txt @@ -32,31 +32,17 @@ set( gtest_pvt_xmls set( gtest_reactivefluid_xmls testReactiveFluid.xml ) -set( dependencyList ${parallelDeps} gtest ) +set( tplDependencyList ${parallelDeps} gtest ) -list( APPEND dependencyList mainInterface ) +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}) @@ -64,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} ) @@ -75,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 ) @@ -87,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 ) @@ -100,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/fluidFlowTests/CMakeLists.txt b/src/coreComponents/unitTests/fluidFlowTests/CMakeLists.txt index 2c1d9047d41..bf3fac64bfa 100644 --- a/src/coreComponents/unitTests/fluidFlowTests/CMakeLists.txt +++ b/src/coreComponents/unitTests/fluidFlowTests/CMakeLists.txt @@ -6,36 +6,19 @@ set( gtest_geosx_tests testFlowStatistics.cpp testTransmissibility.cpp ) -set( dependencyList ${parallelDeps} gtest ) +set( tplDependencyList ${parallelDeps} gtest ) -list( APPEND dependencyList geosx_core ) - -set( dependencyList testingUtilities ) +set( dependencyList mainInterface 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() - -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}) @@ -44,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/testingUtilities/CMakeLists.txt b/src/coreComponents/unitTests/testingUtilities/CMakeLists.txt index 7e9ce8c02c6..7534c11b82d 100644 --- a/src/coreComponents/unitTests/testingUtilities/CMakeLists.txt +++ b/src/coreComponents/unitTests/testingUtilities/CMakeLists.txt @@ -15,14 +15,16 @@ 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} ) -list( APPEND dependencyList geosx_core ) - 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} ) 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/wellsTests/CMakeLists.txt b/src/coreComponents/unitTests/wellsTests/CMakeLists.txt index 9e0e2f03706..988582e06a6 100644 --- a/src/coreComponents/unitTests/wellsTests/CMakeLists.txt +++ b/src/coreComponents/unitTests/wellsTests/CMakeLists.txt @@ -3,33 +3,17 @@ set( gtest_geosx_tests testReservoirSinglePhaseMSWells.cpp testWellEnums.cpp ) -set( dependencyList ${parallelDeps} gtest ) +set( tplDependencyList ${parallelDeps} gtest ) -list( APPEND dependencyList geosx_core ${parallelDeps} HDF5::HDF5 ) +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 ) @@ -37,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} ) From 5f77ba6242e3685012b6b49f81cf9ce1380e5315 Mon Sep 17 00:00:00 2001 From: Randolph Settgast Date: Wed, 21 Aug 2024 09:39:12 -0700 Subject: [PATCH 27/29] cleanup more unit test cmake files --- .../dataRepositoryTests/CMakeLists.txt | 23 ++++------------- .../fieldSpecificationTests/CMakeLists.txt | 25 +++++-------------- .../unitTests/fileIOTests/CMakeLists.txt | 11 +++++--- .../finiteVolumeTests/CMakeLists.txt | 11 +++++--- .../unitTests/fluidFlowTests/CMakeLists.txt | 8 +++--- .../linearAlgebraTests/CMakeLists.txt | 22 ++++------------ .../unitTests/meshTests/CMakeLists.txt | 22 +++++----------- .../virtualElementTests/CMakeLists.txt | 22 ++++------------ .../wavePropagationTests/CMakeLists.txt | 23 ++++------------- .../unitTests/xmlTests/CMakeLists.txt | 16 ++++-------- 10 files changed, 55 insertions(+), 128 deletions(-) diff --git a/src/coreComponents/unitTests/dataRepositoryTests/CMakeLists.txt b/src/coreComponents/unitTests/dataRepositoryTests/CMakeLists.txt index 9c2949dbbc9..47b3b63d0a0 100644 --- a/src/coreComponents/unitTests/dataRepositoryTests/CMakeLists.txt +++ b/src/coreComponents/unitTests/dataRepositoryTests/CMakeLists.txt @@ -6,25 +6,12 @@ set( dataRepository_tests testWrapperHelpers.cpp testGroupPath.cpp ) -set( dependencyList ${parallelDeps} gtest ) +set( tplDependencyList ${parallelDeps} gtest ) -list( APPEND dependencyList geosx_core ) +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}) @@ -32,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 f209ed6433a..d66f6661e22 100644 --- a/src/coreComponents/unitTests/fieldSpecificationTests/CMakeLists.txt +++ b/src/coreComponents/unitTests/fieldSpecificationTests/CMakeLists.txt @@ -5,33 +5,20 @@ set( gtest_geosx_tests testRecursiveFieldApplication.cpp ) -set( dependencyList ${parallelDeps} gtest ) +set( tplDependencyList ${parallelDeps} gtest ) -list( APPEND dependencyList geosx_core ) - -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 2f23c577b10..7bf5498da5b 100644 --- a/src/coreComponents/unitTests/fileIOTests/CMakeLists.txt +++ b/src/coreComponents/unitTests/fileIOTests/CMakeLists.txt @@ -1,9 +1,12 @@ # Specify list of tests set( geosx_fileio_tests testHDFFile.cpp ) -set( dependencyList ${parallelDeps} gtest HDF5::HDF5 ) +set( tplDependencyList ${parallelDeps} gtest ) -list( APPEND dependencyList geosx_core ) +set( dependencyList mainInterface ) + +geos_decorate_link_dependencies( LIST decoratedDependencies + DEPENDENCIES ${dependencyList} ) # Add gtest C++ based tests foreach(test ${geosx_fileio_tests}) @@ -11,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} ) @@ -28,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 5da377a9ddb..d809c09d7c3 100644 --- a/src/coreComponents/unitTests/finiteVolumeTests/CMakeLists.txt +++ b/src/coreComponents/unitTests/finiteVolumeTests/CMakeLists.txt @@ -2,17 +2,20 @@ set( gtest_geosx_tests testMimeticInnerProducts.cpp ) -set( dependencyList ${parallelDeps} gtest ) - -list( APPEND dependencyList geosx_core ) +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 bf3fac64bfa..c21190560cf 100644 --- a/src/coreComponents/unitTests/fluidFlowTests/CMakeLists.txt +++ b/src/coreComponents/unitTests/fluidFlowTests/CMakeLists.txt @@ -6,10 +6,6 @@ set( gtest_geosx_tests testFlowStatistics.cpp testTransmissibility.cpp ) -set( tplDependencyList ${parallelDeps} gtest ) - -set( dependencyList mainInterface testingUtilities ) - if( ENABLE_PVTPackage ) list( APPEND gtest_geosx_tests testCompMultiphaseFlow.cpp @@ -17,6 +13,10 @@ if( ENABLE_PVTPackage ) testReactiveCompositionalMultiphaseOBL.cpp ) endif() +set( tplDependencyList ${parallelDeps} gtest ) + +set( dependencyList mainInterface testingUtilities ) + geos_decorate_link_dependencies( LIST decoratedDependencies DEPENDENCIES ${dependencyList} ) diff --git a/src/coreComponents/unitTests/linearAlgebraTests/CMakeLists.txt b/src/coreComponents/unitTests/linearAlgebraTests/CMakeLists.txt index 19cf441cdb8..f14fe910eac 100644 --- a/src/coreComponents/unitTests/linearAlgebraTests/CMakeLists.txt +++ b/src/coreComponents/unitTests/linearAlgebraTests/CMakeLists.txt @@ -6,25 +6,13 @@ set( LAI_tests set( nranks 2 ) # Add gtest C++ based tests -set( dependencyList ${parallelDeps} gtest ) +set( tplDependencyList ${parallelDeps} gtest ) -list( APPEND dependencyList geosx_core ) +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} ) -if (TARGET fmt::fmt-header-only) - set( dependencyList ${dependencyList} fmt::fmt-header-only ) -endif() - -if (TARGET fmt) - set( dependencyList ${dependencyList} fmt ) -endif() foreach(test ${LAI_tests}) get_filename_component( test_name ${test} NAME_WE ) @@ -32,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 ddaa0dcb379..fe8cca29817 100644 --- a/src/coreComponents/unitTests/meshTests/CMakeLists.txt +++ b/src/coreComponents/unitTests/meshTests/CMakeLists.txt @@ -19,23 +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 geosx_core ) +set( tplDependencyList ${parallelDeps} gtest ) -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} ) @@ -43,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} ) @@ -69,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/virtualElementTests/CMakeLists.txt b/src/coreComponents/unitTests/virtualElementTests/CMakeLists.txt index 1e604ebf686..0d99a9b63ca 100644 --- a/src/coreComponents/unitTests/virtualElementTests/CMakeLists.txt +++ b/src/coreComponents/unitTests/virtualElementTests/CMakeLists.txt @@ -2,25 +2,13 @@ set( testSources testConformingVirtualElementOrder1.cpp ) -set( dependencyList ${parallelDeps} gtest ) +set( tplDependencyList ${parallelDeps} gtest ) -list( APPEND dependencyList geosx_core ) +set( dependencyList mainInterface ) -if (TARGET pugixml::pugixml) - list( APPEND dependencyList pugixml::pugixml ) -endif() - -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}) @@ -28,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 f33e03cb161..fab0a741e73 100644 --- a/src/coreComponents/unitTests/wavePropagationTests/CMakeLists.txt +++ b/src/coreComponents/unitTests/wavePropagationTests/CMakeLists.txt @@ -8,25 +8,12 @@ set( gtest_geosx_tests testWavePropagationAttenuation.cpp testWavePropagationAcousticFirstOrder.cpp ) -set( dependencyList ${parallelDeps} gtest ) +set( tplDependencyList ${parallelDeps} gtest ) -list( APPEND dependencyList geosx_core ) +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 ${gtest_geosx_tests}) @@ -34,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/xmlTests/CMakeLists.txt b/src/coreComponents/unitTests/xmlTests/CMakeLists.txt index 2c6ca51a0a6..28d5cc772ae 100644 --- a/src/coreComponents/unitTests/xmlTests/CMakeLists.txt +++ b/src/coreComponents/unitTests/xmlTests/CMakeLists.txt @@ -15,18 +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 ) -list( APPEND dependencyList geosx_core ) +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}) @@ -34,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 From a0685881872289b11315c6d30bf7ddd6bdc67d7c Mon Sep 17 00:00:00 2001 From: Randolph Settgast Date: Wed, 21 Aug 2024 12:32:27 -0700 Subject: [PATCH 28/29] move constitutive driver documentation out on its own --- .../constitutive/docs/FluidModels.rst | 4 +--- .../constitutive/docs/solid/SolidModels.rst | 1 - .../docs/ConstitutiveDrivers.rst | 13 +++++++++++++ .../docs/{solid => }/TriaxialDriver.rst | 0 .../docs/{solid => }/TriaxialDriver.svg | 0 src/coreComponents/functions/FunctionBase.hpp | 2 +- src/docs/sphinx/userGuide/Index.rst | 2 ++ 7 files changed, 17 insertions(+), 5 deletions(-) create mode 100644 src/coreComponents/constitutiveDrivers/docs/ConstitutiveDrivers.rst rename src/coreComponents/constitutiveDrivers/docs/{solid => }/TriaxialDriver.rst (100%) rename src/coreComponents/constitutiveDrivers/docs/{solid => }/TriaxialDriver.svg (100%) 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/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/constitutiveDrivers/docs/solid/TriaxialDriver.rst b/src/coreComponents/constitutiveDrivers/docs/TriaxialDriver.rst similarity index 100% rename from src/coreComponents/constitutiveDrivers/docs/solid/TriaxialDriver.rst rename to src/coreComponents/constitutiveDrivers/docs/TriaxialDriver.rst diff --git a/src/coreComponents/constitutiveDrivers/docs/solid/TriaxialDriver.svg b/src/coreComponents/constitutiveDrivers/docs/TriaxialDriver.svg similarity index 100% rename from src/coreComponents/constitutiveDrivers/docs/solid/TriaxialDriver.svg rename to src/coreComponents/constitutiveDrivers/docs/TriaxialDriver.svg diff --git a/src/coreComponents/functions/FunctionBase.hpp b/src/coreComponents/functions/FunctionBase.hpp index b0e8bdb59d1..3b160059743 100644 --- a/src/coreComponents/functions/FunctionBase.hpp +++ b/src/coreComponents/functions/FunctionBase.hpp @@ -132,7 +132,7 @@ class FunctionBase : public dataRepository::Group /** * @brief Set the output directory for function output - * @param dir The output directory + * @param outputDir The output directory */ static void setOutputDirectory( string const & outputDir ); 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 From 0cedfedf793e0fad179a4122b055d3088c2ed0d9 Mon Sep 17 00:00:00 2001 From: Randolph Settgast Date: Wed, 21 Aug 2024 14:50:07 -0700 Subject: [PATCH 29/29] default to shared libs --- host-configs/apple/macOS_base.cmake | 2 +- src/CMakeGraphVizOptions.cmake | 6 ++++-- src/cmake/GeosxOptions.cmake | 7 +------ 3 files changed, 6 insertions(+), 9 deletions(-) diff --git a/host-configs/apple/macOS_base.cmake b/host-configs/apple/macOS_base.cmake index 06635ad4161..c9cf2efc8df 100644 --- a/host-configs/apple/macOS_base.cmake +++ b/host-configs/apple/macOS_base.cmake @@ -28,7 +28,7 @@ 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_SHARED_LIBS OFF CACHE BOOL "" FORCE) +set(GEOS_BUILD_SHARED_LIBS ON CACHE BOOL "" FORCE) diff --git a/src/CMakeGraphVizOptions.cmake b/src/CMakeGraphVizOptions.cmake index c1445d96d92..fbce48fe7e8 100644 --- a/src/CMakeGraphVizOptions.cmake +++ b/src/CMakeGraphVizOptions.cmake @@ -1,4 +1,6 @@ -set( GRAPHVIZ_EXECUTABLES FALSE ) +set( GRAPHVIZ_EXECUTABLES TRUE ) set( GRAPHVIZ_OBJECT_LIBS TRUE ) set( GRAPHVIZ_EXTERNAL_LIBS FALSE ) -set( GRAPHVIZ_GENERATE_DEPENDERS FALSE ) \ No newline at end of file +set( GRAPHVIZ_GENERATE_DEPENDERS FALSE ) +set( GRAPHVIZ_IGNORE_TARGETS "test*;example*;benchmark*" ) +set( GRAPHVIZ_CUSTOM_TARGETS FALSE ) diff --git a/src/cmake/GeosxOptions.cmake b/src/cmake/GeosxOptions.cmake index 0e7821c282d..cce8877cb28 100644 --- a/src/cmake/GeosxOptions.cmake +++ b/src/cmake/GeosxOptions.cmake @@ -89,7 +89,7 @@ option( GEOS_INSTALL_SCHEMA "Enables schema generation and installation" ON ) option( GEOS_BUILD_OBJ_LIBS "Builds coreComponent modules as object libraries" OFF ) -option( GEOS_BUILD_SHARED_LIBS "Builds geosx_core as a shared library " OFF ) +option( GEOS_BUILD_SHARED_LIBS "Builds geosx_core as a shared library " ON ) set( GEOS_PARALLEL_COMPILE_JOBS "" CACHE STRING "Maximum number of concurrent compilation jobs" ) if( GEOS_PARALLEL_COMPILE_JOBS ) @@ -205,9 +205,4 @@ message( "GEOS_GLOBALINDEX_TYPE_FLAG = ${GEOS_GLOBALINDEX_TYPE_FLAG}" ) message( "CMAKE_CXX_FLAGS = ${CMAKE_CXX_FLAGS}" ) -set( GRAPHVIZ_EXTERNAL_LIBS TRUE ) -set( GRAPHVIZ_IGNORE_TARGETS "testingUtilities" ) -set( GRAPHVIZ_EXECUTABLES TRUE ) -set( GRAPHVIZ_CUSTOM_TARGETS TRUE ) - message( "Leaving GeosxOptions.cmake\n" )