add imported opm-models code to buildsystem

This commit is contained in:
Arne Morten Kvarving 2024-08-09 10:38:35 +02:00
parent bc46647aa5
commit e3a16df477
8 changed files with 497 additions and 39 deletions

View File

@ -275,7 +275,6 @@ macro (config_hook)
if(dune-fem_FOUND)
opm_need_version_of ("dune-fem")
endif()
opm_need_version_of ("opm-models")
if(NOT fmt_FOUND)
include(DownloadFmt)
@ -293,6 +292,21 @@ macro (config_hook)
if(BUILD_FLOW_FLOAT_VARIANTS)
set(FLOW_INSTANTIATE_FLOAT 1)
endif()
# The parameter system can leverage std::from_chars() for
# floating-point types if available. Detect support for this
# feature.
try_compile(
have_float_from_chars
${CMAKE_BINARY_DIR}
${PROJECT_SOURCE_DIR}/cmake/test/testFloatFromChars.cpp
CXX_STANDARD 17
)
set(HAVE_FLOATING_POINT_FROM_CHARS 0)
if(have_float_from_chars)
set(HAVE_FLOATING_POINT_FROM_CHARS 1)
endif()
endmacro (config_hook)
macro (prereqs_hook)
@ -371,6 +385,44 @@ opm_add_test(test_tuning_tsinit_nextstep
${Boost_UNIT_TEST_FRAMEWORK_LIBRARY} opmcommon
ONLY_COMPILE)
# this test is identical to the simulation of the lens problem that
# uses the element centered finite volume discretization in
# conjunction with automatic differentiation
# (lens_immiscible_ecfv_ad). The only difference is that it uses
# multiple compile units in order to ensure that eWoms code can be
# used within libraries that use the same type tag within multiple
# compile units.
opm_add_test(lens_immiscible_ecfv_ad_mcu
SOURCES
examples/lens_immiscible_ecfv_ad_cu1.cpp
examples/lens_immiscible_ecfv_ad_cu2.cpp
examples/lens_immiscible_ecfv_ad_main.cpp
LIBRARIES
opmsimulators opmcommon
ONLY_COMPILE)
if(QuadMath_FOUND)
foreach(tapp co2injection_flash_ni_ecfv
co2injection_flash_ni_vcfv
co2injection_flash_ecfv
co2injection_flash_vcfv)
opm_add_test(${tapp}_quad
EXE_NAME ${tapp}_quad
SOURCES
examples/${tapp}.cpp
ONLY_COMPILE)
target_link_libraries(${tapp}_quad QuadMath::QuadMath)
target_compile_definitions(${tapp}_quad PRIVATE HAVE_QUAD=1)
endforeach()
endif()
target_sources(test_outputdir PRIVATE $<TARGET_OBJECTS:moduleVersion>)
target_sources(test_equil PRIVATE $<TARGET_OBJECTS:moduleVersion>)
target_sources(test_RestartSerialization PRIVATE $<TARGET_OBJECTS:moduleVersion>)
target_sources(test_glift1 PRIVATE $<TARGET_OBJECTS:moduleVersion>)
include (${CMAKE_CURRENT_SOURCE_DIR}/modelTests.cmake)
if (HAVE_OPM_TESTS)
include (${CMAKE_CURRENT_SOURCE_DIR}/compareECLFiles.cmake)
endif()
@ -379,11 +431,6 @@ if(MPI_FOUND)
include (${CMAKE_CURRENT_SOURCE_DIR}/parallelUnitTests.cmake)
endif()
target_sources(test_outputdir PRIVATE $<TARGET_OBJECTS:moduleVersion>)
target_sources(test_equil PRIVATE $<TARGET_OBJECTS:moduleVersion>)
target_sources(test_RestartSerialization PRIVATE $<TARGET_OBJECTS:moduleVersion>)
target_sources(test_glift1 PRIVATE $<TARGET_OBJECTS:moduleVersion>)
include(OpmBashCompletion)
if (NOT BUILD_FLOW)

View File

@ -326,6 +326,10 @@ endif()
# originally generated with the command:
# find tests -name '*.cpp' -a ! -wholename '*/not-unit/*' -printf '\t%p\n' | sort
list (APPEND TEST_SOURCE_FILES
tests/models/test_quadrature.cpp
tests/models/test_propertysystem.cpp
tests/models/test_tasklets.cpp
tests/models/test_tasklets_failure.cpp
tests/test_ALQState.cpp
tests/test_aquifergridutils.cpp
tests/test_blackoil_amg.cpp
@ -480,12 +484,226 @@ list (APPEND TEST_DATA_FILES
tests/include/well_vfp.ecl
tests/test10.partition
tests/parametersystem.ini
tests/data/co2injection.dgf
tests/data/cuvette_11x4.dgf
tests/data/cuvette_44x24.dgf
tests/data/fracture.art.dgf
tests/data/fracture-raw.art
tests/data/groundwater_1d.dgf
tests/data/groundwater_2d.dgf
tests/data/groundwater_3d.dgf
tests/data/infiltration_50x3.dgf
tests/data/infiltration_250x20.dgf
tests/data/obstacle_24x16.dgf
tests/data/obstacle_48x32.dgf
tests/data/outflow.dgf
tests/data/reservoir.dgf
tests/data/richardslens_24x16.dgf
tests/data/richardslens_48x32.dgf
tests/data/richardslens_96x64.dgf
tests/data/test_stokes.dgf
tests/data/test_stokes2c.dgf
tests/data/test_stokes2cni.dgf
tests/data/waterair.dgf
)
# originally generated with the command:
# find opm -name '*.h*' -a ! -name '*-pch.hpp' -printf '\t%p\n' | sort
list (APPEND PUBLIC_HEADER_FILES
opm/models/blackoil/blackoilboundaryratevector.hh
opm/models/blackoil/blackoilbrinemodules.hh
opm/models/blackoil/blackoilbrineparams.hh
opm/models/blackoil/blackoildarcyfluxmodule.hh
opm/models/blackoil/blackoildiffusionmodule.hh
opm/models/blackoil/blackoildispersionmodule.hh
opm/models/blackoil/blackoilenergymodules.hh
opm/models/blackoil/blackoilextbomodules.hh
opm/models/blackoil/blackoilextboparams.hh
opm/models/blackoil/blackoilextensivequantities.hh
opm/models/blackoil/blackoilfoammodules.hh
opm/models/blackoil/blackoilfoamparams.hh
opm/models/blackoil/blackoilindices.hh
opm/models/blackoil/blackoilintensivequantities.hh
opm/models/blackoil/blackoillocalresidual.hh
opm/models/blackoil/blackoillocalresidualtpfa.hh
opm/models/blackoil/blackoilmicpmodules.hh
opm/models/blackoil/blackoilmicpparams.hh
opm/models/blackoil/blackoilmodel.hh
opm/models/blackoil/blackoilnewtonmethod.hh
opm/models/blackoil/blackoilnewtonmethodparameters.hh
opm/models/blackoil/blackoilonephaseindices.hh
opm/models/blackoil/blackoilpolymermodules.hh
opm/models/blackoil/blackoilpolymerparams.hh
opm/models/blackoil/blackoilprimaryvariables.hh
opm/models/blackoil/blackoilproblem.hh
opm/models/blackoil/blackoilproperties.hh
opm/models/blackoil/blackoilratevector.hh
opm/models/blackoil/blackoilsolventmodules.hh
opm/models/blackoil/blackoilsolventparams.hh
opm/models/blackoil/blackoiltwophaseindices.hh
opm/models/common/darcyfluxmodule.hh
opm/models/common/diffusionmodule.hh
opm/models/common/directionalmobility.hh
opm/models/common/energymodule.hh
opm/models/common/flux.hh
opm/models/common/forchheimerfluxmodule.hh
opm/models/common/multiphasebaseextensivequantities.hh
opm/models/common/multiphasebasemodel.hh
opm/models/common/multiphasebaseparameters.hh
opm/models/common/multiphasebaseproblem.hh
opm/models/common/multiphasebaseproperties.hh
opm/models/common/quantitycallbacks.hh
opm/models/common/transfluxmodule.hh
opm/models/discretefracture/discretefractureextensivequantities.hh
opm/models/discretefracture/discretefractureintensivequantities.hh
opm/models/discretefracture/discretefracturelocalresidual.hh
opm/models/discretefracture/discretefracturemodel.hh
opm/models/discretefracture/discretefractureprimaryvariables.hh
opm/models/discretefracture/discretefractureproblem.hh
opm/models/discretefracture/discretefractureproperties.hh
opm/models/discretefracture/fracturemapper.hh
opm/models/discretization/common/baseauxiliarymodule.hh
opm/models/discretization/common/fvbaseadlocallinearizer.hh
opm/models/discretization/common/fvbaseboundarycontext.hh
opm/models/discretization/common/fvbaseconstraints.hh
opm/models/discretization/common/fvbaseconstraintscontext.hh
opm/models/discretization/common/fvbasediscretization.hh
opm/models/discretization/common/fvbasediscretizationfemadapt.hh
opm/models/discretization/common/fvbaseelementcontext.hh
opm/models/discretization/common/fvbaseextensivequantities.hh
opm/models/discretization/common/fvbasefdlocallinearizer.hh
opm/models/discretization/common/fvbasegradientcalculator.hh
opm/models/discretization/common/fvbaseintensivequantities.hh
opm/models/discretization/common/fvbaselinearizer.hh
opm/models/discretization/common/fvbaselocalresidual.hh
opm/models/discretization/common/fvbasenewtonconvergencewriter.hh
opm/models/discretization/common/fvbasenewtonmethod.hh
opm/models/discretization/common/fvbaseparameters.hh
opm/models/discretization/common/fvbaseprimaryvariables.hh
opm/models/discretization/common/fvbaseproblem.hh
opm/models/discretization/common/fvbaseproperties.hh
opm/models/discretization/common/linearizationtype.hh
opm/models/discretization/common/restrictprolong.hh
opm/models/discretization/common/tpfalinearizer.hh
opm/models/discretization/ecfv/ecfvbaseoutputmodule.hh
opm/models/discretization/ecfv/ecfvdiscretization.hh
opm/models/discretization/ecfv/ecfvgridcommhandlefactory.hh
opm/models/discretization/ecfv/ecfvproperties.hh
opm/models/discretization/ecfv/ecfvstencil.hh
opm/models/discretization/vcfv/vcfvbaseoutputmodule.hh
opm/models/discretization/vcfv/vcfvdiscretization.hh
opm/models/discretization/vcfv/vcfvgridcommhandlefactory.hh
opm/models/discretization/vcfv/vcfvproperties.hh
opm/models/discretization/vcfv/vcfvstencil.hh
opm/models/discretization/vcfv/p1fegradientcalculator.hh
opm/models/flash/flashboundaryratevector.hh
opm/models/flash/flashextensivequantities.hh
opm/models/flash/flashindices.hh
opm/models/flash/flashintensivequantities.hh
opm/models/flash/flashlocalresidual.hh
opm/models/flash/flashmodel.hh
opm/models/flash/flashratevector.hh
opm/models/flash/flashparameters.hh
opm/models/flash/flashprimaryvariables.hh
opm/models/flash/flashproperties.hh
opm/models/immiscible/immiscibleboundaryratevector.hh
opm/models/immiscible/immiscibleextensivequantities.hh
opm/models/immiscible/immiscibleindices.hh
opm/models/immiscible/immiscibleintensivequantities.hh
opm/models/immiscible/immisciblelocalresidual.hh
opm/models/immiscible/immisciblemodel.hh
opm/models/immiscible/immiscibleprimaryvariables.hh
opm/models/immiscible/immiscibleproperties.hh
opm/models/immiscible/immiscibleratevector.hh
opm/models/io/baseoutputmodule.hh
opm/models/io/baseoutputwriter.hh
opm/models/io/basevanguard.hh
opm/models/io/cubegridvanguard.hh
opm/models/io/dgfvanguard.hh
opm/models/io/restart.hh
opm/models/io/simplexvanguard.hh
opm/models/io/structuredgridvanguard.hh
opm/models/io/unstructuredgridvanguard.hh
opm/models/io/vtkblackoilenergymodule.hh
opm/models/io/vtkblackoilmicpmodule.hh
opm/models/io/vtkblackoilmodule.hh
opm/models/io/vtkblackoilpolymermodule.hh
opm/models/io/vtkblackoilsolventmodule.hh
opm/models/io/vtkcompositionmodule.hh
opm/models/io/vtkdiffusionmodule.hh
opm/models/io/vtkdiscretefracturemodule.hh
opm/models/io/vtkenergymodule.hh
opm/models/io/vtkmultiphasemodule.hh
opm/models/io/vtkmultiwriter.hh
opm/models/io/vtkphasepresencemodule.hh
opm/models/io/vtkprimaryvarsmodule.hh
opm/models/io/vtkptflashmodule.hh
opm/models/io/vtkscalarfunction.hh
opm/models/io/vtktemperaturemodule.hh
opm/models/io/vtktensorfunction.hh
opm/models/io/vtkvectorfunction.hh
opm/models/ncp/ncpboundaryratevector.hh
opm/models/ncp/ncpextensivequantities.hh
opm/models/ncp/ncpindices.hh
opm/models/ncp/ncpintensivequantities.hh
opm/models/ncp/ncplocalresidual.hh
opm/models/ncp/ncpmodel.hh
opm/models/ncp/ncpnewtonmethod.hh
opm/models/ncp/ncpprimaryvariables.hh
opm/models/ncp/ncpproperties.hh
opm/models/ncp/ncpratevector.hh
opm/models/nonlinear/newtonmethod.hh
opm/models/nonlinear/newtonmethodparameters.hh
opm/models/nonlinear/newtonmethodproperties.hh
opm/models/nonlinear/nullconvergencewriter.hh
opm/models/parallel/gridcommhandles.hh
opm/models/parallel/mpibuffer.hh
opm/models/parallel/mpiutil.hh
opm/models/parallel/tasklets.hh
opm/models/parallel/threadedentityiterator.hh
opm/models/parallel/threadmanager.hh
opm/models/ptflash/flashindices.hh
opm/models/ptflash/flashintensivequantities.hh
opm/models/ptflash/flashlocalresidual.hh
opm/models/ptflash/flashmodel.hh
opm/models/ptflash/flashnewtonmethod.hh
opm/models/ptflash/flashparameters.hh
opm/models/ptflash/flashprimaryvariables.hh
opm/models/pvs/pvsboundaryratevector.hh
opm/models/pvs/pvsextensivequantities.hh
opm/models/pvs/pvsindices.hh
opm/models/pvs/pvsintensivequantities.hh
opm/models/pvs/pvslocalresidual.hh
opm/models/pvs/pvsmodel.hh
opm/models/pvs/pvsnewtonmethod.hh
opm/models/pvs/pvsprimaryvariables.hh
opm/models/pvs/pvsproperties.hh
opm/models/pvs/pvsratevector.hh
opm/models/richards/richardsboundaryratevector.hh
opm/models/richards/richardsextensivequantities.hh
opm/models/richards/richardsindices.hh
opm/models/richards/richardsintensivequantities.hh
opm/models/richards/richardslocalresidual.hh
opm/models/richards/richardsmodel.hh
opm/models/richards/richardsnewtonmethod.hh
opm/models/richards/richardsprimaryvariables.hh
opm/models/richards/richardsproperties.hh
opm/models/richards/richardsratevector.hh
opm/models/utils/alignedallocator.hh
opm/models/utils/basicparameters.hh
opm/models/utils/basicproperties.hh
opm/models/utils/genericguard.hh
opm/models/utils/parametersystem.hh
opm/models/utils/pffgridvector.hh
opm/models/utils/prefetch.hh
opm/models/utils/propertysystem.hh
opm/models/utils/quadraturegeometries.hh
opm/models/utils/signum.hh
opm/models/utils/simulator.hh
opm/models/utils/start.hh
opm/models/utils/timer.hh
opm/models/utils/timerguard.hh
opm/simulators/flow/ActionHandler.hpp
opm/simulators/flow/AluGridCartesianIndexMapper.hpp
opm/simulators/flow/AluGridVanguard.hpp
@ -564,33 +782,65 @@ list (APPEND PUBLIC_HEADER_FILES
opm/simulators/aquifers/BlackoilAquiferModel_impl.hpp
opm/simulators/aquifers/SupportsFaceTag.hpp
opm/simulators/linalg/amgcpr.hh
opm/simulators/linalg/bicgstabsolver.hh
opm/simulators/linalg/blacklist.hh
opm/simulators/linalg/combinedcriterion.hh
opm/simulators/linalg/convergencecriterion.hh
opm/simulators/linalg/DILU.hpp
opm/simulators/linalg/twolevelmethodcpr.hh
opm/simulators/linalg/domesticoverlapfrombcrsmatrix.hh
opm/simulators/linalg/elementborderlistfromgrid.hh
opm/simulators/linalg/extractMatrix.hpp
opm/simulators/linalg/ExtractParallelGridInformationToISTL.hpp
opm/simulators/linalg/ExtraSmoothers.hpp
opm/simulators/linalg/findOverlapRowsAndColumns.hpp
opm/simulators/linalg/fixpointcriterion.hh
opm/simulators/linalg/FlexibleSolver.hpp
opm/simulators/linalg/FlexibleSolver_impl.hpp
opm/simulators/linalg/FlowLinearSolverParameters.hpp
opm/simulators/linalg/foreignoverlapfrombcrsmatrix.hh
opm/simulators/linalg/getQuasiImpesWeights.hpp
opm/simulators/linalg/globalindices.hh
opm/simulators/linalg/GraphColoring.hpp
opm/simulators/linalg/ilufirstelement.hh
opm/simulators/linalg/ISTLSolver.hpp
opm/simulators/linalg/istlpreconditionerwrappers.hh
opm/simulators/linalg/istlsolverwrappers.hh
opm/simulators/linalg/istlsparsematrixadapter.hh
opm/simulators/linalg/linalgparameters.hh
opm/simulators/linalg/linalgproperties.hh
opm/simulators/linalg/linearsolverreport.hh
opm/simulators/linalg/matrixblock.hh
opm/simulators/linalg/MatrixMarketSpecializations.hpp
opm/simulators/linalg/nullborderlistmanager.hh
opm/simulators/linalg/overlappingbcrsmatrix.hh
opm/simulators/linalg/overlappingblockvector.hh
opm/simulators/linalg/overlappingoperator.hh
opm/simulators/linalg/overlappingpreconditioner.hh
opm/simulators/linalg/overlappingscalarproduct.hh
opm/simulators/linalg/overlaptypes.hh
opm/simulators/linalg/OwningBlockPreconditioner.hpp
opm/simulators/linalg/OwningTwoLevelPreconditioner.hpp
opm/simulators/linalg/parallelamgbackend.hh
opm/simulators/linalg/parallelbasebackend.hh
opm/simulators/linalg/parallelbicgstabbackend.hh
opm/simulators/linalg/parallelistlbackend.hh
opm/simulators/linalg/ParallelIstlInformation.hpp
opm/simulators/linalg/ParallelOverlappingILU0.hpp
opm/simulators/linalg/ParallelRestrictedAdditiveSchwarz.hpp
opm/simulators/linalg/ParallelIstlInformation.hpp
opm/simulators/linalg/PressureSolverPolicy.hpp
opm/simulators/linalg/PressureTransferPolicy.hpp
opm/simulators/linalg/PreconditionerFactory.hpp
opm/simulators/linalg/PreconditionerWithUpdate.hpp
opm/simulators/linalg/PropertyTree.hpp
opm/simulators/linalg/residreductioncriterion.hh
opm/simulators/linalg/SmallDenseMatrixUtils.hpp
opm/simulators/linalg/setupPropertyTree.hpp
opm/simulators/linalg/superlubackend.hh
opm/simulators/linalg/twolevelmethodcpr.hh
opm/simulators/linalg/vertexborderlistfromgrid.hh
opm/simulators/linalg/weightedresidreductioncriterion.hh
opm/simulators/linalg/WellOperators.hpp
opm/simulators/linalg/WriteSystemMatrixHelper.hpp
opm/simulators/linalg/extractMatrix.hpp
opm/simulators/linalg/findOverlapRowsAndColumns.hpp
opm/simulators/linalg/getQuasiImpesWeights.hpp
opm/simulators/linalg/setupPropertyTree.hpp
opm/simulators/timestepping/AdaptiveSimulatorTimer.hpp
opm/simulators/timestepping/AdaptiveTimeStepping.hpp
opm/simulators/timestepping/ConvergenceReport.hpp
@ -754,10 +1004,62 @@ if(HDF5_FOUND)
endif()
list (APPEND EXAMPLE_SOURCE_FILES
examples/art2dgf.cpp
examples/co2injection_flash_ecfv.cpp
examples/co2injection_flash_ni_ecfv.cpp
examples/co2injection_flash_ni_vcfv.cpp
examples/co2injection_flash_vcfv.cpp
examples/co2injection_immiscible_ecfv.cpp
examples/co2injection_immiscible_ni_ecfv.cpp
examples/co2injection_immiscible_ni_vcfv.cpp
examples/co2injection_immiscible_vcfv.cpp
examples/co2injection_ncp_ecfv.cpp
examples/co2injection_ncp_ni_ecfv.cpp
examples/co2injection_ncp_ni_vcfv.cpp
examples/co2injection_ncp_vcfv.cpp
examples/co2injection_pvs_ecfv.cpp
examples/co2injection_pvs_ni_ecfv.cpp
examples/co2injection_pvs_ni_vcfv.cpp
examples/co2_ptflash_ecfv.cpp
examples/co2injection_pvs_vcfv.cpp
examples/cuvette_pvs.cpp
examples/diffusion_flash.cpp
examples/diffusion_ncp.cpp
examples/diffusion_pvs.cpp
examples/groundwater_immiscible.cpp
examples/infiltration_pvs.cpp
examples/lens_immiscible_ecfv_ad.cpp
examples/lens_immiscible_ecfv_ad_23.cpp
examples/lens_immiscible_ecfv_ad_trans.cpp
examples/lens_immiscible_vcfv_ad.cpp
examples/lens_immiscible_vcfv_fd.cpp
examples/lens_richards_ecfv.cpp
examples/lens_richards_vcfv.cpp
examples/obstacle_immiscible.cpp
examples/obstacle_ncp.cpp
examples/obstacle_pvs.cpp
examples/outflow_pvs.cpp
examples/powerinjection_darcy_ad.cpp
examples/powerinjection_darcy_fd.cpp
examples/powerinjection_forchheimer_ad.cpp
examples/powerinjection_forchheimer_fd.cpp
examples/reservoir_blackoil_ecfv.cpp
examples/reservoir_blackoil_vcfv.cpp
examples/reservoir_ncp_ecfv.cpp
examples/reservoir_ncp_vcfv.cpp
examples/printvfp.cpp
examples/tutorial1.cpp
examples/waterair_pvs_ni.cpp
)
if(HDF5_FOUND)
list (APPEND EXAMPLE_SOURCE_FILES
examples/opmrst_inspect.cpp
)
endif()
if(dune-alugrid_FOUND)
list (APPEND EXAMPLE_SOURCE_FILES
examples/finger_immiscible_ecfv.cpp
examples/finger_immiscible_vcfv.cpp
examples/fracture_discretefracture.cpp
)
endif()

View File

@ -10,4 +10,4 @@ Label: 2024.10-pre
Maintainer: atgeirr@sintef.no
MaintainerName: Atgeirr F. Rasmussen
Url: http://opm-project.org
Depends: dune-istl (>= 2.7) opm-common opm-grid opm-models
Depends: dune-istl (>= 2.7) opm-common opm-grid

View File

@ -5,13 +5,11 @@
declare -a upstreams
upstreams=(opm-common
opm-grid
opm-models)
opm-grid)
declare -A upstreamRev
upstreamRev[opm-common]=master
upstreamRev[opm-grid]=master
upstreamRev[opm-models]=master
if grep -q "opm-common=" <<< $ghprbCommentBody
then

117
modelTests.cmake Normal file
View File

@ -0,0 +1,117 @@
opm_set_test_driver(${PROJECT_SOURCE_DIR}/tests/run-vtu-test.sh "--simulation")
opm_add_test(art2dgf
NO_COMPILE
EXE_NAME $<TARGET_FILE:art2dgf>
DRIVER_ARGS --plain
TEST_ARGS data/fracture-raw.art
WORKING_DIRECTORY ${PROJECT_BINARY_DIR}/tests)
foreach(tgt lens_immiscible_ecfv_ad
lens_immiscible_ecfv_ad_23
lens_immiscible_ecfv_ad_trans
lens_immiscible_vcfv_ad
lens_immiscible_vcfv_fd)
opm_add_test(${tgt}
NO_COMPILE
EXE_NAME $<TARGET_FILE:${tgt}>
TEST_ARGS --end-time=3000
WORKING_DIRECTORY ${PROJECT_BINARY_DIR}/tests)
endforeach()
opm_add_test(waterair_pvs_ni
NO_COMPILE
EXE_NAME $<TARGET_FILE:waterair_pvs_ni>
TEST_ARGS --grid-global-refinements=1
WORKING_DIRECTORY ${PROJECT_BINARY_DIR}/tests)
set(PLAIN_TGT
co2injection_flash_ecfv
co2injection_flash_ni_ecfv
co2injection_flash_ni_vcfv
co2injection_flash_vcfv
co2injection_immiscible_ecfv
co2injection_immiscible_ni_ecfv
co2injection_immiscible_ni_vcfv
co2injection_immiscible_vcfv
co2injection_ncp_ecfv
co2injection_ncp_ni_vcfv
co2injection_ncp_vcfv
co2injection_pvs_ecfv
co2injection_pvs_ni_vcfv
co2injection_pvs_vcfv
co2injection_ncp_ni_ecfv
co2injection_pvs_ni_ecfv
co2_ptflash_ecfv
cuvette_pvs
diffusion_flash
diffusion_ncp
diffusion_pvs
groundwater_immiscible
infiltration_pvs
lens_richards_ecfv
lens_richards_vcfv
obstacle_immiscible
obstacle_ncp
obstacle_pvs
outflow_pvs
powerinjection_darcy_ad
powerinjection_darcy_fd
powerinjection_forchheimer_ad
powerinjection_forchheimer_fd
tutorial1
)
if(dune-alugrid_FOUND)
list(APPEND PLAIN_TGT
finger_immiscible_ecfv
finger_immiscible_vcfv
)
endif()
foreach(tgt ${PLAIN_TGT})
opm_add_test(${tgt}
NO_COMPILE
EXE_NAME $<TARGET_FILE:${tgt}>
WORKING_DIRECTORY ${PROJECT_BINARY_DIR}/tests)
endforeach()
foreach(tgt reservoir_blackoil_ecfv
reservoir_blackoil_vcfv
reservoir_ncp_ecfv
reservoir_ncp_vcfv)
opm_add_test(${tgt}
NO_COMPILE
EXE_NAME $<TARGET_FILE:${tgt}>
TEST_ARGS --end-time=8750000
WORKING_DIRECTORY ${PROJECT_BINARY_DIR}/tests)
endforeach()
if(dune-alugrid_FOUND)
opm_add_test(fracture_discretefracture
NO_COMPILE
EXE_NAME $<TARGET_FILE:fracture_discretefracture>
TEST_ARGS --end-time=400
WORKING_DIRECTORY ${PROJECT_BINARY_DIR}/tests)
endif()
if(dune-alugrid_FOUND AND dune-fem_FOUND)
opm_add_test(finger_immiscible_ecfv_adaptive
NO_COMPILE
EXE_NAME $<TARGET_FILE:finger_immiscible_ecfv>
TEST_ARGS --enable-grid-adaptation=true --end-time=25e3 --enable-async-vtk-output=false
WORKING_DIRECTORY ${PROJECT_BINARY_DIR}/tests)
endif()
opm_add_test(obstacle_immiscible_parameters
NO_COMPILE
EXE_NAME $<TARGET_FILE:obstacle_immiscible>
DRIVER_ARGS --parameters
WORKING_DIRECTORY ${PROJECT_BINARY_DIR}/tests)
opm_add_test(obstacle_pvs_restart
NO_COMPILE
EXE_NAME $<TARGET_FILE:obstacle_pvs>
TEST_ARGS --pvs-verbosity=2 --end-time=30000
DRIVER_ARGS --restart
WORKING_DIRECTORY ${PROJECT_BINARY_DIR}/tests)

View File

@ -14,6 +14,7 @@ set (opm-simulators_CONFIG_VAR
HAVE_ROCALUTION
HAVE_ROCSPARSE
HAVE_SUITESPARSE_UMFPACK_H
HAVE_DUNE_COMMON
HAVE_DUNE_ISTL
DUNE_ISTL_WITH_CHECKING
DUNE_ISTL_VERSION_MAJOR
@ -25,6 +26,7 @@ set (opm-simulators_CONFIG_VAR
USE_HIP
USE_TRACY
FLOW_INSTANTIATE_FLOAT
HAVE_FLOATING_POINT_FROM_CHARS
)
# dependencies
@ -37,6 +39,8 @@ set (opm-simulators_DEPS
# DUNE prerequisites
"dune-common REQUIRED"
"dune-istl REQUIRED"
"dune-alugrid"
"dune-fem"
# matrix library
"BLAS REQUIRED"
"LAPACK REQUIRED"
@ -54,7 +58,6 @@ set (opm-simulators_DEPS
# OPM dependency
"opm-common REQUIRED"
"opm-grid REQUIRED"
"opm-models REQUIRED"
"Damaris 1.9"
"HDF5"
"Tracy"

View File

@ -182,3 +182,15 @@ opm_add_test(test_rstconv_parallel
PROCESSORS
4
)
opm_add_test(test_mpiutil
CONDITION
MPI_FOUND AND Boost_UNIT_TEST_FRAMEWORK_FOUND
SOURCES
tests/models/test_mpiutil.cpp
DRIVER_ARGS
-n 4
-b ${PROJECT_BINARY_DIR}
PROCESSORS
4
)

View File

@ -40,7 +40,7 @@ TEST_TYPE="$1"
if test "$2" != "-e"; then
echo "Expects second option to be -e"
fi
TEST_NAME="$3"
TEST_BINARY="$3"
TEST_ARGS="${@:5:100}"
# make sure we have at least 2 parameters
@ -51,27 +51,6 @@ if test "$#" -lt 2; then
exit 1
fi
if test "$TEST_TYPE" != "--spe1"; then
# find the binary in the its folder
TEST_BINARY=$(find . -type f -perm -0111 -name "$TEST_NAME")
NUM_BINARIES=$(echo "$TEST_BINARY" | wc -w | tr -d '[:space:]')
if test "$NUM_BINARIES" != "1"; then
echo "No binary file found or binary file is non-unique (is: $TEST_BINARY)"
echo
usage
exit 1
fi
# make sure the binary is of the test is present
if ! test -x "$TEST_BINARY"; then
echo "$TEST_NAME does not exist or is not executable"
echo
usage
exit 1
fi
fi
#run the test
echo "######################"
echo "# Running test '$TEST_NAME'"