Skip to content

Commit 6e4f0fe

Browse files
committed
add imported opm-models code to buildsystem
1 parent bc46647 commit 6e4f0fe

File tree

8 files changed

+481
-38
lines changed

8 files changed

+481
-38
lines changed

CMakeLists.txt

Lines changed: 38 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -371,6 +371,44 @@ opm_add_test(test_tuning_tsinit_nextstep
371371
${Boost_UNIT_TEST_FRAMEWORK_LIBRARY} opmcommon
372372
ONLY_COMPILE)
373373

374+
# this test is identical to the simulation of the lens problem that
375+
# uses the element centered finite volume discretization in
376+
# conjunction with automatic differentiation
377+
# (lens_immiscible_ecfv_ad). The only difference is that it uses
378+
# multiple compile units in order to ensure that eWoms code can be
379+
# used within libraries that use the same type tag within multiple
380+
# compile units.
381+
opm_add_test(lens_immiscible_ecfv_ad_mcu
382+
SOURCES
383+
examples/lens_immiscible_ecfv_ad_cu1.cpp
384+
examples/lens_immiscible_ecfv_ad_cu2.cpp
385+
examples/lens_immiscible_ecfv_ad_main.cpp
386+
LIBRARIES
387+
opmsimulators opmcommon
388+
ONLY_COMPILE)
389+
390+
if(QuadMath_FOUND)
391+
foreach(tapp co2injection_flash_ni_ecfv
392+
co2injection_flash_ni_vcfv
393+
co2injection_flash_ecfv
394+
co2injection_flash_vcfv)
395+
opm_add_test(${tapp}_quad
396+
EXE_NAME ${tapp}_quad
397+
SOURCES
398+
examples/${tapp}.cpp
399+
ONLY_COMPILE)
400+
target_link_libraries(${tapp}_quad QuadMath::QuadMath)
401+
target_compile_definitions(${tapp}_quad PRIVATE HAVE_QUAD=1)
402+
endforeach()
403+
endif()
404+
405+
target_sources(test_outputdir PRIVATE $<TARGET_OBJECTS:moduleVersion>)
406+
target_sources(test_equil PRIVATE $<TARGET_OBJECTS:moduleVersion>)
407+
target_sources(test_RestartSerialization PRIVATE $<TARGET_OBJECTS:moduleVersion>)
408+
target_sources(test_glift1 PRIVATE $<TARGET_OBJECTS:moduleVersion>)
409+
410+
include (${CMAKE_CURRENT_SOURCE_DIR}/modelTests.cmake)
411+
374412
if (HAVE_OPM_TESTS)
375413
include (${CMAKE_CURRENT_SOURCE_DIR}/compareECLFiles.cmake)
376414
endif()
@@ -379,11 +417,6 @@ if(MPI_FOUND)
379417
include (${CMAKE_CURRENT_SOURCE_DIR}/parallelUnitTests.cmake)
380418
endif()
381419

382-
target_sources(test_outputdir PRIVATE $<TARGET_OBJECTS:moduleVersion>)
383-
target_sources(test_equil PRIVATE $<TARGET_OBJECTS:moduleVersion>)
384-
target_sources(test_RestartSerialization PRIVATE $<TARGET_OBJECTS:moduleVersion>)
385-
target_sources(test_glift1 PRIVATE $<TARGET_OBJECTS:moduleVersion>)
386-
387420
include(OpmBashCompletion)
388421

389422
if (NOT BUILD_FLOW)

0 commit comments

Comments
 (0)