Added basic support for PLYADSS keyword.
This commit is contained in:
@@ -8,7 +8,7 @@ foreach(tapp CheckDeckValidity IntegrationTests ParseWellProbe
|
||||
ParseRSVD ParsePVTG ParsePVTO ParseSWOF BoxTest
|
||||
ParseMULTREGT ParseSGOF ParseSLGOF EclipseGridCreateFromDeck NNCTests
|
||||
ResinsightTest IOConfigIntegrationTest
|
||||
Polymer)
|
||||
Polymer ParsePLYADSS)
|
||||
opm_add_test(run${tapp} SOURCES ${tapp}.cpp
|
||||
LIBRARIES opmparser ${Boost_LIBRARIES})
|
||||
endforeach()
|
||||
|
||||
42
opm/parser/eclipse/IntegrationTests/ParsePLYADSS.cpp
Normal file
42
opm/parser/eclipse/IntegrationTests/ParsePLYADSS.cpp
Normal file
@@ -0,0 +1,42 @@
|
||||
/*
|
||||
Copyright 2013 Statoil ASA.
|
||||
|
||||
This file is part of the Open Porous Media project (OPM).
|
||||
|
||||
OPM is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
OPM is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with OPM. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#define BOOST_TEST_MODULE ParsePLYVISC
|
||||
#include <math.h>
|
||||
|
||||
#include <boost/test/unit_test.hpp>
|
||||
#include <boost/test/test_tools.hpp>
|
||||
|
||||
#include <opm/parser/eclipse/Deck/Deck.hpp>
|
||||
#include <opm/parser/eclipse/Parser/Parser.hpp>
|
||||
#include <opm/parser/eclipse/Parser/ParseMode.hpp>
|
||||
#include <opm/parser/eclipse/EclipseState/EclipseState.hpp>
|
||||
|
||||
using namespace Opm;
|
||||
|
||||
|
||||
|
||||
BOOST_AUTO_TEST_CASE( PARSE_PLYADSS_OK) {
|
||||
ParserPtr parser(new Parser());
|
||||
boost::filesystem::path deckFile("testdata/integration_tests/POLYMER/plyadss.data");
|
||||
DeckPtr deck = parser->parseFile(deckFile.string() , ParseMode());
|
||||
DeckKeywordConstPtr kw = deck->getKeyword("PLYADSS");
|
||||
|
||||
BOOST_CHECK_EQUAL( kw->size() , 11U );
|
||||
}
|
||||
4
opm/parser/share/keywords/000_Eclipse100/P/PLYADSS
Normal file
4
opm/parser/share/keywords/000_Eclipse100/P/PLYADSS
Normal file
@@ -0,0 +1,4 @@
|
||||
{"name" : "PLYADSS" , "sections" : ["PROPS"] , "num_tables" : {"keyword" : "TABDIMS" , "item" : "NTSFUN"},
|
||||
"items" : [{"name" : "POLYMER_C" , "value_type" : "DOUBLE" , "dimension" : "PolymerDensity"},
|
||||
{"name" : "POLYMER_ADS_C" , "value_type" : "DOUBLE" , "dimension" : "1"},
|
||||
{"name" : "DATA" , "value_type" : "DOUBLE" , "size_type" : "ALL"}]}
|
||||
18
testdata/integration_tests/POLYMER/plyadss.data
vendored
Normal file
18
testdata/integration_tests/POLYMER/plyadss.data
vendored
Normal file
@@ -0,0 +1,18 @@
|
||||
TABDIMS
|
||||
-- NTSFUN NTPVT NSSFUN NPPVT NTFIP NRPVT
|
||||
3 1 100 50 1 /
|
||||
|
||||
PLYADSS
|
||||
0.00 0.0 0 1 2 3 /
|
||||
1.00 1.0 0 10 20 30 /
|
||||
2.00 2.0 0 100 200 300 /
|
||||
/
|
||||
6.00 6.0 0 1 2 3 /
|
||||
7.00 7.0 0 10 20 30 /
|
||||
8.00 8.0 0 100 200 300 /
|
||||
/
|
||||
3.00 4.0 0 1 2 3 /
|
||||
4.00 4.0 0 10 20 30 /
|
||||
5.00 5.0 0 100 200 300 /
|
||||
/
|
||||
|
||||
Reference in New Issue
Block a user