mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-25 18:55:30 -06:00
Remove python tests.
This commit is contained in:
parent
e223c03647
commit
e999ad7a98
@ -130,22 +130,9 @@ endif (NOT EIGEN3_FOUND)
|
||||
if (HAVE_OPM_DATA)
|
||||
add_test( NAME flow_SPE1CASE2 COMMAND flow_legacy ${OPM_DATA_ROOT}/spe1/SPE1CASE2.DATA )
|
||||
add_test( NAME flow_sequential_SPE1 COMMAND flow_sequential ${OPM_DATA_ROOT}/spe1/SPE1CASE1.DATA )
|
||||
|
||||
add_test( NAME flow_MSW2DH__ COMMAND flow_multisegment ${OPM_DATA_ROOT}/wells_test_suite/MSW/2D_H__/2D_H__.DATA)
|
||||
|
||||
if (ERT_PYTHON_PATH)
|
||||
include(OpmPythonTest)
|
||||
|
||||
opm_add_python_test( check_INIT_SPE1 ${PROJECT_SOURCE_DIR}/tests/compare_INIT.py $<TARGET_FILE:flow_legacy> ${OPM_DATA_ROOT}/spe1/SPE1CASE1.DATA ${OPM_DATA_ROOT}/spe1/eclipse-simulation/SPE1CASE1.INIT
|
||||
TRANX TRANY TRANZ PORO PORV PERMX DX DY DZ DEPTH PVTNUM SATNUM EQLNUM FIPNUM )
|
||||
opm_add_python_test( check_INIT_NORNE ${PROJECT_SOURCE_DIR}/tests/compare_INIT.py $<TARGET_FILE:flow_legacy> ${OPM_DATA_ROOT}/norne/NORNE_ATW2013.DATA ${OPM_DATA_ROOT}/norne/ECL.2014.2/NORNE_ATW2013.INIT PORO PORV PERMX )
|
||||
|
||||
opm_add_python_test( check_RESTART_SPE1CASE2
|
||||
${PROJECT_SOURCE_DIR}/tests/check_RESTART.py
|
||||
$<TARGET_FILE:flow_legacy> ${OPM_DATA_ROOT}/spe1/SPE1CASE2.DATA ${OPM_DATA_ROOT}/spe1/SPE1CASE2_RESTART.DATA )
|
||||
endif()
|
||||
|
||||
include (${CMAKE_CURRENT_SOURCE_DIR}/compareECLFiles.cmake)
|
||||
include (${CMAKE_CURRENT_SOURCE_DIR}/compareECLFiles.cmake)
|
||||
endif()
|
||||
|
||||
# create a symbolic link from flow to flow_legacy
|
||||
|
@ -1,40 +0,0 @@
|
||||
#!/usr/bin/env python
|
||||
import subprocess
|
||||
import sys
|
||||
import os.path
|
||||
|
||||
from ert.ecl import EclFile
|
||||
from ert.test import TestAreaContext
|
||||
|
||||
|
||||
def compare_files( flow_file , ref_file):
|
||||
flow = EclFile( flow_file )
|
||||
ref = EclFile( ref_file )
|
||||
|
||||
for kw in ["PRESSURE" , "SWAT" , "SGAS" , "RS" , "RV"]:
|
||||
flow_kw = flow[kw][-1]
|
||||
ref_kw = ref[kw][-1]
|
||||
|
||||
if not flow_kw.equal_numeric( ref_kw , abs_epsilon = 0, rel_epsilon = 1e-3 ):
|
||||
first_different = flow_kw.firstDifferent( ref_kw , abs_epsilon = 0, rel_epsilon = 1e-3 )
|
||||
sys.exit("Keyword:%s was different in flow simulation and reference. First difference in index:%d" % (kw , first_different))
|
||||
|
||||
|
||||
#-----------------------------------------------------------------
|
||||
# Small script running flow twice, once with restart and normal run
|
||||
# from step 0. The final state of the two runs is compared.
|
||||
|
||||
flow = sys.argv[1]
|
||||
full_deck = sys.argv[2]
|
||||
restart_deck = sys.argv[3]
|
||||
|
||||
with TestAreaContext("flow_init") as ta:
|
||||
ta.copy_file( full_deck )
|
||||
ta.copy_file( restart_deck )
|
||||
|
||||
subprocess.check_call( [flow , os.path.basename( full_deck ) ] )
|
||||
subprocess.check_call( [flow , os.path.basename( restart_deck ) ] )
|
||||
|
||||
compare_files( os.path.splitext( os.path.basename( full_deck ) )[0] + ".UNRST" , os.path.splitext( os.path.basename( restart_deck ) )[0] + ".UNRST")
|
||||
|
||||
|
@ -1,41 +0,0 @@
|
||||
#!/usr/bin/env python
|
||||
import subprocess
|
||||
import sys
|
||||
import os.path
|
||||
|
||||
from ert.ecl import EclFile
|
||||
from ert.test import TestAreaContext
|
||||
|
||||
|
||||
def compare_files( flow_file , ref_file , kw_list):
|
||||
abs_epsilon = 0
|
||||
rel_epsilon = 1e-2
|
||||
flow = EclFile( flow_file )
|
||||
ref = EclFile( ref_file )
|
||||
|
||||
for kw in kw_list:
|
||||
flow_kw = flow[kw][0]
|
||||
ref_kw = ref[kw][0]
|
||||
|
||||
if not flow_kw.equal_numeric( ref_kw , abs_epsilon = abs_epsilon , rel_epsilon = rel_epsilon):
|
||||
first_different = ref_kw.firstDifferent( flow_kw , abs_epsilon = abs_epsilon , rel_epsilon = rel_epsilon)
|
||||
sys.exit("Keyword:%s was different in flow simulation and reference. Index of first difference: %d" % (kw , first_different))
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
flow = sys.argv[1]
|
||||
data_file = sys.argv[2]
|
||||
ref_init_file = sys.argv[3]
|
||||
kw_list = sys.argv[4:]
|
||||
|
||||
with TestAreaContext("flow_init") as ta:
|
||||
subprocess.check_call( [flow , "nosim=true" , data_file ] )
|
||||
|
||||
compare_files( os.path.splitext( os.path.basename( data_file ) )[0] + ".INIT" , ref_init_file , kw_list)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user