Added (not run) test for PVTW.

This commit is contained in:
Joakim Hove 2016-11-29 14:07:57 +01:00
parent 72d699473a
commit 47a13e0579
2 changed files with 26 additions and 0 deletions

View File

@ -70,3 +70,7 @@ PVTG
0.00000314 0.030249 0.01383
0.00000000 0.030245 0.01383 /
/
PVTW
247.7 1.03665 0.41726E-04 0.29120 0.99835E-04 /

View File

@ -107,6 +107,7 @@ BOOST_AUTO_TEST_CASE(Test_PVTX) {
BOOST_CHECK_CLOSE(28.19 , ecl_kw_iget_double( tab , rs_offset + 1), 1e-6 );
}
/* PVTG */
{
int offset = ecl_kw_iget_int( tabdims , TABDIMS_IBPVTG_OFFSET_ITEM );
@ -124,6 +125,27 @@ BOOST_AUTO_TEST_CASE(Test_PVTX) {
BOOST_CHECK_CLOSE(20.0 , ecl_kw_iget_double( tab , pg_offset ), 1e-6 );
BOOST_CHECK_CLOSE(40.0 , ecl_kw_iget_double( tab , pg_offset + 1), 1e-6 );
}
/* PVTW */
/*
This test code should be OK; however it turns out the PVTW
tabular data is not really internalized in the EclipseState
object so it is commented out for now.
{
int offset = ecl_kw_iget_int( tabdims , TABDIMS_IBPVTW_OFFSET_ITEM );
int column_stride = ecl_kw_iget_int( tabdims , TABDIMS_NTPVTW_ITEM );
BOOST_CHECK_CLOSE( 247.7 , ecl_kw_iget_double( tab , offset ));
BOOST_CHECK_CLOSE( 1.0 / 1.03665 , ecl_kw_iget_double( tab , offset + column_stride));
BOOST_CHECK_CLOSE( 0.41726E-04 , ecl_kw_iget_double( tab , offset + 2 * column_stride));
BOOST_CHECK_CLOSE( 1.03665 / 0.29120 , ecl_kw_iget_double( tab , offset + 3 * column_stride));
// For the last column - WATER_VISCOSIBILITY there is
// clearly a transform involved; not really clear which
// transform this is. This column is therefor not tested.
}
*/
ecl_file_close( f );
}
}