Handle GDFILE with grid without actnum
This commit is contained in:
parent
7002faba3b
commit
a1f8585395
@ -466,6 +466,8 @@ list (APPEND TEST_DATA_FILES
|
||||
)
|
||||
if(ENABLE_ECL_OUTPUT)
|
||||
list (APPEND TEST_DATA_FILES
|
||||
tests/GDFILE_NO_ACTNUM.DATA
|
||||
tests/EGRID_NO_ACTNUM.FEGRID
|
||||
tests/BASE_SIM.DATA
|
||||
tests/BASE_SIM_THPRES.DATA
|
||||
tests/RESTART_SIM.DATA
|
||||
|
@ -425,7 +425,8 @@ EclipseGrid::EclipseGrid(const Deck& deck, const int * actnum)
|
||||
if ((egridfile.hasKey("ACTNUM")) && (m_useActnumFromGdfile)) {
|
||||
const std::vector<int>& actnum = egridfile.get<int>("ACTNUM");
|
||||
resetACTNUM( actnum );
|
||||
}
|
||||
} else
|
||||
resetACTNUM( );
|
||||
|
||||
if (egridfile.hasKey("MAPAXES"))
|
||||
this->m_mapaxes = std::make_optional<MapAxes>(egridfile);
|
||||
@ -1399,7 +1400,7 @@ std::vector<double> EclipseGrid::createDVector(const std::array<int,3>& dims, st
|
||||
}
|
||||
|
||||
size_t EclipseGrid::getNumActive( ) const {
|
||||
return m_nactive;
|
||||
return this->m_nactive;
|
||||
}
|
||||
|
||||
bool EclipseGrid::allActive( ) const {
|
||||
|
71
tests/EGRID_NO_ACTNUM.FEGRID
Normal file
71
tests/EGRID_NO_ACTNUM.FEGRID
Normal file
@ -0,0 +1,71 @@
|
||||
'FILEHEAD' 100 'INTE'
|
||||
3 2007 0 3 0 0
|
||||
1 0 0 0 0 0
|
||||
0 0 0 0 0 0
|
||||
0 0 0 0 0 0
|
||||
0 0 0 0 0 0
|
||||
0 0 0 0 0 0
|
||||
0 0 0 0 0 0
|
||||
0 0 0 0 0 0
|
||||
0 0 0 0 0 0
|
||||
0 0 0 0 0 0
|
||||
0 0 0 0 0 0
|
||||
0 0 0 0 0 0
|
||||
0 0 0 0 0 0
|
||||
0 0 0 0 0 0
|
||||
0 0 0 0 0 0
|
||||
0 0 0 0 0 0
|
||||
0 0 0 0
|
||||
'GRIDUNIT' 2 'CHAR'
|
||||
'METRES ' ' '
|
||||
'GRIDHEAD' 100 'INTE'
|
||||
1 2 2 2 0 0
|
||||
0 0 0 0 0 0
|
||||
0 0 0 0 0 0
|
||||
0 0 0 0 0 0
|
||||
1 1 0 0 0 0
|
||||
0 0 0 0 0 0
|
||||
0 0 0 0 0 0
|
||||
0 0 0 0 0 0
|
||||
0 0 0 0 0 0
|
||||
0 0 0 0 0 0
|
||||
0 0 0 0 0 0
|
||||
0 0 0 0 0 0
|
||||
0 0 0 0 0 0
|
||||
0 0 0 0 0 0
|
||||
0 0 0 0 0 0
|
||||
0 0 0 0 0 0
|
||||
0 0 0 0
|
||||
'COORD ' 54 'REAL'
|
||||
0.00000000E+00 0.00000000E+00 0.00000000E+00 0.00000000E+00
|
||||
0.00000000E+00 3.00000000E+00 1.00000000E+00 0.00000000E+00
|
||||
0.00000000E+00 1.00000000E+00 0.00000000E+00 3.00000000E+00
|
||||
2.00000000E+00 0.00000000E+00 0.00000000E+00 2.00000000E+00
|
||||
0.00000000E+00 3.00000000E+00 0.00000000E-00 1.00000000E+00
|
||||
0.00000000E+00 0.00000000E+00 1.00000000E+00 3.00000000E+00
|
||||
1.00000000E+00 1.00000000E+00 0.00000000E+00 1.00000000E+00
|
||||
1.00000000E+00 3.00000000E+00 2.00000000E+00 1.00000000E+00
|
||||
0.00000000E+00 2.00000000E+00 1.00000000E+00 3.00000000E+00
|
||||
0.00000000E-00 2.00000000E+00 0.00000000E+00 0.00000000E+00
|
||||
2.00000000E+00 3.00000000E+00 1.00000000E+00 2.00000000E+00
|
||||
0.00000000E+00 1.00000000E+00 2.00000000E+00 3.00000000E+00
|
||||
2.00000000E+00 2.00000000E+00 0.00000000E+00 2.00000000E+00
|
||||
2.00000000E+00 3.00000000E+00
|
||||
'ZCORN ' 64 'REAL'
|
||||
0.00000000E+00 0.00000000E+00 0.00000000E+00 0.00000000E+00
|
||||
0.00000000E+00 0.00000000E+00 0.00000000E+00 0.00000000E+00
|
||||
0.00000000E+00 0.00000000E+00 0.00000000E+00 0.00000000E+00
|
||||
0.00000000E+00 0.00000000E+00 0.00000000E+00 0.00000000E+00
|
||||
1.00000000E+00 1.00000000E+00 1.00000000E+00 1.00000000E+00
|
||||
1.00000000E+00 1.00000000E+00 1.00000000E+00 1.00000000E+00
|
||||
1.00000000E+00 1.00000000E+00 1.00000000E+00 1.00000000E+00
|
||||
1.00000000E+00 1.00000000E+00 1.00000000E+00 1.00000000E+00
|
||||
1.00000000E+00 1.00000000E+00 1.00000000E+00 1.00000000E+00
|
||||
1.00000000E+00 1.00000000E+00 1.00000000E+00 1.00000000E+00
|
||||
1.00000000E+00 1.00000000E+00 1.00000000E+00 1.00000000E+00
|
||||
1.00000000E+00 1.00000000E+00 1.00000000E+00 1.00000000E+00
|
||||
2.00000000E+00 2.00000000E+00 2.00000000E+00 2.00000000E+00
|
||||
2.00000000E+00 2.00000000E+00 2.00000000E+00 2.00000000E+00
|
||||
2.00000000E+00 2.00000000E+00 2.00000000E+00 2.00000000E+00
|
||||
2.00000000E+00 2.00000000E+00 2.00000000E+00 2.00000000E+00
|
||||
'ENDGRID ' 0 'INTE'
|
65
tests/GDFILE_NO_ACTNUM.DATA
Normal file
65
tests/GDFILE_NO_ACTNUM.DATA
Normal file
@ -0,0 +1,65 @@
|
||||
RUNSPEC
|
||||
|
||||
DIMENS
|
||||
2 2 2 /
|
||||
|
||||
OIL
|
||||
|
||||
WATER
|
||||
|
||||
NOSIM
|
||||
|
||||
WELLDIMS
|
||||
0 /
|
||||
|
||||
EQLDIMS
|
||||
/
|
||||
|
||||
TABDIMS
|
||||
1* 1* 30 30 /
|
||||
|
||||
GRID
|
||||
|
||||
GDFILE
|
||||
'EGRID_NO_ACTNUM.FEGRID' F /
|
||||
|
||||
PORO
|
||||
8*0.1 /
|
||||
|
||||
PERMX
|
||||
8*150 /
|
||||
|
||||
PERMY
|
||||
8*150 /
|
||||
|
||||
PERMZ
|
||||
8*15 /
|
||||
|
||||
PROPS
|
||||
|
||||
SWOF
|
||||
0.0 0.0 1.0 0.0 1.0 1.0 0 0.0 /
|
||||
|
||||
DENSITY
|
||||
3*40 /
|
||||
|
||||
PVTW
|
||||
1000 1.0 0.0 0.0 0.0 /
|
||||
|
||||
PVTO
|
||||
0.0 500.0 1.0 0.1 5000.0 0.0 0.2 /
|
||||
3.0 1500.0 2.0 0.1 5000.0 0.0 0.2 /
|
||||
/
|
||||
|
||||
SOLUTION
|
||||
|
||||
EQUIL
|
||||
3*1000 0 1000 0 0 0 0 /
|
||||
|
||||
SUMMARY
|
||||
|
||||
SCHEDULE
|
||||
|
||||
NOSIM
|
||||
|
||||
END
|
@ -30,6 +30,9 @@
|
||||
#include <opm/common/utility/FileSystem.hpp>
|
||||
#include <opm/common/utility/OpmInputError.hpp>
|
||||
#include <opm/parser/eclipse/Units/Units.hpp>
|
||||
#include <opm/parser/eclipse/Parser/Parser.hpp>
|
||||
#include <opm/parser/eclipse/Deck/Deck.hpp>
|
||||
#include <opm/parser/eclipse/EclipseState/EclipseState.hpp>
|
||||
|
||||
#define BOOST_TEST_MODULE EclipseGridTests
|
||||
#include <boost/test/unit_test.hpp>
|
||||
@ -2975,4 +2978,10 @@ EDIT
|
||||
BOOST_CHECK_CLOSE(grid.getCellVolume(0), 1.0, 1e-6);
|
||||
}
|
||||
|
||||
BOOST_AUTO_TEST_CASE(GDFILE_NO_ACTNUM) {
|
||||
Opm::Parser parser;
|
||||
auto deck = parser.parseFile("GDFILE_NO_ACTNUM.DATA");
|
||||
BOOST_CHECK_NO_THROW( Opm::EclipseState(deck));
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user